-
Notifications
You must be signed in to change notification settings - Fork 536
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
Use extracted @primer/behaviors #1700
Conversation
🦋 Changeset detectedLatest commit: c49033b 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 |
size-limit report 📦
|
@@ -9,5 +9,7 @@ module.exports = { | |||
'<rootDir>/src/utils/test-deprecations.tsx', | |||
'<rootDir>/src/utils/test-helpers.tsx' | |||
], | |||
testMatch: ['<rootDir>/(src|codemods)/__tests__/**/*.test.[jt]s?(x)', '!**/*.types.test.[jt]s?(x)'] | |||
testMatch: ['<rootDir>/(src|codemods)/__tests__/**/*.test.[jt]s?(x)', '!**/*.types.test.[jt]s?(x)'], | |||
// @primer/behaviors is ESM, so needs to be transformed |
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.
nit: this didn't make sense to me — it seems like you're saying something needs to be transformed, but then the code seems like you're setting it to be ignored?
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.
Good old double negatives at work here. This is the transform ignore option, and we are passing it a regex for node_modules minus @primer/behaviors
. By setting this option, we overwrite the default which is just node_modules
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.
Co-authored-by: Cole Bemis <colebemis@github.com>
a36b667
to
c49033b
Compare
As discussed in ADR 2, all of the "behaviors" in PRC have been written in vanilla javascript, with React Hooks that wrap the vanilla js behaviors. One of the reasons for this approach was that the behaviors could eventually be extracted and shared with other projects, like PVC and github/github. We have seen an increased need for a few of these behaviors on the github/github side, and have extracted the behaviors to a new @primer/behaviors package that can be shared. This PR removes all of the behaviors from the PRC project and pulls in @primer/behaviors as a replacement.
Closes https://github.com/github/primer/issues/483
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.