You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Pull Request is a proposal to demonstrate the project structure for the RFC for moving Primer React to a monorepo.
Checklist
Structure
@primer/react added as workspace
docs added as workspace
examples added as workspaces
Tooling
ESLint
TypeScript
Prettier
Markdownlint
Jest
Changesets
GitHub Actions
Deploy Production
Deploy Preview
Deploy Preview forks
Release
Release Canary
Release Candidate
Size
CI
Update Snapshots
VRT
Consumer Test
Notes
Due to docs, we need to have --legacy-peer-deps turned on by default
Lack of hoisting options makes this process challenging 😅 it'd be great to use pnpm or yarn (specifically yarn v2+, not yarn v1)
For example, if we have a shared dependency (like mdx) that uses context then we require the package version to be the same across the monorepo (otherwise the contexts would be different and would not work)
We could update our release canary step to only publish if a changeset is available in any package instead of forcing an individual package
Known issues
The styles for docs seems to be off 🤔
Possible next steps
Add documentation for common monorepo tasks
Add more examples to the examples directory, in particular one for Next.js app router
Refactor ad-hoc scripts under script to dedicated (internal) packages
Add a "primer cli" that wraps common commands in the monorepo, in particular scaffolding different file types
Explore alternate npm clients (such as pnpm, yarn) to help with dependency hoisting issues
Explore monorepo tooling (such as nx, turbo, lerna) to help with common monorepo tasks
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC: https://github.com/github/primer/discussions/2955
This Pull Request is a proposal to demonstrate the project structure for the RFC for moving Primer React to a monorepo.
Checklist
@primer/reactadded as workspacedocsadded as workspaceexamplesadded as workspacesNotes
docs, we need to have--legacy-peer-depsturned on by defaultyarn(specifically yarn v2+, not yarn v1)Known issues
The styles for docs seems to be off 🤔Possible next steps
examplesdirectory, in particular one for Next.js app routerscriptto dedicated (internal) packages