Skip to content

Commit

Permalink
feat!: remove addDevtoolbarFrameworkApp utility (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtjenkins authored Apr 25, 2024
1 parent a1f8eff commit 76e7343
Show file tree
Hide file tree
Showing 29 changed files with 4,770 additions and 7,659 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-months-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-integration-kit": minor
---

Removes the `addDevtoolbarFrameworkApp` utility in favor of `defineToolbarApp` added in Astro 4.7.0
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["playground", "docs", "test-vue-app"]
"ignore": ["playground", "docs"]
}
4 changes: 4 additions & 0 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export default defineConfig({
{
label: "addDevToolbarFrameworkApp",
link: "/utilities/add-devtoolbar-framework-app/",
badge: badge("removed"),
attrs: {
style: "opacity:0.5",
},
},
{
label: "addDts",
Expand Down
11 changes: 11 additions & 0 deletions docs/src/content/docs/getting-started/upgrade-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';

Features get added and removed, and breaking changes are introduced! This documents how to migrate.

## `0.12.0`

---

### `addDevToolbarFrameworkApp` removed

The `addDevToolbarFrameworkApp` has been removed in favour of the Astro `defineToolbarApp` utility
added in Astro v4.7.0.

To migrate your Dev Toolbar App to the new Astro utility, please see [their documentation here](https://docs.astro.build/en/recipes/making-toolbar-apps/#building-apps-with-a-ui-framework).

## `0.11.0`

---
Expand Down
10 changes: 10 additions & 0 deletions docs/src/content/docs/utilities/add-devtoolbar-framework-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ description: Allows you to register a framework component as a Dev Toolbar App.
---
import { Tabs, TabItem, LinkCard, Aside } from '@astrojs/starlight/components';

:::danger
Removed in v0.12.0.

`addDevToolbarFrameworkApp` has been removed in favour of using the updated Astro Dev Toolbar API,
specifically looking at the `defineToolbarApp` helper.

See the [Astro v4.7.0 blog post](https://astro.build/blog/astro-470/) for more info
or [learn how to create Dev Toolbar Apps with a framework from the Astro docs here](https://docs.astro.build/en/recipes/making-toolbar-apps/#building-apps-with-a-ui-framework).
:::

`addDevToolbarFrameworkApp` allows you to register a framework component as a Dev Toolbar App!
You can now use a React, Preact, Solid, Vue or Svelte component instead of manipulating the DOM imperatively!

Expand Down
30 changes: 1 addition & 29 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,39 +49,11 @@
"type": "module",
"peerDependencies": {
"@astrojs/db": "^0.9.0",
"@vitejs/plugin-react": "^4.2.1",
"astro": "^4.4.1",
"preact": "^10.19.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"solid-js": "^1.8.15",
"svelte": "^4.2.11",
"vue": "^3.4.19"
"astro": "^4.4.1"
},
"peerDependenciesMeta": {
"@astrojs/db": {
"optional": true
},
"@vitejs/plugin-react": {
"optional": true
},
"preact": {
"optional": true
},
"react": {
"optional": true
},
"react-dom": {
"optional": true
},
"solid-js": {
"optional": true
},
"svelte": {
"optional": true
},
"vue": {
"optional": true
}
},
"devDependencies": {
Expand Down
31 changes: 0 additions & 31 deletions package/src/stubs/add-devtoolbar-framework-app/preact.js

This file was deleted.

33 changes: 0 additions & 33 deletions package/src/stubs/add-devtoolbar-framework-app/react.js

This file was deleted.

31 changes: 0 additions & 31 deletions package/src/stubs/add-devtoolbar-framework-app/solid.js

This file was deleted.

26 changes: 0 additions & 26 deletions package/src/stubs/add-devtoolbar-framework-app/svelte.js

This file was deleted.

49 changes: 0 additions & 49 deletions package/src/stubs/add-devtoolbar-framework-app/vue.js

This file was deleted.

103 changes: 0 additions & 103 deletions package/src/utilities/add-devtoolbar-framework-app.ts

This file was deleted.

1 change: 0 additions & 1 deletion package/src/utilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export { hasIntegration } from "./has-integration.js";
export { hasVitePlugin } from "./has-vite-plugin.js";
export { injectDevRoute } from "./inject-dev-route.js";
export { watchDirectory } from "./watch-directory.js";
export { addDevToolbarFrameworkApp } from "./add-devtoolbar-framework-app.js";
export { addIntegration } from "./add-integration.js";
2 changes: 1 addition & 1 deletion package/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig((options) => {
clean: true,
splitting: false,
minify: !dev,
external: [...Object.keys(peerDependencies), "@@COMPONENT_SRC@@"],
external: [...Object.keys(peerDependencies)],
tsconfig: "tsconfig.build.json",
};
});
Loading

0 comments on commit 76e7343

Please sign in to comment.