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

deps(angular): update minor version of angular fixture #11043

Closed
wants to merge 3 commits into from

Conversation

paulirish
Copy link
Member

same as #10086 just 7 months later.

this gets rid of the last security advisory we have.


also added one more minification-estimator test.... to make sure it doesn't overestimate pre-minified savings.

@paulirish paulirish requested a review from a team as a code owner June 30, 2020 22:50
@paulirish paulirish requested review from brendankenny and removed request for a team June 30, 2020 22:50
Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

good thinkin' on the minification! :)

lighthouse-core/test/lib/minification-estimator-test.js Outdated Show resolved Hide resolved
Co-authored-by: Patrick Hulce <patrick.hulce@gmail.com>
@vercel vercel bot temporarily deployed to Preview June 30, 2020 23:40 Inactive
@@ -10,6 +10,7 @@ const assert = require('assert').strict;
const {computeCSSTokenLength, computeJSTokenLength} = require('../../lib/minification-estimator.js'); // eslint-disable-line max-len

const angularFullScript = fs.readFileSync(require.resolve('angular/angular.js'), 'utf8');
const zoneMinifiedScript = fs.readFileSync(`${__dirname}/../../../lighthouse-cli/test/fixtures/dobetterweb/third_party/aggressive-promise-polyfill.js`, 'utf8'); // eslint-disable-line max-len
Copy link
Member

Choose a reason for hiding this comment

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

can we use this as motivation to move aggressive-promise-polyfill.js to the root third-party/ where it probably should be? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

i looked into it, but

let absoluteFilePath = path.join(__dirname, filePath);

makes that pretty challenging. ideas?

Copy link
Member Author

@paulirish paulirish Jul 1, 2020

Choose a reason for hiding this comment

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

we could do another of these

if (filePath.startsWith('/dist/viewer')) {
// Rewrite lighthouse-viewer paths to point to that location.
absoluteFilePath = path.join(__dirname, '/../../../', filePath);
}

🤮

Copy link
Collaborator

Choose a reason for hiding this comment

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

plz no this breaks smoke rider

Copy link
Member

Choose a reason for hiding this comment

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

plz no this breaks smoke rider

Can we talk solutions, then? How did smokerider work when we used to serve it out of node_modules/?

Copy link
Member

Choose a reason for hiding this comment

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

bump

Copy link
Collaborator

@connorjclark connorjclark Jul 7, 2020

Choose a reason for hiding this comment

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

Can we talk solutions, then? How did smokerider work when we used to serve it out of node_modules/?

we skip urls that use external resources, so I guess we skipped that one too when it served a file from node_modules. search for usesExternalResources in google3 smokerider.

can we check it into fixtures/third_party instead, so there is no serving rewiring needed?

EDIT: ah, I see that is how it is now but brendan is suggesting moving to root. so my take is to keep it where it is. but I'd prefer fixtures/third_party as a central place for all possible 3p smoke assets

Copy link
Member

Choose a reason for hiding this comment

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

so my take is to keep it where it is. but I'd prefer fixtures/third_party as a central place for all possible 3p smoke assets

well, those are equally wrong places to put third-party code, so I'm equally fine with them :P

Honestly we should probably delete this file and replace it with a considerably simpler promise stomper (we have a lot more confidence in our isolated context and cached globals than we did when we added this test), but adding it to the unit test is probably going to make it so that never happens :)

Copy link
Collaborator

@connorjclark connorjclark Jul 8, 2020

Choose a reason for hiding this comment

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

devtools frontend does this (/third_party and /front_end/third_party), so it's not without prior art

Copy link
Member Author

Choose a reason for hiding this comment

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

resolution: we handwrite a promisepolyfill for that test.
we get rid of this big one.
maybe use some other minified js for this estimator test.

@paulirish to do

@paulirish
Copy link
Member Author

resolution: we handwrite a promisepolyfill for that test.
we get rid of this big one.
maybe use some other minified js for this estimator test.

@paulirish to do

split into #11192 #11190 and #11191

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.

6 participants