Main and component entries use removed `assert { type: 'json' }` syntax, and `/zod` export is uncompiled TypeScript with syntax errors
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js, typescript
- 領域
- build-system, release
調査の方向性
Start by reproducing both failures with the two node --input-type=module commands against a fresh install. Read scripts/generate-schemas.js (which emits the old assert { type: 'json' } import, unlike index.json.js) and scripts/generate-zod-schemas.js (which interpolates unescaped quotes/newlines into the 19 schema.zod.ts files), then check the exports map in package.json for ./zod. Done means both documented entry points import cleanly, generated files use with { type: 'json' }, and /zod ships compiled .js/.d.ts.
索引モデルが issue の本文から書いたものです。
説明
Importing @patternfly/patternfly-component-schemas (or @patternfly/patternfly-component-schemas/components/*) fails on Node.js 22 and later with SyntaxError: Unexpected identifier 'assert', and @patternfly/patternfly-component-schemas/zod fails in both Node.js and TypeScript/bundlers.
npm install @patternfly/[email protected]
node --input-type=module -e "import { Button } from '@patternfly/patternfly-component-schemas'; console.log(Button.componentName);"
node --input-type=module -e "import { ButtonSchema } from '@patternfly/patternfly-component-schemas/zod'; console.log(ButtonSchema);"
Actual output (main entry):
file:///.../node_modules/@patternfly/patternfly-component-schemas/components/KeyboardHandler/index.js:2
import schema from './schema.json' assert { type: 'json' };
^^^^^^
SyntaxError: Unexpected identifier 'assert'
Actual output (/zod entry):
Error [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently unsupported for files under node_modules, for "file:///.../node_modules/@patternfly/patternfly-component-schemas/zod/index.ts"
Bundling or type-checking @patternfly/patternfly-component-schemas/zod with esbuild, tsx, or tsc also fails to parse 19 generated components/*/schema.zod.ts files (for example .default('['BUTTON', 'A']') in components/KeyboardHandler/schema.zod.ts:30, unescaped multiline strings in components/TreeViewListItemBase/schema.zod.ts:12 and components/PopperOptions/schema.zod.ts:21, and \' inside z.custom<...>() in components/WizardContextProps/schema.zod.ts:28).
Expected output:
Both documented entry points import cleanly (Button.componentName logs "Button" and ButtonSchema loads as a Zod schema), matching @patternfly/patternfly-component-schemas/json.
scripts/generate-schemas.js emits import schema from './schema.json' assert { type: 'json' }; in all 479 components/*/index.js files instead of with { type: 'json' } (which index.json.js already uses), while package.json points "./zod" at raw ./zod/index.ts without compiled .js/.d.ts output and scripts/generate-zod-schemas.js interpolates unescaped quotes and newlines into generated TypeScript source.
Versions: @patternfly/[email protected] (npm latest) and main (b8509c3), Node.js v26.13.0.
Found with a differential-testing tool; the report was drafted with AI assistance and reviewed and edited by me.
Credit: https://ucsbplse.github.io/
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 3
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
patternfly/patternfly-component-schemas のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
patternfly/patternfly-component-schemas の issue をすべて見る
似ている issue
-
[Site] Active section detection should respect scroll-margin-top対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea/web reproduced type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
anomalyco/opencode#65384 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
swc-project/swc-ai-issues#1001 ·
-
check:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
fix(table): CollapseColumn uses wrong caret icon for expandable row toggle対応中かも @redhat-chai-bot が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
patternfly/patternfly-react#12727 ·
メンテナーはふだん 1 日以内に返信
-
CLI OAuth login fails behind an authenticating proxy: GET /api/v1/user omits Proxy-Authorizationオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
lightdash/lightdash#33086 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信