Commit graph

609 commits

Author SHA1 Message Date
Nate Moore
2bb2c2f7d1
Update compiler (#2767)
* chore: update compiler

* chore: add changeset
2022-03-11 16:20:20 -06:00
github-actions[bot]
e032e89a64
[ci] release (next) (#2754)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-10 17:31:45 -06:00
Nate Moore
499fb6a335
CLI: add prerelease warning (#2758)
* feat(cli): add prerelease and outdated warnings

* refactor: cleanup getLatestVersion code

* refactor: simplify isPrerelease logic

* chore: add changeset

* fix: do not require devStart for preview

* refactor: extract prerelase/outdated into own templates

* feat: remove upgrade warning

* feat: make prerelease less scary

* chore: update prerelease wording

* chore: update feedback copy
2022-03-10 17:25:06 -06:00
Nate Moore
10843aba63
Add sitemap filter option (#2755)
* Add filter for sitemap

* chore: add changeset

* fix: types

* docs: add sitemapFilter docs

Co-authored-by: David Rothmann <david@rothmann.it>
2022-03-10 14:14:45 -06:00
Ben Holmes
a14075e2a4
Feat: show 404 when getStaticPaths doesn't match URL (#2743)
* WIP: return 404 for unmatched getStaticPaths route

* feat: regex on static paths to 404 in dev

* Revert "WIP: return 404 for unmatched getStaticPaths route"

This reverts commit 9c395a2586ca40d44c3ab18edc7ffbc1c4660ed8.

* feat: call getParamsAndProps pre-ssr to catch errs

* fix: remove unused cache regex check

* fix: revert getPattern changes

* fix: remove unused preload props

* fix: log 404 for custom 404 pages

* refactor: rename fixture for clarity

* feat: add getStaticPaths status code tests

* fix: pas rootRelativeUrl to handle subpaths

* fix: update dev-routing tests from 500 -> 404

* refactor: make error handling more explicit

* lint: use typescript no shadow to fix enum issue

* chore: add changeset

* refactor: clarify test names

* refactor: remove variable reassignment

* fix: update dev-routing tests 500 > 404

* refactor: update test file structure

* Fix: revert to old logging

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Chore: use `const enum` instead

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* chore: format

Co-authored-by: Nate Moore <nate@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-03-10 13:02:37 -05:00
Fred K. Schott
79fc320480
update deps: esbuild, typescript (#2750)
* update dep: typescript

* update dep: esbuild

* update types

* update types

* update dep: es-module-lexer

* update tests
2022-03-10 09:55:40 -06:00
github-actions[bot]
6ead80db47
[ci] release (next) (#2734)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-09 19:01:26 -06:00
Nate Moore
ae8d925666
Improve Astro.slots API (#2695)
* feat: update Astro.slots API

* fix: migrate Markdown to public `Astro.slots.render` API

* chore: update internal AstroGlobal types

* chore: add changeset

* Update clean-bottles-drive.md

* refactor(test): update slot tests to new syntax
2022-03-09 18:09:48 -06:00
Nate Moore
af075d8157 chore: add changeset 2022-03-09 17:45:25 -06:00
Nate Moore
e8d4e56803
Improve logger (deduping, new help and version) (#2737)
* feat: improve logger by removing repeat messages

* feat(hmr): only send HMR updates when files change

* feat: improve hmr formatting

* feat(logger): improve welcome formatting

* feat(logger): improve hmr formatting

* chore(test): update cli test output

* feat(logger): improve logging output

* feat(logger): improve help/version flags

* chore: remove checksum checks

* fix(test): update cli tests

* refactor(test): cleanup astro dev cli tests

* chore: add changeset

* chore(test): skip doctype test
2022-03-09 17:37:59 -06:00
Nate Moore
05b66bd68b
Escape HTML by default (#2747)
* feat: escape HTML by default

* feat(test): add escaping test
2022-03-09 17:02:25 -06:00
Fred K. Schott
2906110c04
Update tests for legacy build (#2746)
* move fast-build example into a test fixture for legacy build

* update tests for legacy build
2022-03-09 16:38:46 -06:00
Nate Moore
72c2c86e9d
merge next into main (#2705)
* 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 <natemoo-re@users.noreply.github.com>

* 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 <evan@boehs.org>

* 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 <nate@skypack.dev>

* 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 <matthew@skypack.dev>
Co-authored-by: Evan Boehs <evan@boehs.org>
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 <fkschott@gmail.com>
2022-03-09 15:44:26 -06:00
Ben Holmes
0ae96bb749
Fix/2177/log missing local network ip (#2732)
* feat: show "localhost" for local network IPs

* refactor: remove timestamps from addr logs

* fix: hide timestamp on null types

* feat: add emoji OS helper

* feat: make logs 100% nicer

* refactor: extract isLocalHost to util

* feat: update preview logs to match

* chore: add changeset

* fix: pull pkg version from package.json

* refactor: remove 👉 guys

* fix: devStart return type

* feat: inject process.env.PACKAGE_VERSION at build time

* feat: update unit test for hostname checks

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-03-08 17:11:18 -05:00
Fred K. Schott
6bf124fb2f
remove a bad dev warning from static-build (#2733) 2022-03-08 14:03:33 -08:00
github-actions[bot]
a6ee42fa17
[ci] release (#2724)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-04 15:29:27 -06:00
Nate Moore
0d37f8e0a5
chore: revert #2715 (#2722) 2022-03-04 15:25:59 -06:00
github-actions[bot]
88ccb2d696
[ci] release (#2720)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-04 11:28:59 -06:00
Nate Moore
5f91e007cb
Remove postcss-load-config warning for Svelte users (#2715)
* chore: update dependencies

* fix(svelte): use experimental vite preprocessor rather than svelte-preprocess

* chore: add changeset
2022-03-04 11:18:55 -06:00
github-actions[bot]
92447974f2
[ci] release (#2714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-03 11:52:40 -06:00
Juan Martín Seery
b2c37385f9
chore: changed data-astro-raw to is:raw (#2706)
* chore: changed `data-astro-raw` to `is:raw`

* changesets
2022-03-03 11:34:36 -06:00
github-actions[bot]
4f924b8cea
[ci] release (#2692)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-02 16:23:55 -06:00
Fred K. Schott
91765d79b1
Improve build perf (#2697)
* improve md perf

* chore: add changesets

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-03-02 16:09:18 -06:00
Juan Martín Seery
caf9135c48
fix: upgraded vite (#2678)
* fix: upgraded vite

* chore: changeset

* Upgraded to vite v2.8.6

* Updated changeset

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-02 15:51:13 -06:00
Nate Moore
c7bbb11289
fix: disable HMR during build (#2684) 2022-03-01 09:13:39 -05:00
github-actions[bot]
9cc6f26946
[ci] release (#2683)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-28 16:15:09 -06:00
Nate Moore
046af36475
fix(hmr): HMR regression related to .astro updates (#2681) 2022-02-28 16:00:09 -06:00
github-actions[bot]
c0a6e3e80a
[ci] release (#2666)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-25 17:29:08 -06:00
Fred K. Schott
fca6407318
fix astro scoping of "@import" inside of style tags (#2656)
* fix astro scoping of "@import" inside of style tags

* Create lovely-lies-dress.md

* Update compile.ts

* fix smoke test

* Update package.json
2022-02-25 17:04:04 -06:00
Nate Moore
0494f74e4e
feat: improve third-party Astro package compatability (#2665) 2022-02-25 17:03:05 -06:00
github-actions[bot]
e31246f7ac
[ci] release (#2641)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-24 14:48:44 -06:00
Fred K. Schott
a0fc5cb5ff
ensure utf8 encoding when serving html (#2654)
* ensure utf8 encoding on servers

* Create spicy-tomatoes-act.md

* Update spicy-tomatoes-act.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-02-24 14:39:41 -06:00
Javier Cortés
2e5c3b5126
fix(core): Issue #2625. error with process.env.LANG larger than 5 (#2645)
* Update logger.ts

Solving #2625

* chore: add changeset

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-02-24 14:38:31 -06:00
Nate Moore
17032cd064
chore: upgrade compiler (#2653) 2022-02-24 14:15:29 -06:00
Nate Moore
5091d788f6
Add fine-grained HMR support (#2649)
* feat: add fine-grained HMR support

* chore: lint

* chore: lint

* fix: handle hmr with custom event handler

* refactor: cleanup hmr script
2022-02-24 13:11:18 -06:00
Juan Martín Seery
a2128f8e47
Fixed incorrect types and imports (#2630)
* Fixed incorrect types and imports

* Changeset
2022-02-23 17:14:39 -06:00
Juan Martín Seery
9b7e2ab251
Fixed shiki import to work with "type": "module" (#2628)
* Fixed shiki import to work with "type": "module"

* Changeset

* Separated types import

* Add "* as" to type import
2022-02-22 08:46:04 -08:00
Fred K. Schott
ac6d2e8c64
Create afraid-phones-peel.md 2022-02-22 08:44:01 -08:00
github-actions[bot]
1d9f8a57f5
[ci] release (#2619)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-18 16:33:56 -06:00
Fred K. Schott
4eb0d9863f update changeset tags before release 2022-02-18 14:30:38 -08:00
Nate Moore
492f6f1c70 chore: exit pre 2022-02-18 16:08:12 -06:00
Nate Moore
39cbe50085
Expose private .env variables to import.meta.env during SSR (#2612)
* chore(examples): add env-vars example

* feat: improve import.meta.env support

* chore: add changeset

* test: update astro-envs test

* refactor: cleanup code based on feedback

* fix: import.meta guard

* fix: update memory test threshold to 10%
2022-02-18 16:06:56 -06:00
github-actions[bot]
85eb3141cd
[ci] release (next) (#2607)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-17 11:11:06 -05:00
Matthew Phillips
96609d4c9e
Static build - fixes path to HMR script (#2606)
* Static build - fixes path to HMR script

* Changeset
2022-02-17 10:35:01 -05:00
Matthew Phillips
87762410f3
Fix loading of styles in static build (#2605)
* Fix loading of styles in static build

* Adds a changeset
2022-02-17 10:32:24 -05:00
github-actions[bot]
8dcfc1bb15
[ci] release (next) (#2600)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-16 17:45:49 -06:00
Nate Moore
929fae684f
chore: upgrade @astrojs/compiler (#2599) 2022-02-16 17:33:43 -06:00
github-actions[bot]
097d7777c4
[ci] release (next) (#2595)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-16 11:32:57 -05:00
Tony Sullivan
40c0e2b3f6
Bug fix: Order of params for routing has to match (#2593)
* make sure route params are sorted before comparing stringified keys

* including changeset for a patch release
2022-02-16 15:49:03 +00:00
Matthew Phillips
102161761d
Pass children to client components even if they do not render them (#2588)
* Pass children to client components even if they do not render them

* Handle when no children are provided

* Adds a changeset

* Use roots directly i guess

* Use an attribute to signal that the template is needed
2022-02-16 10:11:54 -05:00