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: refactor ts parser loading #54243

Merged

Conversation

marco-ippolito
Copy link
Member

This PR refactors the way TypeScript parser is loaded.
Currently the function loadTypeScriptParser is not exposed but could allow overriding the default parsing options, so that an external version of amaro could be used.
It also changes the parse signature to take only the code string input and return { code }.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Aug 7, 2024
@marco-ippolito marco-ippolito added the strip-types Issues or PRs related to strip-types support label Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.11%. Comparing base (e0634f5) to head (fa44b7a).
Report is 5 commits behind head on main.

Files Patch % Lines
lib/internal/modules/helpers.js 92.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #54243   +/-   ##
=======================================
  Coverage   87.10%   87.11%           
=======================================
  Files         647      647           
  Lines      181739   181758   +19     
  Branches    34887    34887           
=======================================
+ Hits       158310   158332   +22     
- Misses      16738    16740    +2     
+ Partials     6691     6686    -5     
Files Coverage Δ
lib/internal/modules/helpers.js 97.31% <92.00%> (-0.43%) ⬇️

... and 30 files with indirect coverage changes

@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 7, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 7, 2024
@nodejs-github-bot
Copy link
Collaborator

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

@legendecas
Copy link
Member

legendecas commented Aug 7, 2024

The new function is not exposed as a public function or being able to be used with --expose-internals. How is it supposed to be used to override with an external amaro?

@marco-ippolito
Copy link
Member Author

The new function is not exposed as a public function or being able to be used with --expose-internals. How is it supposed to be used to override with an external amaro?

it's currently unusable from outside, but it prepares for it eventually

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@nodejs-github-bot
Copy link
Collaborator

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

Landed in 3cbeed8

targos pushed a commit that referenced this pull request Aug 14, 2024
PR-URL: #54243
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Aug 19, 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. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. strip-types Issues or PRs related to strip-types support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants