Skip to content

Use native Object.assign()#418

Merged
johnnyreilly merged 6 commits intoTypeStrong:masterfrom
arusakov:native_object_assign
Jan 21, 2017
Merged

Use native Object.assign()#418
johnnyreilly merged 6 commits intoTypeStrong:masterfrom
arusakov:native_object_assign

Conversation

@arusakov
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

arusakov commented Jan 17, 2017

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

@johnnyreilly
Copy link
Copy Markdown
Member

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

Comment thread src/tsconfig.json Outdated
"suppressImplicitAnyIndexErrors": true,
"strictNullChecks": false,
"lib": [
"dom", "es2015" // dom for console.log only
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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