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

Update example dependencies versions with a script #7367

Merged
merged 3 commits into from
Jun 12, 2023
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Jun 12, 2023

Changes

Add a script to update the example deps versions.

Testing

Manually ran pnpm run version locally

Docs

n/a

@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2023

⚠️ No Changeset found

Latest commit: d5d0831

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

LGTM! Not quite sure what to make of the cancelled/skipped CI jobs given they‘re not really testing this PR. Existing tests should still pass though right?

@bluwy
Copy link
Member Author

bluwy commented Jun 12, 2023

Yeah it should still pass. I've been seeing similar failures recently here where CI would bail completely without any reason. I've merged the branch to re-trigger CI again.

scripts/deps/update-example-versions.js Outdated Show resolved Hide resolved
scripts/deps/update-example-versions.js Show resolved Hide resolved
// Update dependencies
for (const depName of Object.keys(packageJson.dependencies ?? [])) {
if (packageToVersions.has(depName)) {
packageJson.dependencies[depName] = `^${packageToVersions.get(depName)}`;
Copy link
Member

Choose a reason for hiding this comment

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

nit: should we just pin ~ - bug fixes?

Personally, I would pin the versions without ranges. It's known that there are libraries that break the CIs with patches.

Copy link
Member

Choose a reason for hiding this comment

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

Worth bearing in mind we’re bumping astro or @astrojs/* integrations in our example templates here. If we break CI with patches, that’s probably on us, no?

Copy link
Member Author

@bluwy bluwy Jun 12, 2023

Choose a reason for hiding this comment

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

I think ^ should be good here as it's what we used to use too. Since these are our packages that we're bumping, I don't think we're making breaking changes in minors or patches that needs this restriction. (EDIT: I sent this before seeing Chris's comment)

@bluwy bluwy merged commit 718cebd into main Jun 12, 2023
@bluwy bluwy deleted the update-example-versions branch June 12, 2023 12:48
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.

3 participants