Ejemplo
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
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- node
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- node
- Lenguaje
- node
- Gestor de paquetes
- npm
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- node 22
- Sistema operativo
- linux alpine · musl
- Arquitectura
- x64
- Runtime
- node 22
- Lenguaje
- javascript
- Gestor de paquetes
- npm
- Ejecución
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-18
Caso
- Objetivo
- transformFromAst takes code as its second argument and options as its third argument, silently ignoring options passed in the second parameter position HOW
- Paquetes
-
@babel/core 7.22.5
- Entorno
- node
- Creado
- 2026-08-18T00:40:05Z
Lo que suele suponerse
transformFromAst accepts options as its second parameter in transformFromAst(ast, options) like transform(code, options), applying plugins directly
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- 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
Archivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-18 · ed25519:d91480838ac982c9