Skip to content
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

feat: add support for typescript 3.2 #27536

Closed
wants to merge 6 commits into
base: master
from

Conversation

@IgorMinar
Copy link
Member

IgorMinar commented Dec 7, 2018

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html
https://blogs.msdn.microsoft.com/typescript/2018/11/29/announcing-typescript-3-2/

Any application using tsickle for closure compatibility will need to update it's tsickle dependency to 0.34

@googlebot googlebot added the cla: yes label Dec 7, 2018

@IgorMinar IgorMinar force-pushed the IgorMinar:build/typescript-3.2 branch from 0f86dfc to 3ff3b65 Dec 7, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 7, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 7, 2018

Show resolved Hide resolved package.json
@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 13, 2018

@IgorMinar IgorMinar force-pushed the IgorMinar:build/typescript-3.2 branch from 42d7176 to 8d4ba41 Dec 13, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 13, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 13, 2018

@IgorMinar IgorMinar force-pushed the IgorMinar:build/typescript-3.2 branch from d784ba0 to ff0edd5 Dec 14, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 14, 2018

@IgorMinar IgorMinar force-pushed the IgorMinar:build/typescript-3.2 branch from ff0edd5 to f5a6d4c Dec 14, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 14, 2018

@IgorMinar IgorMinar force-pushed the IgorMinar:build/typescript-3.2 branch from f5a6d4c to 1530a94 Dec 14, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 14, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 15, 2018

@IgorMinar IgorMinar requested a review from alxhub Dec 15, 2018

@alxhub

alxhub approved these changes Dec 15, 2018

@@ -8,6 +8,8 @@
import {dirname} from 'canonical-path';
import {existsSync, writeFileSync} from 'fs';
import {mkdir, mv} from 'shelljs';
// "unused" import needed by tsc type inference
import * as ts from 'typescript';

This comment has been minimized.

@alxhub

alxhub Dec 15, 2018

Contributor

I think this is required by the return type of Transformer.analyzeProgram being inferred (and the inferred type including TS types). If you make that return type explicit, this statement won't appear unused.

@IgorMinar IgorMinar force-pushed the IgorMinar:build/typescript-3.2 branch from d8202f3 to a6e6763 Dec 15, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 15, 2018

@IgorMinar

This comment has been minimized.

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 17, 2018

import { createCustomElement } from '@angular/elements';

// huh? not sure why, but ts 3.2 emits broken code for: `import { from as fromPromise, ...} from 'rxjs';
// this const alias works around the problem.
const fromPromise = from;

This comment has been minimized.

@alfaproject

alfaproject Dec 17, 2018

Contributor

Why not update the references to not use the alias?

This comment has been minimized.

@IgorMinar

IgorMinar Dec 18, 2018

Author Member

that's what I'll do for now, I just wanted to get more people to take a look at this because import as should work and shouldn't break with a typescript update.

I filed angular/angular-cli#13212 to track this.

@IgorMinar

This comment has been minimized.

Copy link
Member Author

IgorMinar commented Dec 18, 2018

caretaker note: pullapprove and travis flaked

@mhevery mhevery closed this in 17e702b Dec 18, 2018

mhevery added a commit that referenced this pull request Dec 18, 2018

fix(compiler-cli): create LiteralLikeNode for String and Number liter…
…al (#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close #27536

mhevery added a commit that referenced this pull request Dec 18, 2018

fix(docs-infra): workaround for broken 'import as' (#27536)
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close #27536

mhevery added a commit that referenced this pull request Dec 18, 2018

mhevery added a commit that referenced this pull request Dec 18, 2018

build(docs-infra): disable cli.warnings.typescriptMismatch warnings (#…
…27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close #27536

mhevery added a commit that referenced this pull request Dec 18, 2018

build(docs-infra): turn on disableTypeScriptVersionCheck in angularCo…
…mpilerOptions (#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close #27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

fix(compiler-cli): create LiteralLikeNode for String and Number liter…
…al (angular#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

fix(docs-infra): workaround for broken 'import as' (angular#27536)
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

build(docs-infra): disable cli.warnings.typescriptMismatch warnings (a…
…ngular#27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

build(docs-infra): turn on disableTypeScriptVersionCheck in angularCo…
…mpilerOptions (angular#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

fix(compiler-cli): create LiteralLikeNode for String and Number liter…
…al (angular#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

fix(docs-infra): workaround for broken 'import as' (angular#27536)
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

build(docs-infra): disable cli.warnings.typescriptMismatch warnings (a…
…ngular#27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close angular#27536

IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

build(docs-infra): turn on disableTypeScriptVersionCheck in angularCo…
…mpilerOptions (angular#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close angular#27536
@zw-slime

This comment has been minimized.

Copy link

zw-slime commented Jan 9, 2019

Package "ng-zorro-antd" has an incompatible peer dependency to "typescript" (requires "~3.1.1", would install "3.2.2").

I can not update ngrx to 7.0.0, please help, when can support typescript 3.2?

@IgorMinar

This comment has been minimized.

Copy link
Member Author

IgorMinar commented Jan 9, 2019

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

fix(compiler-cli): create LiteralLikeNode for String and Number liter…
…al (angular#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close angular#27536

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

fix(docs-infra): workaround for broken 'import as' (angular#27536)
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close angular#27536

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

build(docs-infra): disable cli.warnings.typescriptMismatch warnings (a…
…ngular#27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close angular#27536

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

build(docs-infra): turn on disableTypeScriptVersionCheck in angularCo…
…mpilerOptions (angular#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close angular#27536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.