Skip to content

Conversation

@adamraine
Copy link
Contributor

npm module is published #12044 (comment)

We can get rid of the google3 binary and the irregular method of importing.

Reduces devtools bundle size by ~45KB.

@adamraine adamraine requested a review from a team as a code owner March 8, 2021 21:04
@adamraine adamraine requested review from paulirish and removed request for a team March 8, 2021 21:04
@google-cla google-cla bot added the cla: yes label Mar 8, 2021
@adamraine adamraine changed the title core(csp-xss): use the csp evaluator npm module core(csp-xss): csp evaluator npm module Mar 8, 2021

/* eslint-env jest */

describe('Evaluator compatibility', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was just a sanity check since the previous method of importing CSP evaluator was irregular. We shouldn't need it now.

Comment on lines -135 to -137
const results = [
...findings.map(this.findingToTableItem),
];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol

/**
* @param {string[]} rawCsps
*/
function evaluateRawCspForFailures(rawCsps) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Helper functions added so i didn't need to change every single test case.

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

two minor things but otherwise lgtm

@devtools-bot devtools-bot merged commit 8d38cb5 into master Mar 16, 2021
@devtools-bot devtools-bot deleted the csp-eval-npm branch March 16, 2021 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants