Skip to content

Conversation

@marco-ippolito
Copy link
Member

This new error allows user to know if its unsupported syntax like enums in strip-types or just general invalid syntax.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/typescript

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Jan 15, 2025
@codecov

This comment was marked as outdated.

@marco-ippolito
Copy link
Member Author

idk why the coverage complains, the behavioral change is tested 😫

@marco-ippolito marco-ippolito added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jan 15, 2025
@marco-ippolito
Copy link
Member Author

marco-ippolito commented Jan 15, 2025

Removed some dead code. Since we splitted compilation from execution, there is no need to check if what is thrown is not an error or if error properties have been overwritten.

@marco-ippolito marco-ippolito force-pushed the update-error-to-syntax-error branch from f300ebb to f67762a Compare January 15, 2025 14:35
@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 15, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 15, 2025
@nodejs-github-bot
Copy link
Collaborator

@marco-ippolito marco-ippolito added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jan 15, 2025
@aduh95 aduh95 added semver-minor PRs that contain new features and should be released in the next minor version. request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jan 15, 2025
Co-authored-by: Antoine du Hamel <[email protected]>
@marco-ippolito marco-ippolito force-pushed the update-error-to-syntax-error branch from a3e87d4 to b15ee51 Compare January 15, 2025 19:03
@nodejs-github-bot
Copy link
Collaborator

Comment on lines +3148 to +3150
The provided TypeScript syntax is unsupported.
This could happen when using TypeScript syntax that requires
transformation with [type-stripping][].
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be more explicit and immediately suggest to the user that a potential solution is to run using --experimental-transform-types?

Copy link
Member

Choose a reason for hiding this comment

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

Seems like a more forward-looking suggestion would be to suggest they use the TS 5.8 option (once it's out) so they avoid using that syntax in the first place (or perhaps both suggestions)

Copy link
Member Author

@marco-ippolito marco-ippolito Jan 17, 2025

Choose a reason for hiding this comment

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

We could add it in the error message itself?
I will followup with a PR after swc updates since I have to refactor error messages anyways

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 17, 2025
@nodejs-github-bot nodejs-github-bot merged commit cee63dc into nodejs:main Jan 17, 2025
53 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in cee63dc

@marco-ippolito marco-ippolito added the strip-types Issues or PRs related to strip-types support label Feb 4, 2025
@marco-ippolito marco-ippolito added the backport-open-v22.x Indicate that the PR has an open backport label Feb 4, 2025
@aduh95 aduh95 added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed backport-open-v22.x Indicate that the PR has an open backport labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backported-to-v22.x PRs backported to the v22.x-staging branch. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. errors Issues and PRs related to JavaScript errors originated in Node.js core. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. semver-minor PRs that contain new features and should be released in the next minor version. strip-types Issues or PRs related to strip-types support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants