Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Conversation

@christianliebel
Copy link

Update the lib property in tsconfig.json files of both schematics and the DevKit repo to es2018.

The ECMAScript 2018 feature set was finalized in January, so it seems reasonable to upgrade the libs as well. This is specifically interesting for the new Angular libs that are stuck at ECMAScript 2015 (!).

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@christianliebel
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels May 8, 2018
@clydin
Copy link
Member

clydin commented May 8, 2018

Please avoid changing files within the tests directory. They are generally setup to test specific scenarios.

Also, feat requires a scope. The commits should ideally be split into:

  • feat(@schematics/angular): ...
  • feat(@schematics/schematics): ...
  • build: ... -> for the main tsconfig

@christianliebel
Copy link
Author

@clydin I see. Thanks for your help. I’ll update the PR accordingly.

Make the es2018 typescript lib available for the repository.
Update the lib property in tsconfig.json files for Angular libraries and workspaces to include es2018.
…2018

Update the lib property in tsconfig.json files to include es2018.
@christianliebel christianliebel force-pushed the ChristianLiebel-patch-1 branch from 69edba9 to dcb2f8b Compare May 9, 2018 07:50
@christianliebel
Copy link
Author

christianliebel commented May 9, 2018

@clydin The tests looks better now. 👍 However, bazel-build seems to have a problem, probably because the Bazel TypeScript rules only support TS 2.6.x: https://github.com/bazelbuild/rules_typescript/blob/master/package.json#L27

What do you suggest? Should I file a new PR for rules_typescript to update their TS version?

@christianliebel
Copy link
Author

I’ve created an additional PR (#870) that only bumps the lib to es2017, which should work using the current bazel build.

@filipesilva
Copy link
Contributor

@alexeagle do you know why the bazel rules only support TS 2.6.x?

@clydin
Copy link
Member

clydin commented May 21, 2018

The devkit is built against 2.7. The problem appears to be that the lib type definitions are being sourced from the following (and 2.6 does not contain ES2018 definitions):

/home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular_devkit/external/build_bazel_rules_typescript_tsc_wrapped_deps/node_modules/typescript/lib/lib.es2018.d.ts

instead of the typescript version used to compile:

/home/circleci/ng/node_modules/typescript/lib/typescript.js

@clydin
Copy link
Member

clydin commented Jun 5, 2018

The error may stem from the following line which attempts to optimize the build time by re-using the library definitions from an existing project.

https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/BUILD#L32

@alexeagle
Copy link
Contributor

Sorry @christianliebel , this got lost when we moved the code back over to the angular/angular-cli repo. Do you have time to re-base this commit on master over there?

@alexeagle alexeagle closed this Sep 5, 2018
@christianliebel christianliebel deleted the ChristianLiebel-patch-1 branch September 5, 2018 07:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants