Sample
Demonstrate that @babel/preset-env retains in-memory browserslist configuration caches across transforms, requiring explicit browserslist.clearCaches() when on-disk target files change.
sha256:5230d1d8374292e6b338e3af9d42b2f705868895b5c720d33aec72599fd6f335
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Demonstrate that @babel/preset-env retains in-memory browserslist configuration caches across transforms, requiring explicit browserslist.clearCaches() when on-disk target files change. HOW
- Packages
- @babel/preset-env 7.29.7 @babel/core 7.29.7 browserslist 4.28.8
- Environment
- node
- Created
- 2026-08-16T17:30:14Z
Commonly assumed
Modifying .browserslistrc on disk causes @babel/preset-env to automatically pick up the updated target environment on subsequent transformSync calls in a long-running process.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- When .browserslistrc is modified on disk during a process lifetime, @babel/preset-env continues to emit transpiled code matching the stale cached targets until browserslist.clearCaches() is explicitly invoked.
- assert modifying .browserslistrc on disk without clearing caches produces output transpiled against stale cached targets
- assert browserslist.clearCaches() evicts memoized config files and forces @babel/preset-env to re-read updated target definitions
- assert passing explicit in-memory targets option bypasses file configuration caching
Files
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9