summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/astro-parser/CHANGELOG.md2
-rw-r--r--packages/astro-parser/package.json2
-rw-r--r--packages/astro/CHANGELOG.md70
-rw-r--r--packages/astro/package.json4
4 files changed, 75 insertions, 3 deletions
diff --git a/packages/astro-parser/CHANGELOG.md b/packages/astro-parser/CHANGELOG.md
index 9c2da8ef7..3da1b144d 100644
--- a/packages/astro-parser/CHANGELOG.md
+++ b/packages/astro-parser/CHANGELOG.md
@@ -1,5 +1,7 @@
# @astrojs/parser
+## 0.18.6
+
## 0.18.5
### Patch Changes
diff --git a/packages/astro-parser/package.json b/packages/astro-parser/package.json
index 6623a7497..fa617cad8 100644
--- a/packages/astro-parser/package.json
+++ b/packages/astro-parser/package.json
@@ -1,6 +1,6 @@
{
"name": "@astrojs/parser",
- "version": "0.18.5",
+ "version": "0.18.6",
"author": "Skypack",
"license": "MIT",
"type": "commonjs",
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md
index 87f3a6a6c..f12430a6f 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,75 @@
# astro
+## 0.19.0
+
+### Minor Changes
+
+- 239065e2: **[BREAKING]** Replace the Collections API with new file-based routing.
+
+ This is a breaking change which impacts collections, pagination, and RSS support.
+ Runtime warnings have been added to help you migrate old code to the new API.
+ If you have trouble upgrading, reach out on https://astro.build/chat
+
+ This change was made due to confusion around our Collection API, which many users found difficult to use. The new file-based routing approach should feel more familiar to anyone who has used Next.js or SvelteKit.
+
+ Documentation added:
+
+ - https://astro-docs-git-main-pikapkg.vercel.app/core-concepts/routing
+ - https://astro-docs-git-main-pikapkg.vercel.app/guides/pagination
+ - https://astro-docs-git-main-pikapkg.vercel.app/guides/rss
+ - https://astro-docs-git-main-pikapkg.vercel.app/reference/api-reference#getstaticpaths
+
+- 239065e2: Adds support for Astro.resolve
+
+ `Astro.resolve()` helps with creating URLs relative to the current Astro file, allowing you to reference files within your `src/` folder.
+
+ Astro _does not_ resolve relative links within HTML, such as images:
+
+ ```html
+ <img src="../images/penguin.png" />
+ ```
+
+ The above will be sent to the browser as-is and the browser will resolve it relative to the current **page**. If you want it to be resolved relative to the .astro file you are working in, use `Astro.resolve`:
+
+ ```astro
+ <img src={Astro.resolve('../images/penguin.png')} />
+ ```
+
+- 239065e2: Adds support for client:only hydrator
+
+ The new `client:only` hydrator allows you to define a component that should be skipped during the build and only hydrated in the browser.
+
+ In most cases it is best to render placeholder content during the build, but that may not always be feasible if an NPM dependency attempts to use browser APIs as soon as is imported.
+
+ **Note** If more than one renderer is included in your Astro config, you need to include a hint to determine which renderer to use. Renderers will be matched to the name provided in your Astro config, similar to `<MyComponent client:only="@astrojs/renderer-react" />`. Shorthand can be used for `@astrojs` renderers, i.e. `<MyComponent client:only="react" />` will use `@astrojs/renderer-react`.
+
+ An example usage:
+
+ ```jsx
+ ---
+ import BarChart from '../components/BarChart.jsx';
+ ---
+
+ <BarChart client:only />
+ /**
+ * If multiple renderers are included in the Astro config,
+ * this will ensure that the component is hydrated with
+ * the Preact renderer.
+ */
+ <BarChart client:only="preact" />
+ /**
+ * If a custom renderer is required, use the same name
+ * provided in the Astro config.
+ */
+ <BarChart client:only="my-custom-renderer" />
+ ```
+
+ This allows you to import a chart component dependent on d3.js while making sure that the component isn't rendered at all at build time.
+
+### Patch Changes
+
+- @astrojs/parser@0.18.6
+
## 0.19.0-next.3
### Minor Changes
diff --git a/packages/astro/package.json b/packages/astro/package.json
index dc0028adb..aced2e9e8 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -1,6 +1,6 @@
{
"name": "astro",
- "version": "0.19.0-next.3",
+ "version": "0.19.0",
"author": "Skypack",
"license": "MIT",
"type": "module",
@@ -44,7 +44,7 @@
},
"dependencies": {
"@astrojs/markdown-support": "0.2.3",
- "@astrojs/parser": "0.18.5",
+ "@astrojs/parser": "0.18.6",
"@astrojs/prism": "0.2.2",
"@astrojs/renderer-preact": "0.2.1",
"@astrojs/renderer-react": "0.2.0",