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

core: update SourceMap build to use newest frontend and ParsedURL #14108

Merged
merged 6 commits into from
Jun 22, 2022

Conversation

connorjclark
Copy link
Collaborator

There's a handful of what seems like useful fixes since we last updated. see the history.

Since our last update, the CDT build has changed quite a bit. Including private fields. So we get some cruft in our outputted SourceMap.js now.

I tweaked the build script to do the raw string replacements on the input, instead of the code output. It made it simpler to iterate.

@connorjclark connorjclark requested a review from a team as a code owner June 9, 2022 20:24
@connorjclark connorjclark requested review from brendankenny and removed request for a team June 9, 2022 20:24
@@ -133,7 +133,7 @@ class UnusedJavaScript extends ByteEfficiencyAudit {
})
.filter(d => d.unused >= bundleSourceUnusedThreshold);

const commonSourcePrefix = commonPrefix([...bundle.map.sourceInfos.keys()]);
const commonSourcePrefix = commonPrefix(bundle.map.sourceURLs());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

literally does the same thing

@@ -100,7 +100,7 @@ class ModuleDuplication {
for (let i = 0; i < rawMap.sources.length; i++) {
if (this._shouldIgnoreSource(rawMap.sources[i])) continue;

const sourceKey = (rawMap.sourceRoot || '') + rawMap.sources[i];
const sourceKey = rawMap.sources[i];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

looks like the sourceRoot is no longer used to index the sources array.

@connorjclark connorjclark changed the title core: update cdt SourceMap to latest devtools frontend core: update SourceMap build to use newest frontend, and use ParsedURL Jun 9, 2022
@connorjclark connorjclark changed the title core: update SourceMap build to use newest frontend, and use ParsedURL core: update SourceMap build to use newest frontend and ParsedURL Jun 9, 2022
@connorjclark connorjclark merged commit de4d3e4 into master Jun 22, 2022
@connorjclark connorjclark deleted the update-cdt-sourcemap branch June 22, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants