Skip to content

module: add SourceMap.lineLengths - #48461

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
isaacs:isaacs/expose-source-maps-line-lengths
Jul 12, 2023
Merged

module: add SourceMap.lineLengths#48461
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
isaacs:isaacs/expose-source-maps-line-lengths

Conversation

@isaacs

Copy link
Copy Markdown
Contributor

Fix: #48460

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jun 14, 2023

@anonriganonrig 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.

Can you update the documentation as well?

@isaacs
isaacsforce-pushed the isaacs/expose-source-maps-line-lengths branch from b2376cf to 5873274CompareJune 15, 2023 04:04
@isaacs

Copy link
Copy Markdown
ContributorAuthor

The failing tests in CI are a bit confusing, these all pass locally, and it looks like they're not running with source maps enabled for some reason. I'm not sure why anything I did there would have changed that though.

@isaacs
isaacsforce-pushed the isaacs/expose-source-maps-line-lengths branch from 5873274 to 11b3b96CompareJune 15, 2023 16:50
@isaacs
isaacsforce-pushed the isaacs/expose-source-maps-line-lengths branch from 11b3b96 to da4b63aCompareJune 24, 2023 19:33
Comment threadlib/internal/source_map/source_map.js Outdated
@isaacs
isaacsforce-pushed the isaacs/expose-source-maps-line-lengths branch from da4b63a to 1485dc8CompareJune 25, 2023 11:19

@legendecaslegendecas 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 % one nit.

Comment threaddoc/api/module.md Outdated
@@ -274,6 +274,7 @@ added:
#### `new SourceMap(payload)`

@legendecaslegendecasJul 5, 2023

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.

The function signature should be updated to include the optional parameter too.

Suggested change
#### `new SourceMap(payload)`
#### `new SourceMap(payload[, lineLengths])`

As the generated code line lengths property is not part of the source maps spec, would it be more prudent to set the property with an option bag instead of a positional parameter?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

would it be more prudent to set the property with an option bag instead of a positional parameter?

No strong opinions here, but it's a pita to change this kind of thing later, so I'm feeling like it's probably a good idea, too. Anyone else wanna weight on it?

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.

@bcoe would you mind taking a look at this PR? Thank you!

@legendecaslegendecas added the source maps Issues and PRs related to source map support. label Jul 5, 2023
Document lineLengths argument
Make lineLengths part of an option bag rather than a positional arg

@legendecaslegendecas 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

@legendecaslegendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 12, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 12, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@lpincalpinca added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jul 12, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 12, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 9053943 into nodejs:mainJul 12, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 9053943

juanarbol pushed a commit that referenced this pull request Jul 13, 2023
Fix: #48460
PR-URL: #48461Fixes: #48460
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@juanarboljuanarbol mentioned this pull request Jul 13, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Fix: nodejs#48460
PR-URL: nodejs#48461Fixes: nodejs#48460
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Fix: nodejs#48460
PR-URL: nodejs#48461Fixes: nodejs#48460
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@ruyadorno

Copy link
Copy Markdown
Member

This commit does not land cleanly on v18.x-staging and will need manual backport in case we want it in v18.

@targostargos added the semver-minor PRs that contain new features and should be released in the next minor version. label Nov 15, 2023
@targos

Copy link
Copy Markdown
Member

This is another PR that should have been labeled semver-minor.

nodejs-github-bot pushed a commit that referenced this pull request Feb 18, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 added a commit to aduh95/node that referenced this pull request Feb 18, 2025
PR-URL: nodejs#57098Fixes: nodejs#57094
Refs: nodejs#48461
Refs: nodejs#47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 added a commit to aduh95/node that referenced this pull request Feb 18, 2025
PR-URL: nodejs#57098Fixes: nodejs#57094
Refs: nodejs#48461
Refs: nodejs#47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Feb 20, 2025
PR-URL: #57098
Backport-PR-URL: #57129Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
acidiney pushed a commit to acidiney/node that referenced this pull request Feb 23, 2025
PR-URL: nodejs#57098Fixes: nodejs#57094
Refs: nodejs#48461
Refs: nodejs#47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Feb 24, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Feb 25, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau pushed a commit that referenced this pull request Mar 20, 2025
PR-URL: #57098
Backport-PR-URL: #57131Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 added a commit that referenced this pull request Apr 2, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 added a commit that referenced this pull request Apr 3, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Apr 16, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Apr 17, 2025
PR-URL: #57098Fixes: #57094
Refs: #48461
Refs: #47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.needs-ciPRs that need a full CI run.semver-minorPRs that contain new features and should be released in the next minor version.source mapsIssues and PRs related to source map support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose lineLengths from source map cache

7 participants

@isaacs@nodejs-github-bot@ruyadorno@targos@anonrig@legendecas@lpinca