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

Use native Object.assign() #418

Merged
merged 6 commits into from
Jan 21, 2017

Conversation

arusakov
Copy link
Contributor

  • remove object-assign dependence
  • add engines.node >= 4.0 to package.json
  • add node 7 for travis
  • switch TS target to es5 (if we use node >=4.0 it's good, in future es6 target for node >= 6.0)

@johnnyreilly
Copy link
Member

johnnyreilly commented Dec 19, 2016

Hi @arusakov,

Thanks for the contribution - it's appreciated. That said, I don't see the advantage of taking this PR at the moment I'm afraid. Whilst node 0.12 is being end-of-lifed I'm aware there's people out there who will take a little longer to get to the point of upgrade and so I'll probably wait before making this move for the sake of them. I hope you understand.

For what it's worth, object-assign hands over to native Object.assign when it's available.

@arusakov
Copy link
Contributor Author

HI @johnnyreilly,
Thank you for answer. From my point of view node 0.12 is a history. I think that we need go ahead. Maybe this breaking changes for ts-loader 2.0?

@johnnyreilly
Copy link
Member

From my point of view node 0.12 is a history.

That's fine - but you don't speak for everyone 😄

@johnnyreilly
Copy link
Member

Given webpack 2 is dropping support for node 0.12.0 we'll probably look at merging this soon. One question: why "lib": "es2015"? For Object.assign itself?

@arusakov
Copy link
Contributor Author

arusakov commented Jan 17, 2017

@johnnyreilly
Glad to hear this. Yes, for definition of Object.assign

@johnnyreilly
Copy link
Member

Cool - thanks. Will bump ts-loader to 2.0 as part of the merge. (Probably in a couple of weeks time)

"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"suppressImplicitAnyIndexErrors": true,
"strictNullChecks": false,
"lib": [
"dom", "es2015" // dom for console.log only
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably can use es2015.core.
Also, we can shun away from "dom" like here https://github.com/Microsoft/TypeScript/pull/13453/files

Copy link
Member

Choose a reason for hiding this comment

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

so do you think this could be replaced with:
"lib": [ "es2015.core", "scripthost" ]
?

Copy link
Member

Choose a reason for hiding this comment

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

I'd certainly rather use that than dom if that's possible

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably ["es5", "es2015.core"] with this declaration

declare var console: {log(...args: any[]): void}

Copy link
Member

Choose a reason for hiding this comment

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

I'll probably merge and then do some tweaking

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@johnnyreilly I will rebase and fix it today

@arusakov arusakov force-pushed the native_object_assign branch from 24b6b57 to 7a9034d Compare January 20, 2017 10:32
@johnnyreilly johnnyreilly merged commit f4d8e71 into TypeStrong:master Jan 21, 2017
@arusakov arusakov deleted the native_object_assign branch September 12, 2017 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants