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: throw ERR_NO_TYPESCRIPT when compiled without amaro #55332

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

marco-ippolito
Copy link
Member

@marco-ippolito marco-ippolito commented Oct 9, 2024

Refs: #55323 (comment)

When trying to run --experimental-strip-types and Amaro is not available:

marcoippolito@marcos-MacBook-Pro node % ./node --experimental-strip-types -p "foo"
node:internal/util:201
    throw new ERR_NO_TYPESCRIPT();
    ^

Error [ERR_NO_TYPESCRIPT]: Node.js is not compiled with TypeScript support
    at assertTypeScript (node:internal/util:201:11)
    at loadTypeScriptParser (node:internal/modules/helpers:346:5)
    at stripTypeScriptTypes (node:internal/modules/helpers:369:17)
    at node:internal/main/eval_string:27:3 {
  code: 'ERR_NO_TYPESCRIPT'
}

Node.js v23.0.0-pre

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@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. util Issues and PRs related to the built-in util module. labels Oct 9, 2024
@RedYetiDev RedYetiDev added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. strip-types Issues or PRs related to strip-types support labels Oct 9, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 9, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.39%. Comparing base (82dab76) to head (a201ae6).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55332   +/-   ##
=======================================
  Coverage   88.39%   88.39%           
=======================================
  Files         652      652           
  Lines      186777   186788   +11     
  Branches    36039    36042    +3     
=======================================
+ Hits       165102   165120   +18     
+ Misses      14929    14925    -4     
+ Partials     6746     6743    -3     
Files with missing lines Coverage Δ
lib/internal/errors.js 96.99% <100.00%> (+<0.01%) ⬆️
lib/internal/modules/helpers.js 99.00% <100.00%> (+0.20%) ⬆️
lib/internal/util.js 96.99% <100.00%> (+0.02%) ⬆️

... and 35 files with indirect coverage changes

@aduh95
Copy link
Contributor

aduh95 commented Oct 9, 2024

Once #55324 lands, this PR would need to be rebased as the linter will likely not pass

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 10, 2024
@aduh95
Copy link
Contributor

aduh95 commented Oct 10, 2024

Error while loading rule 'node-core/documented-errors': Unordered error anchor in doc/api/errors.md:731 {
  [cause]: 'ERR_NO_TYPESCRIPT ≤ ERR_BUFFER_CONTEXT_NOT_AVAILABLE'
}

@marco-ippolito
Copy link
Member Author

@aduh95 linting errors are unrelated to this PR :(

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

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 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. labels Oct 11, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 11, 2024
@nodejs-github-bot nodejs-github-bot merged commit 90f56db into nodejs:main Oct 11, 2024
63 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 90f56db

louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#55332
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
PR-URL: nodejs#55332
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
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. 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. strip-types Issues or PRs related to strip-types support util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants