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

chore: Replace 'yarn' with 'npm' #1250

Merged
merged 8 commits into from May 26, 2021
Merged

chore: Replace 'yarn' with 'npm' #1250

merged 8 commits into from May 26, 2021

Conversation

smockle
Copy link
Member

@smockle smockle commented May 25, 2021

This PR migrates PRC workflows and scripts from yarn to npm (specifically, to npm@6). Public-facing docs continue to give usage examples with both tools, since our customers use both.

Fixes https://github.com/github/primer/issues/179

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@changeset-bot
Copy link

changeset-bot bot commented May 25, 2021

⚠️ No Changeset found

Latest commit: 6bae722

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented May 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/5mFkRYxDxa2ANsdnixzCdFnLqeBd
✅ Preview: https://primer-components-git-npm-primer.vercel.app

@vercel vercel bot temporarily deployed to Preview May 25, 2021 18:02 Inactive
.github/workflows/ci.yml Outdated Show resolved Hide resolved
…peer-dep on React 16.x which conflicts with PRC’s peer-dep on React 17.x
…) has a peer-dep on React 16.x which conflicts with PRC’s peer-dep on React 17.x"

This reverts commit e3612051ab01bf1dfbdf477f00ef96b0ea8aca47.

Storybook has the same issue (storybookjs/storybook#14119, storybookjs/storybook#14619), so if we’re open to using '--legacy-peer-deps' to use Storybook, we can’t justify removing Playroom on anti-'--legacy-peer-deps' grounds.
@vercel vercel bot temporarily deployed to Preview May 25, 2021 20:09 Inactive
…gically fix the 'svg-element-attributes'-related 'ERR_REQUIRE_ESM' error
@vercel vercel bot temporarily deployed to Preview May 25, 2021 20:28 Inactive
@vercel vercel bot temporarily deployed to Preview May 25, 2021 20:31 Inactive
@vercel vercel bot temporarily deployed to Preview May 25, 2021 20:41 Inactive
@smockle
Copy link
Member Author

smockle commented May 25, 2021

I’m very surprised (since the Tooltip test file hasn’t changed in months) that swapping to npm uncovered an accessibility-related issue that yarn elided (presumably by updating an axe-related dependency in the tree):

 FAIL  src/__tests__/Tooltip.tsx (5.329 s)
  ● Tooltip › should have no axe violations

    expect(received).toHaveNoViolations(expected)

    Expected the HTML found at $('span') to have no violations:

    <span aria-label="hi" class="Tooltip__TooltipBase-kp39nc-0 fhzzWU tooltipped-n"></span>

    Received:

    "Elements must only use allowed ARIA attributes (aria-allowed-attr)"

    Fix all of the following:
      ARIA attribute cannot be used, add a role attribute or use a different element: aria-label

    You can find more information on this issue here: 
    https://dequeuniversity.com/rules/axe/4.2/aria-allowed-attr?application=axeAPI

      18 |     const {container} = HTMLRender(<Tooltip text="hi" />)
      19 |     const results = await axe(container)
    > 20 |     expect(results).toHaveNoViolations()
         |                     ^
      21 |     cleanup()
      22 |   })
      23 |

      at Object.<anonymous> (src/__tests__/Tooltip.tsx:20:21)

Fixed in 6bae722

@smockle
Copy link
Member Author

smockle commented May 25, 2021

From @smockle in #1250 (comment):

  • Tested in Safari

For (additional manual) verification (that is, beyond the automated verification from our test suite), I opened every PRC component page on https://primer-components-1dot5xcvk-primer.vercel.app/ (the latest Vercel deployment) and interacted with interactive elements demoed therein.

Copy link
Member

@dgreif dgreif left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for making this transition! Can't wait for npm7 this fall 🚀

@smockle smockle merged commit 878833a into main May 26, 2021
@smockle smockle deleted the npm branch May 26, 2021 17:23
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.

None yet

2 participants