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

feat(monorepo-ts): upgrade syncpack to v12 #691

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

cogwirrel
Copy link
Member

@cogwirrel cogwirrel commented Jan 29, 2024

Upgrade from Syncpack v8 to v12. Additionally pin syncpack to major version 12 to avoid any future
breaking changes in new major versions from affecting new projects.

Note that unfortunately the Syncpack exported RcFile types are not built with JSII so we must redefine them in syncpack-options.ts

BREAKING CHANGE: Syncpack configuration for monorepo updated with breaking changes aligned with
Syncpack upgrade from v8 to v12:

  • The dev, overrides, peer, pnpmOverrides, prod, resolutions and workspace boolean
    flags are replaced by the dependencyTypes array.
  • The workspace dependency type is now named local.
  • semverRange is deprecated in favour of adding a range to semverGroups

For more details, please refer to the Syncpack releases between 8 and 12:

Additionally Syncpack related types and configs are namespaced under a Syncpack namespace,
eg. Syncpack.DEFAULT_CONFIG for the default monorepo syncpack config.

Fixes #675, #553

@cogwirrel cogwirrel requested a review from agdimech January 29, 2024 08:09
@cogwirrel
Copy link
Member Author

@JamieMason would love it if you could take a look at this too if you have time to double check I haven't done anything crazy!

@JamieMason
Copy link

Looks good @cogwirrel, you've added !local which is the main thing that people don't handle and trips them up.

I think there's probably a way to have to redeclare less of Syncpack's types, maybe by importing some of them from /src/config/types.ts – none of those use Partial, only /src/index.ts when it re-exports it, if that helps at all.

@cogwirrel
Copy link
Member Author

Looks good @cogwirrel, you've added !local which is the main thing that people don't handle and trips them up.

I think there's probably a way to have to redeclare less of Syncpack's types, maybe by importing some of them from /src/config/types.ts – none of those use Partial, only /src/index.ts when it re-exports it, if that helps at all.

Thanks so much for looking!

I had a quick play with importing other types but I think they need to be defined in a JSII project to reuse them unfortunately - the Partial error was just the first hurdle!

Upgrade from Syncpack v8 to v12. Additionally pin syncpack to major version 12 to avoid any future
breaking changes in new major versions from affecting new projects.

BREAKING CHANGE: Syncpack configuration for monorepo updated with breaking changes aligned with
Syncpack upgrade from v8 to v12:

- The `dev`, `overrides`, `peer`, `pnpmOverrides`, `prod`, `resolutions` and `workspace` boolean
flags are replaced by the `dependencyTypes` array.
- The `workspace` dependency type is now named `local`.
- `semverRange` is deprecated in favour of adding a range to `semverGroups`

For more details, please refer to the Syncpack releases between 8 and 12:
- [Syncpack v9](https://github.com/JamieMason/syncpack/releases/tag/9.0.0)
- [Syncpack v10](https://github.com/JamieMason/syncpack/releases/tag/10.0.0)
- [Syncpack v11](https://github.com/JamieMason/syncpack/releases/tag/11.0.0)
- [Syncpack v12](https://github.com/JamieMason/syncpack/releases/tag/12.0.0-alpha.0)

Additionally Syncpack related types and configs are namespaced under a `Syncpack` namespace,
eg. `Syncpack.DEFAULT_CONFIG` for the default monorepo syncpack config.

Fixes #675, #553
Copy link
Contributor

@agdimech agdimech left a comment

Choose a reason for hiding this comment

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

Fantastic work! Thanks for updating this and thanks to @JamieMason for your input :)

@cogwirrel cogwirrel merged commit 00dcb53 into mainline Jan 30, 2024
4 checks passed
@cogwirrel cogwirrel deleted the feat/syncpack-12 branch January 30, 2024 00:20
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.

[BUG] (monorepo) upgrade-deps using outdated syncpack (error)
3 participants