Skip to content

module: refactor ts parser loading - #54243

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
marco-ippolito:feat/fix-module-loading
Aug 9, 2024
Merged

module: refactor ts parser loading#54243
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
marco-ippolito:feat/fix-module-loading

Conversation

@marco-ippolito

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-botnodejs-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-ippolitomarco-ippolito added the strip-types Issues or PRs related to strip-types support label Aug 7, 2024
@codecov

codecovBot commented Aug 7, 2024

Copy link
Copy Markdown

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 459 commits behind head on main.

Files with missing linesPatch %Lines
lib/internal/modules/helpers.js92.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 with missing linesCoverage Δ
lib/internal/modules/helpers.js97.31% <92.00%> (-0.43%)⬇️

... and 30 files with indirect coverage changes

@marco-ippolitomarco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 7, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 7, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@marco-ippolitomarco-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
Copy Markdown
Collaborator

@legendecas

legendecas commented Aug 7, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

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

bnb
bnb approved these changes Aug 7, 2024

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

@marco-ippolitomarco-ippolito added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 8, 2024
@nodejs-github-botnodejs-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:mainAug 9, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 3cbeed8

targos pushed a commit that referenced this pull request Aug 14, 2024
PR-URL: #54243
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
@RafaelGSSRafaelGSS mentioned this pull request Aug 19, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.moduleIssues and PRs related to the module subsystem.needs-ciPRs that need a full CI run.strip-typesIssues or PRs related to strip-types support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@marco-ippolito@nodejs-github-bot@legendecas@mcollina@bnb@aduh95@jakecastelli@targos