Skip to content

Commit

Permalink
merge next into main (#2705)
Browse files Browse the repository at this point in the history
* Unflag the static build (#2652)

* Unflag the static build

* Only set legacyBuild to false if experimentalSSR is true

* Use legacy build when we have to

* Put a few more tests into legacy mode

* Last two

* Make astro-basic use the legacy build

* Adds a changeset

* Mark the lit test as legacy

* Update yarn lock

* Update based on feedback

* Add --legacy-build flag

* Move astro-basic test to use static build (#2682)

* Move some tests over to the static build (#2677)

* Move some tests over to the static build

* Fix assets tests

* Fix the assets tests

* Fix for the client:only components

* Moves asset tests to the static build

* Move postcss test over to static build

* Bring back legacy build for astro-basic test

* Move astro-basic test to use static build

* Migrate more tests to the static build (#2693)

* fix: disable HMR during build (#2684)

* Migrate more tests to the static build

* Only prepend links in non-legacy mode

* Add the 0-css tests

* Convert all CSS tests to the static build

* Migrate Astro global tests

* Remove .only

* Fix static build tests

* Migrate a few more

* More tests

* Move the lit test back to legacy

* Increase the test timeout

Co-authored-by: Nate Moore <[email protected]>

* Improve `head` injection behavior (#2436)

* feat: add renderHead util to server

* feat: remove `layouts` from config, Vite plugin

* fix: improve head injection during rendering

* chore: update compiler

* fix: do not escape links

* chore: enter `pre` mode

* Replace `send` with `sirv` (#2713)

* remove send

* Create thick-ravens-chew.md

* I feel like I'm going to screw something up

* working finally!

* rewrite req.url

* Add tiny bit of doc

* Update .gitignore

Co-authored-by: Evan Boehs <[email protected]>

* Move remaining tests to the static build (#2712)

* Move lit test to the static build

* Migrate astro-env plugin to work in the static build

* Do not remove vite:define

* Adds a changeset

* Add a warning when passing the --experimental-static-build flag (#2718)

* Add a warning when passing the --experimental-static-build flag

* Disable the lint warning

* [ci] release (next) (#2721)

* [ci] release (next)

* chore: update changeset

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <[email protected]>

* 404 page (#2719)

* Fix: build to 404.html in the static build

* Adds a changeset

* fix pnpm install missing peer deps

* fix svelte version in workspace

* fix lockfile

* fix(webapi): add dev script

* improve preview reliability (#2739)

* improve preview reliability - fix broken tests

* shamefully hoist to unblock

* remove lit from test running

* chore: update lockfile

Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Evan Boehs <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Fred K. Schott <[email protected]>
  • Loading branch information
6 people committed Mar 9, 2022
1 parent c139829 commit 72c2c86
Show file tree
Hide file tree
Showing 130 changed files with 2,391 additions and 2,407 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-stingrays-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes the static build to write to 404.html
5 changes: 5 additions & 0 deletions .changeset/fresh-ladybugs-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes use of private .env variables with the static build
19 changes: 19 additions & 0 deletions .changeset/modern-elephants-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'astro': minor
---

New default build strategy

This change marks the "static build" as the new default build strategy. If you are unfamiliar with this build strategy check out the [migration guide](https://docs.astro.build/en/migrate/#planned-deprecations) on how to change your code to be compatible with this new bulid strategy.

If you'd like to keep using the old build strategy, use the flag `--legacy-build` both in your `astro dev` and `astro build` scripts, for ex:

```json
{
"scripts": {
"build": "astro build --legacy-build"
}
}
```

Note that the legacy build *is* deprecated and will be removed in a future version. You should only use this flag until you have the time to migration your code.
7 changes: 7 additions & 0 deletions .changeset/new-pianos-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': minor
---

## Updated `<head>` and `<body>` behavior

Since `[email protected]`, Astro placed certain restrictions on what files could use `<head>` or `<body>` tags. In `[email protected]`, the restrictions have been lifted. Astro will be able to correctly handle `<head>` and `<body>` tags in _any_ component, not just those in `src/pages/` or `src/layouts/`.
57 changes: 57 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"@example/blog": "0.0.1",
"@example/blog-multiple-authors": "0.0.1",
"@example/component": "0.0.1",
"@example/my-component-demo": "0.0.1",
"@example/my-component": "0.0.1",
"@example/docs": "0.0.1",
"@example/env-vars": "0.0.1",
"@example/fast-build": "0.0.1",
"@example/framework-alpine": "0.0.1",
"@example/framework-lit": "0.0.1",
"@example/framework-multiple": "0.0.1",
"@example/framework-preact": "0.0.1",
"@example/framework-react": "0.0.1",
"@example/framework-solid": "0.0.1",
"@example/framework-svelte": "0.0.1",
"@example/framework-vue": "0.0.1",
"@example/minimal": "0.0.1",
"@example/non-html-pages": "0.0.1",
"@example/portfolio": "0.0.1",
"@example/portfolio-svelte": "0.0.1",
"@example/ssr": "0.0.1",
"@example/starter": "0.0.1",
"@example/subpath": "0.0.1",
"@example/with-markdown": "0.0.1",
"@example/with-markdown-plugins": "0.0.2",
"@example/with-markdown-shiki": "0.0.1",
"@example/with-nanostores": "0.0.1",
"@example/with-tailwindcss": "0.0.1",
"@example/with-vite-plugin-pwa": "0.0.1",
"astro": "0.23.3",
"@astrojs/parser": "0.22.1",
"@astrojs/prism": "0.4.0",
"@astrojs/test-custom-element-renderer": "0.1.0",
"@astrojs/test-static-build-pkg": "0.0.3",
"create-astro": "0.7.1",
"@astrojs/markdown-remark": "0.6.2",
"@astrojs/renderer-lit": "0.4.0",
"@astrojs/renderer-preact": "0.5.0",
"@astrojs/renderer-react": "0.5.0",
"@astrojs/renderer-solid": "0.4.0",
"@astrojs/renderer-svelte": "0.4.0",
"@astrojs/renderer-vue": "0.4.0",
"astro-scripts": "0.0.1",
"astro.build": "0.0.1",
"docs": "0.0.7"
},
"changesets": [
"fresh-ladybugs-think",
"modern-elephants-burn",
"new-pianos-boil",
"thick-ravens-chew"
]
}
5 changes: 5 additions & 0 deletions .changeset/thick-ravens-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Replace `send` dependency with `sirv`
32 changes: 16 additions & 16 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ prefer-workspace-packages=true
link-workspace-packages=true
save-workspace-protocol=false # This prevents the examples to have the `workspace:` prefix

use-node-version=14.19.0

# Rather than shamefully hoisting everything, just make problematic packages public
public-hoist-pattern[]=autoprefixer
public-hoist-pattern[]=astro
public-hoist-pattern[]=remark-*
public-hoist-pattern[]=rehype-*
public-hoist-pattern[]=react
public-hoist-pattern[]=react-dom
public-hoist-pattern[]=preact
public-hoist-pattern[]=preact-render-to-string
public-hoist-pattern[]=vue
public-hoist-pattern[]=svelte
public-hoist-pattern[]=solid-js
public-hoist-pattern[]=lit
public-hoist-pattern[]=@webcomponents/template-shadowroot
shamefully-hoist=true
# TODO: We would like to move to individual opt-in hoisting, but Astro was not originally
# written with this in mind. In the future, it would be good to hoist individual packages only.
# public-hoist-pattern[]=autoprefixer
# public-hoist-pattern[]=astro
# public-hoist-pattern[]=remark-*
# public-hoist-pattern[]=rehype-*
# public-hoist-pattern[]=react
# public-hoist-pattern[]=react-dom
# public-hoist-pattern[]=preact
# public-hoist-pattern[]=preact-render-to-string
# public-hoist-pattern[]=vue
# public-hoist-pattern[]=svelte
# public-hoist-pattern[]=solid-js
# public-hoist-pattern[]=lit
# public-hoist-pattern[]=@webcomponents/template-shadowroot
Empty file removed comp.txt
Empty file.
2 changes: 1 addition & 1 deletion examples/blog-multiple-authors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/renderer-preact": "^0.5.0",
"astro": "^0.23.7",
"astro": "^0.24.0-next.0",
"sass": "^1.49.8"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7",
"astro": "^0.24.0-next.0",
"@astrojs/renderer-preact": "^0.5.0"
}
}
4 changes: 2 additions & 2 deletions examples/component/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7",
"@example/my-component": "workspace:*"
"@example/my-component": "workspace:*",
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"serve": "astro --project-root demo preview"
},
"devDependencies": {
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
8 changes: 6 additions & 2 deletions examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
"preview": "astro preview"
},
"dependencies": {
"@algolia/client-search": "^4.12.0",
"@docsearch/css": "^3.0.0",
"@docsearch/react": "^1.0.0-alpha.28"
"@docsearch/react": "^3.0.0",
"@types/react": "^17.0.39",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@astrojs/renderer-react": "^0.5.0",
"@astrojs/renderer-preact": "^0.5.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
1 change: 1 addition & 0 deletions examples/docs/src/components/Header/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function Search() {
initialScrollY={window.scrollY}
onClose={onClose}
indexName={(CONFIG as any).ALGOLIA.indexName}
appId={(CONFIG as any).ALGOLIA.appId}
apiKey={(CONFIG as any).ALGOLIA.apiKey}
transformItems={(items) => {
return items.map((item) => {
Expand Down
1 change: 1 addition & 0 deletions examples/docs/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const KNOWN_LANGUAGES = {
// See "Algolia" section of the README for more information.
// export const ALGOLIA = {
// indexName: 'XXXXXXXXXX',
// appId: 'XXXXXXXXXX',
// apiKey: 'XXXXXXXXXX',
// }

Expand Down
2 changes: 1 addition & 1 deletion examples/env-vars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
6 changes: 3 additions & 3 deletions examples/fast-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"devDependencies": {
"@astrojs/renderer-vue": "^0.4.0",
"@astrojs/renderer-preact": "^0.5.0",
"astro": "^0.23.7",
"sass": "^1.49.8",
"astro": "^0.24.0-next.0",
"preact": "~10.6.5",
"unocss": "^0.15.5",
"vite-imagetools": "^4.0.1",
"@astrojs/renderer-vue": "^0.4.0"
"vite-imagetools": "^4.0.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/renderer-lit": "^0.4.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"@astrojs/renderer-preact": "^0.5.0",
"@astrojs/renderer-react": "^0.5.0",
"@astrojs/renderer-solid": "^0.4.0",
"@astrojs/renderer-svelte": "^0.4.0",
"@astrojs/renderer-svelte": "^0.5.1",
"@astrojs/renderer-vue": "^0.4.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/renderer-preact": "^0.5.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/renderer-react": "^0.5.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/renderer-solid": "^0.4.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
4 changes: 2 additions & 2 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"@astrojs/renderer-svelte": "^0.4.0",
"astro": "^0.23.7"
"@astrojs/renderer-svelte": "^0.5.1",
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/renderer-vue": "^0.4.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
4 changes: 2 additions & 2 deletions examples/portfolio-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"@astrojs/renderer-svelte": "^0.4.0",
"astro": "^0.23.7"
"@astrojs/renderer-svelte": "^0.5.1",
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/renderer-preact": "^0.5.0",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
7 changes: 3 additions & 4 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
"server": "node server/server.mjs"
},
"devDependencies": {
"@astrojs/renderer-svelte": "^0.4.0",
"astro": "^0.23.7",
"@astrojs/renderer-svelte": "^0.5.1",
"astro": "^0.24.0-next.0",
"unocss": "^0.15.5",
"vite-imagetools": "^4.0.1",
"@astrojs/renderer-svelte": "^0.5.1"
"vite-imagetools": "^4.0.1"
}
}
2 changes: 1 addition & 1 deletion examples/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
4 changes: 2 additions & 2 deletions examples/subpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.23.7",
"@astrojs/renderer-react": "^0.5.0"
"@astrojs/renderer-react": "^0.5.0",
"astro": "^0.24.0-next.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^0.6.1",
"astro": "^0.23.7",
"astro": "^0.24.0-next.0",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.0",
"rehype-slug": "^5.0.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 @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^0.6.1",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"devDependencies": {
"@astrojs/renderer-preact": "^0.5.0",
"@astrojs/renderer-react": "^0.5.0",
"@astrojs/renderer-svelte": "^0.4.0",
"@astrojs/renderer-svelte": "^0.5.1",
"@astrojs/renderer-vue": "^0.4.0",
"@astrojs/markdown-remark": "^0.6.1",
"astro": "^0.23.7"
"astro": "^0.24.0-next.0"
}
}
Loading

0 comments on commit 72c2c86

Please sign in to comment.