Repository navigation
chore: drop lerna - #1852
Draft
Julusian wants to merge 3 commits into
Draft
chore: drop lerna#1852Julusian wants to merge 3 commits into
Julusian wants to merge 3 commits into
Conversation
`lerna run` and `lerna publish from-package` are replaced with their `yarn workspaces foreach` equivalents. `yarn npm publish` handles provenance and npm trusted publishing itself, and does not need a clean working tree. Yarn does not read ~/.npmrc, so a provided NPM_TOKEN is now passed as YARN_NPM_AUTH_TOKEN.
This brings typescript 6 and eslint 10 with it. - typescript 6: drop the deprecated `baseUrl`. webui now pulls in the w3c-web-hid types and declares `moment/min/locales` itself, as typescript no longer includes all @types by default and checks side-effect imports. The jest tsconfigs silence the node10 resolution deprecation, as ts-jest needs CommonJS - drop the `paths` from the tsconfigs: they only overrode the `node_modules` mapping of the v3 preset, which v4 no longer has, or mapped the package to itself, which nothing uses. Also drop the `types` which repeat the preset - without those `paths`, eslint now notices that playout-gateway imports atem-connection and threadedclass, which are deliberately not dependencies, so allow those imports - eslint-plugin-react cannot detect the react version under eslint 10, so it is resolved in the config instead - the rules which are new or stricter in this version are disabled for now, to be enabled and fixed separately - the formatting is kept unchanged: the prettier config of the preset sorts imports and uses a different tabWidth, which would reformat most of the repo. The previous config is inlined instead, until that reformat is done separately
sofie-version from @sofie-automation/code-standard-preset now does the lockstep versioning of all the workspaces, and writes the changelog of each workspace which has one committed. This drops the last uses of lerna. The root package.json now holds the version, instead of lerna.json. Requires the release of code-standard-preset which adds this to sofie-version.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




About the Contributor
This pull request is posted on behalf of SuperFly
Type of Contribution
This is a: Code improvement
Current Behavior
We are using lerna for some workspace tooling.
Lerna is not as maintained as I would like, and is largely redundant with yarn workspaces that we have been using for a long time now. The only bits we are still using is a couple of run commands, and the version bump and changelog generation.
New Behavior
This PR relies upon Sofie-Automation/sofie-code-standard-preset#57 being merged and published.
The remaining uses are now ported to yarn workspaces, with the sofie-code-standard-preset gaining a bit more ability in its
sofie-versionscript to be able to generate all the changelogs we have. For now this is generating the same set of changelogs, but the tool has been written to only update changelogs which exist. So for any internal libraries or apps which a changelog serves no purpose, we could delete the file to stop it being updated.A benefit of this, is that we trade a couple hundred lines more custom versioning script for a couple of thousands lines less of yarn.lock, so we have dropped a bunch of dependencies, some of which have been dependabot warnings that we have been unable to clear as lerna likes to pin exact versions of libraries and not update those pins often.
Testing
The publish flows need some manual testing, but that is hard to do before the code-preset PR is merged
Affected areas
This affects build tooling
Time Frame
Other Information
Status