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

[rush-migrate-subspace-plugin]: add clean subspace feature #22

Merged

Conversation

pedro-gomes-92
Copy link
Collaborator

@pedro-gomes-92 pedro-gomes-92 commented Nov 29, 2024

Basic Checks

Have you run rush change for this change?

  • Yes
  • No

If No, please run rush change before, this is necessary.

If adding a new feature, the PR's description includes:

Reason for adding this feature

A lot of subspaces are not being properly managed, where there are a lot of similar, duplicated or unused dependency versions being added to the "common-versions.json". Adding this feature helps developers to rapidly clean their subspace multiple dependency versions, reducing its "pnpm-lock.yaml" file and minimise future issues.

How to use

rush migrate-subspace --clean

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Summary

Supports the parameter --clean, to remove a subspace unnecessary dependency versions, reducing its "pnpm-lock.yaml" file and prevent future dependency issues.

Detail

  • Removes duplicated dependency versions from "common-versions.json" alternativeAllowedVersions
  • Removes unused dependency versions from "common-versions.json" alternativeAllowedVersions
  • Removes duplicated dependency versions from "package.json" between devDependencies and dependencies
  • Removes superset dependencies from "common-versions.json" alternativeAllowedVersions and updates each proper project "package.json" with the new subset version (e.g. Project P1 contains A@^1.0.0 and Project P2 contains [email protected], the script will remove ^1.0.0 from the "common-versions.json" and update P1 "package.json" to [email protected])

@pedro-gomes-92 pedro-gomes-92 force-pushed the pedrogomes/support-clean-subspace branch from c0eb143 to aeaa914 Compare December 19, 2024 07:20
@pedro-gomes-92 pedro-gomes-92 marked this pull request as ready for review December 20, 2024 04:30
@pedro-gomes-92 pedro-gomes-92 self-assigned this Dec 20, 2024
@pedro-gomes-92 pedro-gomes-92 changed the title feat: start clean [rush-migrate-subspace-plugin]: add clean subspace feature Dec 20, 2024
Copy link
Member

@octogonz octogonz left a comment

Choose a reason for hiding this comment

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

Approved with some suggestions

@pedro-gomes-92 pedro-gomes-92 force-pushed the pedrogomes/support-clean-subspace branch from 82ee097 to b372387 Compare December 20, 2024 09:18
@pedro-gomes-92 pedro-gomes-92 merged commit 57380b5 into tiktok:main Jan 7, 2025
2 checks passed
@pedro-gomes-92 pedro-gomes-92 deleted the pedrogomes/support-clean-subspace branch January 7, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants