-
Notifications
You must be signed in to change notification settings - Fork 2.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
feat(pub): Support updating lock files #19116
feat(pub): Support updating lock files #19116
Conversation
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.
needs tests for install and docker mode. checkout cargo or nugget manager for samples
Docker mode testsHopefully I'm on the right direction for the docker mode tests. I tracked down that we probably need to update For Flutter, I think the config would be something like this, which seems to be working: flutter: {
datasource: 'flutter-version',
depName: 'flutter',
versioning: npmVersioningId,
}, But for Dart, we don't have a data source for it, so I think we would need to add a new data source for Dart. Potentially something similar to this issue: #12820. Would you be able to confirm? If this is the case, I'm also happy to work on adding a data source for Dart. Install mode testsFor the install mode tests, I've updated the Testit('supports install mode', async () => {
GlobalConfig.set({ ...adminConfig, binarySource: 'install' });
const execSnapshots = mockExecAll();
fs.getSiblingFileName.mockReturnValueOnce('pubspec.lock');
fs.readLocalFile.mockResolvedValueOnce('Old pubspec.lock');
fs.readLocalFile.mockResolvedValueOnce('New pubspec.lock');
expect(
await pub.updateArtifacts({
packageFileName: 'pubspec.yaml',
updatedDeps: [{ depName: 'dep1' }],
newPackageFileContent: 'sdk: flutter',
config,
})
).toEqual([
{
file: {
type: 'addition',
path: 'pubspec.lock',
contents: 'New pubspec.lock',
},
},
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'install-tool flutter 3.3.9' },
{ cmd: 'flutter pub upgrade' },
]);
}); |
Yes on For Dart, you could maybe use https://github.com/dart-lang/sdk/tags although you want to make sure that it matches https://github.com/containerbase/base/blob/7c5021bf3f9c39e6513fe932becd52ee349057d8/src/usr/local/buildpack/tools/v2/dart.sh#L16 |
I remember Google often pushes the new tag first but then uploads the SDK to their storage site a few days later (this happened for Flutter at least). So it seems like a new data source for Dart would be preferable? |
Yes, it would be preferable |
Sorry if you received a couple of review re-requesting, GitHub doesn't let me to re-request both of you for some reasons. |
There's a "refresh" icon you can use to re-request a review, see step 7 in the GitHub docs. Did that not work properly for you? |
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.
I'm happy with the docs.
It did work, but it wouldn't let me to re-request reviews from both of you. So right now I requested one of you. If I request for the other person, GitHub would remove the review request from the first person 😓 |
🎉 This PR is included in version 34.73.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Awesome work ❤️ Thanks a lot for taking over @rarkins ! |
No, thanks to @zeshuaro ! |
Ooops I didn't check the Github UI correctly |
Changes
Add support to also update
pubspec.lock
when a Pub dependency is updatedContext
Documentation
How I've tested my work (please tick one)
I have verified these changes via: