-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
create-app: add a yarn.lock seed file #22659
Conversation
Signed-off-by: Patrik Oldsberg <[email protected]>
Signed-off-by: Patrik Oldsberg <[email protected]>
Signed-off-by: Patrik Oldsberg <[email protected]>
Changed Packages
|
Uffizzi Cluster |
Signed-off-by: Patrik Oldsberg <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep nice!
We should starting msw 2 btw, it's really much nicer.
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, many thanks @Rugvip!
Just have some over all comments:
- Do we have any documentation as to how we would update this file once we hit a case where we have a broken package?
- For those using a private registry will that still work?
- Will this be easy to port to Yarn 3 (or 4)?
@awanlin it's documented in the seed file itself: https://github.com/backstage/backstage/blob/master/packages/create-app/seed-yarn.lock Afaik the behavior for private registries is that they'll end up with the individual |
Thanks @Rugvip , totally missed the commends in that file! |
Hey, I just made a Pull Request!
This adds
seed-yarn.lock
topackages/create-app
, which is downloaded and used as the initialyarn.lock
for all projects created with@backstage/create-app
. The purpose of this is for us to be able to lock individual dependency version ranges to older versions, in the event that the latest release of those dependencies is broken.The file is not bundled with the
@backstage/create-app
package itself in order for us to not have to publish new versions every time we update that file, as that would disrupt our release process quite a lot. Even with patch releases we'd need to keep the file in sync inmaster
as well since we don't want broken e2e tests. If the downloading turns out to be a big issue I think it's something we could consider though.Noting that the
seed-yarn.lock
uses the Yarn v1 lockfile format, but later versions are able to translate that during the install, so our E2E tests that use Yarn v3 currently still pick up the initial lockfile entries.For the e2e tests the
seed-yarn.lock
in the workspace is used instead, so that changes to the file are immediately visible in CI.This also fixes our E2E tests, which are currently broken by testing-library/jest-dom#574
This is what it looks like if
@backstage/create-app
fails to download the seed file:✔️ Checklist
Signed-off-by
line in the message. (more info)