-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add mdn- and Node.js 8 deprecation warnings for 1.1 release #6777
Conversation
On Node.js 8, you'll get messages like this: ``` (node:56410) DeprecationWarning: mdn-browser-compat-data is deprecated. Upgrade to @mdn/browser-compat-data: (TODO: upgrade doc URL) (node:56410) DeprecationWarning: mdn-browser-compat-data: @mdn/browser-compat-data ends support for Node.js 8. Upgrade to Node.js 10 or later. ``` On Node.js 10, you'll get a message like this: ``` (node:56752) DeprecationWarning: mdn-browser-compat-data is deprecated. Upgrade to @mdn/browser-compat-data: (TODO: upgrade doc URL) ```
Oh good, we got the correct deprecation notices in tests:
|
Reviewing the diff here, I noticed that the Node version-checking code runs whether the warning has been emitted already or not. I moved it into the warning function and confirmed that the tests still show the correct warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of small bits, not nothing major. Nice work @ddbeck !
README.md
Outdated
@@ -1,3 +1,5 @@ | |||
**Warning:** This package is soon-to-be renamed. Use [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data) instead. If you're already using `mdn-browser-compat-data`, read [the upgrade guide](https://github.com/mdn/browser-compat-data/blob/v1.1.0/UPGRADE-2.0.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
soon-to-be
doesn't need hyphens in this context, imo. If it was in a context like "The soon-to-be-renamed browser-compat-data package", then it would have hyphens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, fixed with 638d3fc. I wasn't sure if I was modifying is or renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And fixed again with 2aba539.
UPGRADE-2.0.x.md
Outdated
|
||
If possible, run your test suite to make sure this worked. | ||
|
||
If you encountered any undocumented breaking changes as a result of this upgrade, please [open an issue](https://github.com/mdn/browser-compat-data/issues/new). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link "breaking changes" to the section named "Before you start", above, as this is where the breaking changes are documented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Fixed with 11551cd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, nice one @ddbeck .
This concludes the `mdn-` package name and continues development under the `@mdn/browser-compat-data` name. * Implement 2.0.0 breaking changes (#6713) * Rename package and increment version to pre-2.0 * Require Node 10 or later * Rename package in the docs * Increment prerelease version * Initial release of @mdn/browser-compat-data A continuation of mdn/browser-compat-data * Patch release containing data or non-breaking updates only * Revert "Add mdn- and Node.js 8 deprecation warnings for 1.1 release (#6777)" This applies only to the 1.1.x releases. This reverts commit ee7feac. * Patch release containing data or non-breaking updates only * Patch release containing data or non-breaking updates only * Use Node.js ≥10 for CI and drop Travis (#6797) * Use Node.js ≥10 for CI * Remove Travis CI config * Remove badges from README * Patch release containing data or non-breaking updates only
Another entry in the #6640 saga and the v1.1 counterpart to the v2.0.0 changes in #6713.
What this PR attempts to do
process.version
stringWhat needs a close look
Additional notes
nodenv
to switch between Node.js versions), but I'd welcome tests from others. You can install it from my branch directly:npm install https://github.com/ddbeck/browser-compat-data#add-deprecation-warnings
UPGRADE
doc from the deprecation notice won't work until there's a tag forv1.1.0
. This is expected; the tag will be created bynpm version
when I do the 1.1 releaseprocess.emitWarning()
docs. It's a bit verbose, but it seems to be preferredKnown follow-up tasks
Once the
master-scoped-package
branch merges back intomaster
, we'll want to: