Skip to content

Commit c9c8d4e

Browse files
committed
feat(typescript): update to 1.9 nightly.
To workaround microsoft/TypeScript#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.
1 parent 0991bf2 commit c9c8d4e

File tree

6 files changed

+41
-21
lines changed

6 files changed

+41
-21
lines changed

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,9 +981,9 @@ gulp.task('static-checks', ['!build.tools'], function(done) {
981981
// distributed in our npm package, and loaded from node_modules by
982982
// the typescript compiler.
983983

984-
// Make sure the two typings tests are isolated, by running this one in a tempdir
984+
// Make sure the typings tests are isolated, by running in a tempdir
985985
var tmpdir = path.join(os.tmpdir(), 'test.typings', new Date().getTime().toString());
986-
gulp.task('!pre.test.typings.layoutNodeModule', ['build.js.cjs'], function() {
986+
gulp.task('!pre.test.typings.layoutNodeModule', function() {
987987
return gulp.src(['dist/js/cjs/angular2/**/*', 'node_modules/rxjs/**/*'], {base: 'dist/js/cjs'})
988988
.pipe(gulp.dest(path.join(tmpdir, 'node_modules')));
989989
});

npm-shrinkwrap.clean.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,9 @@
22312231
"glob": {
22322232
"version": "4.3.5",
22332233
"dependencies": {
2234+
"inflight": {
2235+
"version": "1.0.4"
2236+
},
22342237
"minimatch": {
22352238
"version": "2.0.10"
22362239
}
@@ -3038,7 +3041,7 @@
30383041
}
30393042
},
30403043
"gulp-tslint": {
3041-
"version": "4.3.4"
3044+
"version": "4.3.5"
30423045
},
30433046
"gulp-typescript": {
30443047
"version": "2.10.0",
@@ -5415,10 +5418,10 @@
54155418
}
54165419
},
54175420
"tslint": {
5418-
"version": "3.2.1",
5421+
"version": "3.7.0-dev.2",
54195422
"dependencies": {
54205423
"glob": {
5421-
"version": "6.0.3"
5424+
"version": "6.0.4"
54225425
},
54235426
"underscore.string": {
54245427
"version": "3.1.1"
@@ -5452,7 +5455,7 @@
54525455
"version": "0.0.6"
54535456
},
54545457
"typescript": {
5455-
"version": "1.7.5"
5458+
"version": "1.9.0-dev.20160409"
54565459
},
54575460
"ua-parser-js": {
54585461
"version": "0.7.10"
@@ -5823,5 +5826,5 @@
58235826
}
58245827
},
58255828
"name": "angular-srcs",
5826-
"version": "2.0.0-beta.12"
5829+
"version": "2.0.0-beta.14"
58275830
}

npm-shrinkwrap.json

Lines changed: 17 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
"ts-api-guardian": "0.0.2",
114114
"ts2dart": "^0.7.31",
115115
"tsd": "^0.6.5-beta",
116-
"tslint": "^3.2.1",
117-
"typescript": "^1.7.3",
116+
"tslint": "^3.7.0-dev.2",
117+
"typescript": "^1.9.0-dev.20160409",
118118
"universal-analytics": "^0.3.9",
119119
"webpack": "^1.12.6",
120120
"which": "~1",

scripts/ci/build_and_test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ elif [ "$MODE" = "typescript_next" ]; then
2323
# Ignore complaints about unsatisfied peer deps
2424
npm install typescript@next || true
2525
${SCRIPT_DIR}/build_js.sh
26+
# Run typings test using the GA release of TypeScript
27+
# This ensures that users aren't forced onto beta/nightly
28+
npm install [email protected]
2629
./node_modules/.bin/gulp test.typings
2730
elif [ "$MODE" = "payload" ]; then
2831
source ${SCRIPT_DIR}/env_dart.sh

tools/broccoli/trees/node_tree.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ module.exports = function makeNodeTree(projects, destinationPath) {
120120

121121
let compiledTree = mergeTrees([compiledSrcTree, compiledTestTree]);
122122

123+
// Down-level .d.ts files to be TS 1.8 compatible
124+
compiledTree = replace(compiledTree, {
125+
files: ['**/*.d.ts'],
126+
patterns: [
127+
//{match: /^(\s*)readonly\s+/mg, replacement: "$1"},
128+
]
129+
});
130+
131+
123132
// Now we add the LICENSE file into all the folders that will become npm packages
124133
outputPackages.forEach(function(destDir) {
125134
var license = new Funnel('.', {files: ['LICENSE'], destDir: destDir});

0 commit comments

Comments
 (0)