From 014b58cb4098c31c1d0d8d2ad521e48368491d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 22:21:36 +0900 Subject: [PATCH 01/17] Create new type definition for 'is-url' (#4013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create new type definition for 'is-url' * [Client] Resolve #3638 * 10.79.1 * New translations ja-JP.yml (Korean) * Add missing semicolon * Remove file-loader from dependencies (#4025) * Update README.md [AUTOGEN] (#4028) * Update README.md [AUTOGEN] (#4030) * Add visibility test (#4029) * Update ws requirement from 6.1.2 to 6.1.3 (#4027) Updates the requirements on [ws](https://github.com/websockets/ws) to permit the latest version. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/commits/6.1.3) Signed-off-by: dependabot[bot] * Module 'web-push' as import syntax (#4017) * Fix visibility test (#4031) * Upgrade gulp version to 4.0.0 * Prevent typescript errors from crashing * Remove duplicated dependencies * Use parallel and task to specify dependencies * Sort tasks by topological ordering * リプライ/メンションされていれば非フォロワーへのフォロワー限定でも参照可能に (#4033) * 非メンション/リプライ投稿がmentionsにあるかどうかはvisibilityと関係ないので削除 * リプライ/メンションされていれば非フォロワーでも参照可能に * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Chinese Simplified) * Fix #4034 (#4037) * Fix #4034 * improve * Module 'crypto' as import syntax (#4011) * Extract MFM normalize function * Extract MFM types * Rename html to toHtml * Rename html-to-mfm to fromHtml * Merge plainParser into mfm * Extract parsePlain function * Rename analyze to parse in MFM tests * Update @types/mongodb requirement from 3.1.18 to 3.1.19 (#4041) Updates the requirements on [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] * Update vue-svg-inline-loader requirement from 1.2.7 to 1.2.10 (#4040) Updates the requirements on [vue-svg-inline-loader](https://github.com/oliverfindl/vue-svg-inline-loader) to permit the latest version. - [Release notes](https://github.com/oliverfindl/vue-svg-inline-loader/releases) - [Commits](https://github.com/oliverfindl/vue-svg-inline-loader/commits/v1.2.10) Signed-off-by: dependabot[bot] * Avoid export default * Rename parser to language * Fix import * Introduce silence (#4043) * Introduce silence * Fix icon * delete unnecessary key (#4045) * delete unnecessary key * Add note * Update CHANGELOG.md * [ActivityPub] Use microformats on mentions To avoid pointless link previews. see: https://misskey.xyz/notes/5c51ab5c2d85f2003248eddc * Create type definition for '*/package.json' (#4014) * Create type definition for '*/package.json' * Update tsconfig.json * Update index.ts * Create type definition for 'is-root' (#4001) * Update @types/sharp requirement from 0.21.0 to 0.21.1 Updates the requirements on [@types/sharp](https://github.com/DefinitelyTyped/DefinitelyTyped) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] * Add multiline math syntax Co-authored-by: syuilo * New translations ja-JP.yml (Catalan) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (English) * New translations ja-JP.yml (French) * New translations ja-JP.yml (German) * New translations ja-JP.yml (Italian) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (Polish) * New translations ja-JP.yml (Portuguese) * New translations ja-JP.yml (Russian) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (Japanese, Kansai) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Norwegian) * New translations ja-JP.yml (English) * Create type definition for 'is-root' * [MFM] Add spin syntax Resolve #4003 * [MFM] Add flip syntax Resolve #4002 * Fix test * Update CHANGELOG.md * 10.79.0 * Update @fortawesome/free-regular-svg-icons requirement (#3963) Updates the requirements on [@fortawesome/free-regular-svg-icons](https://github.com/FortAwesome/Font-Awesome) to permit the latest version. - [Release notes](https://github.com/FortAwesome/Font-Awesome/releases) - [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/Font-Awesome/commits/5.6.3) Signed-off-by: dependabot[bot] * Update @types/webpack requirement from 4.4.21 to 4.4.24 (#3976) Updates the requirements on [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] * Update @types/js-yaml requirement from 3.11.4 to 3.12.0 (#3977) Updates the requirements on [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] * Update debug requirement from 4.1.0 to 4.1.1 (#3964) Updates the requirements on [debug](https://github.com/visionmedia/debug) to permit the latest version. - [Release notes](https://github.com/visionmedia/debug/releases) - [Commits](https://github.com/visionmedia/debug/commits/4.1.1) Signed-off-by: dependabot[bot] * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (French) * [MFM] spinの中でflipを使えるように * Add jump syntax (#4007) * Add jump syntax * Fix typo: spin -> jump * Fix typo * [MFM] Resolve #4009 * Module 'nprogress' as import syntax (#4012) * :art: * [Client] Fix #4008 * Use yarn instead of npm on CircleCI * touch yarn.lock * [Client] Resolve #3638 * 10.79.1 * New translations ja-JP.yml (Korean) * Add missing semicolon * Remove file-loader from dependencies (#4025) * Update README.md [AUTOGEN] (#4028) * Update README.md [AUTOGEN] (#4030) * Add visibility test (#4029) * Update ws requirement from 6.1.2 to 6.1.3 (#4027) Updates the requirements on [ws](https://github.com/websockets/ws) to permit the latest version. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/commits/6.1.3) Signed-off-by: dependabot[bot] * Module 'web-push' as import syntax (#4017) * Fix visibility test (#4031) * Upgrade gulp version to 4.0.0 * Prevent typescript errors from crashing * Remove duplicated dependencies * Use parallel and task to specify dependencies * Sort tasks by topological ordering * リプライ/メンションされていれば非フォロワーへのフォロワー限定でも参照可能に (#4033) * 非メンション/リプライ投稿がmentionsにあるかどうかはvisibilityと関係ないので削除 * リプライ/メンションされていれば非フォロワーでも参照可能に * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Chinese Simplified) * Fix #4034 (#4037) * Fix #4034 * improve * Module 'crypto' as import syntax (#4011) * Extract MFM normalize function * Extract MFM types * Rename html to toHtml * Rename html-to-mfm to fromHtml * Merge plainParser into mfm * Extract parsePlain function * Rename analyze to parse in MFM tests * Update @types/mongodb requirement from 3.1.18 to 3.1.19 (#4041) Updates the requirements on [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] * Update vue-svg-inline-loader requirement from 1.2.7 to 1.2.10 (#4040) Updates the requirements on [vue-svg-inline-loader](https://github.com/oliverfindl/vue-svg-inline-loader) to permit the latest version. - [Release notes](https://github.com/oliverfindl/vue-svg-inline-loader/releases) - [Commits](https://github.com/oliverfindl/vue-svg-inline-loader/commits/v1.2.10) Signed-off-by: dependabot[bot] * Avoid export default * Rename parser to language * Fix import * Introduce silence (#4043) * Introduce silence * Fix icon * Update is-root.d.ts * Update index.ts * Create type definition for 'is-root' * Update is-root.d.ts * Update index.ts * Fix path refs: 7e3a8d56e614a1771015b6b2557fea8127c46aeb * Re-fix path refs: 4bb4903ee513bacf79d475e100019bd3058d9b34, 7e3a8d56e614a1771015b6b2557fea8127c46aeb * Do not import as pack from AP renderer (#4048) * Do not import as pack from AP renderer * rename * Simplify MFM (#4046) * [MFM] Make some syntax block Resolve #3508 * [MFM] Better syntax parsing Allow nesting by same tag * [Client] MFMの制限を緩和 * :art: * Update CHANGELOG.md * 10.80.0 * Update is-url.d.ts --- package.json | 1 - src/@types/is-url.d.ts | 7 +++++++ src/config/load.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 src/@types/is-url.d.ts diff --git a/package.json b/package.json index e4969ade31..8eb1cf9657 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "@types/gulp-util": "3.0.34", "@types/is-root": "1.0.0", "@types/is-svg": "3.0.0", - "@types/is-url": "1.2.28", "@types/js-yaml": "3.12.0", "@types/katex": "0.5.0", "@types/koa": "2.0.48", diff --git a/src/@types/is-url.d.ts b/src/@types/is-url.d.ts new file mode 100644 index 0000000000..c1ccadd498 --- /dev/null +++ b/src/@types/is-url.d.ts @@ -0,0 +1,7 @@ +declare module 'is-url' { + function isUrl(string: string): boolean; + + namespace isUrl {} // Hack + + export = isUrl; +} diff --git a/src/config/load.ts b/src/config/load.ts index ba8b4af3ce..57cfb8075c 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -6,7 +6,7 @@ import * as fs from 'fs'; import { URL } from 'url'; import * as yaml from 'js-yaml'; import { Source, Mixin } from './types'; -import isUrl = require('is-url'); +import * as isUrl from 'is-url'; import * as pkg from '../../package.json'; /** From ceda3dd72a5b4ebe01500d0a5e76a58699c878bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 22:21:47 +0900 Subject: [PATCH 02/17] Create new type definition for 'escape-regexp' (#4058) --- src/@types/escape-regexp.d.ts | 7 +++++++ src/server/api/endpoints/hashtags/search.ts | 2 +- src/server/api/endpoints/users/search.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/@types/escape-regexp.d.ts diff --git a/src/@types/escape-regexp.d.ts b/src/@types/escape-regexp.d.ts new file mode 100644 index 0000000000..d68e6048a1 --- /dev/null +++ b/src/@types/escape-regexp.d.ts @@ -0,0 +1,7 @@ +declare module 'escape-regexp' { + function escapeRegExp(str: string): string; + + namespace escapeRegExp {} // Hack + + export = escapeRegExp; +} diff --git a/src/server/api/endpoints/hashtags/search.ts b/src/server/api/endpoints/hashtags/search.ts index 4d753808d4..d8a2156357 100644 --- a/src/server/api/endpoints/hashtags/search.ts +++ b/src/server/api/endpoints/hashtags/search.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import Hashtag from '../../../../models/hashtag'; import define from '../../define'; -const escapeRegexp = require('escape-regexp'); +import * as escapeRegexp from 'escape-regexp'; export const meta = { desc: { diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index 86b16dcbb1..b0a789c7d5 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -1,5 +1,5 @@ import $ from 'cafy'; -const escapeRegexp = require('escape-regexp'); +import * as escapeRegexp from 'escape-regexp'; import User, { pack, validateUsername, IUser } from '../../../../models/user'; import define from '../../define'; From ce576dea8fe3356e919723f71d7ea09d378f3bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 22:21:55 +0900 Subject: [PATCH 03/17] Create type definition for 'recaptcha-promise' (#4068) --- src/@types/recaptcha-promise.d.ts | 16 ++++++++++++++++ src/server/api/private/signup.ts | 3 +-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/@types/recaptcha-promise.d.ts diff --git a/src/@types/recaptcha-promise.d.ts b/src/@types/recaptcha-promise.d.ts new file mode 100644 index 0000000000..cfbd5eebf2 --- /dev/null +++ b/src/@types/recaptcha-promise.d.ts @@ -0,0 +1,16 @@ +declare module 'recaptcha-promise' { + interface IVerifyOptions { + secret_key?: string; + } + + interface IVerify { + (response: string, remoteAddress?: string): Promise; + init(options: IVerifyOptions): IVerify; + } + + namespace recaptchaPromise {} // Hack + + const verify: IVerify; + + export = verify; +} diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index b89629bcd1..6318eabdb8 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -8,14 +8,13 @@ import Meta from '../../../models/meta'; import RegistrationTicket from '../../../models/registration-tickets'; import usersChart from '../../../chart/users'; import fetchMeta from '../../../misc/fetch-meta'; +import * as recaptcha from 'recaptcha-promise'; export default async (ctx: Koa.BaseContext) => { const body = ctx.request.body as any; const instance = await fetchMeta(); - const recaptcha = require('recaptcha-promise'); - // Verify recaptcha // ただしテスト時はこの機構は障害となるため無効にする if (process.env.NODE_ENV !== 'test' && instance.enableRecaptcha) { From 5049870b6e2e8371509ac4984cc4f74674245d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 23:01:03 +0900 Subject: [PATCH 04/17] Create type definition for 'koa-slow' (#4072) --- src/@types/koa-slow.d.ts | 14 ++++++++++++++ src/server/index.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/@types/koa-slow.d.ts diff --git a/src/@types/koa-slow.d.ts b/src/@types/koa-slow.d.ts new file mode 100644 index 0000000000..bca6a8490b --- /dev/null +++ b/src/@types/koa-slow.d.ts @@ -0,0 +1,14 @@ +declare module 'koa-slow' { + import { Middleware } from 'koa'; + + interface ISlowOptions { + url?: RegExp + delay?: number + } + + function slow(options?: ISlowOptions): Middleware; + + namespace slow {} // Hack + + export = slow; +} diff --git a/src/server/index.ts b/src/server/index.ts index 57f1326f2f..be0a6f5c77 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -13,7 +13,7 @@ import * as mount from 'koa-mount'; import * as compress from 'koa-compress'; import * as koaLogger from 'koa-logger'; import * as requestStats from 'request-stats'; -//const slow = require('koa-slow'); +//import * as slow from 'koa-slow'; import activityPub from './activitypub'; import webFinger from './webfinger'; From fe13c17fcba8f3507e58adfaac181f77a63518ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 23:41:05 +0900 Subject: [PATCH 05/17] Create type definition for 'langmap' (#4059) * Create type definition for 'langmap' * Follow lint --- src/@types/langmap.d.ts | 10 ++++++++++ src/server/api/endpoints/i/update.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/@types/langmap.d.ts diff --git a/src/@types/langmap.d.ts b/src/@types/langmap.d.ts new file mode 100644 index 0000000000..a0f99028ab --- /dev/null +++ b/src/@types/langmap.d.ts @@ -0,0 +1,10 @@ +declare module 'langmap' { + type Lang = { + nativeName: string; + englishName: string; + }; + + const langmap: { [lang: string]: Lang }; + + export = langmap; +} diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 4b02e393bf..d087687a51 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -9,7 +9,7 @@ import getDriveFileUrl from '../../../../misc/get-drive-file-url'; import { parse, parsePlain } from '../../../../mfm/parse'; import extractEmojis from '../../../../misc/extract-emojis'; import extractHashtags from '../../../../misc/extract-hashtags'; -const langmap = require('langmap'); +import * as langmap from 'langmap'; export const meta = { desc: { From 893a3b527dbb4364ef20b38efbd0d50df27e89b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 23:41:27 +0900 Subject: [PATCH 06/17] Create type definition for 'os-utils' (#4050) --- src/@types/os-utils.d.ts | 30 ++++++++++++++++++++++++++++++ src/daemons/server-stats.ts | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/@types/os-utils.d.ts diff --git a/src/@types/os-utils.d.ts b/src/@types/os-utils.d.ts new file mode 100644 index 0000000000..390df17d39 --- /dev/null +++ b/src/@types/os-utils.d.ts @@ -0,0 +1,30 @@ +declare module 'os-utils' { + type FreeCommandCallback = (usedmem: number) => void; + + type HarddriveCallback = (total: number, free: number, used: number) => void; + + type GetProcessesCallback = (result: string) => void; + + type CPUCallback = (perc: number) => void; + + export function platform(): NodeJS.Platform; + export function cpuCount(): number; + export function sysUptime(): number; + export function processUptime(): number; + + export function freemem(): number; + export function totalmem(): number; + export function freememPercentage(): number; + export function freeCommand(callback: FreeCommandCallback): void; + + export function harddrive(callback: HarddriveCallback): void; + + export function getProcesses(callback: GetProcessesCallback): void; + export function getProcesses(nProcess: number, callback: GetProcessesCallback): void; + + export function allLoadavg(): string; + export function loadavg(_time?: number): number; + + export function cpuFree(callback: CPUCallback): void; + export function cpuUsage(callback: CPUCallback): void; +} diff --git a/src/daemons/server-stats.ts b/src/daemons/server-stats.ts index 6028277b25..b82f421779 100644 --- a/src/daemons/server-stats.ts +++ b/src/daemons/server-stats.ts @@ -3,7 +3,7 @@ import * as sysUtils from 'systeminformation'; import * as diskusage from 'diskusage'; import * as Deque from 'double-ended-queue'; import Xev from 'xev'; -const osUtils = require('os-utils'); +import * as osUtils from 'os-utils'; const ev = new Xev(); From 6e0c055fafca940f13893123fe2303394d48f498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 3 Feb 2019 23:49:00 +0900 Subject: [PATCH 07/17] Module 'jsdom' as import syntax (#4016) --- package.json | 1 + src/mfm/toHtml.ts | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8eb1cf9657..b480519f99 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "@types/is-root": "1.0.0", "@types/is-svg": "3.0.0", "@types/js-yaml": "3.12.0", + "@types/jsdom": "12.2.1", "@types/katex": "0.5.0", "@types/koa": "2.0.48", "@types/koa-bodyparser": "5.0.2", diff --git a/src/mfm/toHtml.ts b/src/mfm/toHtml.ts index 85e8c8a7fe..e67ccc5035 100644 --- a/src/mfm/toHtml.ts +++ b/src/mfm/toHtml.ts @@ -1,5 +1,4 @@ -const jsdom = require('jsdom'); -const { JSDOM } = jsdom; +import { JSDOM } from 'jsdom'; import config from '../config'; import { INote } from '../models/note'; import { intersperse } from '../prelude/array'; @@ -158,9 +157,9 @@ export function toHtml(tokens: MfmForest, mentionedRemoteUsers: INote['mentioned text(token) { const el = doc.createElement('span'); - const nodes = (token.node.props.text as string).split(/\r\n|\r|\n/).map(x => doc.createTextNode(x)); + const nodes = (token.node.props.text as string).split(/\r\n|\r|\n/).map(x => doc.createTextNode(x) as Node); - for (const x of intersperse('br', nodes)) { + for (const x of intersperse('br', nodes)) { el.appendChild(x === 'br' ? doc.createElement('br') : x); } From 8f2f4b6d2d64dd83643f958bb5863f40aa563e6a Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 3 Feb 2019 23:52:46 +0900 Subject: [PATCH 08/17] Add missing semicolons --- src/@types/deepcopy.d.ts | 2 +- src/@types/koa-slow.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/@types/deepcopy.d.ts b/src/@types/deepcopy.d.ts index afeee51913..3eb08d5772 100644 --- a/src/@types/deepcopy.d.ts +++ b/src/@types/deepcopy.d.ts @@ -8,7 +8,7 @@ declare namespace deepcopy { valueType: DeepcopyCustomizerValueType) => T; interface DeepcopyOptions { - customizer: DeepcopyCustomizer + customizer: DeepcopyCustomizer; } export function deepcopy( diff --git a/src/@types/koa-slow.d.ts b/src/@types/koa-slow.d.ts index bca6a8490b..a7908d8607 100644 --- a/src/@types/koa-slow.d.ts +++ b/src/@types/koa-slow.d.ts @@ -2,13 +2,13 @@ declare module 'koa-slow' { import { Middleware } from 'koa'; interface ISlowOptions { - url?: RegExp - delay?: number + url?: RegExp; + delay?: number; } function slow(options?: ISlowOptions): Middleware; - namespace slow {} // Hack + namespace slow { } // Hack export = slow; } From 1b0e03704e078f8d7310d9496c35c39072852f9a Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Feb 2019 01:13:39 +0900 Subject: [PATCH 09/17] New translations ja-JP.yml (Polish) (#4115) --- locales/pl-PL.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index ea549dfd67..1880168781 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -472,7 +472,7 @@ common/views/components/visibility-chooser.vue: local-followers: "Dla śledzących (tylko lokalnie)" common/views/components/trends.vue: count: "{}人が投稿" - empty: "トレンドなし" + empty: "Brak popularnych hashtagów" common/views/components/language-settings.vue: title: "Język" pick-language: "Wybierz język" From 206b57b9628bb414d1915ade3c254447f42c7da8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Feb 2019 01:22:37 +0900 Subject: [PATCH 10/17] New translations ja-JP.yml (Polish) (#4116) --- locales/pl-PL.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index 1880168781..6e101cb046 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -395,11 +395,11 @@ common/views/components/signin.vue: token: "Token" signing-in: "Logowanie…" signin: "Zaloguj" - or: "または" + or: "lub" signin-with-twitter: "Zaloguj się za pomocą Twittera" signin-with-github: "Zaloguj się za pomocą GitHuba" signin-with-discord: "Zaloguj się za pomocą Discorda" - login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。" + login-failed: "Logowanie nie powiodło się. Upewnij się, że podałeś prawidłową nazwę użytkownika i hasło." common/views/components/signup.vue: invitation-code: "Kod zaproszenia" invitation-info: "招待コードをお持ちでない方は、管理者までご連絡ください。" @@ -478,7 +478,7 @@ common/views/components/language-settings.vue: pick-language: "Wybierz język" recommended: "Zalecane" auto: "Automatyczny" - specify-language: "言語を指定" + specify-language: "Wybierz język" info: "Musisz odświeżyć stronę, aby zmiany zostały uwzględnione." common/views/components/profile-editor.vue: title: "Twój profil" @@ -504,15 +504,15 @@ common/views/components/profile-editor.vue: upload-failed: "Wysyłanie nie powiodło się" email: "Ustawienia e-mail" email-address: "Adres e-mail" - email-verified: "メールアドレスが確認されました" + email-verified: "Twój adres e-mail został zweryfikowany." email-not-verified: "メールアドレスが確認されていません。メールボックスをご確認ください。" common/views/components/user-list-editor.vue: users: "Użytkownicy" rename: "Zmień nazwę listy" delete: "Usuń listę" remove-user: "Usuń z tej listy" - delete-are-you-sure: "リスト「$1」を削除しますか?" - deleted: "削除しました" + delete-are-you-sure: "Usunąć listę \"$1\"?" + deleted: "Usunięto" common/views/widgets/broadcast.vue: fetching: "Sprawdzanie" no-broadcasts: "Brak transmisji" @@ -595,7 +595,7 @@ desktop/views/components/activity.vue: title: "Aktywność" toggle: "Przełącz widok" desktop/views/components/calendar.vue: - title: "{year}年 {month}月" + title: "{year} / {month}" prev: "Poprzedni miesiąc" next: "Następny miesiąc" go: "Naciśnij, aby przejść" @@ -706,7 +706,7 @@ desktop/views/components/note.vue: add-reaction: "Dodaj reakcję" undo-reaction: "リアクション解除" detail: "Szczegóły" - private: "この投稿は非公開です" + private: "Ten wpis jest prywatny" deleted: "この投稿は削除されました" desktop/views/components/notes.vue: error: "Ładowanie nie powiodło się." From c4f74913225cc92d4285b6da0182b0daf62ca404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Mon, 4 Feb 2019 01:30:33 +0900 Subject: [PATCH 11/17] Revert "Create new type definition for 'is-url' (#4013)" This reverts commit 014b58cb4098c31c1d0d8d2ad521e48368491d07. --- package.json | 1 + src/@types/is-url.d.ts | 7 ------- src/config/load.ts | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 src/@types/is-url.d.ts diff --git a/package.json b/package.json index b480519f99..ad24a1ef19 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@types/gulp-util": "3.0.34", "@types/is-root": "1.0.0", "@types/is-svg": "3.0.0", + "@types/is-url": "1.2.28", "@types/js-yaml": "3.12.0", "@types/jsdom": "12.2.1", "@types/katex": "0.5.0", diff --git a/src/@types/is-url.d.ts b/src/@types/is-url.d.ts deleted file mode 100644 index c1ccadd498..0000000000 --- a/src/@types/is-url.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module 'is-url' { - function isUrl(string: string): boolean; - - namespace isUrl {} // Hack - - export = isUrl; -} diff --git a/src/config/load.ts b/src/config/load.ts index 57cfb8075c..ba8b4af3ce 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -6,7 +6,7 @@ import * as fs from 'fs'; import { URL } from 'url'; import * as yaml from 'js-yaml'; import { Source, Mixin } from './types'; -import * as isUrl from 'is-url'; +import isUrl = require('is-url'); import * as pkg from '../../package.json'; /** From 5891135ac17aa94bd9c20bf84d5afc1b6290fbec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Mon, 4 Feb 2019 01:46:59 +0900 Subject: [PATCH 12/17] Create type definition for ./locales (#4117) --- locales/index.d.ts | 5 +++++ src/server/web/docs.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 locales/index.d.ts diff --git a/locales/index.d.ts b/locales/index.d.ts new file mode 100644 index 0000000000..4a9672c63f --- /dev/null +++ b/locales/index.d.ts @@ -0,0 +1,5 @@ +type Locale = { [key: string]: string }; + +declare const locales: { [lang: string]: Locale }; + +export default locales; diff --git a/src/server/web/docs.ts b/src/server/web/docs.ts index f823c308c2..1455abae78 100644 --- a/src/server/web/docs.ts +++ b/src/server/web/docs.ts @@ -16,7 +16,7 @@ import config from '../../config'; import { licenseHtml } from '../../misc/license'; const constants = require('../../const.json'); import endpoints from '../api/endpoints'; -const locales = require('../../../locales'); +import locales from '../../../locales'; import * as nestedProperty from 'nested-property'; function getLang(lang: string): string { From 99d8d0a484eca8901ea6f1d556d51411ddfd9209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Mon, 4 Feb 2019 01:47:12 +0900 Subject: [PATCH 13/17] Create type definition for '*/const.json' (#4118) --- src/@types/const.json.d.ts | 3 +++ src/server/web/docs.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 src/@types/const.json.d.ts diff --git a/src/@types/const.json.d.ts b/src/@types/const.json.d.ts new file mode 100644 index 0000000000..40a96f2a2a --- /dev/null +++ b/src/@types/const.json.d.ts @@ -0,0 +1,3 @@ +declare module '*/const.json' { + const copyright: string; +} diff --git a/src/server/web/docs.ts b/src/server/web/docs.ts index 1455abae78..0597f50a9c 100644 --- a/src/server/web/docs.ts +++ b/src/server/web/docs.ts @@ -14,7 +14,7 @@ import * as glob from 'glob'; import * as yaml from 'js-yaml'; import config from '../../config'; import { licenseHtml } from '../../misc/license'; -const constants = require('../../const.json'); +import { copyright } from '../../const.json'; import endpoints from '../api/endpoints'; import locales from '../../../locales'; import * as nestedProperty from 'nested-property'; @@ -59,7 +59,7 @@ async function genVars(lang: string): Promise<{ [key: string]: any }> { vars['config'] = config; - vars['copyright'] = constants.copyright; + vars['copyright'] = copyright; vars['license'] = licenseHtml; From ba1b5a8ede123bbe4243aa3df0dde5d212d5a285 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Feb 2019 01:51:01 +0900 Subject: [PATCH 14/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a05fbe657b..8b89c01ac3 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Please see the [Contribution Guide](./CONTRIBUTING.md). -:heart: Backers & Sponsors +:heart: Backers ---------------------------------------------------------------- From beb1b570d4a93e39b2ebfc77b25b5f09258f504d Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Feb 2019 01:52:39 +0900 Subject: [PATCH 15/17] New translations ja-JP.yml (Polish) (#4119) --- locales/pl-PL.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index 6e101cb046..d32d2ea59c 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -356,7 +356,7 @@ common/views/components/user-menu.vue: block: "Zablokuj" unblock: "Odblokuj" push-to-list: "Dodaj do listy" - select-list: "リストを選択してください" + select-list: "Wybierz listę" report-abuse: "Zgłoś nadużycie" report-abuse-detail: "どのような迷惑行為を行っていますか?" report-abuse-reported: "管理者に報告されました。ご協力ありがとうございました。" @@ -1011,7 +1011,7 @@ admin/views/abuse.vue: target: "対象" reporter: "報告者" details: "詳細" - remove-report: "削除" + remove-report: "Usuń" admin/views/instance.vue: instance: "インスタンス" instance-name: "インスタンス名" From 42d6ed62f6bda8ee58c41f46e8015cef61978f9e Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Feb 2019 07:01:19 +0900 Subject: [PATCH 16/17] New translations ja-JP.yml (English) (#4120) --- locales/en-US.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 4b3bb98611..f94e6b4785 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -360,8 +360,8 @@ common/views/components/user-menu.vue: report-abuse: "Report abuse" report-abuse-detail: "What kind of nuisance did you encounter?" report-abuse-reported: "The issue has been reported to the administrator. Your cooperation is much appreciated." - silence: "Make Silence" - unsilence: "Unsilence" + silence: "Mute" + unsilence: "Unmute" suspend: "Suspend" unsuspend: "Unsuspend" common/views/components/poll.vue: @@ -1147,8 +1147,8 @@ admin/views/users.vue: unsuspend: "Unsuspend" unsuspend-confirm: "Are you sure you want to unsuspend this account?" unsuspended: "The user has successfully unsuspended." - make-silence: "Make Silence" - unmake-silence: "Unmake Silence" + make-silence: "Mute" + unmake-silence: "Unmute" verify: "Verify account" verify-confirm: "Do you want this to be a verified account?" verified: "The account is now being verified" From 9950b6fbc6c5e880896fdfa04b97cf1813477a63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Feb 2019 07:16:01 +0900 Subject: [PATCH 17/17] Update tslint-sonarts requirement from 1.8.0 to 1.9.0 (#3978) Updates the requirements on [tslint-sonarts](https://github.com/SonarSource/SonarTS) to permit the latest version. - [Release notes](https://github.com/SonarSource/SonarTS/releases) - [Commits](https://github.com/SonarSource/SonarTS/commits/v1.9.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad24a1ef19..53cdbdb433 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,7 @@ "ts-loader": "5.3.3", "ts-node": "7.0.1", "tslint": "5.12.0", - "tslint-sonarts": "1.8.0", + "tslint-sonarts": "1.9.0", "typescript": "3.2.4", "typescript-eslint-parser": "21.0.2", "uglify-es": "3.3.9",