[bug]: init uses RC versions and disables TypeScript for design-system v2
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
Start with src/cli/commands/plugin/init/action.ts and src/cli/commands/plugin/init/files/admin.ts, especially the marked TODO sections. Run npx @strapi/sdk-plugin@latest init and inspect the generated package versions and admin/custom.d.ts. Done means the init path no longer causes unintended RC use or suppresses design-system type errors, with the intended behavior verified.
索引モデルが issue の本文から書いたものです。
説明
What version of design-system are you using?
v2
What's Wrong?
see this issue in the strapi project
When using the plugin init command, the SDK pulls in the release candidate (RC) version of @strapi/design-system, and at the same time disables TypeScript type checking by generating a custom.d.ts file that declares the entire module. This makes VSCode silently accept incorrect imports and breaks type safety.
Using
npx @strapi/sdk-plugin@latest init
It automatically sets up the plugin to use Design System V2 (RC). Specifically, in @strapi/sdk-plugin src/cli/commands/plugin/init/action.ts, there's this line:
// TODO: remove these when release versions are available
const USE_RC_VERSIONS: string[] = ['@strapi/design-system', '@strapi/icons'] as const;
This causes it to pull the RC (v2) versions of those packages.
Additionally, in the same package at src/cli/commands/plugin/init/files/admin.ts, it generates a custom.d.ts file using the following:
{
/**
* TODO: remove this when we release design-system V2
*/
name: 'admin/custom.d.ts',
contents: outdent`
declare module '@strapi/design-system/*';
declare module '@strapi/design-system';
`,
},
This effectively disables TypeScript support for the design system, which explains why VSCode didn’t catch my incorrect imports :(
To Reproduce
Run:
npx @strapi/sdk-plugin@latest init
Try using a design-system component with a wrong import, VSCode won’t show an error because types are completely bypassed.
Expected Behaviour
- Either avoid using RC versions by default (unless explicitly opted in).
- Or at least don’t disable type checking by generating a custom.d.ts that declares wildcard modules.
- Ideally, wait until design-system v2 is stable before switching defaults in the SDK.
- 主要言語
- TypeScript
- スター
- 24
- フォーク
- 13
- 平均マージ
- 5日 3時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
strapi/sdk-plugin のほかの issue
-
難易度 4/5 半日 初心者へのやさしさ 15/100
strapi/sdk-plugin#244 ·
メンテナーはふだん 6 日以内に返信
-
[bug]: build ignores exports file names and package.json#type, breaking "type": "module" plugins対応中かも @unrevised6419 が 44 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
strapi/sdk-plugin#242 ·
メンテナーはふだん 6 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
strapi/sdk-plugin#241 ·
メンテナーはふだん 6 日以内に返信
-
[feat]: build a subset of bundles with --bundle, for per-bundle task caching対応中かも @unrevised6419 が 51 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
strapi/sdk-plugin#238 ·
メンテナーはふだん 6 日以内に返信
-
[bug]: When building with latest sdk-plugin version, I loose sub folders types再び着手できるかも @jhoward1994 が 247 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンissue: bug
strapi/sdk-plugin#115 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 6 日以内に返信
strapi/sdk-plugin の issue をすべて見る
似ている issue
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AOSSIE-Org/DebateAI#801 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Add: BOM Cineオープンapproved check:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信