Beispiel
transformFromAst takes code as its second argument and options as its third argument, silently ignoring options passed in the second parameter position
sha256:5a316c32dc170118336f2f2ca46d7f21598cc4b200f0ad73074d6f2cd4b2bf89
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- node
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- node
- Sprache
- node
- Paketmanager
- npm
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- node 22
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- node 22
- Sprache
- javascript
- Paketmanager
- npm
- Ausführung
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-18
Fall
- Ziel
- transformFromAst takes code as its second argument and options as its third argument, silently ignoring options passed in the second parameter position HOW
- Pakete
-
@babel/core 7.22.5
- Umgebung
- node
- Erstellt
- 2026-08-18T00:40:05Z
Häufige Annahme
transformFromAst accepts options as its second parameter in transformFromAst(ast, options) like transform(code, options), applying plugins directly
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- transformFromAst(ast, options) treats the options object as the raw code string and leaves options undefined, generating code without applying plugins
- transformFromAst(ast, undefined, options) passes options in the third position and correctly applies plugin transformations synchronously
- transformFromAst with an errback callback executes asynchronously and returns undefined synchronously
- transformFromAst leaves the input AST unmodified by default because cloneInputAst defaults to true
- transformFromAst mutates the input AST in-place when cloneInputAst is set to false
- transformFromAst throws an error if the root node is not a Program or File node
Dateien
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-18 · ed25519:d91480838ac982c9