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

Publish deprecation data #883

Merged
merged 13 commits into from
Sep 5, 2019
Merged

Publish deprecation data #883

merged 13 commits into from
Sep 5, 2019

Conversation

shawnbot
Copy link
Contributor

@shawnbot shawnbot commented Sep 5, 2019

This is the first stab at publishing deprecation data, as described in #740. Here's what accessing it looks like:

JSON

const {versions} = require('@primer/css/dist/deprecations.json')
for (const [version, deprecations] of Object.entries(versions)) {
  console.log(`> ### ${version}`)
  for (const {selectors, message} of deprecations) {
    console.log(`  - \`${selectors.join('\`, \`')}\`: ${message}`)
  }
}

outputs:

13.0.0

  • .btn-purple: Please don't make purple buttons.
  • .text-pending: Please use the "text-yellow" class instead of "text-pending".
  • .bg-pending: Please use the "bg-yellow-dark" class instead of "bg-pending".
  • .columns, .column, .one-third, .two-thirds, .one-fourth, .one-half, .three-fourths, .one-fifth, .four-fifths: Please use grid classes.
  • .centered: You can use the "mx-auto" class to center any element.

See the Markdown docs (and the published page) for usage instructions.

Closes #740

@vercel
Copy link

vercel bot commented Sep 5, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://primer-css-git-deprecations-data.primer.now.sh

Copy link
Contributor

@zeke zeke left a comment

Choose a reason for hiding this comment

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

Left a few little comments and suggestions, but overall this looks good!

Are you planning to add tests to validate the deprecations.json output?

docs/content/tools/deprecations.md Outdated Show resolved Hide resolved
docs/content/tools/deprecations.md Show resolved Hide resolved
script/dist Show resolved Hide resolved
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

Looks good! 💯 Left a few comments. The only thing I feel strongly about is adding title front matter to the documentation page.

deprecations/index.js Outdated Show resolved Hide resolved
deprecations/index.js Outdated Show resolved Hide resolved
deprecations/index.js Outdated Show resolved Hide resolved
docs/content/tools/deprecations.md Outdated Show resolved Hide resolved
deprecations/index.js Outdated Show resolved Hide resolved
deprecations/index.js Outdated Show resolved Hide resolved
Co-Authored-By: Zeke Sikelianos <zeke@sikelianos.com>
@vercel vercel bot temporarily deployed to staging September 5, 2019 19:27 Inactive
@vercel vercel bot temporarily deployed to staging September 5, 2019 19:30 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

🚀

@shawnbot shawnbot merged commit 9d2ba66 into release-12.7.0 Sep 5, 2019
@shawnbot shawnbot deleted the deprecations-data branch September 5, 2019 19:50
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