Skip to content
This repository was archived by the owner on Dec 9, 2019. It is now read-only.

Commit 8e225ee

Browse files
committed
fix(package): update deps and aligned code
1 parent 74695cf commit 8e225ee

10 files changed

Lines changed: 2729 additions & 1640 deletions

File tree

package.json

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@
5151
"polymer-workbox"
5252
],
5353
"dependencies": {
54-
"@babel/core": "7.4.3",
54+
"@babel/core": "7.6.2",
5555
"@babel/plugin-syntax-dynamic-import": "7.2.0",
5656
"@babel/plugin-syntax-object-rest-spread": "7.2.0",
57-
"@babel/preset-env": "7.4.3",
58-
"@babel/register": "7.4.0",
59-
"babel-loader": "8.0.5",
57+
"@babel/preset-env": "7.6.2",
58+
"@babel/register": "7.6.2",
59+
"babel-loader": "8.0.6",
6060
"chalk": "2.4.2",
61-
"clean-webpack-plugin": "1.0.1",
61+
"clean-webpack-plugin": "1.0.0",
6262
"cli-table": "0.3.1",
6363
"console-clear": "1.1.1",
6464
"copy-webpack-plugin": "5.0.3",
6565
"devcert-san": "0.3.3",
66-
"ejs-loader": "0.3.1",
66+
"ejs-loader": "0.3.5",
6767
"execa": "1.0.0",
6868
"find-node-modules": "2.0.0",
6969
"get-port": "5.0.0",
@@ -76,30 +76,30 @@
7676
"phunctional": "0.2.1",
7777
"pify": "4.0.1",
7878
"postcss-loader": "3.0.0",
79-
"raw-loader": "2.0.0",
80-
"replace-in-file": "3.4.3",
81-
"script-ext-html-webpack-plugin": "2.1.3",
79+
"raw-loader": "1.0.0",
80+
"replace-in-file": "3.4.2",
81+
"script-ext-html-webpack-plugin": "2.1.4",
8282
"update-notifier": "2.5.0",
8383
"validate-npm-package-name": "3.0.0",
84-
"webpack": "4.35.2",
85-
"webpack-dev-server": "3.2.1",
86-
"webpack-merge": "4.2.1",
84+
"webpack": "4.41.0",
85+
"webpack-dev-server": "3.8.2",
86+
"webpack-merge": "4.2.2",
8787
"which": "1.3.1",
8888
"workbox-webpack-plugin": "3.6.3",
8989
"yargs": "13.2.2"
9090
},
9191
"devDependencies": {
92-
"@babel/cli": "7.4.3",
93-
"ava": "1.2.1",
94-
"codecov": "3.3.0",
92+
"@babel/cli": "7.6.2",
93+
"ava": "2.4.0",
94+
"codecov": "3.6.1",
9595
"glob": "7.1.4",
9696
"ncp": "2.0.0",
97-
"nyc": "13.3.0",
98-
"puppeteer": "1.13.0",
99-
"rimraf": "2.6.3",
100-
"standard-version": "6.0.1",
101-
"uuid": "3.3.2",
102-
"xo": "0.24.0"
97+
"nyc": "14.1.1",
98+
"puppeteer": "1.20.0",
99+
"rimraf": "3.0.0",
100+
"standard-version": "7.0.0",
101+
"uuid": "3.3.3",
102+
"xo": "0.25.3"
103103
},
104104
"ava": {
105105
"files": [
@@ -109,6 +109,7 @@
109109
"xo": {
110110
"space": true,
111111
"rules": {
112+
"require-atomic-updates": 0,
112113
"max-len": [
113114
"error",
114115
{

src/check-version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const colors = require('chalk');
22
const pkg = require('./../package.json');
33

4-
const version = parseFloat(process.version.substr(1), 10);
4+
const version = parseFloat(process.version.slice(1), 10);
55
const minimum = parseFloat(pkg.engines.node.match(/\d+/g).join('.'), 10);
66

77
const write = message => process.stdout.write(message) + '\n';

src/commands/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ export default asyncCommand({
8282
// Be sure to show errors/warnings if present
8383
showStats(results);
8484
endMessage(results.toJson().assets);
85-
} catch (error) {
86-
console.error('\n' + error);
85+
} catch (error_) {
86+
console.error('\n' + error_);
8787
}
8888

8989
// if (argv.json) {

src/commands/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const getAuthor = async () => {
2323
return `${user ? user.name : ''} <${user ? user.email : ''}>`;
2424
};
2525

26-
const capitalize = str => str.charAt(0).toUpperCase() + str.substring(1);
26+
const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1);
2727
const completeData = async (argv, spinner) => {
2828
const questions = isMissing(argv);
2929
if (questions.length > 0) {

src/lib/async-command.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
const done = (err, result) => {
55
return err ?
6-
process.stderr.write(String(err) + '\n') &&
7-
process.exit(err.exitCode || 1) :
8-
result ? process.stdout.write(result + '\n') : process.exit(0);
6+
(process.stderr.write(String(err) + '\n') && process.exit(err.exitCode || 1)) :
7+
(result ? process.stdout.write(result + '\n') : process.exit(0));
98
};
109

1110
export default function asyncCommand(options) {

src/lib/logo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const textify = (logoASCII, text, useColor) => {
1919
const index = words[i].indexOf('\n');
2020
if (~index) {
2121
words
22-
.splice(i, 1, words[i].substring(0, index), '\n', words[i].substring(index + 1));
22+
.splice(i, 1, words[i].slice(0, index), '\n', words[i].slice(index + 1));
2323
i += 2;
2424
}
2525
}
@@ -66,7 +66,7 @@ const textify = (logoASCII, text, useColor) => {
6666
if (useColor) {
6767
for (let index = 3; index <= height; index++) {
6868
logo[index] = color(
69-
COLOR_CODE, logo[index].substring(0, start)) + color(0, logo[index].substring(start)
69+
COLOR_CODE, logo[index].slice(0, start)) + color(0, logo[index].slice(start)
7070
);
7171
}
7272
}

src/lib/replace-owner.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export default (keeps, name, author) => {
66
['name', 'short_name'].forEach(str => {
77
dict.set(new RegExp(`"${str}": ".+"`, 'g'), `"${str}": "${name}"`);
88
});
9+
10+
/* eslint-disable-next-line prefer-regex-literals */
911
dict.set(new RegExp('"author": ".+"', 'g'), `"author": "${author}"`);
1012

1113
for (const entry of keeps) {

src/lib/webpack/helpers/WebpackConfigHelpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default class WebpackConfigHelpers {
176176
try {
177177
fs.statSync(template);
178178
isPath = true;
179-
} catch (error) {}
179+
} catch (_) {}
180180

181181
const templatePath = isPath ? `!!ejs-loader!${path.resolve(this._cwd, template)}` : template;
182182
const {

src/lib/webpack/transform-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default async function (env, config) {
1111

1212
try {
1313
await fs.stat(transformerPath);
14-
} catch (error) {
14+
} catch (_) {
1515
if (env.config) {
1616
throw new Error(`polymerx-cli config could not be loaded!\nFile ${env.config} not found.`);
1717
}

0 commit comments

Comments
 (0)