Skip to content

feat(evasive-transform): expose makeTransformCommentsVisitor#3217

Draft
boneskull wants to merge 1 commit intoboneskull/async-parserfrom
boneskull/evasive-pipeline2
Draft

feat(evasive-transform): expose makeTransformCommentsVisitor#3217
boneskull wants to merge 1 commit intoboneskull/async-parserfrom
boneskull/evasive-pipeline2

Conversation

@boneskull
Copy link
Copy Markdown
Member

Extracts makeTransformCommentsVisitor from transformAst and exports it via a new ./visitor.js subpath.

transformAst is reimplemented as a thin wrapper that calls makeTransformCommentsVisitor and traverses — no logic change, just inversion of control.

Additional tidy-ups in the same diff:

  • SourceType now includes commonjs, and parseAst passes allowReturnOutsideFunction: true for that source type (which it does by default, if we didn't have it being set for script as well)
  • SourceMapOption type removed; its usages are replaced with object | string (actual referenced type does not exist)
  • Inline import() type references in JSDoc replaced with @import declarations at the top of each file.
  • stripInternal: true added to tsconfig.json so @internal items are excluded from generated .d.ts output.
  • @types/babel__generator and @types/babel__traverse (prod) added as dependencies (they were missing)

@boneskull
Copy link
Copy Markdown
Member Author

boneskull commented Apr 30, 2026

Warning

This PR is part of a stack and targets branch boneskull/async-parser, not master.
DO NOT MERGE until fix(compartment-mapper,bundle-source): async parser support #3186 is merged into master.

📚 Pull Request Stack


Managed by gh-stack

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: 2b97a5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@endo/evasive-transform Minor
@endo/bundle-source Patch
@endo/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Extracts `makeEvasiveTransformVisitor ` from `transformAst` and exports it via a new `./visitor.js` subpath.

`transformAst` is reimplemented as a thin wrapper that calls `makeEvasiveTransformVisitor ` and traverses — no logic change, just inversion of control.

Additional tidy-ups in the same diff:

- `SourceType` now includes `commonjs`, and `parseAst` passes `allowReturnOutsideFunction: true` for that source type (which it does by default, if we didn't have it being set for `script` as well)
- `SourceMapOption` type removed; its usages are replaced with `object | string` (actual referenced type does not exist)
- Inline `import()` type references in JSDoc replaced with `@import` declarations at the top of each file.
- `stripInternal: true` added to `tsconfig.json` so `@internal` items are excluded from generated `.d.ts` output.
- `@types/babel__generator` and `@types/babel__traverse` (prod) added as dependencies (they were missing)
@boneskull boneskull force-pushed the boneskull/async-parser branch from 80a974c to d47070d Compare May 5, 2026 20:07
@boneskull boneskull force-pushed the boneskull/evasive-pipeline2 branch from 3f047de to 2b97a5e Compare May 5, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lavamoat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant