Skip to content

feat(ci): refactor updateProjectReferences#17317

Merged
Lemonexe merged 1 commit intodevelopfrom
fix-yarn-refs
Mar 3, 2025
Merged

feat(ci): refactor updateProjectReferences#17317
Lemonexe merged 1 commit intodevelopfrom
fix-yarn-refs

Conversation

@Lemonexe
Copy link
Copy Markdown
Contributor

@Lemonexe Lemonexe commented Feb 28, 2025

Description

As discovered in #17234, the updateProjectReferences.ts script does not treat tsconfig.ts & tsconfig.lib.ts consistently.

Currently you can push incomplete tsconfig.lib.json to master; it will pass CI, because yarn verify-project-references throws only on tsconfig.json. But yarn update-project-references modifies also tsconfig.lib.json.
This is inconsistent, yarn verify-project-references should throw if there are any changes that would be modified by yarn update-project-references.

➡️ fixed it, and reorganized the code while doing that; I hope it will be easier to read now 🙂

QA

I tried:

  • yarn verify-project-references passes ✔️
  • yarn refs passes with no change ✔️
  • In some packages, editing either (tsconfig.ts, tsconfig.lib.ts or both), by either (adding line, removing line, swapping lines or removing references altogether) and then first running:
    • yarn verify-project-references to make sure it throws ✔️
    • then yarn refs to make sure it corrects to original state (no git diff) ✔️
  • Removing tsconfig.ts:
    • yarn verify-project-references throws ✔️
    • yarn refs recreates it, but not necessarily to the same state (the defaultConfig has some different fields) 🤷
  • Removing tsconfig.lib.ts: both scripts pass, no change ✔️

@Lemonexe Lemonexe added ci Continuous Integration (CI) related no-project This label is used to specify that PR doesn't need to be added to a project labels Feb 28, 2025
@Lemonexe Lemonexe marked this pull request as ready for review February 28, 2025 16:43
@Lemonexe Lemonexe requested a review from Nodonisko as a code owner February 28, 2025 16:43
Copy link
Copy Markdown
Contributor

@Nodonisko Nodonisko left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing it 👍 🚀

@Lemonexe Lemonexe merged commit 857be3c into develop Mar 3, 2025
@Lemonexe Lemonexe deleted the fix-yarn-refs branch March 3, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration (CI) related no-project This label is used to specify that PR doesn't need to be added to a project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants