Skip to content

ci: transition to monorepo#6988

Merged
benelan merged 24 commits intomasterfrom
benelan/monorepo
Jun 3, 2023
Merged

ci: transition to monorepo#6988
benelan merged 24 commits intomasterfrom
benelan/monorepo

Conversation

@benelan
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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

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

Comment thread .lintstagedrc.cjs
Comment thread .lintstagedrc.cjs
@@ -0,0 +1,18 @@
module.exports = {
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread .husky/pre-push
Comment thread package.json
Comment thread packages/calcite-components-react/README.md Outdated
Comment thread packages/calcite-components/src/utils/floating-ui.ts
Comment thread support/syncLinkedPackageVersions.ts Outdated
Comment thread support/syncLinkedPackageVersions.ts
Comment thread packages/calcite-components/stencil.config.ts
@benelan benelan force-pushed the benelan/monorepo branch from 41855d7 to 5f1f03d Compare June 2, 2023 23:35
@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