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

Use workspace:^ to specify @babel/ dependencies #13772

Merged

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Sep 16, 2021

Q                       A
Tests Added + Pass? Yes
License MIT

When workspace:^, yarn automatically replaces it with the correct version (still using the ^ marker) at pack time. This has the advantage that we stop getting conflicts due to package.json changes, since dependencies won't be modified on publish anymore. Yarn uses this feature for their monorepo: yarnpkg/berry#3431

@merceyz
Copy link
Contributor

merceyz commented Sep 17, 2021

while in theory this should work, I get this error:

The feature was added in yarnpkg/berry#3386 which is currently in a canary release

yarn set version canary

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 17, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e76a1b6:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@babel-bot
Copy link
Collaborator

babel-bot commented Sep 17, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/49382/

@nicolo-ribaudo nicolo-ribaudo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Oct 24, 2021
@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review October 24, 2021 12:55
@nicolo-ribaudo
Copy link
Member Author

I updated this PR to also use workspace:^ in devDependencies: there is no need to distinguish workspace:^ and workspace:*.

Copy link
Member

@hzoo hzoo left a comment

Choose a reason for hiding this comment

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

Cool, so when we publish it'll auto update to the version, found the url https://yarnpkg.com/features/workspaces/#publishing-workspaces (dont know if we want to specify these kinds of things in our contributing, I guess it's enforced too?)

@nicolo-ribaudo
Copy link
Member Author

Yeah it's enforced by the constraints file (and rbh I think most contributors won't even notice).

@nicolo-ribaudo nicolo-ribaudo merged commit c7ddb1a into babel:main Oct 25, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the yarn-workspace-implicit-version branch October 25, 2021 05:22
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants