Fix punycode deprecation warning (#7426)

This commit is contained in:
MeiMei 2021-04-04 13:00:39 +09:00 committed by GitHub
parent 1f4ae2f63a
commit 7d2126e2b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 20 additions and 14 deletions

View file

@ -88,6 +88,7 @@
"@types/parsimmon": "1.10.6",
"@types/portscanner": "2.1.0",
"@types/pug": "2.0.4",
"@types/punycode": "2.1.0",
"@types/qrcode": "1.4.0",
"@types/random-seed": "0.3.3",
"@types/ratelimiter": "3.4.1",

View file

@ -7,7 +7,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { host } from '@client/config';
export default defineComponent({

View file

@ -22,7 +22,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
import { toUnicode as decodePunycode } from 'punycode';
import { toUnicode as decodePunycode } from 'punycode/';
import { url as local } from '@client/config';
import { isDeviceTouch } from '@client/scripts/is-device-touch';
import * as os from '@client/os';

View file

@ -16,7 +16,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { host as localHost } from '@client/config';
import { wellKnownServices } from '../../well-known-services';
import * as os from '@client/os';

View file

@ -56,7 +56,7 @@ import { faReply, faQuoteRight, faPaperPlane, faTimes, faUpload, faPollH, faGlob
import { faEyeSlash, faLaughSquint } from '@fortawesome/free-regular-svg-icons';
import insertTextAtCursor from 'insert-text-at-cursor';
import { length } from 'stringz';
import { toASCII } from 'punycode';
import { toASCII } from 'punycode/';
import XNotePreview from './note-preview.vue';
import * as mfm from 'mfm-js';
import { host, url } from '@client/config';

View file

@ -48,7 +48,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { faLock, faGavel } from '@fortawesome/free-solid-svg-icons';
import { faTwitter, faDiscord, faGithub } from '@fortawesome/free-brands-svg-icons';
import MkButton from './ui/button.vue';

View file

@ -55,7 +55,7 @@
import { defineComponent, defineAsyncComponent } from 'vue';
import { faLock, faExclamationTriangle, faSpinner, faCheck, faKey } from '@fortawesome/free-solid-svg-icons';
const getPasswordStrength = require('syuilo-password-strength');
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { host, url } from '@client/config';
import MkButton from './ui/button.vue';
import MkInput from './ui/input.vue';

View file

@ -94,7 +94,7 @@
import { defineComponent } from 'vue';
import { faPalette, faChevronDown, faKeyboard } from '@fortawesome/free-solid-svg-icons';
import * as JSON5 from 'json5';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import MkRadio from '@client/components/ui/radio.vue';
import MkButton from '@client/components/ui/button.vue';

View file

@ -52,7 +52,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { faPalette, faSave, faEye, faCode } from '@fortawesome/free-solid-svg-icons';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import * as tinycolor from 'tinycolor2';
import { v4 as uuid} from 'uuid';
import * as JSON5 from 'json5';

View file

@ -53,7 +53,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { faEllipsisH, faInfoCircle, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import XSigninDialog from '@client/components/signin-dialog.vue';
import XSignupDialog from '@client/components/signup-dialog.vue';
import MkButton from '@client/components/ui/button.vue';

View file

@ -37,7 +37,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { faEllipsisH, faInfoCircle, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import XSigninDialog from '@client/components/signin-dialog.vue';
import XSignupDialog from '@client/components/signup-dialog.vue';
import MkButton from '@client/components/ui/button.vue';

View file

@ -57,7 +57,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { faEllipsisH, faInfoCircle, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import XSigninDialog from '@client/components/signin-dialog.vue';
import XSignupDialog from '@client/components/signup-dialog.vue';
import MkButton from '@client/components/ui/button.vue';

View file

@ -1,6 +1,6 @@
import { Ref, ref } from 'vue';
import * as getCaretCoordinates from 'textarea-caret';
import { toASCII } from 'punycode';
import { toASCII } from 'punycode/';
import { popup } from '@client/os';
export class Autocomplete {

View file

@ -52,7 +52,7 @@ import { faReply, faQuoteRight, faPaperPlane, faTimes, faUpload, faPollH, faGlob
import { faEyeSlash, faLaughSquint } from '@fortawesome/free-regular-svg-icons';
import insertTextAtCursor from 'insert-text-at-cursor';
import { length } from 'stringz';
import { toASCII } from 'punycode';
import { toASCII } from 'punycode/';
import * as mfm from 'mfm-js';
import { host, url } from '@client/config';
import { erase, unique } from '../../../prelude/array';

View file

@ -1,6 +1,6 @@
import { URL } from 'url';
import config from '@/config';
import { toASCII } from 'punycode';
import { toASCII } from 'punycode/';
export function getFullApAccount(username: string, host: string | null) {
return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`;

View file

@ -917,6 +917,11 @@
resolved "https://registry.yarnpkg.com/@types/pug/-/pug-2.0.4.tgz#8772fcd0418e3cd2cc171555d73007415051f4b2"
integrity sha1-h3L80EGOPNLMFxVV1zAHQVBR9LI=
"@types/punycode@2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/punycode/-/punycode-2.1.0.tgz#89e4f3d09b3f92e87a80505af19be7e0c31d4e83"
integrity sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g==
"@types/q@^1.5.1":
version "1.5.2"
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"