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

[astro add] Support adapters and third party packages #3854

Merged
merged 13 commits into from
Jul 8, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Jul 7, 2022

Changes

  • Detect adapters and integrations by package.json keywords!
    • astro-integration -> valid Astro integration
    • astro-adapter -> valid Astro adapter
  • Add package.json keywords across all official integrations and adapters
  • Correctly set the adapter in your astro config instead of blindly adding to integrations
  • Add warning + "continue?" prompt when installing third party integrations and adapters
  • Remove astro- package naming requirement for third party integrations

Testing

TODO

Docs

Document magic "keywords" in the integrations API and adapter API references for package authors ❤️
withastro/docs#946

@changeset-bot
Copy link

changeset-bot bot commented Jul 7, 2022

🦋 Changeset detected

Latest commit: 6826650

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

This PR includes changesets to release 27 packages
Name Type
astro Patch
@astrojs/cloudflare Patch
@astrojs/deno Patch
@astrojs/image Patch
@astrojs/lit Patch
@astrojs/mdx Patch
@astrojs/netlify Patch
@astrojs/node Patch
@astrojs/partytown Patch
@astrojs/preact Patch
@astrojs/prefetch Patch
@astrojs/react Patch
@astrojs/sitemap Patch
@astrojs/solid-js Patch
@astrojs/svelte Patch
@astrojs/tailwind Patch
@astrojs/turbolinks Patch
@astrojs/vercel Patch
@astrojs/vue Patch
@e2e/astro-component Patch
@e2e/lit-component Patch
@e2e/preact-component Patch
@e2e/react-component Patch
@e2e/solid-component Patch
@e2e/svelte-component Patch
@e2e/e2e-tailwindcss Patch
@e2e/ts-resolution Patch

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: lit Related to Lit (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: solid Related to Solid (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: integration Related to any renderer integration (scope) labels Jul 7, 2022
return integrationEntries;
} catch (e) {
if (e instanceof Error) {
spinner.fail(e.message);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Map errors to spinner.fail to avoid unnecessary stack traces!

@bholmesdev bholmesdev changed the title [astro add] Support adapters and third party integrations / adapters [astro add] Support adapters and third party packages Jul 7, 2022
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

🙌🏻 Great update, thanks Ben! LGTM!

Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

Well done!

@natemoo-re natemoo-re linked an issue Jul 8, 2022 that may be closed by this pull request
1 task
@bholmesdev bholmesdev merged commit b012ee5 into main Jul 8, 2022
@bholmesdev bholmesdev deleted the feat/astro-add-adapter-third-party-support branch July 8, 2022 20:55
@astrobot-houston astrobot-houston mentioned this pull request Jul 8, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* feat: support adapters and third part integrations by keywords

* refactor: add keywords to all official integrations

* docs: add adapter ex to astro add help

* nit: clarify astro add usage

* nit: highlight link

* fix: use process.exit(1) on error

* chore: changeset

* nit: bold integration name

* fix: log install instructions for adapters instead

* nit: change to logAdapterConfigInstructions

* Revert "fix: log install instructions for adapters instead"

This reverts commit 1a459f1.

* feat: add hardcoded adapter export map

* refactor: inline adapter config log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: lit Related to Lit (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: solid Related to Solid (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 astro add vercel fails in a misleading way
3 participants