-
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
Add variable deprecation data and tests #971
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/primer/primer-css/ghltnvrla |
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.
LGTM! 👍 Although one question:
When planning to delete a CSS selector or SCSS variable, you should:
2. Add it to [deprecations.js]:
Should deprecations.js
get updated in the same PR where the variables/selectors get removed? One concern might be that because all PRs that have deprecations are based on master
, they all try edit the same spot in deprecations.js
. So when starting to merge those PRs into the release branch, there will be constantly merge conflicts. Maybe fine if there are not too many, but could also get annoying. I can think of 2 options:
- Do the "develop branch" idea. So that PRs (plus changes to
deprecations.js
) get merged as soon as they are ready. And new PRs get branched off that already include these changes todeprecations.js
. - Not worry about updating
deprecations.js
for every PR. Only once all PRs that go into a major release are merged, then updatedeprecations.js
for everything. Kinda similar how we update CHANGELOG only "at the end".
I don't think we'll be deprecating things so often that we'll need to worry about merge conflicts in this file, but if we end up in that situation my vote would be for:
|
👀 Updated docs: contributing, deprecation data
This adds planned variable declaration messages for 14.0.0 (#925) and adds deprecation tests for variables in
script/test-deprecations.js
. The output looks like this (but with colored symbols!):The errors come from new entries in
deprecations.js
, and the test script has been updated to look forselectors
and/orvariables
arrays in any of the version deprecation "entries", e.g.The diff from one version to the next is determined from the keys of the
dist/variables.json
data generated inscript/dist.js
before publication, soscript/test-deprecations.js
should always be run on a freshdist
directory built byscript/dist.js
.When this is merged into #925 with #968 (or if we merge #968 first, then update this branch) it should trigger a bunch of errors that we'll need to fix in the release branch. 🤞