Skip to content

Conversation

@fraxken
Copy link
Member

@fraxken fraxken commented Dec 21, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Dec 21, 2025

🦋 Changeset detected

Latest commit: 269ea78

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

This PR includes changesets to release 2 packages
Name Type
@nodesecure/js-x-ray Major
@nodesecure/js-x-ray-ai 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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the codebase from meriyah v6.x to v7.0.0, introducing breaking changes in the parsing API. The migration updates parsing function calls, removes deprecated options, and adjusts error handling to align with the new API.

  • Updated meriyah dependency to v7.0.0 across all workspaces (tracer, js-x-ray, estree-ast-utils)
  • Migrated from parseScript with module option to parseModule/parse with sourceType option
  • Removed the module configuration option from AstAnalyser's RuntimeOptions interface
  • Added non-null assertions in test files to handle potential undefined returns from getWarning()

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
workspaces/tracer/package.json Updated meriyah dependency to v7.0.0
workspaces/tracer/test/utils.ts Migrated to meriyah.parse with sourceType: "module" option
workspaces/js-x-ray/package.json Updated meriyah dependency to v7.0.0
workspaces/js-x-ray/src/JsSourceParser.ts Refactored to use parseModule by default with fallback to parse using sourceType: "commonjs" for illegal return statements
workspaces/js-x-ray/src/AstAnalyser.ts Removed module option from RuntimeOptions and updated parser invocations
workspaces/js-x-ray/test/utils/index.ts Implemented try-catch fallback from parseModule to parseScript
workspaces/js-x-ray/test/probes/isRequire.spec.ts Added non-null assertions for getWarning() return values
workspaces/js-x-ray/test/probes/isImportDeclaration.spec.ts Added non-null assertion for getWarning() return value
workspaces/js-x-ray/test/issues/163-illegalReturnStatement.spec.ts Simplified test to remove module option
workspaces/js-x-ray/test/JsSourceParser.spec.ts Removed isEcmaScriptModule option from test cases
workspaces/js-x-ray/test/AstAnalyser.spec.ts Removed module option from all test cases
workspaces/js-x-ray/docs/AstAnalyser.md Updated documentation to remove module option
workspaces/js-x-ray-ai/package-lock.json Deleted package-lock.json file
workspaces/estree-ast-utils/package.json Updated meriyah dependency to v7.0.0
workspaces/estree-ast-utils/test/utils.ts Removed module and globalReturn options from parseScript call
Files not reviewed (1)
  • workspaces/js-x-ray-ai/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fraxken fraxken merged commit 0e1b5f5 into master Dec 21, 2025
6 checks passed
@fraxken fraxken deleted the update-meriyah branch December 21, 2025 12:48
@github-actions github-actions bot mentioned this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants