infra frontendTesting: tsconfig.test.json doesn't work in a standalone extension, and webpack.config.js is left behind
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
src/steps/gen-ext-scaffolder.ts の frontendTesting モジュール定義から始め、生成される tsconfig.test.json、webpack.config.cjs、js/package.json を調べます。生成される TypeScript の include と shim のパスを、issue に記載された単独の extension の構成と比較し、ジェネレーターが古い webpack 設定をどのように扱うか確認します。完了条件は、単独の extension でテストの型チェックが機能し、意図した webpack 設定だけが存在し、package ファイルの diff が必要な範囲に絞られていることです。
索引モデルが issue の本文から書いたものです。
説明
Running flarum-cli infra frontendTesting -n (3.0.15) on an existing standalone (Composer-installed) Flarum 2 extension gives a setup where yarn test runs, but the tests don't type-check and an old file is left behind:
js/tsconfig.test.jsonpoints at the monorepo'snode_modules."files": ["../../../node_modules/@flarum/jest-config/shims.d.ts"]only resolves inside flarum/framework. In a standalone extension it should be./node_modules/@flarum/jest-config/shims.d.ts, as the testing docs show.js/tsconfig.test.jsonreplaces the baseincludewith["tests/**/*"]. Tests that import the extension'ssrcthen lose core's global typings (../vendor/*/*/js/dist-typings/@types/**/*) and the extension's own declaration files.tsc -p tsconfig.test.json --noEmitfails withCannot find name 'm',Cannot find name 'flarum', and errors on model attributes added through declaration merging. Repeating the baseincludewithtestsadded fixes it:"include": ["src/**/*", "tests/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],js/webpack.config.jsis left in place next to the newjs/webpack.config.cjs. The module adds the.cjsfile (needed now that"type": "module"is set) but doesn't remove the.jsone, which the docs say to rename.- Minor:
js/package.jsonis rewritten with 4-space indentation, so the whole file shows up in the diff.
3.x has the same skeleton tsconfig.test.json and the same frontendTesting module definition in src/steps/gen-ext-scaffolder.ts.
- 主要言語
- TypeScript
- スター
- 47
- フォーク
- 4
- 平均マージ
- 8分
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
flarum/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
transitmatters/shutdown-tracker#155 ·
メンテナーはふだん 2 日以内に返信
-
Popping out a single panel leaves its always render overlay in the main window, blocking clicksオープンbug triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
"Claude Code request is missing its initial user message" when the prompt starts with an image pathオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
earendil-works/pi-claude-code#31 ·
メンテナーはふだん 8 日以内に返信
-
bug pending triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
privatenumber/cleye#48 ·