Commit graph

509 commits

Author SHA1 Message Date
Fred K. Bot
bb022f5230
[ci] release (#4957)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-03 11:52:23 -04:00
Matthew Phillips
ee8dd424fd
Improve rendering perf (#4956)
* Improve rendering perf

* Adding a changeset

* Disable eslint warning
2022-10-03 11:44:58 -04:00
Scott Willsey
a8f1a91e7e
Astro image cache dependency fix scottaw66 (#4944)
* Moves http-cache-semantics from dev dependency to dependency

* Pull request for astro image http-cache-semantics dependency
2022-09-30 22:25:37 -05:00
Fred K. Bot
5565782d70
[ci] release (#4943)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-30 19:51:17 -04:00
Nate Moore
cf2bba1e4a
P5: fix MDX memory leak (#4939)
* fix(astro): tag jsx vnodes with renderer so errors are properly handled

* chore: fix missing package in test

Co-authored-by: Nate Moore <nate@astro.build>
2022-09-30 17:13:44 -05:00
Fred K. Bot
2ffdafff45
[ci] release (#4921)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-30 20:15:38 +00:00
Fred K. Bot
e5687471a5
[ci] update lockfile (#4927)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-30 11:47:32 -04:00
Tony Sullivan
9892989619
[@astrojs/image] adding caching support for SSG builds (#4909)
* adds a caching feature for SSG builds

* chore: add changeset

* nit: eslint fix

* chore: add readme docs for caching

* adding basic test coverage for cached images
2022-09-29 21:20:48 +00:00
Fred K. Bot
d08093f7d4
[ci] release (#4903)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-29 11:20:00 -04:00
Fred K. Bot
10317c65fe
[ci] update lockfile (#4899)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-09-29 09:41:29 -04:00
Bjorn Lu
fd9d323a68
Support Vue JSX (#4897)
Co-authored-by: Dan Jutan <danjutan@gmail.com>
2022-09-29 11:25:45 +08:00
Matthew Phillips
01c1aaa003
Fix CSS ordering between imported and Astro styles (#4907)
* Fix CSS ordering between imported and Astro styles

* Fix linting errors

* Add changeset and upgrade compiler version

* Update test to reflect shared styles placed before page styles
2022-09-28 18:12:22 -04:00
Matthew Phillips
d3091f89e9
Astro.cookies implementation (#4876)
* Astro.cookies implementation

* Remove unused var

* Fix build

* Add a changesetp

* Remove spoken-word expires
2022-09-28 16:55:27 -04:00
Bjorn Lu
3832c083d4
Fix test (#4904) 2022-09-28 23:54:40 +08:00
Bjorn Lu
812658ad2a
Remove shamefully-hoist (#4842) 2022-09-28 23:13:33 +08:00
Matthew Phillips
87a7cf48e7
Hoist hydration script out of slot templates (#4891)
* Hoist hydration script out of slot templates

* Add changeset

* Fix HTML components

* Mark as html string
2022-09-28 10:55:14 -04:00
Matthew Phillips
ff7ba0ee0f
Ensure head content rendered once with lazy layouts (#4892)
* Ensure head content rendered once with lazy layouts

* Add changeset
2022-09-28 10:55:06 -04:00
Fred K. Bot
077134ae2c
[ci] release (#4846)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-27 12:12:44 -04:00
Fred K. Bot
c6cfc638fd
[ci] update lockfile (#4885)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-27 08:39:39 -04:00
Ben Holmes
58a2dca228
Fix: correctly transform import.meta.env.* in MDX (#4858)
* fix: serialize route pattern for Netlify edge

Co-authored-by: Jackie Macharia <jackiewmacharia>

* fix: escape import.meta.env in MDX compiler output

* test: env vars in mdx

* chore: changeset

* deps: estree-util-visit, @types/estree

* feat: inject import.meta.env w/ recma

* feat: pull importMetaEnv from vite + astro configs

* test: `import.meta.env` in JSX

* fix: lockfile

* chore: update changeset

* fix: remove stray stashed commit
2022-09-26 18:23:47 -04:00
Steven Yung
6fd00c4941
add double check on astro file return type to display more human readable error (#4857) 2022-09-26 14:13:25 -04:00
Fred K. Bot
e948f62bbc
[ci] update lockfile (#4862)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-26 14:04:48 -04:00
Fred K. Bot
9077073fb4
[ci] update lockfile (#4852)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-23 12:04:07 -04:00
Matthew Phillips
3389f0ce91
Prevent the root from being deleted during the build (#4845)
* Prevent the root from being deleted during the build

* Adding a changeset
2022-09-22 16:37:16 -04:00
Tony Sullivan
fad3867adb
Adding an optional image service based on Squoosh (#4738)
* WIP: adding a service built on @squoosh/lib

* WIP: investigating memory leaks in Squoosh

* WIP: vendoring Squoosh to work with our build

* chore: a bit of cleanup and a small perf gain

* removing a few unused deps

* fix: removing temp .only() in sharp test

* hooking up the last build steps to copy over .wasm files

* removing the duplicated lib/*.wasm files

* defaulting to Sharp for the initial @next release

* make sure pnpm always runs the postbuild script

* removing a few node dependencies

* refactor: move the copy .wasm build step out of the SSR bundle

* linter fixes

* fixing lock file

* chore: add TEMP changeset

* fix built wasm location for SSG builds

* Revert "defaulting to Sharp for the initial @next release"

This reverts commit 1a8d4f7f60.

* removing sharp dependency

* Revert "fix built wasm location for SSG builds"

This reverts commit 446b80bb53.

* chore: update lockfile

* fixing up image tests for the wasm loader

* updating the README for squoosh

* parallel wasm builds

* refactor: a bit of house keeping

* perf: allow a thread for each output encoding format

* fix: dev broke with the shift to wasm workers

* adds a new `astro:build:generated` hook for SSG builds

* fix: typo + calling cleanup methods in wasm codecs

* adding @astrojs/webapi for the TransformStream polyfill

* Revert "adding @astrojs/webapi for the TransformStream polyfill"

This reverts commit 39e5b845a5.

* perf: using sharp for most of the CI tests

* chore: update lockfile

* removing hard-coded squoosh imports

* fix: adding sharp to rollup externals

* test: using dev for the squoosh tests

* fix: updating the build output dir for wasm filles in SSG builds

* updating the changeset with migration details

* Revert "adds a new `astro:build:generated` hook for SSG builds"

This reverts commit 59b5fec7be.

* nit: adding comments for the wasm file copy

* chore: fix eslint warning
2022-09-22 19:48:14 +00:00
Bjorn Lu
6a1a17dd28
Add CSS @import test (#4454)
* Add css hmr test

* Allow HMR in e2e tests

* Add changeset

* Actually fix test

* Fix lint

* Skip windows for now
2022-09-22 15:06:49 -04:00
Zicklag
5e4c5252bd
Http proxy for fetch (#4676)
* Add HTTP Proxy Support to `fetch` Polyfill

Use `global-agent` to support HTTP_PROXY, HTTPS_PROXY, and NO_PROXY
environment variables.

* Add Changeset For HTTP Proxy Support in `fetch`
2022-09-22 14:47:06 -04:00
Michael Rienstra
7481ffda02
create-astro: always create tsconfig.json (#4810)
* `create-astro`: always create `tsconfig.json`

Currently, we only make sure `tsconfig.json` exists when `strict` or `strictest` is selected. Both `default` & `optout` are intended to correspond to `base` -- and will do so for all [23 official templates](https://github.com/withastro/astro/tree/main/examples), but not necessarily for third-party templates.

The [example command for installing a third-party template](https://github.com/withastro/astro/blob/a800bf7/packages/create-astro/README.md?plain=1#L31-L35) is (rather conveniently for the sake of this PR!) an example of a template without a `tsconfig.json` file, and installing it with the `default` ("Relaxed") Typescript option results in no `tsconfig.json` file, rather than a `tsconfig.json` file containing `{ "extends": "astro/tsconfigs/base" }` as would be expected.

This PR addresses this scenario. 

It also explicitly sets the `tsconfig.json` file to `{ "extends": "astro/tsconfigs/base" }` when `default` (which I renamed to `base`, still presented to the user as "Relaxed") or `optout` is selected (`optout` has always printed a warning about the importance of `tsconfig.json` & `src/env.d.ts` but otherwise behaved identically to `default`). This is necessary in two scenarios:

1. When the `tsconfig.json` file was created by this script.
2. When it either didn't already include `"extends"`, or it extended a different config by default. For example, some third-party templates might default to `strict`, in which case I'm guessing we'd want to respect the user's choice and change that to `base`.

* update `del` 6.1.1 --> 7.0.0

* test: prevent excess writes
(without this it triggers many times)

* test: create-astro typescript prompt

* changeset

* fix: recursive `mkdirSync`

* test: longer timeout for `windows-latest` OS
(see if this fixes failing tests)

* better glob path creation, don't hardcode `/`

* test: longer timeout for windows-latest OS
(since I'm about to trigger another CI run by pushing a commit, might as well try this too)

* create-astro test: show last CLI output on timeout

* drop variable timeout
Typescript tests are slower than directory tests, but they are all usually less than 5000 ms. Less complexity, easier to maintain.

* DRY new error output

* Update lockfile

* Sync lockfile with main

* Update lockfile

Co-authored-by: Princesseuh <princssdev@gmail.com>
2022-09-22 14:37:01 -04:00
梁峰宁
17dbc67018
Fix slashes for paths containing non-ASCII characters on Windows. (#4712)
* Fix slashes for paths containing non-ASCII characters on Windows.

* Add non-ASCII path test

* Fix slashes in pnpm-lock.yaml
2022-09-22 14:33:28 -04:00
Fred K. Bot
47d4165603
[ci] release (#4833)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-22 11:04:45 -04:00
Fred K. Bot
49c6eb8b8a
[ci] update lockfile (#4839)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-09-22 10:55:39 -04:00
Matthew Phillips
25a5b9a89a
Revert preact signals support (#4843)
* Revert "Update preact example to match @astrojs/preact ranges (#4840)"

This reverts commit d650a1161a.

* Revert "[ci] format"

This reverts commit e3c78c5b16.

* Revert "Support shared signals in Preact islands (#4763)"

This reverts commit 5e46be5468.
2022-09-22 10:32:42 -04:00
Matthew Phillips
d650a1161a
Update preact example to match @astrojs/preact ranges (#4840) 2022-09-22 08:37:38 -04:00
Matthew Phillips
73f215df76
Allow passing fetch() Response to set:html (#4832)
* ALlow passing fetch() Response to set:html

* Only check for Symbol.iterator on objects

* oops

* Fix no-streaming case

* Remove old comment
2022-09-21 19:07:00 -04:00
董雨航
29b29e6a8a
Fix: Invalid hook call when user use export jsx function (#4831)
* update vite-jsx-plugin for export

* update vite-jsx-plugin for export

* update changeset level

Co-authored-by: Yuhang <dong_yu_hang@126.com>
2022-09-21 15:53:58 -04:00
Matthew Phillips
5e46be5468
Support shared signals in Preact islands (#4763)
* Support signals in Preact islands

* Add a changeset

* Only add signals if we need them

* Refactor signal logic into its own module

* Keep track of the signals used
2022-09-21 15:21:21 -04:00
Erika
baae1b3fd1
Update astro check to latest version of the language server (#4754)
* Update to latest version of the language server

* Add changeset
2022-09-21 15:15:04 -03:00
Fred K. Bot
f366967cbc
[ci] update lockfile (#4786)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-21 11:44:57 -04:00
Fred K. Bot
a08b178cdb
[ci] release (#4811)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-20 15:15:54 -04:00
Elian ☕️
f2b515d0b4
Add Deno example (#4641)
* Add Deno example

* update lockfile

* update README

* update README
2022-09-20 08:29:33 -04:00
Kristoffer K
df54595a88
fix(markdown-remark): declare hast-util-to-html as a dependency (#4787) 2022-09-20 17:21:54 +08:00
Fred K. Bot
8a1dd4b7e8
[ci] release (#4790)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-19 14:44:49 -04:00
Bjorn Lu
cf5ed5f3a8
Update Vite 3.1.3 (#4802) 2022-09-19 11:46:05 -04:00
Fred K. Bot
1c36b0ec18
[ci] release (#4781)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-16 14:13:02 -04:00
Fred K. Bot
48567639e0
[ci] update lockfile (#4779)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-16 08:49:07 -04:00
Fred K. Bot
b2da8a124a
[ci] release (#4761)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-15 14:05:25 -04:00
Matthew Phillips
9a59e24e02
Ensure before-hydration is only loaded when used (#4768)
* Ensure before-hydration is only loaded when used

* client fix + changeset
2022-09-15 12:33:52 -04:00
Fred K. Bot
798d36f349
[ci] update lockfile (#4767)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-15 12:08:00 -04:00
Matthew Phillips
fc885eaea1
Read jsxImportSource from tsconfig (#4759)
* Read jsxImportSource from tsconfig

* Only read from tsconfig if not found earlier
2022-09-15 09:50:48 -04:00
Fred K. Bot
27aa9851d8
[ci] release (#4750)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-14 16:06:23 -04:00