Skip to content

Update terser to v4.1.0 - #17035

Merged
sbc100 merged 1 commit into
mainfrom
update_terser
May 24, 2022
Merged

sbc100 merged 1 commit into
mainfrom
update_terser

Conversation

@sbc100

@sbc100 sbc100 commented May 24, 2022

Copy link
Copy Markdown
Collaborator

Also write some instructions for how to update doing forward.

This change allows us to move forward with things like usage
of BigInt literals in our JS library code (e.g. 42n).

@sbc100
sbc100 force-pushed the update_terser branch 2 times, most recently from 456779d to 70a4f9f Compare May 24, 2022 16:26
@sbc100 sbc100 changed the title Update terser to v4.8.0 Update terser to v4.1.0 May 24, 2022
@sbc100
sbc100 requested review from juj and kripken May 24, 2022 16:27
// Terser suboptimality! Should produce:
// test('var i=new Image;i.onload=()=>{}', 'var i=new Image;i.onload=()=>{}');
// but instead produces:
test('var i=new Image;i.onload=()=>{}', 'var i=new Image;i.onload=(()=>{});');

@sbc100 sbc100 May 24, 2022 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@kripken, What do you think about this part of the change? Is it still useful? What is it now testing?

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.

I think it's nice to verify that codegen is optimal there. I guess ideally this could just be in upstream terser, but since it's been an issue in the past, and it has almost no cost for us to test here, I'd keep it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

OK, I'll a quick comment maybe

Also write some instructions for how to update doing forward.

This change allows us to move forward with things like usage
of BigInt literals in our JS library code (e.g. `42n`).
@sbc100
sbc100 enabled auto-merge (squash) May 24, 2022 17:42
@sbc100
sbc100 merged commit 565c853 into main May 24, 2022
@sbc100
sbc100 deleted the update_terser branch May 24, 2022 18:45
sbc100 added a commit that referenced this pull request May 26, 2022
When updating terser to 4.1.0 in #17035 I inadvertently introduced a
dependency on the node source-map module.  Rebuilding after patching
our terser fork removed this:

emscripten-core/terser@b3ace3b

This happens to be available during testing because it one of our dev
decpendencies but we not include it in our end-user/production
dependencies.

This kind of error is hard to find since the `node_modules` for our test
setup is the same as the node_modules for emscripten itself.  It migth
be worth attempting to tease them appart if this kind of thing ever
shows up again.
sbc100 added a commit that referenced this pull request May 26, 2022
When updating terser to 4.1.0 in #17035 I inadvertently introduced a
dependency on the node source-map module.  Rebuilding after patching
our terser fork removed this:

emscripten-core/terser@b3ace3b

This happens to be available during testing because it one of our dev
decpendencies but we not include it in our end-user/production
dependencies.

This kind of error is hard to find since the `node_modules` for our test
setup is the same as the node_modules for emscripten itself.  It migth
be worth attempting to tease them appart if this kind of thing ever
shows up again.
sbc100 added a commit that referenced this pull request May 26, 2022
When updating terser to 4.1.0 in #17035 I inadvertently introduced a
dependency on the node source-map module.  Rebuilding after patching
our terser fork removed this:

emscripten-core/terser@b3ace3b

This happens to be available during testing because it one of our dev
decpendencies but we not include it in our end-user/production
dependencies.

This kind of error is hard to find since the `node_modules` for our test
setup is the same as the node_modules for emscripten itself.  It migth
be worth attempting to tease them appart if this kind of thing ever
shows up again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants