Skip to content

Commit

Permalink
Merge branch 'next' into fix/6708
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Aug 14, 2023
2 parents 6c5809d + 2aa6d8a commit 3cc918a
Show file tree
Hide file tree
Showing 190 changed files with 1,245 additions and 1,268 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-tips-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/internal-helpers': patch
---

Trigger re-release to fix `collapseDuplicateSlashes` export
7 changes: 7 additions & 0 deletions .changeset/cool-feet-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/solid-js': major
---

New `include` and `exclude` config options

The Solid integration now has new `include` and `exclude` config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and `exclude` does the opposite.
7 changes: 7 additions & 0 deletions .changeset/large-countries-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/preact': major
---

New `include` and `exclude` config options

The Preact integration now has new `include` and `exclude` config options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact and `exclude` does the opposite.
27 changes: 27 additions & 0 deletions .changeset/perfect-horses-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'astro': major
---

Astro's JSX handling has been refactored with better support for each framework.

Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult.

Now, Astro determines which framework to use with `include` and `exclude` config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using the `include` and `exclude` options.

```js
export default defineConfig({
// The `include` config is only needed in projects that use multiple JSX frameworks;
// if only using one no extra config is needed.
integrations: [
preact({
include: ['**/preact/*']
}),
react({
include: ['**/react/*']
}),
solid({
include: ['**/solid/*'],
}),
]
});
```
16 changes: 16 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,30 @@
},
"changesets": [
"afraid-dots-whisper",
"breezy-frogs-learn",
"chilled-ducks-grin",
"cool-feet-rest",
"dirty-lies-cover",
"fair-emus-divide",
"famous-queens-itch",
"four-houses-compete",
"gentle-deers-yawn",
"gentle-meals-crash",
"giant-plants-sip",
"heavy-walls-arrive",
"large-countries-share",
"loud-candles-admire",
"mighty-dancers-lay",
"neat-suns-search",
"odd-books-live",
"perfect-horses-tell",
"plenty-keys-add",
"purple-buses-prove",
"rude-ears-play",
"six-grapes-look",
"slimy-carrots-sell",
"spicy-eels-rush",
"tame-files-glow",
"three-adults-exist",
"three-onions-repeat",
"tricky-candles-suffer",
Expand All @@ -51,6 +64,9 @@
"unlucky-hotels-try",
"unlucky-ravens-type",
"unlucky-sheep-build",
"violet-peaches-invent",
"wild-bobcats-carry",
"wild-jobs-tan",
"young-roses-teach"
]
}
9 changes: 9 additions & 0 deletions .changeset/slimy-carrots-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@astrojs/react': major
---

Support for React Refresh

The React integration now fully supports React Refresh and is backed by `@vitejs/plugin-react`.

Also included in this change are new `include` and `exclude` config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and `exclude` does the opposite.
5 changes: 5 additions & 0 deletions .changeset/wild-bobcats-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Add a new `astro/errors` module. Developers can import `AstroUserError`, and provide a `message` and an optional `hint`
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.10.4"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^1.0.0-beta.0",
"@astrojs/rss": "^3.0.0-beta.0",
"@astrojs/sitemap": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/blog/src/content/blog/markdown-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ we can use 3 backticks ``` in new line and write snippet and close with 3 backti

````markdown
```html
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
},
"devDependencies": {
"@astrojs/deno": "^5.0.0-beta.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.3.0-beta.0",
"@types/alpinejs": "^3.7.1",
"alpinejs": "^3.12.2",
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.0-beta.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"lit": "^2.7.5"
}
}
8 changes: 7 additions & 1 deletion examples/framework-multiple/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ import solid from '@astrojs/solid-js';
// https://astro.build/config
export default defineConfig({
// Enable many frameworks to support all different kinds of components.
integrations: [preact(), react(), svelte(), vue(), solid()],
integrations: [
preact({ include: ['**/preact/*'] }),
solid({ include: ['**/solid/*'] }),
react({ include: ['**/react/*'] }),
svelte(),
vue(),
],
});
8 changes: 4 additions & 4 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^3.0.0-beta.0",
"@astrojs/react": "^3.0.0-beta.0",
"@astrojs/solid-js": "^3.0.0-beta.0",
"@astrojs/preact": "^3.0.0-beta.1",
"@astrojs/react": "^3.0.0-beta.1",
"@astrojs/solid-js": "^3.0.0-beta.1",
"@astrojs/svelte": "^4.0.0-beta.0",
"@astrojs/vue": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"preact": "^10.15.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/framework-multiple/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import '../styles/global.css';
// Component Imports
// For JSX components, all the common ways of exporting (under a namespace, specific export, default export etc) are supported!
import * as react from '../components/ReactCounter';
import { PreactCounter } from '../components/PreactCounter';
import SolidCounter from '../components/SolidCounter';
import * as react from '../components/react/ReactCounter';
import { PreactCounter } from '../components/preact/PreactCounter';
import SolidCounter from '../components/solid/SolidCounter';
import VueCounter from '../components/VueCounter.vue';
import SvelteCounter from '../components/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^3.0.0-beta.0",
"@astrojs/preact": "^3.0.0-beta.1",
"@preact/signals": "^1.1.3",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"preact": "^10.15.1"
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.0.0-beta.0",
"@astrojs/react": "^3.0.0-beta.1",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.6",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/solid-js": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"@astrojs/solid-js": "^3.0.0-beta.1",
"astro": "^3.0.0-beta.1",
"solid-js": "^1.7.6"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^4.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"svelte": "^3.59.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"vue": "^3.3.4"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^6.0.0-beta.0",
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^6.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"html-minifier": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^6.0.0-beta.0",
"@astrojs/svelte": "^4.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"svelte": "^3.59.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.0-beta.0",
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"hast-util-select": "^5.0.5",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.0-beta.0"
"astro": "^3.0.0-beta.1"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@astrojs/mdx": "^1.0.0-beta.0",
"@astrojs/preact": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.0",
"@astrojs/preact": "^3.0.0-beta.1",
"astro": "^3.0.0-beta.1",
"preact": "^10.15.1"
}
}
4 changes: 2 additions & 2 deletions examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^3.0.0-beta.0",
"@astrojs/preact": "^3.0.0-beta.1",
"@nanostores/preact": "^0.4.1",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"nanostores": "^0.8.1",
"preact": "^10.15.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/mdx": "^1.0.0-beta.0",
"@astrojs/tailwind": "^5.0.0-beta.0",
"@types/canvas-confetti": "^1.6.0",
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"autoprefixer": "^10.4.14",
"canvas-confetti": "^1.6.0",
"postcss": "^8.4.24",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vite-plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.0-beta.0",
"astro": "^3.0.0-beta.1",
"vite-plugin-pwa": "0.14.7",
"workbox-window": "^6.6.0"
}
Expand Down
Loading

0 comments on commit 3cc918a

Please sign in to comment.