Skip to content

Commit 30414ce

Browse files
authored
Merge pull request #604 from audreyso/CB-13501
CB-13501 : added support for node 8 and cleaned up eslint
2 parents 9513295 + c336af8 commit 30414ce

File tree

5 files changed

+7
-36
lines changed

5 files changed

+7
-36
lines changed

.travis.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,8 @@ git:
55
node_js:
66
- "4"
77
- "6"
8+
- "8"
89
install:
9-
- git clone https://github.com/apache/cordova-js --depth 10
10-
- git clone https://github.com/apache/cordova-fetch --depth 10
11-
- git clone https://github.com/apache/cordova-serve --depth 10
12-
- git clone https://github.com/apache/cordova-common --depth 10
13-
- (cd cordova-js && npm install && npm link .)
14-
- (cd cordova-common && npm install && npm link .)
15-
- (cd cordova-serve && npm install && npm link .)
16-
- (cd cordova-fetch && npm link cordova-common && npm install && npm link .)
17-
- (npm link cordova-serve && npm link cordova-fetch && npm link cordova-common && npm link cordova-js)
1810
- npm install
1911
# Workaround for npm/npm#10343 when dependency of linked module is moved to dependent
2012
# module's 'node_modules' In our case 'cordova-common' -> jshint' -> 'cli' dependency

appveyor.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,10 @@ environment:
55
matrix:
66
- nodejs_version: "4"
77
- nodejs_version: "6"
8+
- nodejs_version: "8"
89

910
install:
1011
- ps: Install-Product node $env:nodejs_version
11-
- git clone https://github.com/apache/cordova-js --depth 10
12-
- git clone https://github.com/apache/cordova-common --depth 10
13-
- git clone https://github.com/apache/cordova-fetch --depth 10
14-
- git clone https://github.com/apache/cordova-serve --depth 10
15-
- cd cordova-js
16-
- npm install
17-
- npm link .
18-
- cd ../cordova-common
19-
- npm install
20-
- npm link .
21-
- cd ../cordova-serve
22-
- npm install
23-
- npm link .
24-
- cd ../cordova-fetch
25-
- npm link cordova-common
26-
- npm install
27-
- npm link .
28-
- cd ../
29-
- npm link cordova-js
30-
- npm link cordova-fetch
31-
- npm link cordova-common
32-
- npm link cordova-serve
3312
- npm install
3413
# Workaround for npm/npm#10343 when dependency of linked module is moved to dependent
3514
# module's 'node_modules' In our case 'cordova-common' -> jshint' -> 'cli' dependency

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"aliasify": "^2.1.0",
2121
"cordova-common": "2.1.1",
2222
"cordova-create": "~1.1.0",
23-
"cordova-fetch": "1.2.0",
23+
"cordova-fetch": "1.2.1",
2424
"cordova-js": "4.2.2",
2525
"cordova-serve": "^2.0.0",
2626
"dep-graph": "1.1.0",

spec/cordova/util.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,9 @@ describe('util module', function () {
312312

313313
describe('getPlatformApiFunction', function () {
314314
it('Test 027 : should throw error informing user to update platform', function () {
315-
expect(function () { util.getPlatformApiFunction('some/path', 'android'); }).toThrow(new Error // eslint-disable-line func-call-spacing
316-
('Uncaught, unspecified "error" event. ( Using this version of Cordova with older version of cordova-android is deprecated. Upgrade to [email protected] or newer.)'));
315+
expect(function () { util.getPlatformApiFunction('some/path', 'android'); }).toThrowError(
316+
/(Uncaught, unspecified|Unhandled) "error" event. \( Using this version of Cordova with older version of cordova-android is deprecated\. Upgrade to cordova-android@5\.0\.0 or newer.\)/
317+
);
317318
});
318319

319320
it('Test 028 : should throw error if platform is not supported', function () {

src/cordova/plugin/add.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,8 @@ function determinePluginTarget (projectRoot, cfg, target, fetchOptions) {
240240
// If parsedSpec.version satisfies pkgJson version, no writing to pkg.json. Only write when
241241
// it does not satisfy.
242242
/* if (parsedSpec.version) {
243-
244243
if (pkgJson && pkgJson.dependencies && pkgJson.dependencies[parsedSpec.package]) {
245-
//it can only go in here if
244+
//it can only go in here if
246245
var noSymbolVersion = parsedSpec.version;
247246
if (parsedSpec.version.charAt(0) === '^' || parsedSpec.version.charAt(0) === '~') {
248247
noSymbolVersion = parsedSpec.version.slice(1);

0 commit comments

Comments
 (0)