You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2020/07/16 16:13:08 UTC
[cordova-lib] branch master updated: chore: bump cordova-eslint w/
automatic fixes (#848)
This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-lib.git
The following commit(s) were added to refs/heads/master by this push:
new 05dc359 chore: bump cordova-eslint w/ automatic fixes (#848)
05dc359 is described below
commit 05dc359da0ad8c2ab913e2e8547868df13815863
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Fri Jul 17 01:12:58 2020 +0900
chore: bump cordova-eslint w/ automatic fixes (#848)
---
integration-tests/fetch.spec.js | 14 +-
integration-tests/pkgJson.spec.js | 32 +++--
integration-tests/plugman_uninstall.spec.js | 14 +-
package-lock.json | 201 +++++++++++-----------------
package.json | 2 +-
spec/cordova/platform/addHelper.spec.js | 2 +-
spec/cordova/util.spec.js | 10 +-
spec/helpers.js | 16 ++-
spec/plugman/install.spec.js | 16 +--
src/cordova/plugin/add.js | 4 +-
src/hooks/Context.js | 4 +-
11 files changed, 138 insertions(+), 177 deletions(-)
diff --git a/integration-tests/fetch.spec.js b/integration-tests/fetch.spec.js
index 06e93dc..1e824ef 100644
--- a/integration-tests/fetch.spec.js
+++ b/integration-tests/fetch.spec.js
@@ -69,7 +69,7 @@ describe('end-to-end plugin dependency tests', function () {
return cordova.plugin('add', 'cordova-plugin-file');
}).then(function () {
expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
- return cordova.plugin('add', plugins['Test1']);
+ return cordova.plugin('add', plugins.Test1);
}).catch(function (err) {
expect(err.message).toContain('does not satisfy dependency plugin requirement');
});
@@ -82,7 +82,7 @@ describe('end-to-end plugin dependency tests', function () {
})
.then(function () {
expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
- return cordova.plugin('add', plugins['Test1'], { force: true });
+ return cordova.plugin('add', plugins.Test1, { force: true });
})
.then(function () {
expect(path.join(pluginsDir, 'Test1')).toExist();
@@ -97,7 +97,7 @@ describe('end-to-end plugin dependency tests', function () {
})
.then(function () {
expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
- return cordova.plugin('add', plugins['Test1']);
+ return cordova.plugin('add', plugins.Test1);
})
.then(function () {
expect(path.join(pluginsDir, 'Test1')).toExist();
@@ -109,15 +109,15 @@ describe('end-to-end plugin dependency tests', function () {
// Test1 and Test3 have incompatible dependencies on cordova-plugin-file
return Promise.resolve()
.then(function () {
- return cordova.plugin('add', plugins['Test1']);
+ return cordova.plugin('add', plugins.Test1);
})
.then(function () {
expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
expect(path.join(pluginsDir, 'Test1')).toExist();
- return cordova.plugin('add', plugins['Test2']);
+ return cordova.plugin('add', plugins.Test2);
})
.then(function () {
- return cordova.plugin('add', plugins['Test3']);
+ return cordova.plugin('add', plugins.Test3);
})
.catch(function (err) {
expect(path.join(pluginsDir, 'Test2')).toExist();
@@ -134,7 +134,7 @@ describe('end-to-end plugin dependency tests', function () {
return cordova.plugin('add', 'https://github.com/apache/cordova-plugin-file');
})
.then(function () {
- return cordova.plugin('add', plugins['Test4']);
+ return cordova.plugin('add', plugins.Test4);
})
.then(function () {
expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
diff --git a/integration-tests/pkgJson.spec.js b/integration-tests/pkgJson.spec.js
index 4ce7feb..0f4ae8d 100644
--- a/integration-tests/pkgJson.spec.js
+++ b/integration-tests/pkgJson.spec.js
@@ -89,20 +89,24 @@ describe('pkgJson', function () {
}
const customMatchers = {
- toSatisfy: () => ({ compare (version, spec) {
- const pass = semver.satisfies(version, spec);
- const expectation = (pass ? 'not ' : '') + 'to satisfy';
- return {
- pass, message: `expected ${version} ${expectation} ${spec}`
- };
- } }),
- tohaveMinSatisfyingVersion: () => ({ compare (spec, version) {
- const pass = specWithMinSatisfyingVersion(version).asymmetricMatch(spec);
- const expectation = (pass ? 'not ' : '') + 'to have minimal satisfying version';
- return {
- pass, message: `expected ${spec} ${expectation} ${version}`
- };
- } })
+ toSatisfy: () => ({
+ compare (version, spec) {
+ const pass = semver.satisfies(version, spec);
+ const expectation = (pass ? 'not ' : '') + 'to satisfy';
+ return {
+ pass, message: `expected ${version} ${expectation} ${spec}`
+ };
+ }
+ }),
+ tohaveMinSatisfyingVersion: () => ({
+ compare (spec, version) {
+ const pass = specWithMinSatisfyingVersion(version).asymmetricMatch(spec);
+ const expectation = (pass ? 'not ' : '') + 'to have minimal satisfying version';
+ return {
+ pass, message: `expected ${spec} ${expectation} ${version}`
+ };
+ }
+ })
};
// Add our custom matchers
diff --git a/integration-tests/plugman_uninstall.spec.js b/integration-tests/plugman_uninstall.spec.js
index 5d6c651..6cdcc91 100644
--- a/integration-tests/plugman_uninstall.spec.js
+++ b/integration-tests/plugman_uninstall.spec.js
@@ -59,15 +59,15 @@ describe('plugman/uninstall', () => {
.then(function () {
return install('android', project1, plugins['org.test.plugins.dummyplugin']);
}).then(function () {
- return install('android', project1, plugins['A']);
+ return install('android', project1, plugins.A);
}).then(function () {
- return install('android', project2, plugins['C']);
+ return install('android', project2, plugins.C);
}).then(function () {
- return install('android', project2, plugins['A']);
+ return install('android', project2, plugins.A);
}).then(function () {
- return install('android', project3, plugins['A']);
+ return install('android', project3, plugins.A);
}).then(function () {
- return install('android', project3, plugins['C']);
+ return install('android', project3, plugins.C);
}).then(function (result) {
expect(result).toEqual(true);
});
@@ -264,12 +264,12 @@ describe('plugman/uninstall', () => {
return uninstall('android', project, plugins['org.test.plugins.dummyplugin'])
.then(function () {
// Fails... A depends on
- return uninstall('android', project, plugins['C']);
+ return uninstall('android', project, plugins.C);
}).catch(function (err) {
expect(err.stack).toMatch(/The plugin 'C' is required by \(A\), skipping uninstallation./);
}).then(function () {
// dependencies on C,D ... should this only work with --recursive? prompt user..?
- return uninstall('android', project, plugins['A']);
+ return uninstall('android', project, plugins.A);
});
});
});
diff --git a/package-lock.json b/package-lock.json
index e0e8b2a..e9f63f0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -140,16 +140,15 @@
}
},
"@cordova/eslint-config": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@cordova/eslint-config/-/eslint-config-2.0.0.tgz",
- "integrity": "sha512-Wz0fYU1MohlVaB3938EWBCg1MfSbaevg3ZBXTdrpMBrwXaWTAuV/Z5m/KKbw0xOQmP3POtBOeDxNy9VbkmyUOg==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@cordova/eslint-config/-/eslint-config-3.0.0.tgz",
+ "integrity": "sha512-YOZn/G5foKFzZc8R/oBM+BLG6vHufOmZiJtiZHNxifsrqzORwyjq1EiUSvQ6s0bm6Ydh3zwwyuGVbYyDBil67w==",
"dev": true,
"requires": {
- "eslint": "^6.6.0",
- "eslint-config-semistandard": "^15.0.0",
- "eslint-config-standard": "^13.0.1",
- "eslint-plugin-import": "^2.18.2",
- "eslint-plugin-node": "^10.0.0",
+ "eslint": "^6.8.0",
+ "eslint-config-standard": "^14.1.1",
+ "eslint-plugin-import": "^2.20.1",
+ "eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1"
}
@@ -278,9 +277,9 @@
}
},
"ajv": {
- "version": "6.12.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
- "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
+ "version": "6.12.3",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
+ "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -609,7 +608,8 @@
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
},
"camelcase": {
"version": "5.3.1",
@@ -869,11 +869,6 @@
}
}
},
- "cordova-app-hello-world": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-5.0.0.tgz",
- "integrity": "sha512-5My01wsYoeYwS0f/t5Ck52xPm0+2zYJ0SlvxG9vUsndDGtgiP6t/G8upPgWcyDRRz7Rs/50yZuOntmHqmJxccQ=="
- },
"cordova-common": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.1.tgz",
@@ -908,50 +903,6 @@
}
}
},
- "cordova-create": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cordova-create/-/cordova-create-3.0.0.tgz",
- "integrity": "sha512-WxZRTnt5RHxSAB9urnHFUtVBcIe1YjR4sfwHLsxakNoKkFhcie3HrV5QmNBgRQ5DkxmanRN3VSx4OrPVsNmAaQ==",
- "requires": {
- "cordova-app-hello-world": "^5.0.0",
- "cordova-common": "^4.0.1",
- "cordova-fetch": "^3.0.0",
- "fs-extra": "^9.0.0",
- "globby": "^11.0.0",
- "import-fresh": "^3.2.1",
- "isobject": "^4.0.0",
- "npm-package-arg": "^8.0.1",
- "path-is-inside": "^1.0.2",
- "tmp": "^0.2.1",
- "valid-identifier": "0.0.2"
- },
- "dependencies": {
- "fs-extra": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
- "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
- "requires": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^1.0.0"
- }
- },
- "globby": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
- "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
- "requires": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.1.1",
- "ignore": "^5.1.4",
- "merge2": "^1.3.0",
- "slash": "^3.0.0"
- }
- }
- }
- },
"cordova-fetch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cordova-fetch/-/cordova-fetch-3.0.0.tgz",
@@ -1365,16 +1316,10 @@
}
}
},
- "eslint-config-semistandard": {
- "version": "15.0.1",
- "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-15.0.1.tgz",
- "integrity": "sha512-sfV+qNBWKOmF0kZJll1VH5XqOAdTmLlhbOl9WKI11d2eMEe+Kicxnpm24PQWHOqAfk5pAWU2An0LjNCXKa4Usg==",
- "dev": true
- },
"eslint-config-standard": {
- "version": "13.0.1",
- "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-13.0.1.tgz",
- "integrity": "sha512-zLKp4QOgq6JFgRm1dDCVv1Iu0P5uZ4v5Wa4DTOkg2RFMxdCX/9Qf7lz9ezRj2dBRa955cWQF/O/LWEiYWAHbTw==",
+ "version": "14.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz",
+ "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==",
"dev": true
},
"eslint-import-resolver-node": {
@@ -1398,15 +1343,24 @@
}
},
"eslint-plugin-es": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz",
- "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz",
+ "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==",
"dev": true,
"requires": {
- "eslint-utils": "^1.4.2",
+ "eslint-utils": "^2.0.0",
"regexpp": "^3.0.0"
},
"dependencies": {
+ "eslint-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+ "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+ "dev": true,
+ "requires": {
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ },
"regexpp": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
@@ -1449,17 +1403,28 @@
}
},
"eslint-plugin-node": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz",
- "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==",
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
+ "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
"dev": true,
"requires": {
- "eslint-plugin-es": "^2.0.0",
- "eslint-utils": "^1.4.2",
+ "eslint-plugin-es": "^3.0.0",
+ "eslint-utils": "^2.0.0",
"ignore": "^5.1.1",
"minimatch": "^3.0.4",
"resolve": "^1.10.1",
"semver": "^6.1.0"
+ },
+ "dependencies": {
+ "eslint-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+ "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+ "dev": true,
+ "requires": {
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ }
}
},
"eslint-plugin-promise": {
@@ -2169,6 +2134,7 @@
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
"integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
@@ -2237,21 +2203,21 @@
}
},
"inquirer": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.2.0.tgz",
- "integrity": "sha512-E0c4rPwr9ByePfNlTIB8z51kK1s2n6jrHuJeEHENl/sbq2G/S1auvibgEwNR4uSyiU+PiYHqSwsgGiXjG8p5ZQ==",
+ "version": "7.3.2",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.2.tgz",
+ "integrity": "sha512-DF4osh1FM6l0RJc5YWYhSDB6TawiBRlbV9Cox8MWlidU218Tb7fm3lQTULyUJDfJ0tjbzl0W4q651mrCCEM55w==",
"dev": true,
"requires": {
"ansi-escapes": "^4.2.1",
- "chalk": "^3.0.0",
+ "chalk": "^4.1.0",
"cli-cursor": "^3.1.0",
- "cli-width": "^2.0.0",
+ "cli-width": "^3.0.0",
"external-editor": "^3.0.3",
"figures": "^3.0.0",
- "lodash": "^4.17.15",
+ "lodash": "^4.17.16",
"mute-stream": "0.0.8",
"run-async": "^2.4.0",
- "rxjs": "^6.5.3",
+ "rxjs": "^6.6.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0",
"through": "^2.3.6"
@@ -2268,15 +2234,21 @@
}
},
"chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
+ "cli-width": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
+ "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
+ "dev": true
+ },
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -2298,6 +2270,12 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
+ "lodash": {
+ "version": "4.17.19",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
+ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
+ "dev": true
+ },
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
@@ -2421,11 +2399,6 @@
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
- "isobject": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
- "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA=="
- },
"istanbul-lib-coverage": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz",
@@ -3151,6 +3124,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
"requires": {
"callsites": "^3.0.0"
}
@@ -3183,7 +3157,8 @@
"path-is-inside": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
- "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM="
+ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
+ "dev": true
},
"path-key": {
"version": "3.1.1",
@@ -3476,7 +3451,8 @@
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
},
"restore-cursor": {
"version": "3.1.0",
@@ -3919,14 +3895,6 @@
}
}
},
- "rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "requires": {
- "glob": "^7.1.3"
- }
- },
"run-async": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
@@ -3954,9 +3922,9 @@
}
},
"rxjs": {
- "version": "6.5.5",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz",
- "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==",
+ "version": "6.6.0",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz",
+ "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
@@ -4251,9 +4219,9 @@
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="
},
"strip-json-comments": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
- "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true
},
"stubs": {
@@ -4447,14 +4415,6 @@
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true
},
- "tmp": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
- "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
- "requires": {
- "rimraf": "^3.0.0"
- }
- },
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -4591,11 +4551,6 @@
"integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==",
"dev": true
},
- "valid-identifier": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/valid-identifier/-/valid-identifier-0.0.2.tgz",
- "integrity": "sha512-zaSmOW6ykXwrkX0YTuFUSoALNEKGaQHpxBJQLb3TXspRNDpBwbfrIQCZqAQ0LKBlKuyn2YOq7NNd6415hvZ33g=="
- },
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
diff --git a/package.json b/package.json
index 8a78431..46f3400 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"write-file-atomic": "^3.0.3"
},
"devDependencies": {
- "@cordova/eslint-config": "^2.0.0",
+ "@cordova/eslint-config": "^3.0.0",
"codecov": "^3.2.0",
"cordova-android": "9.0.0",
"delay": "^4.1.0",
diff --git a/spec/cordova/platform/addHelper.spec.js b/spec/cordova/platform/addHelper.spec.js
index 06d6577..81cbe6f 100644
--- a/spec/cordova/platform/addHelper.spec.js
+++ b/spec/cordova/platform/addHelper.spec.js
@@ -235,7 +235,7 @@ describe('cordova/platform/addHelper', function () {
it('should use pkgJson version devDependencies, if dependencies are undefined', function () {
package_json_mock.dependencies = undefined;
package_json_mock.cordova = { platforms: ['ios'] };
- package_json_mock.devDependencies['ios'] = {};
+ package_json_mock.devDependencies.ios = {};
cordova_util.requireNoCache.and.returnValue(package_json_mock);
fs.existsSync.and.callFake(function (filePath) {
return path.basename(filePath) === 'package.json';
diff --git a/spec/cordova/util.spec.js b/spec/cordova/util.spec.js
index 40d5674..f95a8d4 100644
--- a/spec/cordova/util.spec.js
+++ b/spec/cordova/util.spec.js
@@ -24,7 +24,7 @@ var events = require('../../cordova-lib').events;
var helpers = require('../helpers');
var cwd = process.cwd();
-var origPWD = process.env['PWD'];
+var origPWD = process.env.PWD;
describe('util module', function () {
let temp;
@@ -45,7 +45,7 @@ describe('util module', function () {
fs.ensureDirSync(anotherdir);
});
afterEach(function () {
- process.env['PWD'] = origPWD;
+ process.env.PWD = origPWD;
process.chdir(cwd);
});
it('Test 002 : should return false if it cannot find a Cordova project directory up the directory tree', function () {
@@ -56,7 +56,7 @@ describe('util module', function () {
expect(util.isCordova(somedir)).toEqual(somedir);
});
it('Test 004 : should ignore PWD when it is undefined', function () {
- delete process.env['PWD'];
+ delete process.env.PWD;
fs.ensureDirSync(path.join(somedir, 'www'));
fs.ensureDirSync(path.join(somedir, 'config.xml'));
process.chdir(anotherdir);
@@ -64,13 +64,13 @@ describe('util module', function () {
});
it('Test 005 : should use PWD when available', function () {
fs.ensureDirSync(path.join(somedir, 'www', 'config.xml'));
- process.env['PWD'] = anotherdir;
+ process.env.PWD = anotherdir;
process.chdir(path.sep);
expect(util.isCordova()).toEqual(somedir);
});
it('Test 006 : should use cwd as a fallback when PWD is not a cordova dir', function () {
fs.ensureDirSync(path.join(somedir, 'www', 'config.xml'));
- process.env['PWD'] = path.sep;
+ process.env.PWD = path.sep;
process.chdir(anotherdir);
expect(util.isCordova()).toEqual(somedir);
});
diff --git a/spec/helpers.js b/spec/helpers.js
index 7d29f10..7f1dc66 100644
--- a/spec/helpers.js
+++ b/spec/helpers.js
@@ -199,13 +199,15 @@ module.exports.asymmetricMatchers = {
};
const customMatchers = {
- toExist: () => ({ compare (file) {
- const pass = fs.existsSync(file);
- const expectation = (pass ? 'not ' : '') + 'to exist';
- return {
- pass, message: `expected ${file} ${expectation}`
- };
- } })
+ toExist: () => ({
+ compare (file) {
+ const pass = fs.existsSync(file);
+ const expectation = (pass ? 'not ' : '') + 'to exist';
+ return {
+ pass, message: `expected ${file} ${expectation}`
+ };
+ }
+ })
};
// Add our custom matchers
diff --git a/spec/plugman/install.spec.js b/spec/plugman/install.spec.js
index 817ea8d..d7e6d27 100644
--- a/spec/plugman/install.spec.js
+++ b/spec/plugman/install.spec.js
@@ -74,8 +74,8 @@ describe('plugman/install', () => {
return getFixture('androidApp').copyTo(project)
.then(_ => {
- results['emit_results'] = [];
- events.on('results', result => results['emit_results'].push(result));
+ results.emit_results = [];
+ events.on('results', result => results.emit_results.push(result));
// Every time when addPlugin is called it will return some truthy value
const returnValues = [true, {}, [], 'foo', () => {}][Symbol.iterator]();
@@ -130,19 +130,19 @@ describe('plugman/install', () => {
describe('success', () => {
it('Test 002 : should emit a results event with platform-agnostic <info>', () => {
// org.test.plugins.childbrowser
- expect(results['emit_results'][0]).toBe('No matter what platform you are installing to, this notice is very important.');
+ expect(results.emit_results[0]).toBe('No matter what platform you are installing to, this notice is very important.');
}, TIMEOUT);
it('Test 003 : should emit a results event with platform-specific <info>', () => {
// org.test.plugins.childbrowser
- expect(results['emit_results'][1]).toBe('Please make sure you read this because it is very important to complete the installation of your plugin.');
+ expect(results.emit_results[1]).toBe('Please make sure you read this because it is very important to complete the installation of your plugin.');
}, TIMEOUT);
it('Test 004 : should interpolate variables into <info> tags', () => {
// VariableBrowser
- expect(results['emit_results'][2]).toBe('Remember that your api key is batman!');
+ expect(results.emit_results[2]).toBe('Remember that your api key is batman!');
}, TIMEOUT);
it('Test 005 : should call fetch if provided plugin cannot be resolved locally', () => {
fetchSpy.and.returnValue(Promise.resolve(pluginDir('org.test.plugins.dummyplugin')));
- spyOn(fs, 'existsSync').and.callFake(fake['existsSync']['noPlugins']);
+ spyOn(fs, 'existsSync').and.callFake(fake.existsSync.noPlugins);
return install('android', project, 'CLEANYOURSHORTS')
.then(() => {
expect(fetchSpy).toHaveBeenCalled();
@@ -221,8 +221,8 @@ describe('plugman/install', () => {
let emit;
beforeEach(() => {
spyOn(PlatformJson.prototype, 'isPluginInstalled').and.returnValue(false);
- spyOn(fs, 'existsSync').and.callFake(fake['existsSync']['noPlugins']);
- fetchSpy.and.callFake(fake['fetch']['dependencies']);
+ spyOn(fs, 'existsSync').and.callFake(fake.existsSync.noPlugins);
+ fetchSpy.and.callFake(fake.fetch.dependencies);
emit = spyOn(events, 'emit');
execaSpy.and.returnValue(Promise.resolve({ stdout: '9.0.0' }));
diff --git a/src/cordova/plugin/add.js b/src/cordova/plugin/add.js
index c6e635f..cc6dac8 100644
--- a/src/cordova/plugin/add.js
+++ b/src/cordova/plugin/add.js
@@ -84,7 +84,7 @@ function add (projectRoot, hooksRunner, opts) {
pluginInfoProvider: pluginInfoProvider,
variables: opts.cli_variables,
is_top_level: true,
- save_exact: opts['save_exact'] || false,
+ save_exact: opts.save_exact || false,
production: opts.production
};
@@ -118,7 +118,7 @@ function add (projectRoot, hooksRunner, opts) {
usePlatformWww: true,
nohooks: opts.nohooks,
force: opts.force,
- save_exact: opts['save_exact'] || false,
+ save_exact: opts.save_exact || false,
production: opts.production
};
diff --git a/src/hooks/Context.js b/src/hooks/Context.js
index 0c8bdde..199d83f 100644
--- a/src/hooks/Context.js
+++ b/src/hooks/Context.js
@@ -55,9 +55,9 @@ Context.prototype.requireCordovaModule = function (modulePath) {
if (!pkg.match(/^cordova-[^/]+/)) {
throw new CordovaError(
- `Using "requireCordovaModule" to load non-cordova module ` +
+ 'Using "requireCordovaModule" to load non-cordova module ' +
`"${modulePath}" is not supported. Instead, add this module to ` +
- `your dependencies and use regular "require" to load it.`
+ 'your dependencies and use regular "require" to load it.'
);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org