feat(typescript): update to 1.9 nightly.
To workaround https://github.com/Microsoft/TypeScript/issues/7573 we must remove the readonly keyword from generated .d.ts files. This solution will not scale, but will probably buy enough time to require our users move to a 2.0 beta. Closes #8003
This commit is contained in:
parent
347e71af7d
commit
3412aba46e
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue