サンプル
Verify how @babel/preset-env resolves input domain edges across empty target queries, numeric target versions, and regex feature filters
sha256:4075ed00db008acfd57b6abf92a49a1a778223299d8463bfe3a57491b60666c2
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Verify how @babel/preset-env resolves input domain edges across empty target queries, numeric target versions, and regex feature filters HOW
- パッケージ
- @babel/preset-env 8.0.2 @babel/core 8.0.1
- 環境
- node
- 作成日
- 2026-08-16T17:26:03Z
よくある思い込み
Setting targets to an empty array [] behaves identically to an empty object {} by defaulting to the standard baseline and leaving modern syntax untranspiled.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- Passing targets: [] resolves to an empty environment matching zero engines and forces full ES5 transpilation of modern arrow functions and const declarations, whereas targets: {} defaults to the modern baseline.
- Passing targets: { node: 0 } coerces numeric 0 to Node version 0.0.0 and forces full ES5 transpilation, while targets: { node: true } targets the active Node.js runtime.
- Setting targets.node to false or null throws a target validation error rather than disabling or ignoring the Node target.
- Passing a RegExp in include that matches zero registered preset plugins throws an invalid plugin error at preset initialization instead of acting as a no-op filter.
- Specifying overlapping plugins between include and exclude via string or regex expansion throws a preset validation error rejecting duplicate entries.
- Passing include: null throws an unhandled TypeError on length, while include: undefined or empty string is safely handled.
- Calling transformIncludesAndExcludes parses string and RegExp filters into separate plugin and builtIn Sets.
ファイル
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9