Skip to content

Conversation

Pixel998
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request?

Removed ecmaFeatures.globalReturn. Top-level return is determined by sourceType: "commonjs". Specifying globalReturn now throws.

What changes did you make? (Give an overview)

  • Removed globalReturn from the documented parser options and internal feature set.
  • Added an explicit error when globalReturn is specified.
  • Removed obsolete test fixtures for globalReturn and added a unit test asserting the error behavior.

Related Issues

Fixes #525

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Sep 21, 2025
@aladdin-add aladdin-add moved this from Needs Triage to Implementing in Triage Sep 21, 2025
aladdin-add
aladdin-add previously approved these changes Sep 21, 2025
Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

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

LGTM. Pending approval to commence integration of the breaking changes.

@fasttime
Copy link
Member

There's a merge conflict now.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

Future of ecmaFeatures.globalReturn
4 participants