Skip to content

module: remove extra padding from ts errors #57704

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

Merged
merged 2 commits into from
Apr 3, 2025

Conversation

marco-ippolito
Copy link
Member

@marco-ippolito marco-ippolito commented Apr 1, 2025

This PR finally removed the extra padding from errors and this is the final result:

[eval]:1
declare module F { export type x = number }
        ^^^^^^^^

SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: `module` keyword is not supported. Use `namespace` instead.
    at parseTypeScript (node:internal/modules/typescript:67:40)
    at processTypeScriptCode (node:internal/modules/typescript:145:42)
    at stripTypeScriptModuleTypes (node:internal/modules/typescript:212:22)
    at parseAndEvalModuleTypeScript (node:internal/process/execution:360:26)
    at node:internal/main/eval_string:39:3 {
  code: 'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX'
}

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/security-wg
  • @nodejs/typescript

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 1, 2025
@marco-ippolito marco-ippolito added the strip-types Issues or PRs related to strip-types support label Apr 1, 2025
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.22%. Comparing base (1c2d98d) to head (1d226bf).
Report is 672 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57704      +/-   ##
==========================================
- Coverage   90.22%   90.22%   -0.01%     
==========================================
  Files         630      630              
  Lines      185073   185073              
  Branches    36222    36215       -7     
==========================================
- Hits       166990   166983       -7     
- Misses      11044    11047       +3     
- Partials     7039     7043       +4     
Files with missing lines Coverage Δ
lib/internal/modules/typescript.js 97.51% <100.00%> (ø)

... and 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Apr 2, 2025
@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 Apr 3, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 3, 2025
@nodejs-github-bot nodejs-github-bot merged commit 0dc4725 into nodejs:main Apr 3, 2025
76 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 0dc4725

JonasBa pushed a commit to JonasBa/node that referenced this pull request Apr 11, 2025
PR-URL: nodejs#57704
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
RafaelGSS pushed a commit that referenced this pull request May 1, 2025
PR-URL: #57704
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
PR-URL: #57704
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request Jun 25, 2025
PR-URL: nodejs#57704
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@marco-ippolito marco-ippolito added the backport-open-v22.x Indicate that the PR has an open backport label Jun 25, 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. backport-open-v22.x Indicate that the PR has an open backport commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. 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.

6 participants