Exemplo
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
Caso
- Objetivo
- Demonstrate that @babel/preset-env retains in-memory browserslist configuration caches across transforms, requiring explicit browserslist.clearCaches() when on-disk target files change. HOW
- Pacotes
- @babel/preset-env 7.29.7 @babel/core 7.29.7 browserslist 4.28.8
- Ambiente
- node
- Criado
- 2026-08-16T17:30:14Z
O que costuma-se supor
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.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- 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
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9