Skip to content

feat(@angular/cli): support TypeScript 2.4 #6891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"raw-loader": "^0.5.1",
"resolve": "^1.1.7",
"rsvp": "^3.0.17",
"rxjs": "^5.0.1",
"rxjs": "^5.4.2",
"sass-loader": "^6.0.3",
"script-loader": "^0.7.0",
"semver": "^5.3.0",
Expand All @@ -96,7 +96,7 @@
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"temp": "0.8.3",
"typescript": "~2.3.1",
"typescript": "~2.4.2",
"url-loader": "^0.5.7",
"walk-sync": "^0.3.1",
"webpack": "~3.3.0",
Expand All @@ -111,15 +111,15 @@
"@angular/core": "^4.0.0",
"@types/chalk": "^0.4.28",
"@types/common-tags": "^1.2.4",
"@types/denodeify": "^1.2.29",
"@types/denodeify": "^1.2.30",
"@types/express": "^4.0.32",
"@types/fs-extra": "~3.0.2",
"@types/glob": "^5.0.29",
"@types/jasmine": "2.5.45",
"@types/lodash": "4.14.50",
"@types/minimist": "^1.2.0",
"@types/mock-fs": "^3.6.30",
"@types/node": "^6.0.36",
"@types/node": "^6.0.84",
"@types/request": "0.0.39",
"@types/semver": "^5.3.30",
"@types/source-map": "^0.5.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/@angular/cli/blueprints/ng/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"core-js": "^2.4.1",
"rxjs": "^5.4.1",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
Expand All @@ -45,8 +45,8 @@
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.0.4",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",<% } %>
"typescript": "~2.3.3"
"typescript": "~2.4.2"
}
}
7 changes: 5 additions & 2 deletions packages/@angular/cli/commands/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ const NewCommand = Command.extend({
}
});
} else {
createDirectory = mkdir(directoryName)
.catch(err => {
// The type of `mkdir` in ts2.4 seems to be wrong.
// Might be due to denodeify.
// TODO(@filipesilva): fix this.
createDirectory = (mkdir as any)(directoryName)
.catch((err: any) => {
if (err.code === 'EEXIST') {
if (this.isProject(directoryName)) {
throw new SilentError(oneLine`
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular/cli/models/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class CliConfig<JsonType> {
get config(): JsonType { return <any>this._config; }

save(path: string = this._configPath) {
return fs.writeFileSync(path, this.serialize(), 'utf-8');
return fs.writeFileSync(path, this.serialize(), {encoding: 'utf-8'});
}
serialize(mimetype = 'application/json'): string {
return this._config.$$serialize(mimetype);
Expand Down
4 changes: 2 additions & 2 deletions packages/@angular/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"raw-loader": "^0.5.1",
"resolve": "^1.1.7",
"rsvp": "^3.0.17",
"rxjs": "^5.0.1",
"rxjs": "^5.4.2",
"sass-loader": "^6.0.3",
"script-loader": "^0.7.0",
"semver": "^5.1.0",
Expand All @@ -81,7 +81,7 @@
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"temp": "0.8.3",
"typescript": ">=2.0.0 <2.4.0",
"typescript": ">=2.0.0 <2.5.0",
"url-loader": "^0.5.7",
"walk-sync": "^0.3.1",
"webpack": "~3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@ngtools/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"npm": ">= 3.0.0"
},
"dependencies": {
"rxjs": "^5.0.1"
"rxjs": "^5.4.2"
}
}
2 changes: 1 addition & 1 deletion packages/@ngtools/logger/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class Logger extends Observable<LogEntry> {
return `<Logger(${this.name})>`;
}

lift(operator: Operator<LogEntry, LogEntry>): Observable<LogEntry> {
lift<R>(operator: Operator<LogEntry, R>): Observable<R> {
return this._observable.lift(operator);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@ngtools/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"source-map": "^0.5.6"
},
"peerDependencies": {
"typescript": "^2.0.2",
"typescript": "~2.4.2",
"webpack": "^2.2.0 || ^3.0.0"
}
}
2 changes: 1 addition & 1 deletion tests/e2e/assets/webpack/test-app-weird/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"preprocess-loader": "^0.2.2",
"raw-loader": "^0.5.1",
"sass-loader": "^3.2.0",
"typescript": "~2.1.0",
"typescript": "~2.4.2",
"webpack": "2.2.0"
}
}
2 changes: 1 addition & 1 deletion tests/e2e/assets/webpack/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"performance-now": "^0.2.0",
"raw-loader": "^0.5.1",
"sass-loader": "^3.2.0",
"typescript": "~2.0.3",
"typescript": "~2.4.2",
"webpack": "2.2.0"
}
}
2 changes: 1 addition & 1 deletion tests/e2e/assets/webpack/test-server-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"performance-now": "^0.2.0",
"raw-loader": "^0.5.1",
"sass-loader": "^6.0.3",
"typescript": "^2.3.2",
"typescript": "~2.4.2",
"webpack": "2.2.1"
}
}
2 changes: 1 addition & 1 deletion tools/publish/src/build-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function build(args: string[], _opts: any, logger: Logger): void {

const output = require('./build-schema').buildSchema(inFile, logger);
if (outFile) {
fs.writeFileSync(outFile, output, 'utf-8');
fs.writeFileSync(outFile, output, { encoding: 'utf-8' });
} else {
logger.info(output);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/publish/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function build(packagesToBuild: string[], _opts: any,
.then(() => {
const input = path.join(root, 'packages/@angular/cli/lib/config/schema.json');
const output = path.join(root, 'packages/@angular/cli/lib/config/schema.d.ts');
fs.writeFileSync(output, buildSchema(input, logger), 'utf-8');
fs.writeFileSync(output, buildSchema(input, logger), { encoding: 'utf-8' });
})
.then(() => logger.info('Compiling packages...'))
.then(() => {
Expand Down
20 changes: 14 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
version "1.2.5"
resolved "https://registry.yarnpkg.com/@types/common-tags/-/common-tags-1.2.5.tgz#14f29893992eb325594b83d739af02f2b6520f46"

"@types/denodeify@^1.2.29":
"@types/denodeify@^1.2.30":
version "1.2.30"
resolved "https://registry.yarnpkg.com/@types/denodeify/-/denodeify-1.2.30.tgz#9e356062b44524e7a399fb446d836fcfe352b9dc"

Expand Down Expand Up @@ -107,10 +107,14 @@
dependencies:
"@types/node" "*"

"@types/node@*", "@types/node@^6.0.36":
"@types/node@*":
version "6.0.78"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.78.tgz#5d4a3f579c1524e01ee21bf474e6fba09198f470"

"@types/node@^6.0.84":
version "6.0.84"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.84.tgz#193ffe5a9f42864d425ffd9739d95b753c6a1eab"

"@types/request@0.0.39":
version "0.0.39"
resolved "https://registry.yarnpkg.com/@types/request/-/request-0.0.39.tgz#168b96cf4253c5d54d403f746f82ee7aed47ce2c"
Expand Down Expand Up @@ -4536,9 +4540,9 @@ rx-lite@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"

rxjs@^5.0.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.1.tgz#b62f757f279445d265a18a58fb0a70dc90e91626"
rxjs@^5.4.2:
version "5.4.2"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.2.tgz#2a3236fcbf03df57bae06fd6972fd99e5c08fcf7"
dependencies:
symbol-observable "^1.0.1"

Expand Down Expand Up @@ -5251,10 +5255,14 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^2.3.3, typescript@~2.3.1:
typescript@^2.3.3:
version "2.3.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.4.tgz#3d38321828231e434f287514959c37a82b629f42"

typescript@~2.4.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844"

uglify-js@3.0.x:
version "3.0.19"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.19.tgz#ab1dfe2a171361b81fa9ffb3383461ea384557ed"
Expand Down