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

ci: transition to monorepo #6988

Merged
merged 24 commits into from
Jun 3, 2023
Merged

ci: transition to monorepo #6988

merged 24 commits into from
Jun 3, 2023

Conversation

benelan
Copy link
Member

@benelan benelan commented May 23, 2023

Related Issue: #6532

Summary

Transitions to a monorepo using Turbo Repo. The existing files are moved to packages/calcite-components and calcite-components-react is added to the repo. For more information see:
https://github.com/Esri/calcite-components/wiki/Monorepo

@benelan benelan requested a review from a team as a code owner May 23, 2023 00:40
@github-actions github-actions bot added the chore Issues with changes that don't modify src or test files. label May 23, 2023
@benelan benelan added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 23, 2023
@benelan benelan added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 23, 2023
@benelan benelan added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 28, 2023
@benelan benelan added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 30, 2023
@benelan benelan added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 30, 2023
@benelan benelan added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 31, 2023
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

This is awesome, @benelan! Thanks for the time and effort on this. 🏆 #hellomonorepoland

💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻
💻🧐💻💻💻🧐💻💻🧐🧐💻💻🧐💻💻💻🧐💻💻🧐🧐💻💻🧐🧐🧐💻💻🧐🧐🧐🧐💻🧐🧐🧐💻💻💻🧐🧐💻💻
💻🧐🧐💻🧐🧐💻🧐💻💻🧐💻🧐🧐💻💻🧐💻🧐💻💻🧐💻🧐💻💻🧐💻🧐💻💻💻💻🧐💻💻🧐💻🧐💻💻🧐💻
💻🧐💻🧐💻🧐💻🧐💻💻🧐💻🧐💻🧐💻🧐💻🧐💻💻🧐💻🧐🧐🧐💻💻🧐🧐🧐💻💻🧐🧐🧐💻💻🧐💻💻🧐💻
💻🧐💻💻💻🧐💻🧐💻💻🧐💻🧐💻💻🧐🧐💻🧐💻💻🧐💻🧐💻🧐💻💻🧐💻💻💻💻🧐💻💻💻💻🧐💻💻🧐💻
💻🧐💻💻💻🧐💻💻🧐🧐💻💻🧐💻💻💻🧐💻💻🧐🧐💻💻🧐💻💻🧐💻🧐🧐🧐🧐💻🧐💻💻💻💻💻🧐🧐💻💻
💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻💻

.lintstagedrc.cjs Show resolved Hide resolved
@@ -0,0 +1,18 @@
module.exports = {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to add cjs too? 🤯 #lintception

Copy link
Member Author

Choose a reason for hiding this comment

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

It may not be needed but I like being explicit when dealing with commonjs vs esmodules since it can be a bit of a clustergoof. Would you prefer the file be named .lintstagedrc.js if it doesn't seem to break anything?

Copy link
Member

Choose a reason for hiding this comment

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

I was commenting about adding a lint filter for cjs and not the filename.

Copy link
Member Author

@benelan benelan Jun 3, 2023

Choose a reason for hiding this comment

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

Ah, my mistake. As we discussed on Teams, we would need to add an eslintrc to the root in order to lint .lintstagedrc.cjs and I'm not sure if that would conflict with the package-specific linting setups.

The next step in the monorepo setup is splitting out the shared eslint configuration and extending it in the individual packages. Once that happens we use the shared eslintrc in the root directory, and include the cjs file.

Here is one of turbo's examples that shows this in practice:
https://github.com/vercel/turbo/tree/main/examples/design-system

We held off on splitting code out of CC for now becaues it makes more sense to make the monorepo transition incrementally. I'll create a follow up issue for splitting out the eslint/tsconfig/storybook/demos.

Copy link
Member Author

Choose a reason for hiding this comment

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

.husky/pre-push Show resolved Hide resolved
package.json Show resolved Hide resolved
packages/calcite-components-react/README.md Outdated Show resolved Hide resolved
support/syncLinkedPackageVersions.ts Outdated Show resolved Hide resolved
support/syncLinkedPackageVersions.ts Show resolved Hide resolved
packages/calcite-components/stencil.config.ts Show resolved Hide resolved
@benelan benelan added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Jun 3, 2023
@benelan benelan merged commit 14036c1 into master Jun 3, 2023
@benelan benelan deleted the benelan/monorepo branch June 3, 2023 02:20
@github-actions github-actions bot added this to the 2023 June patch priorities milestone Jun 3, 2023
benelan added a commit that referenced this pull request Jun 7, 2023
**Related Issue:** #6988

## Summary

Fixes a couple release CI issues:

1. We were going to rename `master` to `main` but not sure what happened
to that so I changed the branch names back before installing the
monorepo PR. However I missed a few in `package.json`. I think it is
still going to happen but I want to wait for Franco to get back before
pulling the trigger. cc @alisonailea
2. Looks like the Action gets out of sync in a real dev environment
rather than my isolated testing. I need to pull before pushing the
changelog cleaning. Error:
https://github.com/Esri/calcite-components/actions/runs/5191460111/jobs/9359307809#step:5:35
benelan added a commit that referenced this pull request Jun 9, 2023
…7153)

**Related Issue:** #6988

## Summary

This PR changes the `release-please` PR title to `chore: release
latest`. The default is `chore: release master`.

It also makes sure a `v` isn't added before the version in git tags.
Their schema doc says it doesn't by default,
but I'm not convinced (see links below) so I want to hardcode the config
value. The `v` being in the tag wouldn't break anything in our CI, but
Lerna doesn't add a `v` and we should make sure our tag format is
consistent for our consumer's CI.


https://github.com/googleapis/release-please/blob/bdd9b0158ce79d958da01ebf54cb6b07925bc125/schemas/config.json#L77-L79


https://github.com/googleapis/release-please/blob/bdd9b0158ce79d958da01ebf54cb6b07925bc125/src/strategies/base.ts#L139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issues with changes that don't modify src or test files. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants