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

Add @astrojs/upgrade package for automatic package upgrades #8525

Merged
merged 33 commits into from
Nov 27, 2023

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Sep 12, 2023

Changes

  • Closes PLT-1214
  • Adds a new CLI package named @astrojs/upgrade
  • Usage is as follows:
    npx @astrojs/upgrade # upgrades to latest
    npx @astrojs/upgrade beta # upgrades to beta (or latest if beta isn't found)
    npx @astrojs/upgrade --dry-run # logs versions but no install

Terminal window that shows "Integration upgrade in progress..." for a mixed release

  • For major or prereleases, automatically links to the migration guide for Astro (only if it exists) and the CHANGELOG for everything else.

Terminal window that shows "Integration upgrade in progress..." for a beta release

Testing

Added some initial basic test suites in addition to lots of manual testing

Docs

Updated the README! We should take another pass at this, though.

@natemoo-re natemoo-re requested a review from a team as a code owner September 12, 2023 21:19
@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2023

🦋 Changeset detected

Latest commit: 203530f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@sacarvy
Copy link

sacarvy commented Oct 5, 2023

Is this for hackathon @natemoo-re,
Can we contribute

@jacobdalamb
Copy link
Contributor

@natemoo-re I think it would also be great to either add a @astrojs/uninstall package or a CLI command to uninstall packages gracefully as currently, users have to remember to manually remove them from the Astro config before installing another Astro integration.

@jasikpark
Copy link
Contributor

I'm a big fan of storybook's upgrade script: https://storybook.js.org/docs/react/configure/upgrading#upgrade-script

It especially helps to reduce weird mismatched peer-deps!

https://github.com/antfu/taze is my default for general dep upgrades though: pnpx taze@latest -I is always in my zsh history 🙈

@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: example Related to an example package (scope) 🚨 action Modifies GitHub Actions pkg: react Related to React (scope) pkg: lit Related to Lit (scope) pkg: integration Related to any renderer integration (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Nov 22, 2023
@github-actions github-actions bot removed feat: markdown Related to Markdown (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: example Related to an example package (scope) 🚨 action Modifies GitHub Actions pkg: react Related to React (scope) pkg: lit Related to Lit (scope) pkg: integration Related to any renderer integration (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Nov 22, 2023
@github-actions github-actions bot added the pr: docs A PR that includes documentation for review label Nov 27, 2023
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

So excited for this, Nate, and to be able to put this at the top of the Upgrade guide instead of "don't forget to update all your integrations , too!"

Some tiny suggestions below for your consideration.

.changeset/tasty-dryers-bathe.md Outdated Show resolved Hide resolved
packages/upgrade/README.md Show resolved Hide resolved
packages/upgrade/README.md Outdated Show resolved Hide resolved
packages/upgrade/README.md Outdated Show resolved Hide resolved
packages/upgrade/src/actions/install.ts Outdated Show resolved Hide resolved
packages/upgrade/src/actions/install.ts Outdated Show resolved Hide resolved
packages/upgrade/src/actions/install.ts Show resolved Hide resolved
packages/upgrade/src/actions/install.ts Show resolved Hide resolved
packages/upgrade/src/actions/install.ts Show resolved Hide resolved
packages/upgrade/src/actions/verify.ts Outdated Show resolved Hide resolved
packages/upgrade/src/actions/verify.ts Show resolved Hide resolved
@github-actions github-actions bot added the pkg: create-astro Related to the `create-astro` package (scope) label Nov 27, 2023
@natemoo-re natemoo-re removed the pkg: create-astro Related to the `create-astro` package (scope) label Nov 27, 2023
@natemoo-re natemoo-re merged commit 5a38750 into main Nov 27, 2023
13 checks passed
@natemoo-re natemoo-re deleted the spike/upgrade branch November 27, 2023 23:01
@astrobot-houston astrobot-houston mentioned this pull request Nov 27, 2023
matthewp added a commit that referenced this pull request Nov 28, 2023
* feat: implement redesign

* fix: make it build

* feat: visual tweaks

* feat(overlay): update styling, integration endpoint

* feat: add fallback icons

* Clean up tests (#9183)

* Add `@astrojs/upgrade` package for automatic package upgrades (#8525)

Co-authored-by: Sarah Rainsberger <[email protected]>

* [ci] format

* fix: links with same path but different search params not prefetched (#9189)

Co-authored-by: Sarah Rainsberger <[email protected]>

* fix: discord icon

* chore: changeset

---------

Co-authored-by: Nate Moore <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]>
Co-authored-by: Nate Moore <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Spencer Whitehead <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants