Commit graph

2363 commits

Author SHA1 Message Date
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
natemoo-re
a940354b38 [ci] format 2022-03-10 23:26:18 +00: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
Fred K. Schott
da826a6ba4
Update util.ts (#2761) 2022-03-10 15:17:24 -08:00
Nate Moore
5f55af9cce
fix(#2753): unescape define:vars (#2756)
* fix(#2753): unescape `define:vars`

* test: add directives suite

* chore: update lockfile
2022-03-10 14:36:07 -06:00
natemoo-re
7b18d4c226 [ci] format 2022-03-10 20:15:34 +00: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
Fred K. Schott
602bf2f181
fix eperm ci issue on windows (#2757) 2022-03-10 13:40:27 -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
natemoo-re
7f99d0de9e [ci] format 2022-03-10 17:54:39 +00:00
Fred K. Schott
3d56123f25
Refactor fs utils, fix flakey windows tests (#2749)
* cleanup our fs util usage

* fix fs url support  for node v14

* update to fix windows

* making sure the dir exists before calling readdirSync

* chore: remove debug code

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
2022-03-10 11:53:59 -06:00
Ian Bull
55f007f30a
Support Prism in the blog template example (#2622)
The Prism syntax highlighter failed to render properly when Astro was
initialized with the blog template. This was because the Prism CSS
conflicted with the default blog template.

This change-set removes the Viewport Width from the `pre` transform as
this property conflicted with the prism CSS. This change-set also
includes Prism in the Blog Post layout and adds a small javascript
example to the sample post.
2022-03-10 11:49:52 -06:00
natemoo-re
5d7a92b563 [ci] format 2022-03-10 15:56:29 +00: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
mastercoms
52d812b31a
fix component usage in portfolio-svelte 404 page (#2549) 2022-03-10 09:36:11 -06:00
Nate Moore
567008cfc1
chore(ci): remove second smoke test with --experimental-static-build flag (#2748) 2022-03-10 09:23:54 -06:00
FredKSchott
7c064f8f4f [ci] collect stats 2022-03-10 12:02:05 +00:00
FredKSchott
c5c445f94b [ci] format 2022-03-10 01:13:16 +00:00
Fred K. Schott
e3ef7dc71a update lockfile 2022-03-09 17:12:16 -08: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
natemoo-re
518331f560 [ci] format 2022-03-10 00:10:48 +00: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
natemoo-re
2acfef741f [ci] format 2022-03-09 23:38:46 +00: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
natemoo-re
8c0a8fee32 [ci] format 2022-03-09 23:03:26 +00: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
natemoo-re
658a92915d [ci] format 2022-03-09 22:39:48 +00: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
Fred K. Schott
c9d84af6b1
run tests on example change (#2745) 2022-03-09 16:25:44 -06:00
Tony Sullivan
4b53a53c1b
Update examples for 0.24.0 (#2740)
* removing Astro.resolve, adding sass dev dependencies

* updating tailwind example to use ESM style imports

* moving from `<style global>@import` to ESM imports

* updating lockfile to pick up examples sass deps

* chore(lint): ESLint fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-09 13:52:31 -08:00
natemoo-re
43a5c06a93 [ci] format 2022-03-09 21:45:28 +00: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
Matthew Phillips
c139829b10
Fixes windows test flakiness (#2744)
* Fixes windows test flakiness

* Tighten up the try/catch
2022-03-09 15:44:12 -06:00
Juan Martín Seery
0281d6a65b
chore: npmrc update (#2742)
* Updated npmrc

* Removed volta in favor of engines

* ignore pnpm lock

* move comments
2022-03-09 12:36:56 -06:00
Juan Martín Seery
c5361a131d
chore: update actions (#2738)
* upgraded workflow actions

* removed unnecessary envs + some formatting

* removed extra instruction

* bumped pnpm version
2022-03-09 13:12:12 -03:00
FredKSchott
e27865d2af [ci] collect stats 2022-03-09 12:01:58 +00:00
Fred K. Schott
240d88aefe
fix format (#2736) 2022-03-08 15:20:04 -08: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
Nate Moore
d08ddaf5b9
Move from yarn to pnpm (#2455)
* chore: `yarn` => `pnpm`

* docs: `yarn` => `pnpm`

* chore(ci): yarn => pnpm

* chore(ci): update pnpm cache path

* fix: add missing deps

* fix: add missing deps

* test: add package.json to all test fixtures

* chore: improve hoisting behavior

* chore: move turbo into package.json

* chore: update npmrc

* fix: add missing `debug` dependency

* chore: remove prepare script

* test: fix new tests

* fix: fully resolve renderer paths and `astro/internal` path

* chore: update lockfile

* chore: remove log

* fix: resolve renderers in vite-plugin-jsx

* fix: prefer public-hoist-pattern to shamefully-hoist

* chore: ignore @babel/core peer warning

* chore: update dependencies

* test: add autoprefixer as explicit dep

* chore: update `.npmrc` file in examples

* chore: update dependencies

* fix: resolve renderer dependencies in static build

* fix: static build renderer resolution

* chore: fix smoke tests

* chore: hoist autoprefixer

* chore: update lockfile

* attempt: use full file:// path on Windows

* attempt: use astro/internal

* attempt: optimize astro/internal

* attempt: expose ./internal.js

* chore: add missing package.json files

* attempt: resolve astro/internal path

* chore: tidy package.json

* chore: update lockfile

* chore: update deps

* chore: update deps

* chore: yarn -> pnpm

* attempt: explicit /@fs urls

* attempt: explicit /@fs urls

* chore: update all examples for pnpm

* chore: fix hoisting for with-vite-plugin-pwa

* chore(ci): fix sharp install

* chore: update with-vite-plugin-pwa example

* fix: pin vite-plugin-pwa to 0.11.11

* fix: add workbox-window to vite-plugin-pwa deps

* refactor: use pnpm update --recursive

Co-authored-by: JuanM04 <me@juanm04.com>

* chore: yarn => pnpm

* chore: yarn => pnpm

* fix: update smoke test to skip examples which don't work in static build

* update lockfile

* chore: update .npmrc files

* chore: update lockfile

* fix: smoke script

* chore: update .npmrc file

* fix: return to shamefully-hoist (shamefully)

* chore: update lockfile

* fix(smoke): ignore scripts for smoke tests

* fix: update example to disable renderers

* chore: bump version

* chore(ci): fix smoke tests

* attempt: disable --frozen-lockfile for smoke tests

* chore: update smoke test

* chore: fix rebase issue

* chore: update lockfile

* fix: smoke tests

* fix(ci): run external smoke tests first

* fix(ci): run syntax

* chore: update lockfile

* fix(ci): ensure submodules are up-to-date

* fix(ci): ensure submodules are up-to-date

* chore: update lockfile

* chore: update for webapi

* chore: silence node:* warnings

* chore: update deps

* fix(ci): persist generated webapi assets

* fix(ci): webapi build script

* chore(ci): remove custom node caching

* chore: keep turbo.json

* chore: update turbo, ignore create-astro

* chore: update deps

* fix(ci): test command

* chore(ci): update test script

Co-authored-by: JuanM04 <me@juanm04.com>
2022-03-08 15:46:11 -06:00
natemoo-re
2f7a4f8eae [ci] yarn format 2022-03-08 16:49:21 +00:00
Nate Moore
068b8ee996
fix(ci): update notify script (#2730) 2022-03-08 10:48:12 -06:00
FredKSchott
42aae7a1c5 [ci] collect stats 2022-03-08 12:02:10 +00:00
natemoo-re
63adaeec34 [ci] yarn format 2022-03-07 21:37:50 +00:00
Nate Moore
f18ee36dc0
Add @astrojs/webapi package (#2729)
* chore: add @astrojs/webapi

* chore: update package.json

* fix: update file case

* fix: remove lowercase file

* chore: update tests to use mocha

* chore: update LICENSE
2022-03-07 15:36:22 -06:00
Selwyn
10a9c3412b
Add used renderers to each example package.json devDependencies (#2727)
As the first step to not bundling renderers in the core `astro` package
the examples show usage with renderers as dependencies.
2022-03-07 10:43:02 -06:00
FredKSchott
b1af0c0d2b [ci] collect stats 2022-03-07 12:02:23 +00:00
FredKSchott
dbeaf4e13c [ci] collect stats 2022-03-06 12:02:03 +00:00
FredKSchott
f656552ad7 [ci] collect stats 2022-03-05 12:02:03 +00:00