Skip to content

Commit 964e1ca

Browse files
niieaniEisenbergEffect
authored andcommitted
JSPM updated dependencies (aurelia#709)
* chore(typescript): update dependencies fixes aurelia#631 * chore(esnext): update dependencies
1 parent daff198 commit 964e1ca

20 files changed

+113
-99
lines changed
+2-26
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var path = require('path');
22
var paths = require('./paths');
33

4-
exports.base = function() {
4+
module.exports = function(modules) {
55
return {
66
filename: '',
77
filenameRelative: '',
@@ -12,35 +12,11 @@ exports.base = function() {
1212
comments: false,
1313
compact: false,
1414
code: true,
15-
presets: [ 'es2015-loose', 'stage-1'],
15+
presets: [ ['es2015', { loose: true, modules: modules }], 'stage-1'],
1616
plugins: [
1717
'syntax-flow',
1818
'transform-decorators-legacy',
1919
'transform-flow-strip-types'
2020
]
2121
};
2222
};
23-
24-
exports.commonjs = function() {
25-
var options = exports.base();
26-
options.plugins.push('transform-es2015-modules-commonjs');
27-
return options;
28-
};
29-
30-
exports.amd = function() {
31-
var options = exports.base();
32-
options.plugins.push('transform-es2015-modules-amd');
33-
return options;
34-
};
35-
36-
exports.system = function() {
37-
var options = exports.base();
38-
options.plugins.push('transform-es2015-modules-systemjs');
39-
return options;
40-
};
41-
42-
exports.es2015 = function() {
43-
var options = exports.base();
44-
options.presets = ['stage-1'];
45-
return options;
46-
};

skeleton-esnext/build/tasks/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gulp.task('build-system', function() {
2020
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
2121
.pipe(changed(paths.output, {extension: '.js'}))
2222
.pipe(sourcemaps.init({loadMaps: true}))
23-
.pipe(to5(assign({}, compilerOptions.system())))
23+
.pipe(to5(assign({}, compilerOptions('systemjs'))))
2424
.pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: '/src'}))
2525
.pipe(gulp.dest(paths.output));
2626
});

skeleton-esnext/build/tasks/e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ gulp.task('clean-e2e', function() {
2424
gulp.task('build-e2e', ['clean-e2e'], function() {
2525
return gulp.src(paths.e2eSpecsSrc)
2626
.pipe(plumber())
27-
.pipe(to5(assign({}, compilerOptions.commonjs())))
27+
.pipe(to5(assign({}, compilerOptions('commonjs'))))
2828
.pipe(gulp.dest(paths.e2eSpecsDist));
2929
});
3030

skeleton-esnext/config.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ System.config({
66
"github:*": "jspm_packages/github/*",
77
"npm:*": "jspm_packages/npm/*"
88
},
9-
109
map: {
1110
"aurelia-animator-css": "npm:[email protected]",
1211
"aurelia-bootstrapper": "npm:[email protected]",
@@ -200,4 +199,4 @@ System.config({
200199
"indexof": "npm:[email protected]"
201200
}
202201
}
203-
});
202+
});

skeleton-esnext/package.json

+24-25
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,43 @@
2424
},
2525
"devDependencies": {
2626
"aurelia-bundler": "^0.4.0",
27-
"aurelia-tools": "^0.2.4",
28-
"babel-core": "^6.11.4",
29-
"babel-eslint": "^6.1.2",
30-
"babel-plugin-istanbul": "^1.0.3",
31-
"babel-plugin-syntax-flow": "^6.8.0",
27+
"aurelia-protractor-plugin": "^1.0.0",
28+
"aurelia-tools": "^1.0.0",
29+
"babel-core": "^6.18.2",
30+
"babel-eslint": "^7.1.0",
31+
"babel-plugin-istanbul": "^2.0.3",
32+
"babel-plugin-syntax-flow": "^6.18.0",
3233
"babel-plugin-transform-decorators-legacy": "^1.3.4",
33-
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
34-
"babel-plugin-transform-es2015-modules-commonjs": "^6.11.5",
35-
"babel-plugin-transform-es2015-modules-systemjs": "^6.12.0",
36-
"babel-plugin-transform-flow-strip-types": "^6.8.0",
37-
"babel-preset-es2015": "^6.9.0",
38-
"babel-preset-es2015-loose": "^7.0.0",
39-
"babel-preset-stage-1": "^6.5.0",
40-
"browser-sync": "^2.13.0",
34+
"babel-plugin-transform-flow-strip-types": "^6.18.0",
35+
"babel-preset-es2015": "^6.18.0",
36+
"babel-preset-stage-1": "^6.16.0",
37+
"browser-sync": "^2.17.5",
4138
"conventional-changelog": "1.1.0",
42-
"del": "^2.2.1",
39+
"del": "^2.2.2",
4340
"gulp": "^3.9.1",
4441
"gulp-babel": "^6.1.2",
45-
"gulp-bump": "^2.2.0",
46-
"gulp-changed": "^1.3.1",
42+
"gulp-bump": "^2.5.0",
43+
"gulp-changed": "^1.3.2",
4744
"gulp-eslint": "^3.0.1",
48-
"gulp-htmlmin": "^2.0.0",
45+
"gulp-htmlmin": "^3.0.0",
4946
"gulp-notify": "^2.2.0",
5047
"gulp-plumber": "^1.1.0",
5148
"gulp-protractor": "3.0.0",
52-
"gulp-sourcemaps": "^1.6.0",
53-
"jasmine-core": "^2.4.1",
54-
"jspm": "^0.16.41",
55-
"karma": "^1.1.2",
49+
"gulp-sourcemaps": "^2.2.0",
50+
"jasmine-core": "^2.5.2",
51+
"jspm": "^0.16.47",
52+
"karma": "^1.3.0",
5653
"karma-babel-preprocessor": "^6.0.1",
57-
"karma-chrome-launcher": "^1.0.1",
54+
"karma-chrome-launcher": "^2.0.0",
5855
"karma-coverage": "^1.1.1",
5956
"karma-jasmine": "^1.0.2",
6057
"karma-jspm": "2.2.0",
6158
"object.assign": "^4.0.4",
62-
"require-dir": "^0.3.0",
59+
"protractor": "^4.0.10",
60+
"require-dir": "^0.3.1",
6361
"run-sequence": "^1.2.2",
6462
"vinyl-paths": "^2.1.0",
65-
"yargs": "^4.8.1"
63+
"yargs": "^6.3.0"
6664
},
6765
"jspm": {
6866
"dependencies": {
@@ -87,5 +85,6 @@
8785
"text": "github:systemjs/plugin-text@^0.0.8"
8886
},
8987
"devDependencies": {}
90-
}
88+
},
89+
"dependencies": {}
9190
}

skeleton-esnext/protractor.conf.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ exports.config = {
77
'browserName': 'chrome'
88
},
99

10-
//seleniumAddress: 'http://0.0.0.0:4444',
10+
// optional: add seleniumServerJar with proper version number
11+
// seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.53.1.jar',
1112
specs: ['test/e2e/dist/**/*.js'],
1213

1314
plugins: [{
14-
package: 'aurelia-tools/plugins/protractor'
15+
package: 'aurelia-protractor-plugin'
1516
}],
1617

1718

skeleton-esnext/test/e2e/src/demo.spec.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ describe('aurelia skeleton app', function() {
2929
browser.sleep(200);
3030
expect(poWelcome.getFullname()).toBe('ROB EISENBERG');
3131
});
32-
/*
33-
// Turned off due to a Chrome Bug
32+
3433
it('should show alert message when clicking submit button', () => {
3534
expect(poWelcome.openAlertDialog()).toBe(true);
3635
});
37-
*/
36+
3837
it('should navigate to users page', () => {
3938
poSkeleton.navigateTo('#/users');
4039
expect(poSkeleton.getCurrentPageTitle()).toBe('Github Users | Aurelia');

skeleton-typescript/build/tasks/build.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ gulp.task('build-system', function() {
2121
"typescript": require('typescript')
2222
});
2323
}
24+
2425
return gulp.src(paths.dtsSrc.concat(paths.source))
2526
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
2627
.pipe(changed(paths.output, {extension: '.ts'}))
2728
.pipe(sourcemaps.init({loadMaps: true}))
28-
.pipe(typescript(typescriptCompiler))
29+
.pipe(typescriptCompiler())
2930
.pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: '/src'}))
3031
.pipe(gulp.dest(paths.output));
3132
});

skeleton-typescript/build/tasks/e2e.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ gulp.task('clean-e2e', function() {
2323
var typescriptCompiler = typescriptCompiler || null;
2424
gulp.task('build-e2e', ['clean-e2e'], function() {
2525
if(!typescriptCompiler) {
26-
typescriptCompiler = typescript.createProject('tsconfig.json', {
26+
typescriptCompiler = typescript.createProject('tsconfig.e2e.json', {
2727
"typescript": require('typescript'),
2828
module: 'commonjs'
2929
});
3030
}
3131
return gulp.src(paths.dtsSrc.concat(paths.e2eSpecsSrc))
32-
.pipe(typescript(typescriptCompiler))
32+
.pipe(typescriptCompiler())
3333
.pipe(gulp.dest(paths.e2eSpecsDist));
3434
});
3535

skeleton-typescript/config.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ System.config({
66
"github:*": "jspm_packages/github/*",
77
"npm:*": "jspm_packages/npm/*"
88
},
9-
109
meta: {
1110
"bootstrap": {
1211
"deps": [
1312
"jquery"
1413
]
1514
}
1615
},
17-
1816
map: {
1917
"aurelia-animator-css": "npm:[email protected]",
2018
"aurelia-bootstrapper": "npm:[email protected]",
@@ -208,4 +206,4 @@ System.config({
208206
"indexof": "npm:[email protected]"
209207
}
210208
}
211-
});
209+
});

skeleton-typescript/package.json

+24-20
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,39 @@
2727
},
2828
"devDependencies": {
2929
"aurelia-bundler": "^0.4.0",
30-
"aurelia-tools": "^0.2.4",
31-
"browser-sync": "^2.13.0",
30+
"aurelia-protractor-plugin": "^1.0.0",
31+
"aurelia-tools": "^1.0.0",
32+
"browser-sync": "^2.17.5",
3233
"conventional-changelog": "1.1.0",
33-
"del": "^2.2.1",
34+
"del": "^2.2.2",
3435
"es6-module-loader": "^0.17.11",
3536
"gulp": "^3.9.1",
36-
"gulp-bump": "^2.2.0",
37-
"gulp-changed": "^1.3.1",
38-
"gulp-htmlmin": "^2.0.0",
37+
"gulp-bump": "^2.5.0",
38+
"gulp-changed": "^1.3.2",
39+
"gulp-htmlmin": "^3.0.0",
3940
"gulp-notify": "^2.2.0",
4041
"gulp-plumber": "^1.1.0",
4142
"gulp-protractor": "3.0.0",
42-
"gulp-sourcemaps": "^1.6.0",
43-
"gulp-tslint": "^6.0.2",
44-
"gulp-typescript": "^2.13.6",
43+
"gulp-sourcemaps": "^2.2.0",
44+
"gulp-tslint": "^6.1.3",
45+
"gulp-typescript": "^3.1.2",
4546
"isparta": "^4.0.0",
46-
"jasmine-core": "^2.4.1",
47-
"jspm": "^0.16.41",
48-
"karma": "^1.1.2",
49-
"karma-chrome-launcher": "^1.0.1",
47+
"jasmine-core": "^2.5.2",
48+
"jspm": "^0.16.47",
49+
"karma": "^1.3.0",
50+
"karma-chrome-launcher": "^2.0.0",
5051
"karma-jasmine": "^1.0.2",
51-
"karma-systemjs": "^0.14.0",
52+
"karma-systemjs": "^0.15.0",
5253
"object.assign": "^4.0.4",
53-
"require-dir": "^0.3.0",
54+
"protractor": "^4.0.10",
55+
"require-dir": "^0.3.1",
5456
"run-sequence": "^1.2.2",
55-
"systemjs": "0.19.35",
56-
"tslint": "^3.13.0",
57-
"typescript": "^2.0.0",
58-
"typings": "^1.3.2",
57+
"systemjs": "0.19.40",
58+
"tslint": "^3.15.1",
59+
"typescript": "^2.0.8",
60+
"typings": "^2.0.0",
5961
"vinyl-paths": "^2.1.0",
60-
"yargs": "^4.8.1"
62+
"yargs": "^6.3.0"
6163
},
6264
"jspm": {
6365
"dependencies": {
@@ -82,5 +84,7 @@
8284
"text": "github:systemjs/plugin-text@^0.0.8"
8385
},
8486
"devDependencies": {}
87+
},
88+
"dependencies": {
8589
}
8690
}

skeleton-typescript/protractor.conf.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ exports.config = {
77
'browserName': 'chrome'
88
},
99

10-
//seleniumAddress: 'http://0.0.0.0:4444',
11-
// add proper version number
12-
seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.44.0.jar',
10+
// optional: add seleniumServerJar with proper version number
11+
// seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.53.1.jar',
1312
specs: ['test/e2e/dist/**/*.js'],
1413

1514
plugins: [{
16-
package: 'aurelia-tools/plugins/protractor'
15+
package: 'aurelia-protractor-plugin'
1716
}],
1817

1918

skeleton-typescript/src/users.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ export class Users {
1818
public activate() {
1919
return this.http.fetch('users')
2020
.then(response => response.json())
21-
.then(users => this.users = users);
21+
.then(users => this.users = users as any);
2222
}
2323
}

skeleton-typescript/test/e2e/src/demo.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {PageObject_Welcome} from './welcome.po';
22
import {PageObject_Skeleton} from './skeleton.po';
3+
import {browser, element, by, By, $, $$, ExpectedConditions} from 'aurelia-protractor-plugin/protractor';
34

45
describe('aurelia skeleton app', function() {
56
let po_welcome: PageObject_Welcome;

skeleton-typescript/test/e2e/src/skeleton.po.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {browser, element, by, By, $, $$, ExpectedConditions} from 'aurelia-protractor-plugin/protractor';
2+
13
export class PageObject_Skeleton {
24

35
constructor() {

skeleton-typescript/test/e2e/src/welcome.po.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {browser, element, by, By, $, $$, ExpectedConditions} from 'aurelia-protractor-plugin/protractor';
2+
13
export class PageObject_Welcome {
24
getGreeting() {
35
return element(by.tagName('h2')).getText();
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import 'aurelia-polyfills';
22
import {initialize} from 'aurelia-pal-browser';
3-
initialize();
3+
initialize();

skeleton-typescript/tsconfig.e2e.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"rootDir": "test/e2e/src",
5+
"outDir": "dist",
6+
"sourceMap": true,
7+
"target": "es5",
8+
"module": "amd",
9+
"declaration": false,
10+
"noImplicitAny": false,
11+
"removeComments": true,
12+
"emitDecoratorMetadata": true,
13+
"experimentalDecorators": true,
14+
"moduleResolution": "node",
15+
"lib": ["es2015", "dom"],
16+
"baseUrl": "./",
17+
"paths": {
18+
"src/*": ["src/*"]
19+
}
20+
},
21+
"filesGlob": [
22+
"./src/**/*.ts",
23+
"./test/**/*.ts",
24+
"./typings/index.d.ts",
25+
"./custom_typings/**/*.d.ts",
26+
"./jspm_packages/**/*.d.ts"
27+
],
28+
"exclude": [
29+
"node_modules",
30+
"jspm_packages",
31+
"dist",
32+
"build"
33+
],
34+
"atom": {
35+
"rewriteTsconfig": false
36+
}
37+
}

0 commit comments

Comments
 (0)