Visitar URL original
chore: drop lerna by Julusian · Pull Request #1852 · Sofie-Automation/sofie-core · GitHub
Skip to content

chore: drop lerna - #1852

Draft
Julusian wants to merge 3 commits into
mainfrom
chore/drop-lerna
Draft

Julusian wants to merge 3 commits into
mainfrom
chore/drop-lerna

Conversation

@Julusian

Copy link
Copy Markdown
Member

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-version script 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

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

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

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

`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.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@Julusian Julusian added the Contribution from SuperFly.tv Contributions sponsored by SuperFly.tv label Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from SuperFly.tv Contributions sponsored by SuperFly.tv

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant