From 29f6ba6310e162d6e24c9075ddd6176c155a10e7 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:37:18 +0900 Subject: [PATCH] chore: add missing SPDX ID and workflow check (#13570) * chore: add workflow which checks if SPDX ID exists * chore: add missing SPDX ID in some files * chore: change trigger condition * chore: trigger on push * lint --- .github/workflows/check-spdx-license-id.yml | 75 +++++++++++++++++++ cypress/e2e/basic.cy.js | 5 ++ cypress/e2e/router.cy.js | 5 ++ cypress/e2e/widgets.cy.js | 5 ++ packages/backend/generate_api_json.js | 7 +- .../1689325027964-UserBlacklistAnntena.js | 5 ++ .../1690417561185-fix-renote-muting.js | 5 ++ ...417561186-ChangeCacheRemoteFilesDefault.js | 5 ++ .../backend/migration/1690417561187-Fix.js | 5 ++ .../1690569881926-user-2fa-backup-codes.js | 5 ++ .../1691649257651-refine-announcement.js | 5 ++ .../1691657412740-refine-announcement-2.js | 5 ++ .../migration/1695260774117-verified-links.js | 5 ++ .../1695288787870-following-notify.js | 5 ++ .../migration/1695440131671-short-name.js | 5 ++ .../1695605508898-mutingNotificationTypes.js | 5 ++ .../1695901659683-note-updated-at.js | 5 ++ .../1696323464251-user-list-membership.js | 5 ++ .../migration/1696331570827-hibernation.js | 5 ++ .../backend/migration/1696332072038-clean.js | 5 ++ .../migration/1700383825690-hard-mute.js | 5 ++ .../src/core/ChannelFollowingService.ts | 5 ++ .../backend/src/misc/fastify-hook-handlers.ts | 5 ++ packages/backend/src/misc/is-pure-renote.ts | 5 ++ packages/backend/src/misc/loader.ts | 5 ++ packages/backend/src/models/ReversiGame.ts | 5 ++ .../backend/src/models/json-schema/signin.ts | 5 ++ packages/backend/test/jest.setup.ts | 5 ++ packages/backend/test/unit/ApMfmService.ts | 5 ++ packages/backend/test/unit/misc/loader.ts | 5 ++ .../frontend/.storybook/preview-head.html | 5 ++ .../frontend/src/components/global/I18n.vue | 5 ++ packages/frontend/src/filters/kmg.ts | 5 ++ .../src/scripts/check-reaction-permissions.ts | 5 ++ packages/frontend/src/scripts/clear-cache.ts | 5 ++ .../frontend/src/scripts/code-highlighter.ts | 5 ++ .../frontend/src/scripts/media-has-audio.ts | 5 ++ packages/frontend/src/type.ts | 5 ++ scripts/changelog-checker/src/checker.ts | 5 ++ scripts/changelog-checker/src/index.ts | 5 ++ scripts/changelog-checker/src/parser.ts | 5 ++ .../changelog-checker/test/checker.test.ts | 7 +- scripts/tarball.mjs | 5 ++ 43 files changed, 287 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-spdx-license-id.yml diff --git a/.github/workflows/check-spdx-license-id.yml b/.github/workflows/check-spdx-license-id.yml new file mode 100644 index 0000000000..6cd8bf60d5 --- /dev/null +++ b/.github/workflows/check-spdx-license-id.yml @@ -0,0 +1,75 @@ +name: Check SPDX-License-Identifier + +on: + push: + branches: + - master + - develop + pull_request: + +jobs: + check-spdx-license-id: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Check + run: | + counter=0 + + search() { + local directory="$1" + find "$directory" -type f \ + '(' \ + -name "*.cjs" -and -not -name '*.config.cjs' -o \ + -name "*.html" -o \ + -name "*.js" -and -not -name '*.config.js' -o \ + -name "*.mjs" -and -not -name '*.config.mjs' -o \ + -name "*.scss" -o \ + -name "*.ts" -and -not -name '*.config.ts' -o \ + -name "*.vue" \ + ')' -and \ + -not -name '*eslint*' + } + + check() { + local file="$1" + if ! ( + grep -q "SPDX-FileCopyrightText: syuilo and misskey-project" "$file" || + grep -q "SPDX-License-Identifier: AGPL-3.0-only" "$file" + ); then + echo "Missing: $file" + ((counter++)) + fi + } + + directories=( + "cypress/e2e" + "packages/backend/migration" + "packages/backend/src" + "packages/backend/test" + "packages/frontend/.storybook" + "packages/frontend/@types" + "packages/frontend/lib" + "packages/frontend/public" + "packages/frontend/src" + "packages/frontend/test" + "packages/misskey-bubble-game/src" + "packages/misskey-reversi/src" + "packages/sw/src" + "scripts" + ) + + for directory in "${directories[@]}"; do + for file in $(search $directory); do + check "$file" + done + done + + if [ $counter -gt 0 ]; then + echo "SPDX-License-Identifier is missing in $counter files." + exit 1 + else + echo "SPDX-License-Identifier is certainly described in all target files!" + exit 0 + fi diff --git a/cypress/e2e/basic.cy.js b/cypress/e2e/basic.cy.js index 604241d13c..d2525e0a7d 100644 --- a/cypress/e2e/basic.cy.js +++ b/cypress/e2e/basic.cy.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + describe('Before setup instance', () => { beforeEach(() => { cy.resetState(); diff --git a/cypress/e2e/router.cy.js b/cypress/e2e/router.cy.js index 6de27be5f4..8d8fb3af31 100644 --- a/cypress/e2e/router.cy.js +++ b/cypress/e2e/router.cy.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + describe('Router transition', () => { describe('Redirect', () => { // サーバの初期化。ルートのテストに関しては各describeごとに1度だけ実行で十分だと思う(使いまわした方が早い) diff --git a/cypress/e2e/widgets.cy.js b/cypress/e2e/widgets.cy.js index df6ec8357d..847801a69f 100644 --- a/cypress/e2e/widgets.cy.js +++ b/cypress/e2e/widgets.cy.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + /* flaky describe('After user signed in', () => { beforeEach(() => { diff --git a/packages/backend/generate_api_json.js b/packages/backend/generate_api_json.js index 4079b3bb0a..602ced1d75 100644 --- a/packages/backend/generate_api_json.js +++ b/packages/backend/generate_api_json.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { loadConfig } from './built/config.js' import { genOpenapiSpec } from './built/server/api/openapi/gen-spec.js' import { writeFileSync } from "node:fs"; @@ -5,4 +10,4 @@ import { writeFileSync } from "node:fs"; const config = loadConfig(); const spec = genOpenapiSpec(config, true); -writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8'); \ No newline at end of file +writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8'); diff --git a/packages/backend/migration/1689325027964-UserBlacklistAnntena.js b/packages/backend/migration/1689325027964-UserBlacklistAnntena.js index ce246b20f8..2dc7774493 100644 --- a/packages/backend/migration/1689325027964-UserBlacklistAnntena.js +++ b/packages/backend/migration/1689325027964-UserBlacklistAnntena.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class UserBlacklistAnntena1689325027964 { name = 'UserBlacklistAnntena1689325027964' diff --git a/packages/backend/migration/1690417561185-fix-renote-muting.js b/packages/backend/migration/1690417561185-fix-renote-muting.js index 14150b0362..d9604ca26c 100644 --- a/packages/backend/migration/1690417561185-fix-renote-muting.js +++ b/packages/backend/migration/1690417561185-fix-renote-muting.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class FixRenoteMuting1690417561185 { name = 'FixRenoteMuting1690417561185' diff --git a/packages/backend/migration/1690417561186-ChangeCacheRemoteFilesDefault.js b/packages/backend/migration/1690417561186-ChangeCacheRemoteFilesDefault.js index 7eda5debe5..9bccdb3bb5 100644 --- a/packages/backend/migration/1690417561186-ChangeCacheRemoteFilesDefault.js +++ b/packages/backend/migration/1690417561186-ChangeCacheRemoteFilesDefault.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class ChangeCacheRemoteFilesDefault1690417561186 { name = 'ChangeCacheRemoteFilesDefault1690417561186' diff --git a/packages/backend/migration/1690417561187-Fix.js b/packages/backend/migration/1690417561187-Fix.js index e780e66d7b..7f1d62d68c 100644 --- a/packages/backend/migration/1690417561187-Fix.js +++ b/packages/backend/migration/1690417561187-Fix.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class Fix1690417561187 { name = 'Fix1690417561187' diff --git a/packages/backend/migration/1690569881926-user-2fa-backup-codes.js b/packages/backend/migration/1690569881926-user-2fa-backup-codes.js index 2049df8ea2..a3ef8dcf08 100644 --- a/packages/backend/migration/1690569881926-user-2fa-backup-codes.js +++ b/packages/backend/migration/1690569881926-user-2fa-backup-codes.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class User2faBackupCodes1690569881926 { name = 'User2faBackupCodes1690569881926' diff --git a/packages/backend/migration/1691649257651-refine-announcement.js b/packages/backend/migration/1691649257651-refine-announcement.js index d8d63f3103..ac621155d5 100644 --- a/packages/backend/migration/1691649257651-refine-announcement.js +++ b/packages/backend/migration/1691649257651-refine-announcement.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class RefineAnnouncement1691649257651 { name = 'RefineAnnouncement1691649257651' diff --git a/packages/backend/migration/1691657412740-refine-announcement-2.js b/packages/backend/migration/1691657412740-refine-announcement-2.js index 8791f99f44..67edf19659 100644 --- a/packages/backend/migration/1691657412740-refine-announcement-2.js +++ b/packages/backend/migration/1691657412740-refine-announcement-2.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class RefineAnnouncement21691657412740 { name = 'RefineAnnouncement21691657412740' diff --git a/packages/backend/migration/1695260774117-verified-links.js b/packages/backend/migration/1695260774117-verified-links.js index 18e0571d81..64c8a9ad8f 100644 --- a/packages/backend/migration/1695260774117-verified-links.js +++ b/packages/backend/migration/1695260774117-verified-links.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class VerifiedLinks1695260774117 { name = 'VerifiedLinks1695260774117' diff --git a/packages/backend/migration/1695288787870-following-notify.js b/packages/backend/migration/1695288787870-following-notify.js index e7e2194b15..b3f78d5f2a 100644 --- a/packages/backend/migration/1695288787870-following-notify.js +++ b/packages/backend/migration/1695288787870-following-notify.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class FollowingNotify1695288787870 { name = 'FollowingNotify1695288787870' diff --git a/packages/backend/migration/1695440131671-short-name.js b/packages/backend/migration/1695440131671-short-name.js index 2c37297fc1..fdc256caf8 100644 --- a/packages/backend/migration/1695440131671-short-name.js +++ b/packages/backend/migration/1695440131671-short-name.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class ShortName1695440131671 { name = 'ShortName1695440131671' diff --git a/packages/backend/migration/1695605508898-mutingNotificationTypes.js b/packages/backend/migration/1695605508898-mutingNotificationTypes.js index 8c0e52a2f0..67d4243142 100644 --- a/packages/backend/migration/1695605508898-mutingNotificationTypes.js +++ b/packages/backend/migration/1695605508898-mutingNotificationTypes.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class MutingNotificationTypes1695605508898 { name = 'MutingNotificationTypes1695605508898' diff --git a/packages/backend/migration/1695901659683-note-updated-at.js b/packages/backend/migration/1695901659683-note-updated-at.js index d8a151a1f7..e828fb1a6f 100644 --- a/packages/backend/migration/1695901659683-note-updated-at.js +++ b/packages/backend/migration/1695901659683-note-updated-at.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class NoteUpdatedAt1695901659683 { name = 'NoteUpdatedAt1695901659683' diff --git a/packages/backend/migration/1696323464251-user-list-membership.js b/packages/backend/migration/1696323464251-user-list-membership.js index 7534040c4c..dc1d438dd7 100644 --- a/packages/backend/migration/1696323464251-user-list-membership.js +++ b/packages/backend/migration/1696323464251-user-list-membership.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class UserListMembership1696323464251 { name = 'UserListMembership1696323464251' diff --git a/packages/backend/migration/1696331570827-hibernation.js b/packages/backend/migration/1696331570827-hibernation.js index 119d35913f..1487ece77c 100644 --- a/packages/backend/migration/1696331570827-hibernation.js +++ b/packages/backend/migration/1696331570827-hibernation.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class Hibernation1696331570827 { name = 'Hibernation1696331570827' diff --git a/packages/backend/migration/1696332072038-clean.js b/packages/backend/migration/1696332072038-clean.js index 97dba655f4..92a6810d6a 100644 --- a/packages/backend/migration/1696332072038-clean.js +++ b/packages/backend/migration/1696332072038-clean.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class Clean1696332072038 { name = 'Clean1696332072038' diff --git a/packages/backend/migration/1700383825690-hard-mute.js b/packages/backend/migration/1700383825690-hard-mute.js index afd3247f5c..92c3ada4a1 100644 --- a/packages/backend/migration/1700383825690-hard-mute.js +++ b/packages/backend/migration/1700383825690-hard-mute.js @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export class HardMute1700383825690 { name = 'HardMute1700383825690' diff --git a/packages/backend/src/core/ChannelFollowingService.ts b/packages/backend/src/core/ChannelFollowingService.ts index 75843b9773..12251595e2 100644 --- a/packages/backend/src/core/ChannelFollowingService.ts +++ b/packages/backend/src/core/ChannelFollowingService.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { Inject, Injectable, OnModuleInit } from '@nestjs/common'; import Redis from 'ioredis'; import { DI } from '@/di-symbols.js'; diff --git a/packages/backend/src/misc/fastify-hook-handlers.ts b/packages/backend/src/misc/fastify-hook-handlers.ts index 49a48f6a6b..3e1c099e00 100644 --- a/packages/backend/src/misc/fastify-hook-handlers.ts +++ b/packages/backend/src/misc/fastify-hook-handlers.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import type { onRequestHookHandler } from 'fastify'; export const handleRequestRedirectToOmitSearch: onRequestHookHandler = (request, reply, done) => { diff --git a/packages/backend/src/misc/is-pure-renote.ts b/packages/backend/src/misc/is-pure-renote.ts index 994d981522..f9c2243a06 100644 --- a/packages/backend/src/misc/is-pure-renote.ts +++ b/packages/backend/src/misc/is-pure-renote.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import type { MiNote } from '@/models/Note.js'; export function isPureRenote(note: MiNote): note is MiNote & { renoteId: NonNullable } { diff --git a/packages/backend/src/misc/loader.ts b/packages/backend/src/misc/loader.ts index 25f7b54d31..7f29b9db10 100644 --- a/packages/backend/src/misc/loader.ts +++ b/packages/backend/src/misc/loader.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export type FetchFunction = (key: K) => Promise; type ResolveReject = Parameters>[0]>; diff --git a/packages/backend/src/models/ReversiGame.ts b/packages/backend/src/models/ReversiGame.ts index c03335dd63..6b29a0ce8c 100644 --- a/packages/backend/src/models/ReversiGame.ts +++ b/packages/backend/src/models/ReversiGame.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; import { id } from './util/id.js'; import { MiUser } from './User.js'; diff --git a/packages/backend/src/models/json-schema/signin.ts b/packages/backend/src/models/json-schema/signin.ts index d27d2490c5..45732a742b 100644 --- a/packages/backend/src/models/json-schema/signin.ts +++ b/packages/backend/src/models/json-schema/signin.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export const packedSigninSchema = { type: 'object', properties: { diff --git a/packages/backend/test/jest.setup.ts b/packages/backend/test/jest.setup.ts index cf5b9bf24d..861bc6db66 100644 --- a/packages/backend/test/jest.setup.ts +++ b/packages/backend/test/jest.setup.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { initTestDb, sendEnvResetRequest } from './utils.js'; beforeAll(async () => { diff --git a/packages/backend/test/unit/ApMfmService.ts b/packages/backend/test/unit/ApMfmService.ts index 2b79041c86..79cb81f5c9 100644 --- a/packages/backend/test/unit/ApMfmService.ts +++ b/packages/backend/test/unit/ApMfmService.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import * as assert from 'assert'; import { Test } from '@nestjs/testing'; diff --git a/packages/backend/test/unit/misc/loader.ts b/packages/backend/test/unit/misc/loader.ts index fa37950951..2cf54e1555 100644 --- a/packages/backend/test/unit/misc/loader.ts +++ b/packages/backend/test/unit/misc/loader.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { DebounceLoader } from '@/misc/loader.js'; class Mock { diff --git a/packages/frontend/.storybook/preview-head.html b/packages/frontend/.storybook/preview-head.html index 30f3ebfb64..e50c488243 100644 --- a/packages/frontend/.storybook/preview-head.html +++ b/packages/frontend/.storybook/preview-head.html @@ -1,3 +1,8 @@ + + diff --git a/packages/frontend/src/components/global/I18n.vue b/packages/frontend/src/components/global/I18n.vue index 162aa2bcf8..6b7723e6ac 100644 --- a/packages/frontend/src/components/global/I18n.vue +++ b/packages/frontend/src/components/global/I18n.vue @@ -1,3 +1,8 @@ + + diff --git a/packages/frontend/src/filters/kmg.ts b/packages/frontend/src/filters/kmg.ts index 4dcb5c5800..9608e420f6 100644 --- a/packages/frontend/src/filters/kmg.ts +++ b/packages/frontend/src/filters/kmg.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export default (v, fractionDigits = 0) => { if (v == null) return 'N/A'; if (v === 0) return '0'; diff --git a/packages/frontend/src/scripts/check-reaction-permissions.ts b/packages/frontend/src/scripts/check-reaction-permissions.ts index e7b473dd75..8fc857f84f 100644 --- a/packages/frontend/src/scripts/check-reaction-permissions.ts +++ b/packages/frontend/src/scripts/check-reaction-permissions.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import * as Misskey from 'misskey-js'; import { UnicodeEmojiDef } from './emojilist.js'; diff --git a/packages/frontend/src/scripts/clear-cache.ts b/packages/frontend/src/scripts/clear-cache.ts index b20109ec72..71d1232710 100644 --- a/packages/frontend/src/scripts/clear-cache.ts +++ b/packages/frontend/src/scripts/clear-cache.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { unisonReload } from '@/scripts/unison-reload.js'; import * as os from '@/os.js'; import { miLocalStorage } from '@/local-storage.js'; diff --git a/packages/frontend/src/scripts/code-highlighter.ts b/packages/frontend/src/scripts/code-highlighter.ts index 2733897bab..5dd0a3be78 100644 --- a/packages/frontend/src/scripts/code-highlighter.ts +++ b/packages/frontend/src/scripts/code-highlighter.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { bundledThemesInfo } from 'shiki'; import { getHighlighterCore, loadWasm } from 'shiki/core'; import darkPlus from 'shiki/themes/dark-plus.mjs'; diff --git a/packages/frontend/src/scripts/media-has-audio.ts b/packages/frontend/src/scripts/media-has-audio.ts index 3421a38a76..4bf3ee5d97 100644 --- a/packages/frontend/src/scripts/media-has-audio.ts +++ b/packages/frontend/src/scripts/media-has-audio.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export default async function hasAudio(media: HTMLMediaElement) { const cloned = media.cloneNode() as HTMLMediaElement; cloned.muted = (cloned as typeof cloned & Partial).playsInline = true; diff --git a/packages/frontend/src/type.ts b/packages/frontend/src/type.ts index 9c0fc2a11e..5ff27158d2 100644 --- a/packages/frontend/src/type.ts +++ b/packages/frontend/src/type.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export type WithRequired = T & { [P in K]-?: T[P] }; export type WithNonNullable = T & { [P in K]-?: NonNullable }; diff --git a/scripts/changelog-checker/src/checker.ts b/scripts/changelog-checker/src/checker.ts index bbd5b2270a..8fd6ff5629 100644 --- a/scripts/changelog-checker/src/checker.ts +++ b/scripts/changelog-checker/src/checker.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { Release } from './parser.js'; export class Result { diff --git a/scripts/changelog-checker/src/index.ts b/scripts/changelog-checker/src/index.ts index 8cbeb297d9..0e2c5ce057 100644 --- a/scripts/changelog-checker/src/index.ts +++ b/scripts/changelog-checker/src/index.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import * as process from 'process'; import * as fs from 'fs'; import { parseChangeLog } from './parser.js'; diff --git a/scripts/changelog-checker/src/parser.ts b/scripts/changelog-checker/src/parser.ts index d6a9ddeda8..894d60d6af 100644 --- a/scripts/changelog-checker/src/parser.ts +++ b/scripts/changelog-checker/src/parser.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import * as fs from 'node:fs'; import { unified } from 'unified'; import remarkParse from 'remark-parse'; diff --git a/scripts/changelog-checker/test/checker.test.ts b/scripts/changelog-checker/test/checker.test.ts index bc73e5622b..9ca8fa85f2 100644 --- a/scripts/changelog-checker/test/checker.test.ts +++ b/scripts/changelog-checker/test/checker.test.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import {expect, suite, test} from "vitest"; import {Release, ReleaseCategory} from "../src/parser"; import {checkNewRelease, checkNewTopic} from "../src/checker"; @@ -411,4 +416,4 @@ suite('checkNewTopic', () => { console.log(result.message) expect(result.success).toBe(false) }) -}) \ No newline at end of file +}) diff --git a/scripts/tarball.mjs b/scripts/tarball.mjs index 936a43d270..b1862ad289 100644 --- a/scripts/tarball.mjs +++ b/scripts/tarball.mjs @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { createWriteStream } from 'node:fs'; import { mkdir } from 'node:fs/promises'; import { resolve } from 'node:path';