Skip to content

Commit

Permalink
feat(@angular/cli): update standard library to es2017
Browse files Browse the repository at this point in the history
ECMAScript 2017 was released at the end of June. Standard library support for ES 2017 is around in TypeScript for quite a while now. Even `typescript@~2.0.0` which is used by the Angular 2 template supports a subset of ES 2017. Hence, it seems reasonable to update to the latest standard library version.
  • Loading branch information
christianliebel authored and Brocco committed Jul 19, 2017
1 parent 35c89a5 commit d5d0b07
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
8 changes: 4 additions & 4 deletions docs/documentation/stories/1.0-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ CLI projects now use one tsconfig per app ([#4924](https://github.com/angular/an
"experimentalDecorators": true,
"target": "es5",
"lib": [
"es2016",
"es2017",
"dom"
],
"outDir": "../out-tsc/app",
Expand All @@ -239,7 +239,7 @@ CLI projects now use one tsconfig per app ([#4924](https://github.com/angular/an
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2017",
"dom"
],
"outDir": "../out-tsc/spec",
Expand Down Expand Up @@ -271,7 +271,7 @@ CLI projects now use one tsconfig per app ([#4924](https://github.com/angular/an
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016"
"es2017"
],
"outDir": "../out-tsc/e2e",
"module": "commonjs",
Expand Down Expand Up @@ -302,7 +302,7 @@ There is an additional root-level `tsconfig.json` that is used for IDE integrati
"node_modules/@types"
],
"lib": [
"es2016",
"es2017",
"dom"
]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular/cli/blueprints/ng/files/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node_modules/@types"
],
"lib": [
"es2016",
"es2017",
"dom"
]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/assets/1.0.0-proj/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node_modules/@types"
],
"lib": [
"es2016",
"es2017",
"dom"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2017",
"dom"
],
"outDir": "lib",
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/assets/webpack/test-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2017",
"dom"
],
"outDir": "lib",
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/assets/webpack/test-server-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2017",
"dom"
],
"outDir": "lib",
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/utils/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function useNg2() {
'experimentalDecorators': true,
'target': 'es5',
'lib': [
'es2016',
'es2017',
'dom'
],
'outDir': '../out-tsc/app',
Expand All @@ -130,7 +130,7 @@ export function useNg2() {
'emitDecoratorMetadata': true,
'experimentalDecorators': true,
'lib': [
'es2016',
'es2017',
'dom'
],
'outDir': '../out-tsc/spec',
Expand Down Expand Up @@ -159,7 +159,7 @@ export function useNg2() {
'emitDecoratorMetadata': true,
'experimentalDecorators': true,
'lib': [
'es2016'
'es2017'
],
'outDir': '../out-tsc/e2e',
'module': 'commonjs',
Expand Down
2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
"sourceRoot": "",
"target": "es6",
"lib": [
"es2015",
"es2016",
"es2017"
],
"baseUrl": "",
Expand Down

1 comment on commit d5d0b07

@wulfsberg
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the corresponding polyfills then be included in the polyfills.ts template? (E.g. core-js/es7/object under the IE list).
It seems dangerous to list the needed polyfills for various browsers in that file, and then promise the TypeScript compiler a newer environment than those polyfills provide.

Please sign in to comment.