Skip to content

Commit

Permalink
Merge branch 'main' into fix/netlify-base64
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Sullivan authored Jun 15, 2022
2 parents a475cb2 + 8ed924d commit 9b0d889
Show file tree
Hide file tree
Showing 85 changed files with 950 additions and 398 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-feet-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix: find a hosting network differently based on Node version
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
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/preact": "^0.1.3",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"sass": "^1.52.2"
},
"dependencies": {
Expand Down
41 changes: 29 additions & 12 deletions examples/blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,41 @@ Features:

- ✅ SEO-friendly setup with canonical URLs and OpenGraph data
- ✅ Full Markdown support
- ✅ RSS 2.0 generation
- ✅ Sitemap.xml generation

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
/
├── public/
│ ├── robots.txt
│ └── favicon.ico
├── src/
│ ├── components/
│ │ └── Tour.astro
│ └── pages/
│ └── index.astro
└── package.json
├── README.md
├── astro.config.mjs
├── package.json
├── public
│   ├── assets
│   │   └── blog
│   │   └── introducing-astro.jpg
│   ├── favicon.ico
│   ├── social.jpg
│   └── social.png
├── sandbox.config.json
├── src
│   ├── components
│   │   ├── Author.astro
│   │   ├── BaseHead.astro
│   │   ├── BlogHeader.astro
│   │   ├── BlogPost.astro
│   │   ├── BlogPostPreview.astro
│   │   ├── Heading.astro
│   │   └── Logo.astro
│   ├── layouts
│   │   └── BlogPost.astro
│   ├── pages
│   │   ├── index.astro
│   │   └── posts
│   │   └── index.md
│   └── styles
│   └── blog.css
└── tsconfig.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"preact": "^10.7.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/component/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@example/my-component": "workspace:*",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
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 --root demo preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"@astrojs/react": "^0.1.3",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
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": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"alpinejs": "^3.10.2"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/lit": "^0.1.5",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@astrojs/solid-js": "^0.1.4",
"@astrojs/svelte": "^0.1.4",
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"preact": "^10.7.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.1.3",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"@types/react": "^18.0.10",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/solid-js": "^0.1.4",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"solid-js": "^1.4.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/svelte": "^0.1.4",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"svelte": "^3.48.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"vue": "^3.2.36"
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/solid-js": "0.1.4",
"@astrojs/tailwind": "^0.2.1",
"@astrojs/turbolinks": "^0.1.3",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"solid-js": "^1.4.3"
},
"dependencies": {
Expand Down
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": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
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": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"sass": "^1.52.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@astrojs/node": "^0.1.2",
"@astrojs/svelte": "^0.1.4",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"concurrently": "^7.2.1",
"lightcookie": "^1.0.25",
"unocss": "^0.15.6",
Expand Down
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": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
2 changes: 1 addition & 1 deletion examples/subpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.1.3",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"sass": "^1.52.2"
},
"dependencies": {
Expand Down
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.11.2",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
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.11.2",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^0.1.3",
"@astrojs/svelte": "^0.1.4",
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
},
"dependencies": {
"preact": "^10.7.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@astrojs/solid-js": "^0.1.4",
"@astrojs/svelte": "^0.1.4",
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.44"
"astro": "^1.0.0-beta.46"
}
}
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/tailwind": "^0.2.1",
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1",
"postcss": "^8.4.14",
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 @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.44",
"astro": "^1.0.0-beta.46",
"vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.3"
}
Expand Down
30 changes: 30 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# astro

## 1.0.0-beta.46

### Patch Changes

- [`d1f3406d`](https://github.com/withastro/astro/commit/d1f3406d85aea6e121f20d1d054140f05aea4424) - Add support for the `injectRoute` hook proposed in [RFC0023](https://github.com/withastro/rfcs/blob/main/proposals/0023-inject-route.md). Feature documentation is available in [#704](https://github.com/withastro/docs/pull/704)

* [#3397](https://github.com/withastro/astro/pull/3397) [`48161b77`](https://github.com/withastro/astro/commit/48161b77caf35a9f3c285c0c7fbb9d8a937241c9) Thanks [@happycollision](https://github.com/happycollision)! - MarkdownInstance: Persist frontmatter type into the return of `.default()`

- [#3595](https://github.com/withastro/astro/pull/3595) [`330fef44`](https://github.com/withastro/astro/commit/330fef448e9be257bb3a740387222935e3656c8a) Thanks [@matthewp](https://github.com/matthewp)! - Handle importing multiple CSS packages in same bundle

## 1.0.0-beta.45

### Patch Changes

- [#3593](https://github.com/withastro/astro/pull/3593) [`0e2314d8`](https://github.com/withastro/astro/commit/0e2314d8e5b01f7b2184a243c6d7e53e14b0cd0f) Thanks [@matthewp](https://github.com/matthewp)! - Fixes uses of inline hoisted scripts in SSR

* [#3590](https://github.com/withastro/astro/pull/3590) [`d46f8fb1`](https://github.com/withastro/astro/commit/d46f8fb14d3c702d62cc327de23562078fca0088) Thanks [@okikio](https://github.com/okikio)! - Add support for optional integrations

By making integration optional, Astro can now ignore null, undefined or other [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) "Integration" values instead of giving an internal error most devs can't and/or won't understand.

This also enables conditional integrations,
e.g.

```ts
integration: [
// Only run `compress` integration when in production environments, etc...
import.meta.env.production ? compress() : null,
];
```

## 1.0.0-beta.44

### Patch Changes
Expand Down
7 changes: 7 additions & 0 deletions packages/astro/e2e/fixtures/pass-js/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';

// https://astro.build/config
export default defineConfig({
integrations: [react()],
});
13 changes: 13 additions & 0 deletions packages/astro/e2e/fixtures/pass-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "@e2e/pass-js",
"version": "0.0.0",
"private": true,
"devDependencies": {
"@astrojs/react": "workspace:*",
"astro": "workspace:*"
},
"dependencies": {
"react": "^18.1.0",
"react-dom": "^18.1.0"
}
}
29 changes: 29 additions & 0 deletions packages/astro/e2e/fixtures/pass-js/src/components/React.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { BigNestedObject } from '../types';
import { useState } from 'react';

interface Props {
obj: BigNestedObject;
num: bigint;
}

const isNode = typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]';

/** a counter written in React */
export default function Component({ obj, num, arr }: Props) {
// We are testing hydration, so don't return anything in the server.
if(isNode) {
return <div></div>
}

return (
<div>
<span id="nested-date">{obj.nested.date.toUTCString()}</span>
<span id="regexp-type">{Object.prototype.toString.call(obj.more.another.exp)}</span>
<span id="regexp-value">{obj.more.another.exp.source}</span>
<span id="bigint-type">{Object.prototype.toString.call(num)}</span>
<span id="bigint-value">{num.toString()}</span>
<span id="arr-type">{Object.prototype.toString.call(arr)}</span>
<span id="arr-value">{arr.join(',')}</span>
</div>
);
}
Loading

0 comments on commit 9b0d889

Please sign in to comment.