Skip to content

Upgrade TypeScript to 1.8 #279

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
jpdonaghy opened this issue Mar 5, 2016 · 10 comments
Closed

Upgrade TypeScript to 1.8 #279

jpdonaghy opened this issue Mar 5, 2016 · 10 comments

Comments

@jpdonaghy
Copy link

CLI currently depends on TypeScript ~1.7.3, please upgrade to support TypeScript 1.8.

From the /node_modules/angular-cli/package.json of a project generated by angular-cli 0.0.24.

"dependencies": {
"broccoli": "^0.16.9",
"broccoli-concat": "0.0.13",
"broccoli-funnel": "^1.0.1",
"broccoli-merge-trees": "^1.0.1",
"broccoli-writer": "^0.1.1",
"chalk": "^1.1.0",
"ember-cli": "1.13.15",
"exit": "^0.1.2",
"fs-extra": "^0.18.4",
"leek": "0.0.19",
"lodash": "^3.10.0",
"node-notifier": "^4.4.0",
"resolve": "^1.0.0",
"shelljs": "^0.5.3",
"silent-error": "^1.0.0",
"symlink-or-copy": "^1.0.1",
* "typescript": "~1.7.3",*
"typings": "^0.6.2"
}

@Brocco
Copy link
Contributor

Brocco commented Mar 5, 2016

TypeScript was updated prior to v0.0.24.... reference

Can you try clearing your npm cache and recreate your project?

@jpdonaghy
Copy link
Author

The package.json on master says 1.7.3

@jpdonaghy
Copy link
Author

I see that the blueprint package.jsons have 1.8 but only after I update the dependency in the main package.json on my fork and then npm link does ng start using tsc 1.8. Seems odd to me.

@zackarychapple
Copy link
Contributor

I was able to replicate this as well. I generated a new project. Added a single string literal to the generated app ts and got compile errors.

Error: [DiffingTSCompiler]: Typescript found the following errors: app/blah.ts (22, 9): Type expected. app/blah.ts (22, 9): The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. app/blah.ts (22, 18): The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. app/blah.ts (22, 27): The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. app/blah.ts (22, 40): The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. app/blah.ts (23, 1): Declaration or statement expected. at DiffingTSCompiler.doFullBuild (/Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:202:29) at DiffingTSCompiler.rebuild (/Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:101:18) at DiffingPluginWrapper.rebuild (/Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/lib/broccoli/diffing-broccoli-plugin.js:87:45) at /Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/node_modules/angular-cli/node_modules/broccoli/lib/api_compat.js:42:21 at lib$rsvp$$internal$$tryCatch (/Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16) at lib$rsvp$$internal$$invokeCallback (/Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17) at /Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11 at lib$rsvp$asap$$flush (/Users/chapplez/Desktop/temp/blah/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9) at doNTCallback0 (node.js:419:9) at process._tickCallback (node.js:348:13)

@cironunes
Copy link
Member

This is because we didn't have a release after updating to TS 1.8, so you need to npm link against the current master to get the changes. This will be fixed by the next release, in the meanwhile you can use this workaround.

Feel free to reopen if you think that this is still an issue.

@cironunes
Copy link
Member

Oh, I just realized that current master didn't update to 1.8 yet. My mistake.

@cironunes cironunes reopened this Mar 7, 2016
@jpdonaghy
Copy link
Author

@cironunes Thanks for the confirmation. I'll run off my CLI fork until the main project upgrades.

@cironunes
Copy link
Member

Would you like to create a PR updating to 1.8?

Ciro Nunes
http://cironunes.com

On Mon, Mar 7, 2016 at 2:56 PM, John Donaghy [email protected]
wrote:

@cironunes https://github.com/cironunes Thanks for the confirmation.
I'll run off my CLI fork until the main project upgrades.


Reply to this email directly or view it on GitHub
#279 (comment)
.

@jpdonaghy
Copy link
Author

@cironunes Zack beat me to it. :) #280

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants