Skip to content

Commit

Permalink
pr
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Nov 12, 2020
1 parent 25c751c commit c2f1058
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/build-lightrider-bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function buildReportGenerator() {
.transform('@wardpeet/brfs', {
readFileSyncTransform: minifyFileTransform,
global: true,
parserOpts: {ecmaVersion: 10},
parserOpts: {ecmaVersion: 12},
})
.bundle((err, src) => {
if (err) throw err;
Expand Down
2 changes: 1 addition & 1 deletion build/build-smokehouse-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const smokehouseLibFilename = './lighthouse-cli/test/smokehouse/frontends/lib.js

browserify(smokehouseLibFilename, {standalone: 'Lighthouse.Smokehouse'})
.ignore('./lighthouse-cli/test/smokehouse/lighthouse-runners/cli.js')
.transform('@wardpeet/brfs', {global: true, parserOpts: {ecmaVersion: 10}})
.transform('@wardpeet/brfs', {global: true, parserOpts: {ecmaVersion: 12}})
.bundle((err, src) => {
if (err) throw err;
fs.writeFileSync(bundleOutFile, src.toString());
Expand Down
20 changes: 12 additions & 8 deletions build/build-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ function minifyFileTransform(file) {
next();
},
async final(next) {
const result = await terser.minify(code, {ecma: 2019});
try {
const result = await terser.minify(code, {ecma: 2019});

if (result.code) {
const saved = code.length - result.code.length;
// eslint-disable-next-line no-console
console.log(`minifying ${file} saved ${saved / 1000} KB`);
this.push(result.code);
}
if (result.code) {
const saved = code.length - result.code.length;
// eslint-disable-next-line no-console
console.log(`minifying ${file} saved ${saved / 1000} KB`);
this.push(result.code);
}

next();
next();
} catch (err) {
next(err);
}
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/scripts/dogfood-lhci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ -z "$LHCI_CANARY_SERVER_TOKEN" ]]; then
exit 0;
fi

if [[ "$TRAVIS_NODE_VERSION" != "10" ]]; then
if [[ "$TRAVIS_NODE_VERSION" != "12" ]]; then
echo "Not running dogfood script on node versions other than 10";
exit 0;
fi
Expand Down

0 comments on commit c2f1058

Please sign in to comment.