Commit graph

1152 commits

Author SHA1 Message Date
Erika
e4bb2767d5
Add Astro attributes to svg elements (#3205) 2022-04-26 11:29:25 -04:00
Ben Holmes
38e5e9e982
Feat: create astro add install step (#3190)
* feat: add instlal step with pkg manager detection

* feat: add package emoji for style points

* feat: update next steps to match pkg manager

* refactor: extract some create-astro test utils

* refactor: extract promp msgs to utils

* chore: add install step tests

* chore: changeset

* fix: remove directory test skip

* fix: unset env variables after install step test

* deps: add execa to create-astro

* refactor: use execa for install step

* chore: remove old comment

* fix: rework install step test for node 14?

* chore: remove "politely stolen" footnote

* temp: show stdout dialog

* feat: remove debugging logs, add dryrun flag for testing

* chore: more stray logs

* fix: remove rmdir
2022-04-26 11:24:24 -04:00
Juan Martín Seery
1a86e77c37
fix(markdown): file.url fixes (#3198)
* fix(markdown): file.url fixes

* Added tests

* Changed the default of `base` from `./` to `/`

* Make the url work with subpath

* Changeset

* Forgot to change this comparison
2022-04-25 13:38:46 -03:00
Juan Martín Seery
205d1f07f1
feat(markdown): Improved types (#3191)
* feat(markdown): Improved types

* More MarkdownMetadata
2022-04-24 16:13:33 -07:00
Fred K. Schott
cafd36ef77
Create angry-cheetahs-walk.md 2022-04-22 14:26:04 -07:00
Ben Holmes
2b702d6aba
Fix: astro add generating config outside project root (#3186)
* fix: astro.config generated outside project dir

* chore: changeset
2022-04-22 15:17:16 -04:00
Ben Holmes
75dab3ca3d
chore: changeset (#3187) 2022-04-22 15:10:15 -04:00
Tony Sullivan
ce9a61e9fc
Support custom svelte compiler options in @astrojs/svelte (#3181)
* updating svelte integration to allow custom user config

* test: adding a test to verify that svelte options are piped through the integration

* updating the README with docs on overridding svelte options

* chore: adding changeset

* fix: copy/paste bug in test validation

* removing temporary debug scripts
2022-04-22 17:59:20 +00:00
Juan Martín Seery
725c44a762
feat(vercel): Support trailingSlash (#3176) 2022-04-22 10:03:53 -04:00
Matthew Phillips
19667c45f3
Netlify Edge: forward requests for static assets (#3170)
* Netlify Edge: forward requests for static assets

* Adds a changeset

* Don't run edge tests, yet
2022-04-22 10:03:25 -04:00
github-actions[bot]
f3586cff41
[ci] release (#3173)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 16:00:18 -05:00
github-actions[bot]
84939b2ff2
[ci] release (#3172)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 15:37:18 -05:00
Ben Holmes
7c49194ca2
Feat: [create astro] add directory prompt (#3168)
* wip: add prompt for directory with validation

* feat: wire up dir response to cwd

* feat: improve error handling on non-empty dirs

* fix: update test helpers to execaSync

* chore: add .skipped to old tests for clarity

* deps: add mocha and chai to create-astro

* feat: add directory step test with fixture

* feat: update turbo to run create-astro tests again 🥳

* chore: changeset
2022-04-21 16:36:48 -04:00
Nate Moore
908fffb5ec
chore: upgrade compiler (#3171) 2022-04-21 15:26:14 -05:00
Nate Moore
70263cf748
fix(preact): use updateConfig hook (#3166) 2022-04-21 15:13:09 -05:00
github-actions[bot]
bd66527e7d
[ci] release (#3169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 14:08:37 -04:00
Tony Sullivan
637919c8b6
Improvements to build and dev when building for subpaths (#3156)
* `astro build` should include the `base` provided in astro config

* test: updating build test to expect the base path in links/scripts

* ignore the default "base" value when building links/scripts

* fix: handling config that provides a base but no site

* fix: config.site was being ignored since it's a URL not a string

* hack: handle base path in dev for /public assets

* fix: dev redirect needs to ignore base default of ./

* fix: extra safety checks for the base path redirect

* refactor: simplifying it to remove the regex

* one last safety check - only redirect GET and use a 302 status

* fix: lost the leading slash when redirecting

* nit: adding comments to the test explaining how base is verified

* Remove extra console.log

* Adds a changeset

Co-authored-by: unknown <matthew@skypack.dev>
2022-04-21 14:03:05 -04:00
github-actions[bot]
0406bdc35b
[ci] release (#3165)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 12:19:52 -04:00
Matthew Phillips
ae9ac5cbdc
Fixes using React.lazy and Suspense (#3160)
* Revert "Revert "Fixes using React.lazy and Suspense""

This reverts commit e621c2f7d3.

* Adds a changeset

* Fix ts errors

* Remove netlify metadata folder
2022-04-21 12:10:06 -04:00
github-actions[bot]
3cdc5f1bfb
[ci] release (#3161)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 11:34:03 -04:00
Matthew Phillips
e85b16e2b3
Make 'lit' always be bundled in SSR (#3164)
* Make 'lit' always be bundled in SSR

* Adds a changeset
2022-04-21 11:12:21 -04:00
Nate Moore
37a7a8347c
Improved HMR (#3138)
* WIP: improved HMR

* fix(hmr): improve hmr filtering to avoid full reloads

* chore: add changeset
2022-04-20 16:46:40 -05:00
github-actions[bot]
fce98d5552
[ci] release (#3151)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 22:45:07 -07:00
Fred K. Schott
0c6bbee4c9
Create neat-mails-peel.md 2022-04-19 22:25:47 -07:00
Fred K. Schott
08715b8c15
Delete mighty-teachers-fail.md 2022-04-19 22:21:01 -07:00
Ben Holmes
9ba1f4f825
Fix: markdown JSX expression inconsistencies (#3152)
* fix: remove micromark-extension-mdx-expression to unbreak JSX expressions

* chore: changeset

* deps: update lockfile

* tests: jsx expressions in markdown
2022-04-19 16:37:11 -04:00
hippotastic
5e28b79095
Fix location of SolidJS pre-hydration code (#3140)
* Run before hydration instead of inlining a script after each component
2022-04-19 13:37:27 -05:00
Ben Holmes
0247b54270
Refactor: remove all legacy build logic from codebase (#3141)
* refactor: remove legacy build flag

* refactor: remove legacy style maps

* chore: changeset

* refactor: nuke vite-plugin-build-html

* deps: remove parse5

* tests: restore user provided doctype support!

* deps: remove @web/parse5-utils

* deps: change srcset-parse to dev dep

* chore: remove unused utils

* refactor: remove unused style mapping

* unrelated fix: add .test to astro-markdown-css

* refactor: remove unused astro-style with test update

* chore: remove unused buildTime var
2022-04-19 13:52:15 -04:00
github-actions[bot]
9e00f6d546
[ci] release (#3149)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 13:30:27 -04:00
Matthew Phillips
05cf1a5067
Adjustments for Netlify Edge Functions (#3150)
* Adjustments for Netlify Edge Functions

* Adds a changeset
2022-04-19 13:13:52 -04:00
Tony Sullivan
44e294c9cb
Support custom vue compiler options in @astrojs/vue (#3143)
* adds support for passing options to @vitejs/plugin-vue

* updating vue integration README with options details

* adding a tests for custom vue compiler options

* chore: adding changeset
2022-04-19 16:31:32 +00:00
github-actions[bot]
95d0db5a44
[ci] release (#3120)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 11:30:34 -04:00
Matthew Phillips
b287a9e4f3 Remove test packages from changesets 2022-04-19 11:27:01 -04:00
Matthew Phillips
4cf54c60aa
Netlify Edge function support (#3148)
* Netlify Edge function support

* Update readme with edge function information

* Adds a changeset

* Disable running edge function test in CI for now
2022-04-19 11:22:15 -04:00
Fred K. Schott
ef198ff835
handle diff symbols in shiki (#3108)
* handle diff symbols in shiki

* Create violet-cups-glow.md
2022-04-18 22:36:42 -07:00
Juan Martín Seery
4ac3797344
feat(vercel): added warning when ENABLE_FILE_SYSTEM_API=1 is missing (#3139)
* Added warning in buildtime

* Updated readme

* Changeset
2022-04-18 19:19:46 -03:00
Ben Holmes
facf8016e2
Fix: show correct error log on 5xx error (#3137)
* fix: show correct error log on 5xx error

* chore: changeset
2022-04-18 18:12:30 -04:00
Ben Holmes
44bacd2011
Fix: component styles within imported markdown files (#3116)
* fix: replace markdown path prefix with suffix flag

* fix: avoid non-encoded colons for flag

* fix: remove needless ?

* fix: dev server load order

* fix: production build crawl dynamic imports

* fix: remove  unused virtual_module_id const

* fix: remove unsafe "!" on getmodbyid

* fix: remove needless @id path check

* fix: add list of SSR-able file extensions

* docs: virtual_mod_id change

* fix: support id prefix on resolved ids

* fix: switch to ?mdImport flag to resolve glob imports

* tests: imported md styles for dev and build

* chore: changeset
2022-04-18 15:44:42 -04:00
Tony Sullivan
394ab90547
Perf: reuse Shiki highlighters per theme/lang (#3130)
* reuse Shiki highlighters per theme/lang

* chore: adding changeset
2022-04-18 16:30:19 +00:00
Chris Swithinbank
9e35758ec3
Roll back to React 17 in docs template (#3129)
The docs example template includes Algolia’s Docsearch components to provide a search bar but this doesn’t support React 18 yet, so will error when dependencies are being installed.

See https://discord.com/channels/830184174198718474/965413318678425600
2022-04-18 10:09:57 -04:00
Matthew Phillips
e5383cd357
Handle static file serving in Deno adapter's start command (#3121)
* Handle static file serving in Deno adapter's start command

* Adds a changeset

* Ignore a .ts imort
2022-04-15 17:01:33 -04:00
Juan Martín Seery
b0ba22c5ff
fix(vercel): CJS bundle fix (#3051)
* fix(vercel): CJS bundle fix

* Changeset
2022-04-15 15:58:57 -04:00
Tony Sullivan
e0f838ca39
Fix/numeric path params (#3087)
* adding support for numeric params in getStaticPaths()

* chore: adding changeset

* ignore undefined params in type validation
2022-04-15 14:16:11 -05:00
github-actions[bot]
c1336ae41c
[ci] release (#3114)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-14 15:28:42 -04:00
Matthew Phillips
1687009f31
Add client:only CSS to their pages (#3113)
* Add client:only CSS to their pages

* Adds a changeset

* Use viteID for windows
2022-04-14 12:19:03 -04:00
github-actions[bot]
254048dc82
[ci] release (#3103)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-14 15:10:29 +00:00
Matthew Phillips
4ac0d5d4e7
Support the Markdown component in SSR (#3036)
* Support the Markdown component in SSR

* Adds a changeset

* Support runtime markdown in Node.js

* Remove option from test adapter
2022-04-14 09:51:53 -04:00
Tony Sullivan
254a8f3749
Fixing bug that could lose Tailwind's default presets (#3099)
* fixing bug that could lose Tailwind's default presets

* updating integration README

* chore: adding changeset

* test: fixing the tailwind tests
2022-04-13 15:05:00 +00:00
github-actions[bot]
b23f6b1596
[ci] release (#3101)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-13 08:55:32 -04:00
Matthew Phillips
5acf77dd22
Re-enable custom element test and fix "undefined" child (#3095)
* Re-enable custom element test and fix "undefined" child

* Remove outdated comment

* Adds a changeset
2022-04-13 08:44:22 -04:00
github-actions[bot]
21926278ba
[ci] release (#3090)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-12 20:15:14 -07:00
Fred K. Schott
5316253445 add missing changeset 2022-04-12 20:08:09 -07:00
Fred K. Schott
d33e177817
handle delete resrved word (#3078) 2022-04-12 19:57:05 -07:00
Fred K. Schott
81e210e03c
fix build base bug (#3068)
* fix ssr url search params bug

* fix build base bug

* safer slash removal
2022-04-12 19:54:07 -07:00
Ben Holmes
564caf24c2
Fix: React hydration failure (#3094)
* fix: react hydration failure

* chore: changeset
2022-04-12 17:00:52 -04:00
Matthew Phillips
a5caf08e24
Allow setting multiple cookies in Netlify adapter (#3092)
* Allow setting multiple cookies in Netlify adapter

* Adds a changeset

* Set the response status code

* Add a comment on why this is needed
2022-04-12 16:50:10 -04:00
Juan Martín Seery
f665d1a250
fix(vercel): support dynamic paths (#3081)
* fix(vercel): support dynamic paths

* Changeset
2022-04-12 10:02:59 -04:00
github-actions[bot]
0966a432a8
[ci] release (#3080)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-11 19:59:32 -07:00
Juan Martín Seery
b835e285de
feat: markdown config typechecking (#2970)
* Added schemas to markdown plugin

* Added new schemas to main package

* Changesets

* typeraw

* Explaination about the weird type hack

* Added markdown.mode to config

* Added comment

* Formatted

* Moved validation to `astro` and added RemarkPlugin ad RehypePlugin

* Removed the ability to have a custom markdown renderer internally

* Fixed plugin type

* Removed unused renderMarkdownWithFrontmatter

* Added missing dependency

* Dynamically import astro markdown

* Cache import
2022-04-11 16:01:12 -07:00
Fred K. Schott
5b3464a803
fix ssr url search params bug (#3066) 2022-04-11 15:57:18 -07:00
hippotastic
9f248b0563
Make Netlify adapter actually append redirects (#3079) 2022-04-11 12:30:47 -07:00
github-actions[bot]
791a524411
[ci] release (#3064)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-10 21:13:11 -07:00
Fred K. Schott
815d62f151 trigger re-release changeset 2022-04-10 21:09:30 -07:00
Fred K. Schott
55c4321b25 trigger re-release changeset 2022-04-10 21:04:52 -07:00
Fred K. Schott
bb0015c8f9 trigger re-release changeset 2022-04-10 21:02:10 -07:00
github-actions[bot]
21c74e572c
[ci] release (#3061)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-10 20:15:02 -07:00
Fred K. Schott
2bb6a06ebb revert release 2022-04-10 20:11:34 -07:00
github-actions[bot]
46f02d9cf4
[ci] release (#3060)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-10 20:01:00 -07:00
Fred K. Schott
9f9189ed8e update changeset 2022-04-10 19:53:36 -07:00
Fred K. Schott
8ca5bfad1a update changeset 2022-04-10 19:44:17 -07:00
Fred K. Schott
4ab1a12481 correct changesets 2022-04-10 18:45:58 -07:00
Steve Lee
7b0fbd731e
Fix SSR static build public file copying. fixes #3016 (#3037)
* Fix SSR static build public file copying

* chore: update lockfile

* remove dirname and use URL constructor

* Cleanup test and actually test what it says it tests

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-04-10 18:23:17 -07:00
Fred K. Schott
a9ecefb8ac
fix our weird beta release issues (#3031) 2022-04-10 18:17:39 -07:00
Fred K. Schott
c05a544acd update tailwind integration readme 2022-04-10 18:12:34 -07:00
Fred K. Schott
732ea3881e
Create dry-candles-behave.md 2022-04-10 14:36:08 -07:00
Juan Martín Seery
982f64f69a
chore: updated esbuild (#3028)
* chore: updated esbuild

* Changeset
2022-04-10 14:33:10 -07:00
Erika
d1f292199c
Update JSDoc comments that get shown in editor (#2999) 2022-04-07 17:08:27 -04:00
github-actions[bot]
a5aea2ce56
[ci] release (beta) (#3023)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-07 15:22:47 -04:00
Matthew Phillips
4b0f27d9ff
Fixes adding set-cookie headers multiple times (#3026)
* Fixes adding set-cookie headers multiple times

* Adds a changeset
2022-04-07 15:18:08 -04:00
Matthew Phillips
7e9d82d75e
Warn when trying to access headers in SSG mode (#3021)
* Warn when trying to access headers in SSG mode

* Adds a changeset

* Warn when accessing headers at all + a test
2022-04-07 15:17:05 -04:00
Tony Sullivan
c773dcde31
Exclude any ?raw or ?url css imports when adding asset links (#3020)
* exclude any ?raw css imports when adding css asset links

* ?url imports should be ignored as well

* chore: adding changeset
2022-04-07 18:26:26 +00:00
Matthew Phillips
8c04ff1f0b
Allow an adapter to export default (#3022)
* Allow an adapter to export default

* Adds a changeset
2022-04-07 13:21:56 -04:00
github-actions[bot]
1d0c1d8977
[ci] release (beta) (#3007)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-06 16:40:46 -05:00
Nate Moore
25cc9218f8
fix(#2987): relative config handling with --config flag (#3001)
* fix(#2987): relative config handling with `--config` flag

* test: fix tests

* fix: improve config test for failure case

* fix: test on windows?

* fix: test on windows?
2022-04-06 16:37:49 -05:00
Matthew Phillips
c6f8bce7c3
Fix Netlify adapter and dynamic routes (#3011)
* Fix Netlify adapter and dynamic routes

* Changeset
2022-04-06 16:21:46 -04:00
Juan Martín Seery
8bd49c9536
fix(integrations): astro:build:done dir now matches SSR client output (#3008)
* `dir` now matches client output

* Updated integrations

* Changeset
2022-04-06 16:20:58 -04:00
Ryan Carniato
13b782f421
fix: Nested hydration with Solid (#3003)
* fix: solid nested hydration

* Create ten-rice-unite.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-04-06 14:42:01 -05:00
Peter Singh
d0777ad3af
Astro add docs (#2958)
* So This works 😎

* need to add to the cli next

* Renamed Files and Export
Applied creditation to where I found the
'inspiration' for this application.

* applied `astro docs` to cli

* Trying to add to CLI,
Not working 🤷‍♂️

* Converted into async method,

* 🎆🎆 It works!!! 🥳🎉🥳

Embarrasing as it is I totally missed the part where logic was to be in.

* Moved `docs` cmd to `supportedCommands`

* refactor: cleanup docs command

* chore: add changeset

* chore: rename browser to open

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-04-06 12:19:05 -05:00
Juan Martín Seery
b5ed099eaf
fix: @astrojs/vercel bug fixes (#3000)
* Fixed outDir

* Updated server out

* changeset

* Renamed out to tmp
2022-04-06 14:15:46 -03:00
github-actions[bot]
013150e2de
[ci] release (beta) (#3005)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-06 13:06:36 -04:00
Matthew Phillips
68e1e2dd31
Fixes dynamic API routes in SSR (#3006)
* Fixes dynamic API routes in SSR

* Adds a changeset
2022-04-06 13:01:22 -04:00
Tony Sullivan
9724d844b3
fix(#2981): keeps astro preview server alive (#3004)
* fix(#2981): keeps  server alive

* chore: adding changeset

* keep alive until the 'close' or 'error' event fires
2022-04-06 15:33:07 +00:00
github-actions[bot]
48d01049b0
[ci] release (beta) (#2997)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-05 15:28:29 -04:00
Ben Holmes
77aa3a5c50
Docs: netlify adapter site requirement (#2996)
* feat: human-readable error on bad site or base

* fix: human-readable error should have 1 config option

* docs: update README

* chore: changeset

* docs: mention localhost for testing via netlify CLI
2022-04-05 11:25:48 -04:00
github-actions[bot]
4e021f70e1
[ci] release (beta) (#2992)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-04 18:07:09 -07:00
Fred K. Schott
572ca3dcbe
add missing changeset for #2991 2022-04-04 18:02:52 -07:00
github-actions[bot]
ac34a5a03a
[ci] release (beta) (#2989)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-04 15:19:57 -07:00
Fred K. Schott
bc12edf09c
Create thin-cameras-clean.md 2022-04-04 12:09:53 -07:00
github-actions[bot]
a68885c0d6
[ci] release (beta) (#2986)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-04 11:35:25 -05:00
Fred K. Schott
9d7a4b59b5
enter beta pre mode (#2979)
* enter beta pre mode

* Update shiny-rice-worry.md

* Update shiny-rice-worry.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-04-04 11:24:21 -05:00
github-actions[bot]
2552db0d09
[ci] release (#2975)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-03 23:25:00 -07:00
Nate Moore
3f0bc5af57
fix: edge case with slotted children (#2978) 2022-04-03 23:18:07 -07:00
Tony Sullivan
dff89a0fa3 Merge branch 'main' of github.com:withastro/astro 2022-04-03 20:42:41 +02:00
Juan Martín Seery
824458790a
fix(cli): prevent CLI from hanging (#2974)
* fix(cli): prevent hanging CLI

* Changeset
2022-04-03 14:32:39 -03:00
Juan Martín Seery
ad3c391696
fix(markdown): escape when mode == 'md' (#2971)
* Fix rehype escape

* Changeset
2022-04-03 14:32:12 -03:00
Tony Sullivan
75919537be
Fixing the new config defaults (docs only) (#2973)
* updating the default listed in config jsdocs

* chore: adding changeset

* outDir had the wrong default listed as well

* chore: updating changeset description
2022-04-03 17:05:30 +00:00
JuanM04
a377ac1efc
Merge branch 'main' into feat/vercel-adapter 2022-04-02 18:53:00 -03:00
github-actions[bot]
7fe149ae43
[ci] release (#2969)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-02 13:49:27 -06:00
Fred K. Schott
e425f896b6 Revert "[ci] release (#2925)"
This reverts commit 48c9b142cc.
2022-04-02 13:46:25 -06:00
github-actions[bot]
48c9b142cc
[ci] release (#2925)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-02 13:40:46 -06:00
Fred K. Schott
3483cc2285
exit prerelease mode (#2967) 2022-04-02 13:37:28 -06:00
Nate Moore
17c02925c5
Migrate to new config (#2962)
* wip: config migration

* fix: formatting

* refactor: projectRoot -> root

* refactor: pageUrlFormat -> format

* refactor: buildOptions.site -> site

* refactor: public -> publicDir

* refactor: dist -> outDir

* refactor: styleOptions -> style

* fix: some dist tests -> outDir

* refactor: remove legacyBuild (with TODOs)

* refactor: more legacyBuild cleanup

* refactor: server host and port

* fix: remove experimentalStaticBuild CLI flag

* refactor: src -> srcDir

* refactor: devOptions.trailing -> trailing

* refactor: remove sitemap + related flags

* refactor: experimentalSSR -> experimental.ssr

* fix: last devOptions

* refactor: drafts -> markdown.drafts

* fix: TS error on port as const

* refactor: remove pages

* refactor: more --project-root updates

* refactor: markdownOptions -> markdown

* fix: remaining type errors

* feat: update AstroUserConfig

* refactor: update CLI flag mapper + server mapper

* fix: loadFixture projectRoot

* fix: merge CLI flags before validating / transforming

* wip: attempt to fix bad createRouteManifest config

* refactor: combine config.base and config.site

* fix: skip route manifest test for now

* fix: site and base handling

* refactor: update failing config testes

* fix: build failure

* feat: update config types with migration help

* chore: update types

* fix(deno): update deno fixture

* chore: remove config migration logic

* chore: remove logLevel

* chore: clean-up config types

* chore: update config warning

* chore: add changeset

* Sitemap Integration (#2965)

* feat: add sitemap filter config option

* feat: add canonicalURL sitemap config option

* docs: update sitemap README

* fix: update for new config

* fix: filter not being applied

* chore: changeset

Co-authored-by: bholmesdev <hey@bholmes.dev>

* fred pass

* fix: Astro.resolve typo

* fix: public => publicDir

Co-authored-by: bholmesdev <hey@bholmes.dev>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-04-02 12:29:59 -06:00
Nate Moore
d55658f061
Implement new default script behavior, style is:global (#2961)
* feat: implement RFC0016

* chore: update to latest compiler

* chore: update compiler

* test: fix script tests

* test: update public tests

* feat: throw a warning when referencing scripts in `public/` without `is:inline`
2022-04-02 12:34:25 -05:00
Tony Sullivan
226822cbbf
Allows projects to opt out of the base Tailwind styles (#2959)
* adding an option to opt-out of the Tailwind base styles

* chore: adding changeset description
2022-04-01 13:45:43 +00:00
Nate Moore
80e6e759e2
Update compiler (#2957)
* chore: update compiler

* chore: add changeset
2022-03-31 22:33:07 -05:00
JuanM04
e30aa4dfef
Added changeset 2022-03-31 20:44:15 -03:00
Nate Moore
d81b6d9ebc
Add function-based slot support to Astro.slots.render() (#2954)
* feat(slots): add function-based slot support to Astro.slots.render()

* test(slots): add render tests
2022-03-31 13:11:26 -05:00
Matthew Phillips
cebdc85428
SSR - copy public folder when there is no client JS (#2955)
* SSR - copy public folder when there is no client JS

* Changest

* Use isBuildingToSSR

Co-authored-by: JuanM04 <me@juanm04.com>
2022-03-31 14:04:09 -04:00
Juan Martín Seery
d10c3dea21
fix: --experimental-ssr fixes (#2937)
* Replaced `--experimental-ssr` with `isBuildingToSSR`

* changest

* Improved `isBuildingToSSR` a bit

* Added `isBuildingToSSR` to more places!!1!

* Added `@deprecated` tag

* Replaced missing experimentalSsr

* Added failing test

* Removed test

* Re-added experimental ssr flag

* Fixed typo

Co-authored-by: Matthew Phillips <matthew@skypack.dev>

* Fixed deno tests

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-03-31 13:58:03 -04:00
Fred K. Schott
57f48b2701
Add support for React 18 in @astrojs/react (#2947)
* First pass at supporting React 18 in @astrojs/react

* Try marking React 18’s `react-dom/client` as external

* Try a different approach to importing different React versions

* Allow resolving JSON modules

* Revert "Allow resolving JSON modules"

This reverts commit 5279b7249c.

* Try the separate client entrypoint approach from #2946

* Clean up diff

* Trying to see something

* Just keep swimming… 🐠

* update to support react 18

* add changeset

* add docs

Co-authored-by: delucis <swithinbank@gmail.com>
2022-03-31 12:51:29 -04:00
Matthew Phillips
c989f106f9
Allow components to return a Response (#2944)
* Allow components to return a Response

* Changeset
2022-03-30 15:55:22 -04:00
Matthew Phillips
13b271bc7d
Deno adapter (#2934)
* Bundle everything, commit 1

* Get everything working

* Remove dependency on readable-stream

* Adds a changeset

* Fix ts errors

* Use the node logger in tests

* Callback the logger when done writing

* Fix test helper to await the callback

* Use serialize-javascript again

* Remove dead code

* Rename hook

* Oops
2022-03-30 08:42:19 -04:00
Matthew Phillips
f048cdff70
Fixes API route compat with Node 14 (#2936)
* Fixes API route compat with Node 14

* Changeset
2022-03-29 16:59:06 -04:00
Matthew Phillips
ecc6a4833f
Implement the Astro.request RFC (#2913)
* Implement the Astro.request RFC

* Disable console warnings eslint

* Use our logger

* Adds a changeset

* Fix tests that depend on params, canonicalURL, URL

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-29 07:35:03 -04:00
Michael Marino
030fd48bdd
[fix] 2924 Update import in astro config of portfolio starter (#2926)
* fix: update import in Portfolio starter astro config file

* chore: add changeset
2022-03-28 20:54:25 -07:00
Fred K. Schott
4299ab303b
New Markdown API (#2862)
* Implement new markdown plugin with deferred markdown rendering

* feat: switch from `getContent()` fn to `<Content />` API

* update types

* Update packages/astro/src/@types/astro.ts

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

* update types

* Create forty-coins-attend.md

Co-authored-by: Nate Moore <nate@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-03-28 17:16:06 -07:00
Fred K. Schott
f70207082a
Restyle error messages (#2902)
* clean up error logging in astro

* update from ben feedback

* Update packages/astro/src/core/build/generate.ts

Co-authored-by: Ben Holmes <hey@bholmes.dev>

Co-authored-by: Ben Holmes <hey@bholmes.dev>
2022-03-28 16:55:36 -07:00
Matthew Phillips
b7ee8554f5
Enable next mode (#2920)
* Enable next mode

* update next mode

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-28 16:55:12 -07:00
github-actions[bot]
425139f912
[ci] release (#2923)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-28 16:52:04 -07:00
Chris Swithinbank
22b1432e3e
Fix typing of integrations array in user config (#2907)
* Fix type of `integrations` in config

As per [docs](https://docs.astro.build/en/reference/integrations-reference/#combining-plugins), an integration can return an array of `AstroIntegration` objects to support bundling a collection of integrations as a preset. This change reflects that usages in the typing for the user config object.

* Add changeset
2022-03-28 17:07:07 -05:00
github-actions[bot]
8b7220f5e4
[ci] release (#2919)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-28 16:52:23 -04:00
Matthew Phillips
77354c89bd
Prevent CSS from being added to pages not using it (#2918)
* Prevent CSS from being added to pages not using it

* Adds a changeset

* Add clarification when the CSS is appended to the pageData

* Move addStyles up a level
2022-03-28 16:48:06 -04:00
github-actions[bot]
273919328a
[ci] release (#2896)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-25 17:16:33 -07:00
Fred K. Schott
f268451268
small tailwind example config fix (#2893)
* fix tailwind config example

* Create shaggy-bulldogs-beam.md
2022-03-25 17:11:45 -07:00
Fred K. Schott
9d6e0b5dba
add experimental integrations flag (#2894) 2022-03-25 17:11:36 -07:00
github-actions[bot]
779b5dd37c
[ci] release (#2892)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-25 18:03:58 -05:00
Nate Moore
a0d67b1d25
Fix missing execa dependency (#2891)
* fix: update dependencies

* chore: add changeset
2022-03-25 18:01:13 -05:00
Zade Viggers
71c12b9047
Correct package name in solid intergration readme (#2889)
* Correct package name in solid intergration readme

* Create polite-mirrors-fix.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-03-25 17:54:18 -05:00
github-actions[bot]
109693bb05
[ci] release (#2884)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-25 17:00:49 -05:00
Nate Moore
e232fcda0a chore: update incorrect changeset 2022-03-25 16:56:42 -05:00
Nate Moore
29723ddcd8
Exit pre mode (#2888)
* chore: update docs link

* chore: exit pre
2022-03-25 16:54:11 -05:00
Ben Holmes
6b004363f9
Docs: remaining integration READMEs (#2885)
* docs: partytown README

* docs: sitemap README

* docs: tailwind README

* docs: turbolinks README

* chore: changeset

* update: make partytown 10% less fun

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

* docs: add summaries for each integration

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-03-25 17:45:34 -04:00
Nate Moore
72ef7ae64a
feat(cli): scaffold out astro add command (#2849)
* feat(cli): scaffold out `astro add` command

* added first babel transforms

* Format output

* Added changes confirmation

* Error flow

* Add dependencies

* feat(cli): astro add cleanup pass

* feat: add support for tailwind

* chore: update lockfile

* fix: types

* chore: rever @proload/core bump

* chore: add changeset

* chore: rollback dep update

* Added spinners

* chore: remove extra deps

* Removed extra argument

* Use `execa` instead of `exec`

* Changed how lines are trimmed within diffLines

* refactor: move add to core

* refactor: remove old add entrypoint

* refactor: simplify wording

* feat: improve diff

* feat: improve diff and logging, add interactive prompt when no args passed

* Formatted files

* Added --yes

* feat: improve logging for install command

* Fixed execa

* Added help message to add

* refactor: extract consts to own file

* feat: remove implicit projectRoot behavior

* feat: improve error handling, existing integrations

* fix(tailwind): ensure existing tailwind config is not overwritten

* refactor: prefer cwd to projectRoot flag

* chore: add refactor notes

* refactor: throw createPrettyError > implicit bail

* refactor: cleanup language

* feat(cli): prompt user before generating tailwind config

* fix(cli): update config generation to use cwd

* fix: resolve root from cwd

* chore: update changelog

Co-authored-by: JuanM04 <me@juanm04.com>
2022-03-25 16:26:55 -05:00
Matthew Phillips
80034c6cbc
Netlify adapter (#2879)
* Netlify adapter

* Remove package.json export that doesnt exist

* Fix out path

* Make netlifyFunctions the default

* Make the dist configurable

* Add an export for the functions

* Append of the file exists
2022-03-25 12:08:02 -04:00
github-actions[bot]
c78d7a46c9
[ci] release (next) (#2860)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-24 17:37:49 -05:00
Ben Holmes
2db97f10dc
Refactor: move prism to @astrojs/prism/components (#2878)
* feat: add `<Prism/>` to @astrojs/prism/components

* feat: remove `<Prism/>` from astro/components

* refactor: point to index.mjs in import

* refactor: change exp to @astrojs/prism/component

* refactor: remove unecessary index.js

* chore: changeset
2022-03-24 17:48:07 -04:00
Matthew Phillips
e4025d1f53
Build to a single file (#2873)
* Build to a single file

* Updates based on initial code review

* Adds a changeset

* Use the default export for cjs module

* Await generatePages

* Prevent timing from causing module to not import

* Fix shared CSS

* Properly handle windows ids

* Dont shadow

* Fix ts errors

* Remove console.log
2022-03-24 17:08:36 -04:00
Fred K. Schott
5029382a8c
fix markdown page script injection (#2871) 2022-03-24 12:30:54 -07:00
Ben Holmes
1061d6477a
Feat: improve production build logging (#2857)
* feat: log setup, vite, and route gen steps

* refactor: add back "build" + timestamp for consistency

* feat: improve ms increase logs to match old debug output

* feat: add log for server assets

* chore: remove redundant debug logs

* feat: add logs for ssr steps

* fix: hide  per-page log for ssr builds

* fix: hide "index.html" from debug log in SSR

* feat: add log for "collecting page data" step

* feat: add timeout logs for longer data imports

* chore: add changeset

* remove (includes setup + teardown)

* refactor: add newline to separate ssr from client build

* fix: move "gen static routes" heading to pages

* fix: only show client build ms when triggered

* fix: remove dup render loop

* chore: remove unused static-build imports
2022-03-24 15:23:37 -04:00
Fred K. Schott
5571227718
fix adblock issue (#2875) 2022-03-24 11:20:34 -07:00
Fred K. Schott
d763ec183e
fix shiki perf issue (#2870) 2022-03-24 09:49:54 -07:00
Ben Holmes
098f6f6b06
Fix: is self accepting pt 2 module graph boogaloo (#2872)
* fix: isSelfAccepting Preact error

* refactor: add .js ext to preact entrypoints for consistency

* chore: changeset

* fix: remove ./client and ./server from preact pkg exp
2022-03-24 12:28:50 -04:00
Matthew Phillips
5e52814d97
Adapters v0 (#2855)
* Adapter v0

* Finalizing adapters

* Update the lockfile

* Add the default adapter after config setup is called

* Create the default adapter in config:done

* Fix lint error

* Remove unused callConfigSetup

* remove unused export

* Use a test adapter to test SSR

* Adds a changeset

* Updated based on feedback

* Updated the lockfile

* Only throw if set to a different adapter

* Clean up outdated comments

* Move the adapter to an  config option

* Make adapter optional

* Update the docs/changeset to reflect config API change

* Clarify regular Node usage
2022-03-24 07:26:25 -04:00
Nate Moore
c781b12f87
fix: ensure private API is not enumerable (#2859) 2022-03-22 16:27:35 -05:00
github-actions[bot]
d082689385
[ci] release (next) (#2851)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-21 20:27:46 -07:00
Ben Holmes
96372e6beb
Fix: isSelfAccepting? More like isBanishedToTheShadowRealm (#2852)
* fix: restore renderer caching strategy

* fix: restore old URL constructor for HMR

* docs: comment why we need the rendererCache

* refactor: remove needless "else"

* chore: changeset
2022-03-21 20:14:58 -07:00
Ben Holmes
5315c3f7bc
Feat: support tailwind config files (#2831)
* feat: support custom tailwind config files

* fix: make config options optional

* feat: use existing utilities to resolve config path

* deps: add @proload/core to tailwind integration

* deps: update pnpm lock

* chore: clarify config docs

* refactor: extract user config fetch to helper

* refactor: rename function and function options

* refactor: throw error on bad custom config path

* deps: move @proload/core to regular deps

* chore: add changeset

* fix: apply astro preset when user config exists

* fix: use resolveConfig to preserve defaults
2022-03-21 17:27:32 -04:00
Fred K. Schott
981e2a839b
add injected scripts to markdown pages (#2848)
* add injected scripts to markdown pages

* Create twenty-kiwis-tease.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-03-21 13:05:11 -07:00
Tony Sullivan
3b621f7a61
chore: integration keywords (#2847)
* updating integration package keywords

* adding a changeset
2022-03-21 19:31:15 +00:00
Nate Moore
0bc3b72958 chore: update changeset 2022-03-21 12:34:42 -05:00
Juan Martín Seery
1fdb63b5d0
feat(create-astro): add peer dependencies to package.json (#2843)
* Install dependencies automatically

* Added spinners

* Updated lockfile

* changeset

* Sort dependencies

* Reverted autoinstall

* Updated changeset
2022-03-21 12:33:31 -05:00
Juan Martín Seery
41110ebe72
chore: remove @astrojs/parser (#2845)
* Removed parser from astro

* Removed parser files

* Updated changeset config

* Removed from license
2022-03-21 12:30:23 -05:00
Fred K. Schott
078b6cde6c [ci] release (next) (#2838)
This reverts commit 935e6fa0c8.
2022-03-20 21:02:08 -07:00
Fred K. Schott
935e6fa0c8 Revert "[ci] release (next) (#2838)"
This reverts commit 5df8d68094.
2022-03-20 21:01:42 -07:00
github-actions[bot]
5df8d68094
[ci] release (next) (#2838)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-19 10:34:59 -07:00
Nate Moore
77ebab8bb2
chore: fix missing postcss-load-config dependency (#2835) 2022-03-18 19:02:42 -07:00
github-actions[bot]
b5a8418f82
[ci] release (next) (#2812)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-18 18:20:21 -05:00
Nate Moore
7954541291
Update Compiler with new CSS Parser (#2833)
* chore: update compiler

* Update eighty-trees-thank.md

* test: update css test
2022-03-18 18:16:32 -05:00
Fred K. Schott
31a1b40cb8
Enter prerelease mode (#2832)
* update lockfile

* enter pre-release mode
2022-03-18 15:47:51 -07:00
Ben Holmes
0a3d3e51a6
Feat: change to shiki default md renderer (#2824)
* feat: change Shiki to default

* refactor: update blog styles for shiki

* feat: update examples/docs styles for Shiki

* refactor: remove Prism-ish examples/docs styles

* refactor: simplify rules with `all: unset`

* refactor: remove Prism styles

* refactor: examples/with-md remove Prism-specific line-highlight

* chore: add changeset

* chore: update changeset versions

* refactor: update syntax highlight test for scoped styles

* fix: apply scoped style class to pre and span lines

* feat: test that scoped styles cascade to shiki code

* refactor: pass scopedClassName explicitly
2022-03-18 17:29:51 -04:00
Hlynur Sveinbjornsson
1cd7184ca6
Fix island deduplication ignoring props. (#2825)
* Fix island deduplication ignoring props.

Re-resolves an issue initially patched in https://github.com/withastro/astro/pull/846 but seemingly lost in the 0.21.0 mega-merge (d84bfe719a).
This change makes the component render step account for all props, even if they don't affect the generated HTML, when deduplicating island mount.

* Fix React component test using different rendered props to test deduplication.

* fix: improve serialization support for non-JSON objects

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-03-18 09:00:14 -04:00
Matthew Phillips
7b9d042dde
Allow SSR dynamic routes to not implement getStaticPaths (#2815)
* Allow SSR dynamic routes to not implement getStaticPaths

* Adds a changeset

* Update based on code-review comments
2022-03-17 08:31:01 -04:00
Matthew Phillips
4c25a1c2ea
Implements redirects, headers for SSR (#2798)
* Implements redirects, headers for SSR

* Move away from an explicit Request

* Properly handle endpoint routes in the build

* chore(lint): ESLint fix

* Update based on review comments

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-16 12:16:21 -04:00
github-actions[bot]
2b89613539
[ci] release (#2808)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-15 19:40:27 -05:00
Nate Moore
9a5d58d5ba fix: do not ignore astro-scripts 2022-03-15 19:40:16 -05:00
Nate Moore
fb26d395f5 fix: ignore astro-scripts 2022-03-15 19:31:19 -05:00
Nate Moore
9e59ec921f
Disable sourcemaps for build (#2806)
* fix: disable sourcemaps for build

* chore: add changeset
2022-03-15 19:25:24 -05:00
Ben Holmes
79282163e2
fix: Svelte PostCSS config error (#2807)
* fix: Svelte PostCSS config error

* chore: changeset
2022-03-15 19:32:39 -04:00
github-actions[bot]
b36d16eb8f
[ci] release (#2802)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-15 17:06:40 -05:00
Nate Moore
86419d9ed7
Ignore test fixture for changesets (#2804)
* test: move fixtures to `@test/` scope

* chore: ignore `@test/` scope

* chore: add changeset

* test: renamed missed package

* chore: delete test file

* fix: @test package references

* fix: @test package references
2022-03-15 16:17:23 -05:00
Fred K. Schott
6eb494796e
update HTML escape logic (#2793) 2022-03-15 15:33:55 -05:00
Nate Moore
2b76ee8d75
Export defineConfig helper (#2803)
* feat: add astro/config entrypoint

* chore: update examples to use `defineConfig` util

* chore: prettier fix

* chore: add changeset
2022-03-15 15:27:17 -05:00
Ben Holmes
2d95541b52
Fix missing style imports on initial load (#2791)
* fix: missing style imports on initial load

* chore: changeset

* fix: update comment on using URL map

* fix: use getModulesByFile to match on ID properly

* refactor: use imperative loop for performance

* fix: update scan from each matching mod

* fix: update scan from importedMod loop

* fix: avoid scanning all related mods
2022-03-15 15:02:29 -04:00
Fred K. Schott
11fb3745dd
[windows:ci] handle CLI output in a cross-compat way (#2801)
* handle readline in a cross-compat way

* Create modern-feet-lay.md
2022-03-15 10:30:25 -07:00
github-actions[bot]
973d398074
[ci] release (#2786)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-15 11:40:51 -04:00
Matthew Phillips
58d8686e94
Fix for allowing space in folder name (#2797)
* Fix for allowing space in folder name

* Adds a changeset

* Prepend a forward slash, for windows
2022-03-15 11:26:46 -04:00
Nate Moore
6b34840d3d
Fix set:html behavior with null (#2790)
* feat: improve set:html behavior for null/undefined

* chore: add changeset

* refactor: improve set:html and set:text documentation

* test: improve set:html tests

* refactor: better types for server API
2022-03-14 18:19:53 -05:00
Fred K. Schott
b4d34e2d2c
improve build perf (#2772) 2022-03-14 10:23:05 -07:00
Ben Holmes
2c4fd919fa
Fix: Astro.props missing properties (#2785)
* Fix: Astro.props missing properties

* chore: add changeset
2022-03-14 13:03:44 -04:00
github-actions[bot]
30e78a0bd8
[ci] release (#2770)
* [ci] update lockfile (#2763)

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

* chore: exit prerelease mode

* [ci] release

* chore: update lockfile

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-11 16:47:57 -06:00
Nate Moore
47f5576a3f chore: exit prerelease mode 2022-03-11 16:39:13 -06:00
Matthew Phillips
49c0d9970f
Fix dev resolution of client modules on Windows (#2768)
* Fix dev resolution of client modules on Windows

* Adds a changeset
2022-03-11 17:28:48 -05:00
Ben Holmes
77b9c95352
Feat: expose server on local network with new --host flag (#2760)
* feat: update config to support bool --hostname

* fix: show localhost for --hostname=true

* feat: address logging feature parity w/ Vite

* chore: update type docs

* refactor: extract local, network prefs to variable

* feat: add --host to --help output

* feat: deprecate --hostname, add --host

* feat: add --host tests

* feat: update preview to support new flags

* fix: show --host in dev server log

* feat: update config tests for --host flag

* chore: test lint

* chore: update lock with new fixture

* chore: add changeset

* refactor: add more details to JSdocs

* fix: update path tests

* feat: only expose when --host is not local

* fix: make flag --help less verbose

* fix: address @types comments

* fix: lint

* chore: remove unused import

* fix: use host flag for config test

* fix: ensure local logs come before network

* refactor: switch up that network logging one last time!

* feat: update unit tests

* chore: remove debugging block

* fix: only parse network logs if network is present
2022-03-11 17:25:26 -05:00
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
github-actions[bot]
ebe7f4d0ae
[ci] release (next) (#2580)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-16 08:49:12 -06:00
Nate Moore
085468e949
chore: upgrade compiler (#2594) 2022-02-16 08:45:15 -06:00
Matthew Phillips
ec6f148fc8
Resolve relative imports from hoisted scripts (static build) (#2581)
* Resolve relative imports from hoisted scripts

* Adds a changeset

* Windows fix

* Set a longer timeout for the Lit test

* blah

* Handle windows properly

* Only if the from is astro

* Windows debugging

* This might fix it

* another try

* use only

* More debugging

* Does this work

* Final cleanup

* Update the lockfile
2022-02-15 16:55:07 -05:00
Tony Sullivan
d6d35bcafc
Support non-HTML pages (#2586)
* adds support for build non-html pages

* add non-html pages to the static build test suite

* adds getStaticPaths() test for non-html pages

* adds dev server tests for non-html pages

* ading a changeset

* updating changeset description

* testing for building non-html files with async data

* fixing typo in changeset docs
2022-02-15 17:47:42 +00:00
Matthew Phillips
ba5e2b5e6c
Flagged SSR support (#2548)
* Checkpoint, basics are working

* Add the `--experimental-ssr` flag

* Adds the changeset

* Fixes population of getStaticPaths results

* Pass through the imported module

* Route manifest test

* Fix remaining tests

* Fix remaining tests

* Copy server assets over

* Fix types

* Allowing passing in the request to the Node version of App

* Improve the example app

* Gets CI to pass
2022-02-14 12:48:52 -05:00
github-actions[bot]
9e6f437429
[ci] release (next) (#2573)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-11 17:12:00 -05:00
Matthew Phillips
34317bc05c
Use noExternal config on 'astro' (#2570)
* Use noExternal config on 'astro'

* Changeset
2022-02-11 16:22:16 -05:00
github-actions[bot]
b1afce896a
[ci] release (next) (#2565)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-11 10:41:47 -05:00
Matthew Phillips
82544e4134
Fixes pageUrlFormat: 'file' in static build (#2569)
* Fixes pageUrlFormat: 'file' in static build

* Adds a changeset
2022-02-11 14:43:42 +00:00
Juan Martín Seery
d71c46207a
Fixed curly braces inside Shiki codeblocks (#2545) (#2564) 2022-02-10 12:23:05 -05:00
github-actions[bot]
3e24341f17
[ci] release (next) (#2555)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-09 13:18:10 -06:00
Nate Moore
a907a73b8c
chore: upgrade vite and renderer dependencies (#2563) 2022-02-09 13:01:17 -06:00
Nate Moore
1abb9ed080
Upgrade Vite to latest (#2424)
* chore: unvendor vite

* chore: upgrade vue and svelte

* feat(renderer-solid): upgrade for vite@2.7.x

* chore: update yarn.lock

* fix(solid): upgrade solid renderer for vite@2.7.x

* test: improve css test

* chore: upgrade to vite@2.8.0-beta.3

* fix: replace hacky serialization with 'serialize-javascript'

* fix: externalize serialize-javascript

* fix: explicitly add execa@6.x.x to devDependencies

* test(css): skip css?url test

* chore: update vite-plugin-svelte

* fix: ssr option

* chore: update changeset

* chore: remove changeset

* chore: add changeset

* chore: add back missing changeset

* chore: update vite

* chore: update to latest vite

* test: update proload?

* chore: update dependencies

* fix: remove preact from nanostores example

* fix: update static-build-pkg to use `.mjs` extension

* fix: exclude './server.js' from custom-elements test

* chore: remove unused file
2022-02-08 17:38:00 -06:00
github-actions[bot]
cc436b4ce8
[ci] release (next) (#2554)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-08 16:58:42 -05:00
Matthew Phillips
e81bc3cf14
Prevent the server plugin from running during the build (#2552)
* Prevent the server plugin from running during the build

* Adds a changeset

* More all before blocks to inside of a describe()
2022-02-08 16:55:22 -05:00
github-actions[bot]
4078dc529b
[ci] release (next) (#2533)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-07 15:08:22 -05:00
Jonathan Neal
a911d14eab
Remove docs from monorepo (#2517)
* Remove docs from monorepo

* Update PULL_REQUEST_TEMPLATE.md

* Update relative doc references with links or todo
2022-02-07 13:39:53 -05:00
Juan Martín Seery
2bc91543ce
feat: Added the ability to add custom themes/languages to Shiki (#2518)
* Replaced `shikiTheme` with `shikiConfig`

* Code.astro now accepts custom themes/langs

* Updated docs

* Updated tests

* Fixed language loading

* Added customization examples

* Updated documentation

* Added more tests

* Changelogs

* Changed some spaces to tabs

* Fixed typo in changesets

* Moved tests fixtures

* Rolled back changes to with-markdown-shiki

* Removed lang example in docs

* Optimized Code component

* Try to fix windows errors

* Try to see if this new tests work
2022-02-07 08:31:02 -08:00
Fred K. Schott
b066628693
improve debug logs (#2537)
* improve debug logs

* Update logger.ts
2022-02-07 08:23:01 -05:00
Nate Moore
16d532fe17
fix: HTML/SVG boolean attributes (#2538)
* fix: HTML/SVG boolean attributes

* fix: update case-sensitivity of attributes

* Update packages/astro/src/runtime/server/index.ts

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
2022-02-04 17:38:14 -06:00
Juan Martín Seery
cfeaa9414a
fix: import local plugins into markdown (#2534)
* Replaced "UnifiedPluginImport" for a function

* Updated tests

* Updated docs

* Updated examples

* Added changeset

* Fixed tests

* Removed unused "UnifiedPluginImport"

* Duplicated add-classes.mjs
2022-02-04 13:49:50 -05:00
Matthew Phillips
b210fd008b
Append to list of HMR modules, don't override (#2532)
* Append to list of HMR modules, don't override

* Changeset
2022-02-03 16:41:48 -05:00
Fred K. Schott
ef1d81effd
add back dev server host support (#2531) 2022-02-03 13:40:40 -08:00
github-actions[bot]
e49f581bc2
[ci] release (next) (#2523)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-02 12:11:57 -05:00
Matthew Phillips
3e8844fa87
Fix support for scss in static build (#2522)
* Fix support for scss in static build

* Adds a changeset

* Pass the normalizedID to transformWithVite
2022-02-02 11:35:13 -05:00
github-actions[bot]
dd1a14a2eb
[ci] release (next) (#2492)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-01 08:52:57 -05:00
Juan Martín Seery
6fe1b0279f
Add Shiki as an alternative to Prism (#2497)
* [ci] yarn format

* Added shiki to markdown-remark

* Upgraded astro shiki

* Added minimal example

* Changed defaults to match <Code />

* Replace `shiki` with `astro` classes

* Added documentation

* Updated Astro code to use new `codeToHtml`

* Added changesets

* Added basic test

* Updated tests a bit

Co-authored-by: JuanM04 <JuanM04@users.noreply.github.com>
2022-01-31 16:14:07 -06:00
Nate Moore
618a16f59d
Deprecate unescaped HTML inside of expressions (#2489)
* feat: implement automatic escaping

* feat: deprecate automatic escaping

* fix: cast unescapeHTML as string

* fix: slot fallback behavior

* fix: unescaped content

* Update escape.ts

* Update escape.ts

* feat: update internal components to use `set:html`

* chore: update compiler

* chore: update changeset
2022-01-31 16:13:22 -06:00
Matthew Phillips
b9da87a108
Enter prerelease mode (#2510) 2022-01-31 17:03:42 -05:00
Matthew Phillips
3d2c184962
Fix define:vars in the static build flag (#2511)
* Fix define:vars in the static build flag

* Adds a changeset

* linting
2022-01-31 16:56:14 -05:00
Jonathan Neal
187d5128af
Fix issue rendering content within HTMLElement (#2506) 2022-01-31 16:50:55 -05:00
Fred K. Schott
d7149f9b2f
refactor dev to use vite server (#2494) 2022-01-31 14:44:40 -05:00
Fred K. Schott
c9bb1147cb
[MINOR] standardize trailing subpath, fix fetchContent url issue (#2471)
* standardize trailing subpath, and fix fetchcontent issue

* debug windows ci

* improve ci test

* fix windows test issue?

* fix only usage

* end debugging
2022-01-28 20:29:53 -05:00
Matthew Phillips
6bd165f84c
Handle project folders containing a space in the static build (#2486)
* Handle project folders containing a space

* Adds a changeset

* Bump the test package version

* Use server relative paths as entries

* Fix windows

* A hoisted fix

* Correctly handle facadeIds on windows
2022-01-28 20:29:28 -05:00
github-actions[bot]
1cac6c974a
[ci] release (#2482)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-28 20:06:07 -05:00
Jonathan Neal
c7a6ed9a8d
Changesets (#2491)
* changeset for #2487

* changeset for #2473
2022-01-28 19:57:22 -05:00
Matthew Phillips
69d5b70900
Fix use of preprocessors with the static build (#2490)
* Fix use of preprocessors with the static build

* Adds a changeset
2022-01-28 17:10:52 -05:00
Nate Moore
005751a920
Add escapeHTML to astro/internal (#2479)
* feat: add escapeHTML to astro/internal

* Update packages/astro/src/runtime/server/escape.ts

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>

* Update escape.ts

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
2022-01-27 20:36:47 -06:00
github-actions[bot]
10db1ca75e
[ci] release (#2454)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-27 11:40:08 -05:00
Matthew Phillips
462e315956
Fix HMR in static build + @import HMR (#2440)
* Fix HMR in static build + @import HMR

* Changeset

* Add a comment on what cleanUrl is doing

* Running prettier

* Improve comments on how the static build compilation

works differently.
2022-01-24 12:58:10 -05:00
github-actions[bot]
3059cc8e39
[ci] release (#2437)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-24 09:39:26 -05:00
Matthew Phillips
dfe1f8b4e7
Pass user's viteConfig.ssr to the build (#2442)
* Pass user's viteConfig.ssr to the build

* Changeset
2022-01-24 08:55:26 -05:00
Nate Moore
ed0b46f96f
Fix pre-generated RSS URLs (#2443)
* Allow pre-generated urls to be passed in rss feeds

* Fix variable name

* Add isValidURL helper function

* Remove scary RegEx and tidy up code

* add test for using pregenerated urls

* fix: allow rss to be called multiple times

* test: normalize rss feed in test

* chore: add changeset

Co-authored-by: Zade Viggers <74938858+zadeviggers@users.noreply.github.com>
Co-authored-by: zadeviggers <zade.viggers@gmail.com>
2022-01-21 16:38:48 -06:00
Chris Swithinbank
ebe414f05b
Resolve sitemap URLs in relation to full site path (#2423)
* Resolve sitemap URLs in relation to full site path

Fixes #2422

* Test generated sitemap contains base directory in URLs

* Add changeset

* test: Add `clean` helper to loaded fixture API

Adds a method that when called will remove the loaded fixture’s dist directory using `rimraf`.

* test: Clean up between sitemap/RSS tests

* See if letting rimraf retry more helps…

* Add logging to double check nothing’s running in parallel

* Remove logging & double check clean up actually succeeds

* Try using basic Node.js to clean up dist

* Remove logging/checks

* Remove stray unnecessary `async` keyword
2022-01-20 19:27:47 -05:00
github-actions[bot]
4c802e25a0
[ci] release (#2433)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-20 19:23:30 -05:00
Matthew Phillips
f2b8372c0c
Supports hoisted scripts in the static build (#2414)
* Supports hoisted scripts in the static build

* Adds a changeset

* Update packages/astro/src/core/build/internal.ts

Co-authored-by: Evan Boehs <evan@boehs.org>

* Update based on feedback

* Fix lint

* Fix getting hoist script for Windows

* Try with the pre compiler

* use compiler 0.8.2

* update compiler version

* update yarn.lock

Co-authored-by: Evan Boehs <evan@boehs.org>
2022-01-20 19:13:05 -05:00
Mikkel Tønder
fda857eb22
Add a verbose flag to create-astro (#2429)
* Add verbose logging to create-astro

* Tell user to use the verbose flag when encountering the MISSING_REF error

* Create changeset

* Add information in README

* Format

* Use switch statement instead of if and if else blocks

* Update packages/create-astro/src/logger.ts

Make if statement easier to read

Co-authored-by: Evan Boehs <evan@boehs.org>

Co-authored-by: Evan Boehs <evan@boehs.org>
2022-01-20 19:00:22 -05:00
Matthew Phillips
9e1bc1752f
Upgrade compiler to latest (#2432)
* Upgrade compiler to latest

* Updates the changeset
2022-01-20 15:37:09 -05:00
github-actions[bot]
e3731e5fa8
[ci] release (#2430)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-20 10:04:29 -05:00
Matthew Phillips
3ad236ba01
Pin to the compiler 0.8.1 (#2428)
* Pin to the compiler 0.8.1

* Changeset
2022-01-20 09:49:33 -05:00
github-actions[bot]
5d79bd7e93
[ci] release (#2420)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-19 22:12:32 -05:00
Nate Moore
85ad1aab67
feat: add support for styled RSS feeds (#2371) 2022-01-19 15:34:52 -05:00
Pranav Karawale
24aa3245ae
Implement support for draft pages (#2392)
* feat: support draft pages

* implemented support for draft pages
* added integration test
* updated relevant documentation (english only)

* docs: explicitly mention "markdown draft pages"

* chore: add changeset

* chore: modify changeset

- changed type to 'patch'
- added more description
2022-01-19 15:18:51 -05:00
Matthew Phillips
5208c88aeb
Add Astro.resolve deprecation warning for the static build (#2416)
* Add Astro.resolve deprecation warning for the static build

* Adds a changeset
2022-01-19 08:25:42 -05:00
github-actions[bot]
bcec8adc9a
[ci] release (#2412)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-18 08:38:15 -05:00
Matthew Phillips
bcc617f9dc
Update examples to move away from Astro.resolve on styles (#2393)
* Update examples to move away from Astro.resolve on styles

* Prepend the subpath

* Adds a changeset

* Switch to @import for the starter
2022-01-18 08:34:12 -05:00
github-actions[bot]
d3be8d944d
[ci] release (#2394)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-14 16:19:25 -05:00
Matthew Phillips
c8a257adc4
Improve static build performance on large sites (#2391)
* Improve static build performance on large sites

* Changeset

* Remove debugging code

* Pass through the rss fn
2022-01-14 16:14:04 -05:00
github-actions[bot]
f5ce6edb5b
[ci] release (#2372)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-14 14:40:12 -05:00
Matthew Phillips
a7967530df
Fixes Lit support in the static build (#2370)
* [ci] collect stats

* [ci] update lockfile (#2388)

Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>

* Fixes for blog and docs examples (#2373)

* Fixes for blog and docs examples

* Adds a changeset

* Upgrade the compiler version

* Use a global style tag

* Skip on windows temporarily

* [ci] yarn format

* Fixes Lit support in the static build

* Adds a changeset

* test

* Upgrade lit-labs/ssr

* Conditional

* Testing again

* remove debugging code

* changeset

Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-01-14 14:02:44 -05:00
Matthew Phillips
92532b8882
Fixes for blog and docs examples (#2373)
* Fixes for blog and docs examples

* Adds a changeset

* Upgrade the compiler version

* Use a global style tag

* Skip on windows temporarily
2022-01-14 12:11:56 -05:00
Matthew Phillips
20eaddb2a7
Fix for using React in the static build (#2369)
* Fix react in the static build

* Adds a changeset
2022-01-13 13:28:29 -05:00
github-actions[bot]
834e5299f1
[ci] release (#2366)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-13 09:37:44 -05:00
Matthew Phillips
2aa5ba5c52
Fix use of frameworks in the static build (#2367)
* Fix use of frameworks in the static build

* Adding a changeset

* fix typescript

* Empty out the directory before running the builds

* Use a util to empty the directory

* Only empty the outdir if needed

* Move prepareOutDir to its own module

* Prepare outDir is actually sync
2022-01-13 09:23:03 -05:00
Matthew Phillips
20d0cce681
Fix for shared CSS when using the static build (#2365)
* Fix for shared CSS when using the static build

* Adds a changeset
2022-01-12 12:02:36 -05:00
github-actions[bot]
983bf72aa1
[ci] release (#2340)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-12 11:30:01 -05:00
Matthew Phillips
7e0b32c569
Fix: static-build with .md pages (#2363)
* Fix: static-build with .md pages

This fixes the `--experimental-static-build` flag to work with markdown
pages.

* Adds a changeset

* Account for difference in specifier on windows
2022-01-11 16:52:46 -05:00
Nate Moore
b21dd19cb6
chore: remove www (#2361) 2022-01-11 12:59:06 -06:00
Matthew Phillips
1007497297
Fix build output in static build mode (#2358)
* Fix build output in static build mode

* Adds a changeset

* Formatting
2022-01-11 11:24:57 -05:00
toSayNothing
f482c626a6
Fix renderer-solid (fix #2336) (#2359) 2022-01-11 10:31:26 -05:00
Jonathan Neal
c0cb7eead5
Fix Astro Preview Pathing Issues (#2338)
* Fix preview issues triggered by pageUrlFormat & trailingSlash options

* format

* changeset

* nit: fix host message
2022-01-10 12:43:24 -05:00
Jonathan Neal
f008a19c9d
Fix sitemap.xml page urls (#2335)
* For pages, use the expected pathname, not the file name

* changeset
2022-01-08 08:25:37 -05:00
Jonathan Neal
69af658b00
Fix issue with plugins running twice in dev and build (#2323)
* Fix issue with plugins running twice in dev and build

* nit: only patch plugins

* nit: only patch plugins

* nit: only solve for create-vite

* nit: only solve for create-vite

* Create seven-mice-do.md

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-01-07 15:00:19 -08:00
github-actions[bot]
5ba2650be1
[ci] release (#2339)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-07 16:43:19 -05:00
Matthew Phillips
180dfcf2fc
Handle loading the Code package in the static build (#2337)
* Handle loading the Code package

Fixes #2329

* Use Code the normal way

* Adds a changeset

* Only resolve browser path if there is no common ancestor

* Update examples/fast-build/src/pages/index.astro

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

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-01-07 16:28:27 -05:00
github-actions[bot]
4c826ad5b5
[ci] release (#2333)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-07 09:44:14 -05:00
Matthew Phillips
71ca09125a
Fix subpath support regressions (#2330)
* Fix subpath support regressions

* Adds a changeset

* Update tests to reflect relative URL change

* Pick a different port and hopefully windows works

* Remove bad lint warning

* Better handling of relative paths

* or

* Fixes use with pageUrlFormat

* Update the pageDirectoryUrl test
2022-01-06 16:32:24 -05:00
github-actions[bot]
f80800857e
[ci] release (#2320)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-05 16:56:34 -08:00
Nate Moore
77ef43e66c
chore: update compiler (#2324) 2022-01-05 18:32:42 -06:00
Fred K. Schott
e0de21ef57
Create fluffy-rocks-fold.md 2022-01-05 16:26:16 -08:00
Nate Moore
c0204c0a41
chore: update compiler (#2318) 2022-01-05 12:03:16 -06:00
Jonathan Neal
e6379d514d
Bump WebAPI (#2319)
* bump webapi

* changeset
2022-01-05 13:02:42 -05:00
github-actions[bot]
fa396750ef
[ci] release (#2307)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-05 11:20:39 -05:00
Nate Moore
e98659b7d6
Update compiler to 0.7.2 (#2308)
* chore: update compiler

* chore: add changeset

* chore: upgrade compiler again
2022-01-04 16:06:57 -06:00
Tadeu Zagallo
5fbdd56f15
Fix dynamic routes for sites with subpath (#2299) 2022-01-04 13:22:06 -05:00
github-actions[bot]
d11c7b8c5c
[ci] release (#2304)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-04 11:28:19 -05:00
Matthew Phillips
193ca60f40
Upgrade language server (#2305)
* Upgrade language server

Fixes #2297

* Adds a changeset
2022-01-04 11:06:47 -05:00
moritzlaube
344866762c
Update svelte version in renderer-svelte (#2300)
* Update svelte version in renderer-svelte

I am having funny console logs saying that my svelte component `received an unexpected slot "default".`. This issue is described here: https://github.com/sveltejs/kit/issues/981

Supposedly, updating svelte to version 3.44.3 solves this issue. I couldn't test it, though.

* Update Svelte to 3.44.3 to get rid of console warning that component receives an unexpected slot "default".
2022-01-04 10:17:21 -05:00
github-actions[bot]
69f4ff5473
[ci] release (#2303)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-04 09:46:45 -05:00
Matthew Phillips
9db22b97b6
Only resolve inline script specifiers in the static build (#2302)
* Revert "Revert "Implement hydrated components in the static build (#2260)""

This reverts commit 17ac18e88c.

* Only resolve specifiers in the static build

* Adding a changeset

* Fix the client-only test
2022-01-04 09:35:07 -05:00
github-actions[bot]
c5a67b4275
[ci] release (#2293)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-30 12:03:19 -05:00
Matthew Phillips
2e55dc2686
Revert "Implement hydrated components in the static build (#2260)" (#2292)
* Revert "Implement hydrated components in the static build (#2260)"

This reverts commit ae5255dd25.

* Adds a changeset
2021-12-30 11:52:22 -05:00
github-actions[bot]
1da4682a50
[ci] release (#2291)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-30 09:14:21 -05:00
Matthew Phillips
c77cf52e16
Don't overwrite the stack when using verbose logging (#2290)
* Don't overwrite the stack when using verbose logging

This makes it so that if the compiler panics and `--verbose` logging is
on (debug level), we don't replace the stack trace.

* Adds a changeset
2021-12-30 09:03:03 -05:00
github-actions[bot]
458e57b84f
[ci] release (#2264)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-23 15:34:11 -05:00
github-actions[bot]
b8e3efa7bb
[ci] release (#2219)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-23 11:49:30 -05:00
Matthew Phillips
db79d2e9ec
Fixes includes remote @imports in inline styles (#2258)
* Fixes includes remote @imports in inline styles

* chore(lint): Prettier fix

* Adds a changeset

* Fix empty style tags

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-23 09:24:29 -05:00
Fred K. Schott
e07c1cbd7e
[ci] update lockfile (#2240)
* [ci] update lockfile

* fix package dependency issue

* Create heavy-pianos-obey.md

Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2021-12-21 10:37:09 -08:00
Nate Moore
c5a7305f04 chore: update changesets 2021-12-16 17:57:10 -06:00
Jonathan Neal
45cea6aec5
Support Node v14.15+ (#2202)
* Support Node v14.15+

* changeset

* Update .changeset/new-hats-design.md

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

* Update .changeset/new-hats-design.md

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

* Update .changeset/new-hats-design.md

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

* ES2020

* update yarn.lock

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2021-12-16 18:53:22 -05:00
Nate Moore
810aeb321a chore: release @astrojs/renderer-svelte@0.2.3 2021-12-16 17:36:48 -06:00
Nate Moore
b8c821a074
chore: release pinned version of Svelte renderer (#2216)
* chore: release pinned version of Svelte renderer

* chore(lint): Prettier fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-16 16:24:35 -06:00
Jonathan Neal
91173fe938
Replace fetch walk-n-replace with polyfill (#2206)
* Replace fetch replacer with genuine polyfill

* chore(lint): Prettier fix

* changeset

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-15 14:11:14 -05:00
github-actions[bot]
c16e7f3433
chore: release (#2171)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-09 10:45:03 -08:00
Fred K. Schott
5af24efb34
pin preact to 10.5 to resolve preact issue (#2170)
* pin preact to 10.5 to resolve preact issue

* fix: use current yarn.lock and only update preact

Co-authored-by: Nate Moore <nate@skypack.dev>
2021-12-09 10:33:53 -08:00
github-actions[bot]
9ac4259d2e
chore: release (#2149)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-09 04:57:08 -08:00
Drew Powers
ef3950c647
Fix missing styles (#2156)
#2101
2021-12-07 15:01:45 -07:00
Fred K. Schott
d5ebd9d178
fix create-astro export map entry (#2150) 2021-12-07 10:21:42 -08:00
Fred K. Schott
0ef682c924
Validate Astro frontmatter JS/TS on compiler error (#2115)
* validate the astro component frontmatter ahead of compilation

* add test, update existing tests

* chore(lint): Prettier fix

* Update index.ts

* remove macos skip lines, no longer needed

Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
2021-12-07 08:18:41 -08:00
github-actions[bot]
a7e2070abc
chore: release (#2136)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-06 17:10:43 -06:00
Drew Powers
da7b41f5b8
Fix build missing styles (affecting docs) (#2112)
* Revert "remove odd docs regression caused by Astro.fetchContent()"

This reverts commit df47077978.

* Fix build missing styles
2021-12-06 16:01:32 -07:00
Nate Moore
cc1dae55c8
fix(#2129): exclude 404 from sitemap (#2137)
* fix(#2129): exclude 404 from sitemap

* chore(lint): Prettier fix

* chore: trigger ci

Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
2021-12-06 16:50:30 -06:00
Nate Moore
77c3fda379
Make fetch injection safe to existing code (#2135)
* fix: inject `fetch` only if not declared

* test: improve fetch test

* chore(lint): Prettier fix

* chore: trigger ci

* fix: improve type narrowing

Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
2021-12-06 16:08:00 -06:00
github-actions[bot]
1298fd8678
chore: release (#2133)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-06 15:15:14 -06:00
Elliott Marquez
d9d3906a3c
test(lit): add reflected property tests (#2116) 2021-12-06 13:23:09 -06:00
Leosvel Pérez Espinosa
c0f29bcf8c
Parse --renderers flag correctly when passed to the create-astro cli (#2124) 2021-12-06 09:19:22 -05:00
github-actions[bot]
fe11bdb5f7
chore: release (#2118)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-03 16:29:11 -06:00
Nate Moore
8346a1f2b9
Update Compiler (#2117)
* chore: update compiler

* chore: update compiler

* Revert "chore: update compiler"

This reverts commit 5742c24542.
2021-12-03 16:10:05 -06:00
Mikkel Tønder
3e4cfea4e2
Make aliases work on windows (#2109)
* Make aliases work on windows

Change all occurrences of path.posix to path.

* Remove console log statement

* Update index.ts

* Update index.ts

* Update index.ts

* Edit changeset
2021-12-03 10:53:11 -05:00
github-actions[bot]
4f546173b4
chore: release (#2108)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-03 09:30:45 -05:00
Matthew Phillips
583459d0b6
Fix support for ?url on CSS (#2106)
* Fix support for ?url on CSS

* Adds a changeset

* chore(lint): Prettier fix

Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
2021-12-03 09:19:37 -05:00
Matthew Phillips
4c44467668
Remove use of URL module in runtime (#2107)
* Remove use of URL module

We can't use this module due to Vite not having a shim and this needing
to run inside Vite.

* Adding a changeset
2021-12-03 09:13:20 -05:00
github-actions[bot]
787e4e6497
chore: release (#2098)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-02 17:45:56 -05:00
Jonathan Neal
11798a3209
Update Astro dependencies (#2096)
* Update Astro dependencies

* changeset

* chore: update `@astro/compiler`
2021-12-02 17:33:24 -05:00
github-actions[bot]
e57308d70c
[ci] release (#2071)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-02 13:01:17 -05:00
Drew Powers
0a826c999c
Allow special characters in filenames (#2091)
#2089
2021-12-02 10:45:54 -07:00
Nate Moore
ac3e870280
fix: renderer behavior with no children (#2078)
* fix: renderer behavior with no children

* [ci] Prettier fix

* Force CI

* fix: properly handle falsy values

* [ci] Prettier fix

* chore: force ci

* [experiment] netlify ignore

Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
2021-12-02 10:30:15 -06:00
Drew Powers
62a5e98c90
Improve CSS import ordering, fix empty CSS outputs (#2081)
Fixes #2060
2021-12-02 09:24:00 -07:00
Matthew Phillips
1301f3daa9
Makes Astro.resolve return root-relative paths (#2048)
* Makes Astro.resolve return root-relative paths

* Adds a changeset

* Update the compiler version and PR review

* Fix linting

* [ci] Prettier fix

* Remove use of vitifyURL

Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
2021-12-02 10:48:18 -05:00
Matthew Phillips
2a2eaadc2f
Invalidate based on modulePath (#2086)
* Invalidate based on modulePath

* Adds a changeset
2021-12-02 10:48:08 -05:00
Tony Sullivan
920d3da135
Improving error messages for invalid client hydration directives (#2076)
* Adding check to make sure the hydration directive is valid

* remove temp debug logging

* Adding a check for media query with client:media + small refactor

* adding changeset

Co-authored-by: Tony Sullivan <tony.sullivan@hyperlab.se>
2021-12-01 15:26:17 -06:00
Jonathan Neal
5bda895fcb
Render void elements as self-closing tags (#2064)
* Render void elements as self-closing tags

* changeset

* nit: only check void element names if there is no child content

* nit: only check void element names if there is no child content

* add tests
2021-12-01 15:43:22 -05:00
Drew Powers
b348ca6c9f
Allow importing of rehype plugins (#2075)
Fixes #2061
2021-12-01 12:03:04 -07:00
Drew Powers
c6e4e2831e
Enforce consistent import order of CSS (#2065)
Partially fixes #2060
2021-12-01 08:23:18 -07:00
github-actions[bot]
754ac42478
[ci] release (#2059)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-11-30 22:33:45 -07:00
Drew Powers
96ba37ef02
Modify changeset for #2052 (#2067) 2021-11-30 22:23:04 -07:00
Drew Powers
f5efbe141c
Add changeset for #2052 (#2066) 2021-11-30 22:01:44 -07:00
Nate Moore
606fa81b94
chore: fix changeset (#2058) 2021-11-30 11:14:31 -06:00
Nate Moore
4e06767c01
fix(#2007): astro preview port retry (#2050)
* fix(#2007): astro preview port retry

* docs: update preview comment
2021-11-29 17:39:38 -06:00
Drew Powers
c491d1f423
Fix Sass WASM crashes (#2049)
Partially addresses #2032
2021-11-29 14:44:55 -07:00
Nate Moore
4067151aec
Improve GitHub Actions (#2041)
* chore(actions): test new CI action

* chore(actions): switch action order

* chore(actions): update registry

* chore(actions): remove debug

* chore(actions): target all packages

* chore(actions): test artifacts

* chore(actions): try moving artifacts

* chore(actions): test moving

* chore(actions): test tar approach

* chore(actions): test tar approach

* chore(actions): use artifacts/packages before tar

* chore(actions): test mv -vn

* chore(actions): mkdir first

* chore(actions): how does tar work?

* chore(actions): so good at bash

* chore(actions): test matrix

* chore(actions): fix test matrix

* chore(actions): fix windows?

* chore(actions): fix windows?

* chore(actions): fix windows!

* chore(actions): fix windows!

* chore(actions): add lint

* chore(actions): add back old actions

* chore(actions): test notification action

* chore(actions): test notification action again

* chore(actions): fix extract action

* chore(actions): fix action?

* chore(actions): fix action?

* chore(actions): fix newlines

* chore(actions): test --production flag

* chore(actions): test --production flag for test

* chore(actions): add execa to production deps

* chore(actions): add cheerio to production deps

* chore(actions): add production deps for tested examples

* chore(actions): fix changelog action

* chore(actions): attempt to use --prefer-offline

* chore(actions): revert dependencies/devDependencies change

* chore(actions): update all actions

* chore(actions): add smoke test

* chore(actions): update changelog deps

* chore(actions): move notify script

* chore(actions): consolidate main scripts

* chore(actions): update changelog name

* chore(actions): update congratsbot

* chore(actions): update ci

* chore(actions): change lint/format strategy

* chore(actions): expose GITHUB_TOKEN to linter

* chore(actions): update lint

* chore(actions): enable autofix

* chore(actions): fetch-depth 0

* chore(actions): fix eslint extensions

* chore(actions): debug lint

* chore(actions): fix eslint args

* chore(actions): fix eslint?

* [ci] ESLint fix

* [ci] Prettier fix

* chore(actions): fix lint!

* chore(actions): cleanup comments

* chore(actions): fix lint

* chore(actions): lint astro only

* chore(actions): ignore pattern

* chore(actions): no_verify

* chore(actions): disable no verify

* chore(actions): debug status

* chore(actions): add concurrency

* chore(actions): add comment about concurrency

* chore(actions): make release dependent on lint

* chore(actions): move lint first

* chore(actions): run CI on PR or `main` only

* chore(actions): remove GPR publish step

* chore: add back old actions

* chore: revert package.json

* chore: improve changelog with GitHub info

* chore(actions): try pull_request_target

* debug lint

* debug lint

* debug lint

* try pull_request_target

* update pull_request_target perms

* update pull_request_target

* fix perms

* fix run?

* fix run?

* fix run? (part 3)

* fix run? (part 4)

* fix run? (part 5)

* fix run!

* fix run!!

* fix run!!!

* fix run!!!!

* fix run!!!!!

* fix run!!!!!!

* add comment about forks

Co-authored-by: GitHub Actions <actions-user@github.com>
2021-11-29 15:11:15 -06:00
github-actions[bot]
6203b57974
Version Packages (#2047)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-11-29 14:39:04 -05:00
Drew Powers
50f3b8d7ec
Fix style injection (#2011) 2021-11-29 12:33:40 -07:00
Ludovico Fischer
4436592d22
fix(astro): prevent crash on unexpected file in pages (#2034)
* Skip files in `src/pages` when extension is not '.astro' or '.md'
* Add test

Fix #2033
2021-11-29 12:33:16 -07:00
Matthew Phillips
341ec3cdfd
Fix cached inline modules (#2038)
* Fix cached inline modules

* Adds a changeset
2021-11-29 14:23:14 -05:00
Matthew Phillips
fad6bd0936
Use of PUBLIC_ environment variables (#2044)
* Enable client-side JS to read env variables via PUBLIC_

* Fixes use of PUBLIC_ in client-JS
2021-11-29 14:22:46 -05:00
github-actions[bot]
dd17a5b8d0
Version Packages (#2009)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-11-24 14:10:30 -07:00
Drew Powers
76559faa30
Chore: update compiler (#2008) 2021-11-24 12:39:08 -07:00
github-actions[bot]
0751808a2e
Version Packages (#1988)
* Version Packages (next)

* chore: update CHANGELOG

* fix: merge conflict

* fix: merge conflict

* chore: remove pre.json

* Version Packages

* Version Packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
2021-11-23 17:12:00 -06:00
Nate Moore
9ed6b3c0f0
chore: update compiler (#1995)
* chore: update compiler

* chore: bump compiler again

* chore: bump

* chore: update compiler
2021-11-23 16:42:59 -06:00
Drew Powers
8a5de03098
Fix client:visible (#1999)
Fixes #1963
2021-11-23 15:38:26 -07:00
Drew Powers
7a7427e425
Use URLs for styles, add CSS dev tests (#1993)
#1973
2021-11-23 13:10:22 -07:00
Drew Powers
4cec1256a4
Add default TypeScript, Sass support to Svelte (#1982) 2021-11-23 09:45:24 -07:00
Mikkel Tønder
3e1bdb1a3b
create-astro: Add a helpful message for the "could not find commit hash for ..." error (#1984)
* Add a helpful message for the "could not find commit hash for ..." error. This error mostly shows when someone tries to initialize a new project but git is not installed on their system.
2021-11-23 08:11:56 -06:00
github-actions[bot]
fff00e45f0
Version Packages (#1972)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-11-22 16:31:34 -05:00
Drew Powers
d3476f24d4
Add Sass tests (#1919) 2021-11-22 14:24:42 -07:00
Matthew Phillips
8cb779594e
Bring back building of non-hoisted scripts (#1977)
* Bring back building of non-hoisted scripts

Scripts inside of src/, whether hoisted are not should be built. This
makes that so. If not hoisted they do *not* get bundled together, but
rather are their own standalone modules. This matches 0.20 behavior.

Closes #1968

* Adds a changeset

* Fix windows breakage

* Debug windows

* More debugging

* make it not be parallel

* More windows

* Might fix it

* ARG

* Simpler test

* Remove the debugging
2021-11-22 16:17:01 -05:00