diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dfa75317974..3c0b3d6ccb7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,8 @@ Before creating an issue, please check the following: ### Recommended discussing before implementation We welcome your proposal. +For security-related reports, follow [SECURITY.md](SECURITY.md) instead of the general process below. + When you want to add a feature or fix a bug, **first have the design and policy reviewed in an Issue** (if it is not there, please make one). Without this step, there is a high possibility that the PR will not be merged even if it is implemented. At this point, you also need to clarify the goals of the PR you will create, and make sure that the other members of the team are aware of them. @@ -71,12 +73,7 @@ For ActivityPub payload changes, see [additional requirements](docs/contributing ## Security Advisory ### For reporter -Thank you for your reporting! - -If you can also create a patch to fix the vulnerability, please create a PR on the private fork. - -> [!note] -> There is a GitHub bug that prevents merging if a PR not following the develop branch of upstream, so please keep follow the develop branch. +Please follow [SECURITY.md](SECURITY.md) for reporting security issues and submitting patches. For maintainers: [handling advisories](docs/contributing/maintainer-guide.md#security-advisory). @@ -86,6 +83,8 @@ You can improve our translations with your Crowdin account. Your changes in Crowdin are automatically submitted as a PR (with the title "New Crowdin translations") to the repository. The owner [@syuilo](https://github.com/syuilo) merges the PR into the develop branch before the next release. +For Japanese source strings, edit [`locales/ja-JP.yml`](locales/ja-JP.yml). Do not edit other locale YAML files directly; submit translations through Crowdin. See [locales/README.md](locales/README.md) for the locale editing rules. + If your language is not listed in Crowdin, please open an issue. We will add it to Crowdin. For newly added languages, once the translation progress per language exceeds 70%, it will be officially introduced into Misskey and made available to users. diff --git a/docs/contributing/backend.md b/docs/contributing/backend.md index ed85878fad3..3b7cfc4496d 100644 --- a/docs/contributing/backend.md +++ b/docs/contributing/backend.md @@ -24,6 +24,15 @@ export class FooService { #### OnModuleInit できなければ`OnModuleInit`を使う +`moduleRef.get(BarService.name)` は文字列トークンで解決するため、`BarService` の通常の登録に加え、同じモジュールの `providers` に alias を登録する必要がある。Misskey では [CoreModule](../../packages/backend/src/core/CoreModule.ts) に登録している。 + +```typescript +providers: [ + BarService, + { provide: BarService.name, useExisting: BarService }, +], +``` + ```typescript import { Injectable, OnModuleInit } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; @@ -86,7 +95,7 @@ describe('test', () => { await fooService.onModuleInit(); }); - test('nice', () => { + test('nice', async () => { await fooService.niceMethod(); expect(barService.incredibleMethod).toHaveBeenCalled(); @@ -186,11 +195,11 @@ enumの列挙の内容の削除は、その値をもつレコードを全て削 削除が重たかったり不可能だったりする場合は、削除しないでおく ## Migration作成方法 -packages/backendで: +リポジトリルートから: ```sh -pnpm dlx typeorm migration:generate -d ormconfig.js -o --esm +pnpm --filter backend exec typeorm migration:generate -d ormconfig.js -o --esm migration/ ``` -- 生成後、ファイルをmigration下に移してください +- ワークスペースにインストール済みの TypeORM CLI を使う。設定ファイルと出力先は `packages/backend/` 基準で解決され、生成ファイルは `packages/backend/migration/` に配置される - 作成されたスクリプトは不必要な変更を含むため除去してください - `-o` (`--outputJs`) で JS 形式、`--esm` で ESM 形式に生成する。Misskey の既存 migration はすべて ESM JS なので両方のオプションが必要 diff --git a/docs/contributing/development.md b/docs/contributing/development.md index 6b909c2602e..ebc5cf31033 100644 --- a/docs/contributing/development.md +++ b/docs/contributing/development.md @@ -15,7 +15,7 @@ There are a few ways to proceed. You could install them in system-wide (such as from package manager). ### Use `docker compose` -You could obtain middleware container by typing `docker compose -f $PROJECT_ROOT/compose.local-db.yml up -d`. +From the repository root, you could obtain middleware containers by typing `docker compose -f compose.local-db.yml up -d`. ### Use Devcontainer Devcontainer also has necessary setting. This method can be done by connecting from VSCode. diff --git a/docs/contributing/frontend.md b/docs/contributing/frontend.md index 2a9caa3ad22..ff58e113485 100644 --- a/docs/contributing/frontend.md +++ b/docs/contributing/frontend.md @@ -7,7 +7,7 @@ ## Vue Misskey uses Vue(v3) as its front-end framework. - Use TypeScript. -- **When creating a new component, please use the Composition API (with [setup sugar](https://v3.vuejs.org/api/sfc-script-setup.html) and [ref sugar](https://github.com/vuejs/rfcs/discussions/369)) instead of the Options API.** +- **When creating a new component, please use the Composition API (with [`