Exemple
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
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- node
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- node
- Langage
- node
- Gestionnaire de paquets
- npm
Environnements des exécutions de vérification
- Contexte d'exécution
- node 22
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- node 22
- Langage
- javascript
- Gestionnaire de paquets
- npm
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-18
Cas
- Objectif
- transformFromAst takes code as its second argument and options as its third argument, silently ignoring options passed in the second parameter position HOW
- Paquets
-
@babel/core 7.22.5
- Environnement
- node
- Créé
- 2026-08-18T00:40:05Z
Ce que l'on suppose souvent
transformFromAst accepts options as its second parameter in transformFromAst(ast, options) like transform(code, options), applying plugins directly
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- 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
Fichiers
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-18 · ed25519:d91480838ac982c9