サンプル
Prove that @babel/core loadPartialConfig() throws in Babel 8 when called without a callback, and that loadPartialConfigSync() is the required synchronous replacement — including its null return for ignored files
sha256:ece989311b3739c9235f3c4a0646704bee7ff8e4c348f7344ea4058cddeb7900
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Prove that @babel/core loadPartialConfig() throws in Babel 8 when called without a callback, and that loadPartialConfigSync() is the required synchronous replacement — including its null return for ignored files HOW
- パッケージ
- @babel/core 8.0.1
- 環境
- node
- 作成日
- 2026-08-16T15:15:12Z
よくある思い込み
loadPartialConfig({...}) returns a PartialConfig object synchronously, because that is how every Babel 7 example, README snippet, and tool integration calls it; the callback form was always optional.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- Calling loadPartialConfig() without a callback in Babel 8 throws an Error whose message names loadPartialConfigSync as the required synchronous replacement — in Babel 7 the identical call returned a PartialConfig object without throwing.
- loadPartialConfigSync({ configFile: false, babelrc: false }) returns a non-null object with a hasFilesystemConfig() method
- loadPartialConfigSync returns null — not an empty object, not an error — when the filename matches an ignore glob
- The returned PartialConfig object exposes a fileHandling field equal to "transpile" for a normal JS file
- loadOptions() without a callback also throws in Babel 8, naming loadOptionsSync in the error message
ファイル
- 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