-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Updating deprecations.js file to be more straightforward #1581
Conversation
🦋 Changeset detectedLatest commit: de3f8b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
I think I like this. ❤️
I'm still wondering if there is benefit for keeping the version, but can't really think of any. I guess once something is deprecated it will stay that way "forever" unless we wanna re-use it at some point again.
After looking at the code, I think the original intent was you could mark something to be deprecated such that you want it deprecated at a specific later version but not right now. I don't believe we ever really utilized this though. |
Love this direction! Is there a reason we couldn't make this a JSON file? With JSON, we could use JSON schema to validate the structure. |
This updates the deprecations.js file and process a bit simpler. I modeled this after the work @colebemis did in primer/primitives#202
The placement of the deprecated file hasn't changed but the structure has. The output
dist/deprecations.json
file is as follows: And documented here https://primer-css-82rx1coiw-primer.vercel.app/css/tools/deprecationsDeprecated Selectors
These are deprecated selectors and should not be used. They include a replacement value, which can be an array or null.
<-- Replace with this selector.
<-- Replace with one of these selectors.
<-- No option available, remove selector.