Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: do not attempt to strip type when there's no source #54287

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Aug 9, 2024

It bothers me that tsParse would return an empty string on non-string input, IMO it makes much more sense to use an assertion instead, and make sure the other parts of the code calling that function have already validated the input.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Aug 9, 2024
@aduh95 aduh95 requested a review from marco-ippolito August 9, 2024 16:45
@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 9, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 9, 2024
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 9, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@marco-ippolito
Copy link
Member

if #54250 lands we want to rethink this approach

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 12, 2024
@aduh95
Copy link
Contributor Author

aduh95 commented Aug 12, 2024

if #54250 lands we want to rethink this approach

I don't see why, it's still a win to avoid calling tsParse

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 12, 2024
@nodejs-github-bot nodejs-github-bot merged commit 9a4eb21 into nodejs:main Aug 12, 2024
68 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 9a4eb21

@aduh95 aduh95 deleted the simplify-type-stripping branch August 12, 2024 09:16
targos pushed a commit that referenced this pull request Aug 14, 2024
PR-URL: #54287
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Aug 14, 2024
PR-URL: #54287
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Aug 19, 2024
@targos targos added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Sep 21, 2024
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. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants