diff --git a/gulpfile.js b/gulpfile.js index 9863586bab..0dbc6dc5dc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -981,9 +981,9 @@ gulp.task('static-checks', ['!build.tools'], function(done) { // distributed in our npm package, and loaded from node_modules by // the typescript compiler. -// Make sure the two typings tests are isolated, by running this one in a tempdir +// Make sure the typings tests are isolated, by running in a tempdir var tmpdir = path.join(os.tmpdir(), 'test.typings', new Date().getTime().toString()); -gulp.task('!pre.test.typings.layoutNodeModule', ['build.js.cjs'], function() { +gulp.task('!pre.test.typings.layoutNodeModule', function() { return gulp.src(['dist/js/cjs/angular2/**/*', 'node_modules/rxjs/**/*'], {base: 'dist/js/cjs'}) .pipe(gulp.dest(path.join(tmpdir, 'node_modules'))); }); @@ -1003,7 +1003,7 @@ gulp.task('!pre.test.typings.copyTypingsSpec', function() { return gulp.src(['modules/angular2/examples/**/*.ts']).pipe(gulp.dest(tmpdir)); }); -gulp.task('test.typings', +gulp.task('!test.typings', [ '!pre.test.typings.layoutNodeModule', '!pre.test.typings.copyTypingsSpec', @@ -1023,6 +1023,9 @@ gulp.task('test.typings', })); }); +gulp.task('test.typings', ['build.js.cjs'], + function(done) { runSequence('!test.typings', sequenceComplete(done)); }); + // ----------------- // orchestrated targets diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index 6d6ba4e22f..eabdfdf9bb 100644 --- a/npm-shrinkwrap.clean.json +++ b/npm-shrinkwrap.clean.json @@ -2231,6 +2231,9 @@ "glob": { "version": "4.3.5", "dependencies": { + "inflight": { + "version": "1.0.4" + }, "minimatch": { "version": "2.0.10" } @@ -3038,7 +3041,7 @@ } }, "gulp-tslint": { - "version": "4.3.4" + "version": "4.3.5" }, "gulp-typescript": { "version": "2.10.0", @@ -5415,10 +5418,10 @@ } }, "tslint": { - "version": "3.2.1", + "version": "3.7.0-dev.2", "dependencies": { "glob": { - "version": "6.0.3" + "version": "6.0.4" }, "underscore.string": { "version": "3.1.1" @@ -5452,7 +5455,7 @@ "version": "0.0.6" }, "typescript": { - "version": "1.7.5" + "version": "1.9.0-dev.20160409" }, "ua-parser-js": { "version": "0.7.10" @@ -5823,5 +5826,5 @@ } }, "name": "angular-srcs", - "version": "2.0.0-beta.12" + "version": "2.0.0-beta.14" } diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index fe76af852c..47d782eeb4 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "angular-srcs", - "version": "2.0.0-beta.12", + "version": "2.0.0-beta.14", "dependencies": { "abbrev": { "version": "1.0.7", @@ -3519,6 +3519,11 @@ "from": "glob@>=4.3.0 <4.4.0", "resolved": "https://registry.npmjs.org/glob/-/glob-4.3.5.tgz", "dependencies": { + "inflight": { + "version": "1.0.4", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, "minimatch": { "version": "2.0.10", "from": "minimatch@>=2.0.1 <3.0.0", @@ -4806,9 +4811,9 @@ } }, "gulp-tslint": { - "version": "4.3.4", - "from": "gulp-tslint@4.3.4", - "resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-4.3.4.tgz" + "version": "4.3.5", + "from": "gulp-tslint@4.3.5", + "resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-4.3.5.tgz" }, "gulp-typescript": { "version": "2.10.0", @@ -8632,14 +8637,14 @@ } }, "tslint": { - "version": "3.2.1", - "from": "tslint@>=3.2.1 <4.0.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-3.2.1.tgz", + "version": "3.7.0-dev.2", + "from": "tslint@next", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-3.7.0-dev.2.tgz", "dependencies": { "glob": { - "version": "6.0.3", + "version": "6.0.4", "from": "glob@>=6.0.1 <7.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.3.tgz" + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz" }, "underscore.string": { "version": "3.1.1", @@ -8691,9 +8696,9 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" }, "typescript": { - "version": "1.7.5", - "from": "typescript@1.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.7.5.tgz" + "version": "1.9.0-dev.20160409", + "from": "typescript@next", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.9.0-dev.20160409.tgz" }, "ua-parser-js": { "version": "0.7.10", diff --git a/package.json b/package.json index 334a3116a4..4cda4ac632 100644 --- a/package.json +++ b/package.json @@ -113,8 +113,8 @@ "ts-api-guardian": "0.0.2", "ts2dart": "^0.7.31", "tsd": "^0.6.5-beta", - "tslint": "^3.2.1", - "typescript": "^1.7.3", + "tslint": "^3.7.0-dev.2", + "typescript": "^1.9.0-dev.20160409", "universal-analytics": "^0.3.9", "webpack": "^1.12.6", "which": "~1", diff --git a/scripts/ci/build_and_test.sh b/scripts/ci/build_and_test.sh index 2da7b636a9..a669048561 100755 --- a/scripts/ci/build_and_test.sh +++ b/scripts/ci/build_and_test.sh @@ -23,7 +23,10 @@ elif [ "$MODE" = "typescript_next" ]; then # Ignore complaints about unsatisfied peer deps npm install typescript@next || true ${SCRIPT_DIR}/build_js.sh - ./node_modules/.bin/gulp test.typings + # Run typings test using the GA release of TypeScript + # This ensures that users aren't forced onto beta/nightly + npm install typescript@1.8.9 + ./node_modules/.bin/gulp \!test.typings elif [ "$MODE" = "payload" ]; then source ${SCRIPT_DIR}/env_dart.sh ./node_modules/.bin/gulp test.payload.dart/ci diff --git a/tools/broccoli/trees/node_tree.ts b/tools/broccoli/trees/node_tree.ts index a58a34daed..1f049975e0 100644 --- a/tools/broccoli/trees/node_tree.ts +++ b/tools/broccoli/trees/node_tree.ts @@ -120,6 +120,16 @@ module.exports = function makeNodeTree(projects, destinationPath) { let compiledTree = mergeTrees([compiledSrcTree, compiledTestTree]); + // Down-level .d.ts files to be TS 1.8 compatible + // TODO(alexeagle): this can be removed once we drop support for using Angular 2 with TS 1.8 + compiledTree = replace(compiledTree, { + files: ['**/*.d.ts'], + patterns: [ + {match: /^(\s*(static\s+)?)readonly\s+/mg, replacement: "$1"}, + ] + }); + + // Now we add the LICENSE file into all the folders that will become npm packages outputPackages.forEach(function(destDir) { var license = new Funnel('.', {files: ['LICENSE'], destDir: destDir});