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

doc: document deprecation of util._extend #4903

Closed
wants to merge 1 commit into from

Conversation

benjamingr
Copy link
Member

doc: document deprecation of util._extend

See the discussion here #4593 for more
details as well as the 2016-01-20 minutes.

doc: document deprecation of util._extend

See the discussion here nodejs#4593 for more
details as well as the 2016-01-20 minutes.
@benjamingr
Copy link
Member Author

Something went very wrong with git in #4902 , so I created a new PR.

@thefourtheye thefourtheye added doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module. labels Jan 27, 2016
@@ -548,6 +548,16 @@ Deprecated predecessor of `console.log`.

Deprecated predecessor of `console.log`.

## util._extend(obj)

Stability: 0 - Deprecated: Use Object.assign() instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggested a change in #4907. If it gets through, we can make the Object.assign() a link.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great, now that it landed I'll edit it into it.

@jasnell jasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jan 27, 2016
@jasnell
Copy link
Member

jasnell commented Jan 27, 2016

@nodejs/ctc ... defensively marking as semver-major since it's a deprecation. If anyone feels that too strong, lemme know

@@ -548,6 +548,16 @@ Deprecated predecessor of `console.log`.

Deprecated predecessor of `console.log`.

## util._extend(obj)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to escape (\_) the underscore for markdown.

@ljharb
Copy link
Member

ljharb commented Jan 28, 2016

Is there any benefit in recommending a polyfill so that modules can use Object.assign and retain compatibility with older nodes? Specifically, require('object.assign/polyfill')() will return the best available function (ie, native, unless it's broken or absent).

@benjamingr
Copy link
Member Author

@ljharb in all honesty I think most differences @domenic outlined, while extremely important in evaluating removing _extend are things "average" users would never run into. A single example using ._extend in the wild that would break can go a long way to convince me otherwise though.

@ljharb
Copy link
Member

ljharb commented Jan 28, 2016

Yes, I'm not trying to strengthen the case to deprecate _extend, i'm saying that if users want to use Object.assign but don't want to drop support for older nodes that don't have it, they could use the object.assign package.

@silverwind
Copy link
Contributor

Not sure I agree with this, naming it "deprecation" seems weird. I think if we're going to do this, I'd rather have it be labeled "discouragement" or similar. Also, as others have pointed out, Object.assign is not 100% compatible. -1 from me.

@vkurchatkin
Copy link
Contributor

-1. We shouldn't add something that was never public just to say that it's deprecated

@benjamingr
Copy link
Member Author

@vkurchatkin @silverwind I was under the impression I'm following the consensus reached at the TSC 2016-01-20 meeting.

@silverwind
Copy link
Contributor

Link to the discussion. I wouldn't object if CTC want's to push this through, just my opinion.

@silverwind
Copy link
Contributor

Also, I'm +1 on documenting it. I'd be happy if you remove the deprecation badge and add a note that it's discouraged.

@vkurchatkin
Copy link
Contributor

@benjamingr well, I disagree nonetheless)

@thefourtheye
Copy link
Contributor

-1. We shouldn't add something that was never public just to say that it's deprecated

@vkurchatkin If we cannot document it, then we cannot deprecate it as per the current deprecation process right?

@jasnell
Copy link
Member

jasnell commented Feb 10, 2016

LGTM. This is in line with the CTC discussion and decision.

@benjamingr
Copy link
Member Author

I'd like to give @vkurchatkin and @silverwind a chance to express their views and pursue changing the decision first :)

@benjamingr
Copy link
Member Author

Hey, I'm not sure how to move forward with this. @vkurchatkin @silverwind is there another way you'd write this? I don't mind following up with a different PR if you have an idea that will convey that status you can agree with.

@silverwind
Copy link
Contributor

Looking at it again, I don't think it's really that much of a big deal calling it 'deprecation' as I may have made it out to be, so LGTM.

jasnell pushed a commit that referenced this pull request Mar 16, 2016
Document that util._extend was never intended to be used
and should be considered deprecated.

PR-URL: #4903
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@jasnell
Copy link
Member

jasnell commented Mar 16, 2016

Landed in d829028

@jasnell jasnell closed this Mar 16, 2016
@jasnell jasnell mentioned this pull request Mar 17, 2016
nschonni added a commit to nschonni/node-sass that referenced this pull request Sep 7, 2016
This was never part of the public API, and has officially been
depreciated in Node 6 nodejs/node#4903
nschonni added a commit to nschonni/node-sass that referenced this pull request Sep 7, 2016
This was never part of the public API, and has officially been
depreciated in Node 6 nodejs/node#4903
Object.assign can't be used yet since it requires ES2015
@tniessen tniessen added the deprecations Issues and PRs related to deprecations. label Sep 8, 2018
macbre added a commit to macbre/phantomas that referenced this pull request Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. semver-major PRs that contain breaking changes and should be released in the next major version. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants