Commit graph

1742 commits

Author SHA1 Message Date
tony-sull
47d15870ff [ci] format 2022-06-07 21:22:13 +00:00
Tony Sullivan
3eb96a7ab7
Fix: Astro.site should default to localhost if not provided in config (#3552)
* Astro.site should be defaulted to localhost

* test: verify Astro.site default value

* chore: add changeset

* test: matching a URL regex to ignore specific port numbers
2022-06-07 21:20:20 +00:00
bholmesdev
c5db640dd2 [ci] format 2022-06-07 21:14:44 +00:00
Ben Holmes
a83d581714
Fix: --host flag logs when no network IPs are found (#3547)
* feat: add fallback log if no network interfaces found

* fix: extra newline on missing network log

* chore: changeset
2022-06-07 17:12:35 -04:00
Tony Sullivan
7816403306
Fix: bubbling up a more useful error message for unresolve imports in Astro components (#3540)
* vite-astro-plugin should ignore unresolved relative imports

* test: add error test for unresolved imports

* chore: add changeset

* moving the test to it's own describe

* chore: cleaning up the test's dev server

* TEMP: skipping the old test again to see if that's breaking CI

* test: verifying the dev server recovers

* TEMP: is it the new test breaking ubuntu CI?

* testing whether the errors suite only handles one test case in ubuntu

* disabling the Errors suite on linux for now to avoid reliability issues
2022-06-07 17:53:15 +00:00
github-actions[bot]
ec89def67d
[ci] release (#3534)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-07 12:45:50 -04:00
matthewp
0a978e22fd [ci] format 2022-06-07 15:43:33 +00:00
Matthew Phillips
f3ab822e32
Allow dynamic imports when using Netlify Edge Functions (#3535)
* Allow dynamic imports when using Netlify Edge Functions

* Update deno test script and changeset
2022-06-07 11:41:32 -04:00
matthewp
e8b2d829b4 [ci] format 2022-06-06 22:28:04 +00:00
Matthew Phillips
51c60de76c
Fix importing CSS packages in frontmatter (#3537)
* Fix importing CSS packages in frontmatter

* Formatting

* Only update if the source code contains the import

* Consolidate the two plugins

* we do need a pre and a post

* Adds a changeset
2022-06-06 18:26:15 -04:00
matthewp
88974f8b40 [ci] format 2022-06-06 18:48:00 +00:00
Matthew Phillips
d7688f05c2
Prevent minifying server JS (#3533)
* Prevent minifying server JS

* Add a changeset
2022-06-06 14:45:58 -04:00
tony-sull
2aa43549e0 [ci] format 2022-06-06 18:41:58 +00:00
Nate Moore
a87ce4412c
Improve HMR handling for styles, persisted islands (#3492)
* feat: improve HMR handling for styles, persisted islands

* Also using data-persist to keep injected <style>'s during HMR

* Updating E2E tests to validate that .astro HMR doesn't blow away component styles

* chore: add changeset

* copy/paste error when cleaning up tests

* big change - using inline <style> blocks instead of <link>s in dev

* Updating tests that were expecting <link> stylesheets in dev

* updating all E2E tests to use workspace versions for astro deps

* TEMP: adding debug logging to see why the Ubuntu test only fails in CI

* fix: Svelte styles are automatically handled by Vite, we can skip them in dev

* fix: svelte is more interesting, we need Astro to inject styles only until hydration

* avoiding extra HMTL noise by only including the data-astro-injected URL for svelte components

* TEMP: ubuntu CI doesn't like the svelte HMR test...

* disabling the svelte component test on ubuntu for now

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
2022-06-06 18:39:48 +00:00
FredKSchott
f0f6a3332f [ci] format 2022-06-06 16:49:53 +00:00
Fred K. Schott
5b06398b7b
format: automatically organize imports and removed unused (#3499)
* add import formatting

* chore: update lockfile

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-06-06 09:47:28 -07:00
matthewp
8bb28b48ee [ci] format 2022-06-06 16:03:17 +00:00
Matthew Phillips
c22a07db13
Fix use of dynamic imports / Astro.glob with Deno Deploy (#3532)
* Fix use of dynamic imports / Astro.glob with Deno Deploy

* Adds a changeset

* Mark the markdown package as external
2022-06-06 12:02:13 -04:00
github-actions[bot]
9029c43549
[ci] release (#3512)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-06 09:40:09 -04:00
bholmesdev
ff6c9490a0 [ci] format 2022-06-06 13:28:30 +00:00
Ben Holmes
85b905495d
Fix: refusing to accept isSelfAccepting for JSX (#3521)
* fix: generate client directive scripts from metadata

* chore: changeset

* feat: add all runtime client scripts to optimized deps

* fix: remove hmr.js from optimized deps (monorepo-specific issue)

* Revert "fix: generate client directive scripts from metadata"

This reverts commit 56530a86ef.

* refactor: move optimizedeps to dev only

* docs: add comment on why optimizdeps

* nit: indentation
2022-06-06 09:27:35 -04:00
matthewp
2dbf2234ae [ci] format 2022-06-03 17:01:54 +00:00
Fred K. Schott
25fa0f527d
[ci] update lockfile (#3515)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-03 13:00:47 -04:00
Matthew Phillips
df7c43df63
Allow importing .ts files with .js extension (#3518)
* Allow importing .ts files with .js extension

* Adds a changeset

* Make it also work in .md files
2022-06-03 13:00:28 -04:00
natemoo-re
d9a67d36dc [ci] format 2022-06-03 13:54:25 +00:00
Maurer Krisztian
93d0225ade
refactor(config): refactor duplicated default config values (#3504)
* refactor(config): refactor duplicated default configs

* refactor(config): constant CONSTANT_CASE, remove export
2022-06-03 08:53:38 -05:00
natemoo-re
ae14595407 [ci] format 2022-06-03 13:39:43 +00:00
hippotastic
6c955ca643
Fix Markdown errors missing source filename (#3514) 2022-06-03 08:38:57 -05:00
hippotastic
3057801591
Fix: Allow self-closing tags in Markdown (#3516) 2022-06-03 08:38:45 -05:00
nokazn
939fe15925
Fix cases for JSX-like expressions in code blocks of headings (#3502)
* chore: fix typo in remark tests

* test: add test cases for markdown expressions in header

* fix: avoid evaluating JSX-like expressions inside inline code in heading

* fix: generate slug for id including values in backtick blocks
2022-06-03 08:26:39 -04:00
Nate Moore
2fedb97489
Patch Lit server shim to fix sass compatability (#3511)
* fix(#2623, #3508): patch lit server shim to allow sass compat

* chore: add changeset
2022-06-02 14:45:11 -05:00
github-actions[bot]
a74cf98002
[ci] release (#3509)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-02 15:31:44 -04:00
Fred K. Schott
88cd7525be
[ci] update lockfile (#3501)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-02 15:30:46 -04:00
Matthew Phillips
4a23b5aaed
provide import.meta.env.SITE when there are private envs (#3498)
* provide import.meta.env.SITE when there are private envs

* Adds a changeset

* Handle destructing of import.meta.env.SITE
2022-06-02 13:21:10 -05:00
natemoo-re
c6e7355468 [ci] format 2022-06-02 18:04:50 +00:00
Nate Moore
cf2fb3004e
Pass optimizeDeps.include to silence build warning (#3507)
* fix(build): pass `optimizeDeps.include` to silence build warning

* chore: add changeset
2022-06-02 13:03:59 -05:00
Nate Moore
d41540cc77
Fix <link> tag not being self-closing (#3506)
* fix(#392): ensure link tags are rendered as void elements

* test: ensure html does not include a `</link>` end tag

* chore: add changeset
2022-06-02 13:03:37 -05:00
William Tetlow
207f58d171
fix: alias astro to @types/astro (#3503)
* fix: alias astro to @types/astro

* fix: handle resolve.alias being array

* chore: add integrations patch to changeset

* chore: remove empty file
2022-06-02 12:54:35 -05:00
github-actions[bot]
67ad33debf
[ci] release (#3488)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-02 13:42:18 -04:00
bholmesdev
b6b045c3f1 [ci] format 2022-06-02 17:35:51 +00:00
Ben Holmes
2b35650b5d
Fix: newline characters in Solid (#3505)
* fix: remove source map consumption from babel transform

* refactor: move inputSourceMap to integration option

* tests: add newline ex to test build and dev

* chore: change back to babel.transformAsync

* chore: changeset
2022-06-02 13:35:03 -04:00
natemoo-re
6b54eb460f [ci] format 2022-06-01 22:33:18 +00:00
Ben Holmes
9c2ba13748
Add console warning on fs.strict=false (#3464)
* chore: add warning on fs.strict=false

* chore: add changeset

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-06-01 17:32:29 -05:00
Dan Jutan
5c32c7a4c3
Integration Docs: Tailwind (#3429)
* test commi

* add video

* test video include

* actually close the tag

* try directly pasting the video link

* remove the quote I forgot about

* figured out how to properly upload a video to github

* remove unneeded media directory

* why tailwind

* Installation and Usage

* Troubleshooting

* Add examples section

* Update packages/integrations/tailwind/README.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/integrations/tailwind/README.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/integrations/tailwind/README.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/integrations/tailwind/README.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* TOC + layout tweaks

* separated, and example re: warning to not use Tailwind with other styling method

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-06-01 17:30:36 -05:00
Matthew Phillips
d588bc4a9c
Update rollup to prevent empty slot bug (#3496)
* Update rollup to prevent empty slot bug

* Adds a changeset

* Updated lockfile

* provide import.meta.env.SITE when there are private envs
2022-06-01 12:21:32 -04:00
Fred K. Schott
cfb85ee10e
[ci] update lockfile (#3495)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-01 10:39:32 -05:00
tony-sull
74a034c2cd [ci] format 2022-05-31 18:13:53 +00:00
Tony Sullivan
10b2589093
Fixing HMR for hoisted scripts (#3427)
* WIP: the leading /@fs broke script HMR

* Revert "WIP: the leading /@fs broke script HMR"

This reverts commit 84fce366268033261369aed48f909e59e78bf3e4.

* Metadata needs to strip off /@fs from hoisted script URLs

* adding a test for hoisted script HMR support

* removing 2 second timeout on navigation, allow default 30 seconds

* simplifying the hoisted script test sync

* TEMP: bubbling up console logs to track down windows failure

* removing temp logging

* disabling the test on windows for now

* chore: adding changeset
2022-05-31 18:13:05 +00:00
github-actions[bot]
b2f955ec1b
[ci] release (#3485)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-31 13:40:19 -04:00
natemoo-re
9a31e6f1d5 [ci] format 2022-05-31 17:17:36 +00:00
hippotastic
119ecf8d46
Fix components in markdown regressions (#3486)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-05-31 12:16:43 -05:00
natemoo-re
e02c72f445 [ci] format 2022-05-31 16:47:13 +00:00
Fred K. Schott
c9d8b10a85
[ci] update lockfile (#3448)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-31 11:46:13 -05:00
Nate Moore
e9a77d8619
Improve nested and client:only hydration (#3455)
* wip: fix nested islands

* fix: improve hydration for dynamic content

* chore: fix bundle-size script for new files

* chore: allow-list client:* directive files

* fix(#3362): fix client:only behavior for React, Vue, Solid

* test: add client-only e2e test

* chore: update lockfile

* test: fix e2e tests

* test: add framework nesting e2e tests

* Update packages/astro/src/runtime/client/events.ts

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

* chore: add changeset

* fix(preact): ignore hydrate roots

* chore: remove `ssr` check in integrations

* Revert "chore: remove `ssr` check in integrations"

This reverts commit ba27eaae55.

* chore: add changeset

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-05-31 11:29:36 -05:00
bholmesdev
40614597cc [ci] format 2022-05-31 16:09:23 +00:00
Ben Holmes
d145b8689c
Chore: remove rss helper from getStaticPaths (#3462)
* chore: remove rss() with helpful error message

* docs: add context on "getStaticPaths" removal

* chore: changeset

* deps: remove fast-xml-parser from core!

* chore: update lockfile
2022-05-31 12:08:09 -04:00
Matěj Volf
b795a085f0
Load environment variables in deno SSR (#3483)
* Properly shim env in Deno

* Add test for loading env vars in Deno

* Add changeset
2022-05-31 11:41:33 -04:00
matthewp
1aeb1d0a00 [ci] format 2022-05-31 15:41:24 +00:00
Matthew Phillips
efccebb964
Set the correct content-type for CSS HMR (#3459)
* Set the correct content-type for CSS HMR

* Adds a changeset
2022-05-31 11:40:34 -04:00
Matthew Phillips
55820fa784
Lit polyfill - wait to polyfill on DOMContentLoaded (#3484)
* Lit polyfill - wait to polyfill on DOMContentLoaded

* Adds changeset
2022-05-31 11:40:26 -04:00
matthewp
5e66ffb3a0 [ci] format 2022-05-31 14:12:38 +00:00
Rafid Muhymin Wafi
0ead51ae9c
fixed APIRoute type (#3365)
* fixed APIRoute type

* fixed EndpointHandler type
2022-05-31 10:10:57 -04:00
github-actions[bot]
16345032aa
[ci] release (#3479)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-30 13:06:41 -04:00
bholmesdev
d195f583e3 [ci] format 2022-05-30 16:19:39 +00:00
hippotastic
75fa58f13f
Fix using Vite env var names in Markdown (#3412) (#3471) 2022-05-30 12:18:43 -04:00
hippotastic
429b65d60b
Fix */ breaking HTML comments in Markdown (#3477) 2022-05-30 12:18:33 -04:00
github-actions[bot]
42aa6daa96
[ci] release (#3463)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-27 18:09:20 -04:00
bholmesdev
9d671d178a [ci] format 2022-05-27 20:57:04 +00:00
Ben Holmes
47d1a8d59c
Feat: markdown content.raw() and content.compiled() helpers (#3452)
* feat: add rawContent obj with html helper

* refactor: change toString to function call

* test: rawContent helpers

* chore: update MarkdownInstance type

* refactor: parseHtml -> html

* chore: changeset

* fix: remove needless async heading on content version

* fix: fixLineEndings helper on unit tests

* refactor: change api to raw and compiled

* chore: add new type to env.d.ts

* docs: JSdocs for raw and compiled

* refactor: change API AGAIN to rawContent, compiledContent

* chore: update changeset
2022-05-27 16:56:08 -04:00
Fred K. Schott
ffe5cf0312
update typescript (#3456) 2022-05-27 14:53:04 -05:00
github-actions[bot]
e6d8670168
[ci] release (#3453)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-26 14:25:10 -04:00
matthewp
edf2838a66 [ci] format 2022-05-26 18:01:35 +00:00
Matthew Phillips
ac3c60d48d
Fix VITE_ASSET bug (#3439)
* Fix VITE_ASSET bug

* Updated test that depended on esbuild output

* Fix some more tests

* Fix css config and postcss tests

* Git client only working

* Fix static build test

* Update tailwind tests

* Fix build

* Fix css bundling tests

* Updated some more tests for windows

* Remove tests that are no longer relevant

* Cause it to break

* Fix bug and add explanation

* Adds a changeset

* Inline comments about what the hashing is doing

* Update packages/astro/src/vite-plugin-build-css/index.ts

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

* Update to the lockfile

* Minify css

* Update tailwind tests

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-05-26 14:00:36 -04:00
Nate Moore
2f4ee560dd
Add bundle-size check action (#3454)
* feat: add scripts action, bundle-size checker

* chore: trigger action

* fix: update prefix logic
2022-05-26 11:49:29 -05:00
matthewp
d92d28317f [ci] format 2022-05-26 14:20:02 +00:00
Joaquín Sánchez
79b9ebc83a
feat: expose route dist URL on SSG (#3438)
* feat: expose route dist URL on SSG

* chore: add changeset

* chore: add test for `distURL`

* cleanup: remove console.log from test
2022-05-26 10:19:19 -04:00
github-actions[bot]
8a49ad23bf
[ci] release (#3446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-26 06:48:47 -04:00
Ben Holmes
51db2b9b4e
Fix: markdown imports failing (#3444)
* fix: revert JSX expression hack (temporary!)

* chore: changeset

* fix: skip stray JSX expression test

* Revert "fix: skip stray JSX expression test"

This reverts commit fd3042d003.

* Revert "fix: revert JSX expression hack (temporary!)"

This reverts commit b78883fca1.

* fix: add markdown-remark to external deps!
2022-05-25 20:47:28 -04:00
github-actions[bot]
f200ddadbc
[ci] release (#3435)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-25 10:42:03 -05:00
natemoo-re
cb039219ef [ci] format 2022-05-24 22:03:29 +00:00
Nate Moore
cfae9760b2
Improve Markdown + Components usage (#3410)
* feat: use internal MDX tooling for markdown + components

* fix: improve MD + component tests

* chore: add changeset

* fix: make tsc happy

* fix(#3319): add regression test for component children

* fix(markdown): support HTML comments in markdown

* fix(#2474): ensure namespaced components are properly handled in markdown pages

* fix(#3220): ensure html in markdown pages does not have extra surrounding space

* fix(#3264): ensure that remark files pass in file information

* fix(#3254): enable experimentalStaticExtraction for `.md` pages

* fix: revert parsing change

* fix: remove `markdown.mode` option
2022-05-24 17:02:11 -05:00
Caio Ferrarezi
78e962f744
Add base config option to partytown snippet generation (#3437)
* fix: add base config option to partytown snippet generation

* add changeset

* fix: handle config.base for partytown

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-05-24 15:44:40 -05:00
natemoo-re
03b2ef4b67 [ci] format 2022-05-24 19:40:24 +00:00
Nate Moore
4ca60e9344
Ensure hoisted scripts are deduplicated in build (#3433)
* fix(build): ensure hoisted scripts are deduplicated in build

* chore: add changeset
2022-05-24 14:39:23 -05:00
Nate Moore
62036eefc8
fix: use error log level since warnings are irrelevant and noisy (#3436) 2022-05-24 14:38:39 -05:00
natemoo-re
58b78229c1 [ci] format 2022-05-24 16:59:29 +00:00
Nate Moore
296fff2cff
fix: properly handle scoped class injection with spread attributes (#3384)
* fix: properly handle scoped class injection when a spread attribute is present

* chore: update lockfile

* chore: revert lockfile

* chore: update compiler

* test: add spread scope test

* test: fix spread scoped test
2022-05-24 11:58:21 -05:00
Fred K. Schott
ccaea99765
[ci] update lockfile (#3419)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-24 11:43:37 -05:00
Ben Holmes
946630a112
Fix: add "CSS" to noExternal hint (#3426)
* chore: add "CSS" to noExternal hint

* chore: changeset
2022-05-24 11:43:07 -05:00
Joaquín Sánchez
9ba2c7084a
feat: use Vite's logLevel on SSR build (#3431)
Instead using `error` as default value, use the Vite's default `logLevel`: `info`
2022-05-24 11:30:43 -05:00
matthewp
752a108808 [ci] format 2022-05-24 15:35:08 +00:00
Matthew Phillips
463a1c2147
Fix: Relative imports inside of hosited script on windows (#3423)
* Failing test

* Add some debugging

* Normalize filename to remove @fs prefix

* Adds a changeset

* Break it again

* Fix it

* Update assertion
2022-05-24 11:34:08 -04:00
tony-sull
eb4382a251 [ci] format 2022-05-23 20:53:42 +00:00
Tony Sullivan
0209d6276c
Updates hydration scripts to use absolute paths (#3422)
* WIP: proof of concept fix to use absolute paths

* correct fix to handle absolute paths and config.base

* adding tests for hydration scripts with config.base

* chore: add changeset

* fix: ensure posix paths are used for Windows compat
2022-05-23 20:52:48 +00:00
Matthew Phillips
28ede84a88
Split up e2e HMR test (#3425) 2022-05-23 15:56:38 -04:00
github-actions[bot]
8eec97fdd1
[ci] release (#3409)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-23 13:26:07 -04:00
tony-sull
d0720ccfb4 [ci] format 2022-05-23 16:57:55 +00:00
Tony Sullivan
ff56f083bc
Adding E2E tests for client hydration and HMR (#3374)
* adding Tailwind E2E tests with Playwright

* package.json updates

* adding e2e tests to CI workflow

* using e2e for dev tests, mocha for build tests

* refactor: sharing test-utils helpers

* chore: update lockfile

* Adding contributing docs

* Revert "refactor: sharing test-utils helpers"

This reverts commit 48496f43bc99eab30747baf6e83041ba4932e786.

* refactor: simpler solution to resolving e2e test fixtures

* chore: updating lockfile

* refactor: cleaning up how URLs are resolved in e2e tests

* install playwright deps in CI

* ensure playwright deps are installed during CI

* adding a basic HMR test for tailwind styles

* using @e2e for playwright test packages

* adding react hydration and HMR tests

* adding hydration and HMR tests  for preact

* adding svelte hydration and HMR tests

* adding solid-js hydration and HMR tests

* adding solid hydration and HMR tests

* adding vue hydration and HMR tests

* adding client:media tests

* fixing Lit hydration and HMR tests

* fixing up the Vue e2e tests

* fixing up svelte tests

* chore: test cleanup

* chore: cleaning up test element IDs

* chore: updating lock file

* chore: update lockfile after merge

* TEMP: disabling React e2e tests

* Revert "TEMP: disabling React e2e tests"

This reverts commit ed1bad9cbc.

* updating to use the new editFiles helper

* chore: updating lock file

* updating lock file

* updating lockfile

* TEMP: watching for console logs

* TEMP: testing typescript tests

* updating test:e2e scripts for config file

* seems like it didn't find the config file?

* use a fresh dev server for each test

* removing Lit tests for now

* Revert "removing Lit tests for now"

This reverts commit 4970a8093e.

* updating test config for CI

* WIP: disabling HMR tests to track down why they're unreliable

* TEMP: logging to debug HMR test

* afterEach isn't a global in Playwright

* fix: the test's file reset helper was using a URL not filepath

* one last try, why is the HMR test hanging at cleanup?

* resetting files after tailwind HMR test

* create the onNextChange watcher before editFile is called

* moving the file changed sync into editFile()

* code refactor + Astro Component HMR test

* chore: lint fixes

* adding a test suite for the framework-multiple example app
2022-05-23 16:56:45 +00:00
Pranav Karawale
63c26c1b24
Fix GitHub Issue creation link (closes #3257) (#3421)
* Add IDs to bug report issue form
* Replace 'body' with correct input id for prefilling form
2022-05-23 11:02:03 -05:00
bholmesdev
62e0efa043 [ci] format 2022-05-20 21:27:42 +00:00
Ben Holmes
4de53eccef
Fix: support FormData object on fetch body (#3417)
* refactor: make node-fetch external in rollup build

* deps: make node-fetch standard dep

* refactor: switch to node-fetch pkg ref in fetch.ts

* chore: changeset

* chore: bump webapi to minor change
2022-05-20 17:26:41 -04:00
tony-sull
d296eb63eb [ci] format 2022-05-20 20:08:13 +00:00
Tony Sullivan
d372d29ef8
Fix: Only trim /1 from the canonical URL for paginate() routes (#3393)
* only trim /1 from canonical URLs for paginate() routes

* chore: fixing eslint warning

* chore: add changeset

* typo: copy paste error

* adding a test validation error message

* verifying canonical for all three test routes

* TEMP: extra test logging to track down the failure

* TEMP: additional test logging to see what the failing CLI messages are

* TEMP: digging deeper, it's getting stuck on port 3000 is taken

* TEMP: why is it breaking when LOCAL isn't logged?

* TEMP: still digging, strange how consistent this failure is

* finally found it - the new test wasn't closing the dev server...
2022-05-20 20:07:30 +00:00
tony-sull
1f148dbcfd [ci] format 2022-05-20 19:59:55 +00:00
Tony Sullivan
6373508458
Enforcing routing priority during production builds (#3407)
* WIP: have a few test failures to track down

* WIP: still a few failures to fix

* WIP: fixes the issue of dynamic routes stepping on static routes

* Resolve route priority before building routes for `getStaticPaths()`

* chore: adding comments explaining why this filter is needed

* chore: adding changeset

* got too fancy with the test suite, these routes weren't valid

* simplifying the test cases

* TEMP: is this test breaking my CI run?

* Revert "TEMP: is this test breaking my CI run?"

This reverts commit 291af2a1b6f075ebfc74002886e43110731b3e1b.

* slots-preact didn't list @astrojs/preact as a dep

* reverting copy/paste error
2022-05-20 19:58:59 +00:00
Matthew Phillips
60d7164015
Upgrade the compiler (#3416) 2022-05-20 15:08:50 -04:00
bholmesdev
421eb3b5d4 [ci] format 2022-05-20 19:04:21 +00:00
Ben Holmes
fb5572bebd
Fix: components in imported markdown (#3398)
* test: add with-components to astro-markdown fixture

* fix: markdown pathname with /@fs prefix

* feat: add loadMetadata helper for md

* feat: fix components in Astro.glob results!

* fix: md import path

* Revert "feat: add loadMetadata helper for md"

This reverts commit 76cf96f4be3d0e19589f84025c0131352d0b6cc8.

* fix: add back $$loadMetadata helper

* feat: add second comp framework to md test

* chore: core/render/dev lint

* chore: changeset

* fix: short circuit if mod doesn't have metadata

* fix: skip mod graph preloading in dev

* refactor: make md metadata check recursive

* refactor: extract metadata helper to util

* fix: remove unecessary mod graph query

* fix: move md import flag to util for deno bundling issue

* fix: remove 'dev' mode from test utils build

* feat: add global hashset for seen metadata

* refactor: flip Promise.all to for await for perf!

* Revert bc I was wrong! "refactor: flip Promise.all to for await for perf!"

This reverts commit da8a6873f5.
2022-05-20 15:03:21 -04:00
Fred K. Schott
195f3f7eb7
[ci] update lockfile (#3414)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-20 12:02:10 -05:00
Nate Moore
b26d48d275
Defer head injection until renderPage (#3408)
* fix(#3195, #3197): only perform head injection for renderPage

* chore: add changeset
2022-05-19 15:21:48 -05:00
github-actions[bot]
4dfd341928
[ci] release (#3405)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-19 13:35:19 -04:00
Matthew Phillips
a35c89d2ac Fix react spectrum test lockfile issue 2022-05-19 13:27:08 -04:00
matthewp
435518845f [ci] format 2022-05-19 17:12:59 +00:00
Matthew Phillips
4007aebc6a
Provide a good error message when loading react spectrum (#3406)
* Provide a good error message when loading react spectrum

* Adds a changeset
2022-05-19 13:12:04 -04:00
natemoo-re
e9c137cf5f [ci] format 2022-05-19 15:50:10 +00:00
Nate Moore
d34859d750
Expose file and url for Astro files (#3385)
* feat: update test

* feat: return `file` and `url` for astro files

* chore: add changeset

* fix: use private names $$file and $$url

* test: update markdown test

* chore: update fileId logic to strip query params
2022-05-19 10:49:14 -05:00
Fred K. Schott
a7480452b1
[ci] update lockfile (#3404)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-19 10:22:27 -05:00
matthewp
e118b8a91d [ci] format 2022-05-19 12:39:11 +00:00
Matthew Phillips
0c9f770e8a
Include server CSS in the manifest assets (#3402)
* Include server CSS in the manifest assets

* Adds a changeset
2022-05-19 08:38:27 -04:00
github-actions[bot]
b330c5b72e
[ci] release (#3400)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-18 21:36:32 +00:00
tony-sull
f1d7d543b0 [ci] format 2022-05-18 20:10:07 +00:00
Tony Sullivan
0d3c673dd9
Fix: Support .html requests in dev (#3401)
* WIP: this regex should handle .html as well

* much simpler!  Just fix the req.url, don't touch the manifest

* only handle .html requests when config.build.format === 'file'

* chore: add changeset
2022-05-18 20:09:23 +00:00
matthewp
43cfd7e769 [ci] format 2022-05-18 19:12:28 +00:00
Matthew Phillips
2939be5f2d
Allow overriding build vite config options (#3392)
* Allow overriding build vite config options

* Adds a changeset

* Test svelte

* Move plugins down

* Assign after for the client too

* Spread output options on manually

* Remove .only
2022-05-18 15:11:40 -04:00
bholmesdev
54aba7231d [ci] format 2022-05-18 15:46:22 +00:00
Ben Holmes
1bf12260af
Fix: update "building for SSR" messaging on SSG (#3399)
* fix: update "building for SSR" messaging on SSG

* chore: changeset
2022-05-18 11:45:23 -04:00
Nate Moore
cf8015eaa2
fix: locale handling for logger (#3391)
* fix(#3309): use system default locale

* fix(#3309): use system default locale in create-astro

* test: add locale regression tests

* test: add i18n regression test
2022-05-18 10:45:09 -05:00
Matthew Phillips
6cec1b8ef2
Re-enable error recovery test (#3396)
* Re-enable error recovery test

* Doing some debugging

* Remove extra debugging

* longer wait

* make it wait even longer just to check

* Wait a very long time

* await the change, and then a little bit

* Give a longer timeout for the error recovery test

* OK, make it *very* long

* Run error tests separately

* Get rid of wait
2022-05-18 11:20:06 -04:00
Nate Moore
1297c10480
Fix tests: remove it.only (#3394)
* test: remove it.only

* test: skip failure until #3376 is revisited
2022-05-18 08:27:52 -04:00
Tony Sullivan
d8e5dfb977
Matching custom 404 pages using the manifest's route patterns (#3390)
* matching custom 404 pages using the manifest's route patterns

* windows: still need to use the relative paths for 404 matching
2022-05-17 21:27:06 +00:00
github-actions[bot]
f54072bd3f
[ci] release (#3378)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-17 11:50:18 -04:00
matthewp
42251f3eb4 [ci] format 2022-05-17 15:46:01 +00:00
Fred K. Schott
d102cab126
[ci] update lockfile (#3386)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-17 11:44:50 -04:00
Matthew Phillips
4d00473dbd
Error recovery test and more (#3388)
* Add test to verify errors are recovered from

* Fix nested style components not be added in dev on initial load

* Adds a changeset
2022-05-17 11:43:49 -04:00
Tony Sullivan
387ed0cfa1
Deprecate @astrojs/turbolinks (#3383)
* deprecating the Turbolinks integration

* chore: add changeset
2022-05-16 18:08:49 -05:00
matthewp
3ceff25959 [ci] format 2022-05-16 18:45:15 +00:00
Sarah Etter
43d922277a
Update out directories for Netlify Functions (#3381)
* Change out directories for Netlify Functions

* Changeset

* Update test
2022-05-16 14:44:21 -04:00
Matthew Phillips
0259d7658b
Fix for loading markdown pages with spaces in the name (#3379)
* Fix for loading markdown pages with spaces in the name

* Adds a changeset
2022-05-16 14:44:15 -04:00
Juan Martín Seery
9d01f93b1c
feat(vercel): remove nodeVersion (#3368)
* Remove `nodeVersion`

* Changeset
2022-05-16 13:34:46 -05:00
Fred K. Schott
9dd16bace5
[ci] update lockfile (#3363)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-16 13:33:16 -05:00
natemoo-re
58cca31e79 [ci] format 2022-05-16 18:32:54 +00:00
Mark Leung
31b0bc87a4
Add options to partytown integration (#3380)
* Add options to partytown integration

* Update doc
2022-05-16 13:32:05 -05:00
matthewp
77beab072f [ci] format 2022-05-16 16:17:25 +00:00
Daniel Vivar
fe61e469b2
test(@astrojs/lit): adding tests (#3375)
* test(@astrojs/lit): adding tests

* changeset
2022-05-16 12:16:30 -04:00
Sarah Etter
e1294c422b
Netlify outdirectory (#3377)
* Change dist directory, and functions out directory

* Add changeset

* update docs

* Fix changeset
2022-05-16 11:58:31 -04:00
matthewp
e8007c3b8f [ci] format 2022-05-16 15:39:02 +00:00
Matthew Phillips
b1230152ff
Support alias use with hydration scripts (#3376)
* Support alias use with hydration scripts

* Adds a changeset

* Updated lockfile
2022-05-16 11:37:51 -04:00
tony-sull
4f413ad771 [ci] format 2022-05-15 21:48:18 +00:00
Tony Sullivan
2b622b5e0f
Adding E2E testing with Playwright (#3349)
* adding Tailwind E2E tests with Playwright

* package.json updates

* adding e2e tests to CI workflow

* using e2e for dev tests, mocha for build tests

* refactor: sharing test-utils helpers

* chore: update lockfile

* Adding contributing docs

* Revert "refactor: sharing test-utils helpers"

This reverts commit 48496f43bc99eab30747baf6e83041ba4932e786.

* refactor: simpler solution to resolving e2e test fixtures

* chore: updating lockfile

* refactor: cleaning up how URLs are resolved in e2e tests

* install playwright deps in CI

* trying pnpm playwright install to fix version mismatch
2022-05-15 21:47:28 +00:00
github-actions[bot]
2e414c3e70
[ci] release (#3356)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-12 16:11:35 -06:00
Juan Martín Seery
945f5c68e8
fix(vercel): added type definitions (#3355)
* Added missing types

* Changeset
2022-05-12 16:59:07 -05:00
github-actions[bot]
cedb9a2105
[ci] release (#3334)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-12 14:48:58 -06:00
Juan Martín Seery
4ac792a02d
Serialize route generation (#3354) 2022-05-12 14:39:17 -06:00
Rafid Muhymin Wafi
9481a3c08d
Corrected the default value of trailingSlash (#3353) 2022-05-12 15:38:48 -05:00
Eloi-Perez
ea104dde91
Add config option customPages (#3315)
* Add config option customPages

Add config option customPages to be able to add custom URL pages to the sitemap.xml

* add comment to document customPages option
2022-05-12 14:19:58 -06:00
Juan Martín Seery
8685506174
fix: vite types (#3352)
* Re-export vite types and added them to zod schema

* Removed casted typed

* Changeset
2022-05-12 13:55:29 -03:00
Fred K. Schott
7cd4b1bc12
[ci] update lockfile (#3287)
* [ci] update lockfile

* chore: fix lockfile

* fix: pin turbo

Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
2022-05-12 11:42:34 -05:00
matthewp
4838c51081 [ci] format 2022-05-12 16:30:41 +00:00
Fred K. Schott
e48aa2fd1e
add error hints (#3350)
* add error hints

* chore: add changeset

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-05-12 10:29:59 -06:00
matthewp
8666f22a0f [ci] format 2022-05-12 16:06:40 +00:00
Ben Holmes
678c2b7523
Fix: React - Use "createRoot" instead of "hydrateRoot" for client:only (#3337)
* feat: pass "client" directive to clientEntrypoints

* refactor: remove hydration warning suppression react 17

* feat: remove hydration warning suppression react 18

* chore: changeset

* fix: change metadata to options bag
2022-05-12 10:05:55 -06:00
matthewp
13e697fb80 [ci] format 2022-05-12 16:05:06 +00:00
Tony Sullivan
b463ddb3ce
Resolve components by module ID during compilation (#3300)
* WIP: adding test coverage

* test fixes

* moving the shared lib up a directory to reproduce the bug

* fix: transform with the module ID instead of parsing the filepath

* adding the shared lib to the workspaces list

* fix: client-only assets now get the full URL from vite

* why is this needed for windows?

* WIP: using /@fs to handle windows filepaths

* fix: remove /@fs from hoisted script imports

* nit: removing unused imports

* fix: strip off the path root when mapping client:only styles

* had to reverse the `/@fs` handling to work on windows and unix

* chore: adding comments to explain the fix

* chore: adding changeset
2022-05-12 10:04:01 -06:00
Nate Moore
43e411eed8
Exclude node-fetch from vite.optimizeDeps (#3348)
* fix: exclude `node-fetch` from vite.optimizeDeps

* chore: format
2022-05-11 15:26:01 -06:00
Juan Martín Seery
114bf63e11
refactor(vercel): Build Output API v3 (#3216)
* Removed ignores

* Migration to v3

* More changes

* Remove legacy redirects

* Fail when there is no ENABLE_VC_BUILD

* Fix edge

* Updated readme

* Changeset

* Added static mode

* Updated documentation

* Updated shim

* Made edge work!

* Updated changeset

* Ensure empty dir

* Fixed redirects for dynamic paths

* Removed extra declaration

* Splited imports

* Updated readme

* Fixed some urls

* Deprecated shim!

* [test]: Vercel NFT

* Beautify

* Edge bundle to node 14.19

Vercel runs 14.19.1 (I've checked it manually)

* Re-added shim (#3304)

* Added `node:` prefix

* Use the same bundling as Deno for Edge

* Remove esbuild

* Fixed shim

* Moved nft

* Updated changeset

* Added note about Edge

* fix typo

* Added support for Node 16 (vercel/vercel#7772)
2022-05-11 15:10:38 -06:00
Matthew Phillips
46cd8b9eb4
Fix APIRoute type (#3344)
* Fix APIRoute type

* Adds a changeset

* Update usage of the two API route signatures
2022-05-11 15:07:40 -06:00
Ben Holmes
1a5335ed9a
[create-astro] Finalize developer experience... with gradients 🚀 (#3313)
* wip: port gradient helpers from sandbox ideas

* feat: wire up rocket gradient 🚀

* feat: wire up rocket gradient on install step

* refactor: update "next steps" wording

* deps: add chalk (for rendering gradient)

* chore: changeset

* chore: clean up sstray template string
2022-05-11 10:38:42 -06:00
Jonas Luebbers
abc5b219bb
Remove try/catch from solid component check (#3282)
* Remove try/catch from solid component check

* Move try/catch to renderComponent

* Add solid to integrations-playground example
2022-05-11 10:23:34 -06:00
matthewp
380acd23de [ci] format 2022-05-11 15:25:30 +00:00
Sarah Rainsberger
74510a9607
Update markdown.remark/rehypePlugins defaults for docs (#3321)
Updating defaults used in the documentation
2022-05-11 09:24:26 -06:00
Nate Moore
ca4e3aa048
fix: allow Astro to pass process.env variables to import.meta.env (#3327) 2022-05-11 09:23:55 -06:00
Fred K. Schott
ce6d798282
Fix peer deps issue in svelte and vue plugins (#3333)
* fix peer deps issue

* add changeset

* rebuild lockfile
2022-05-11 09:23:32 -06:00
Matthew Phillips
ccea6a0a1a
HMR hoisted scripts (#3336)
* HMR hoisted scripts

* Add to the dep graph

* Remove example change

* Adds changeset

* Fix markdown test
2022-05-11 09:23:11 -06:00
matthewp
3bb07a01e0 [ci] format 2022-05-11 15:14:43 +00:00
Yuji Sugiura
efe4f1a3ef
Fix GetStaticPathsOptions types (#3341) 2022-05-11 09:13:47 -06:00
Pascal Schilp
352fc3166f
Fix/netlify edge redirects (#3342)
* fix: create redirects file for netlify edge adapter

* chore: changeset

* chore: distinguish between edge/regular
2022-05-11 09:13:23 -06:00
matthewp
9c98ba81e1 [ci] format 2022-05-11 14:54:52 +00:00
Pascal Schilp
3dc68e148e
fix: inject script for ssr mode (#3339)
* fix: inject script for ssr mode

* chore: changeset
2022-05-11 08:53:53 -06:00
tony-sull
0913afb255 [ci] format 2022-05-10 21:06:25 +00:00
Tony Sullivan
e22f7364ce
Fixes custom 404 pages in astro dev (#3331)
* Fixing pathname matching for custom 404 pages

* fixes custom 404 routes in dev

* refactor: removing node path dependency

* refactor: using core's path utils
2022-05-10 21:05:30 +00:00
Fred K. Schott
d04928e8f2
rename dts to ts file (#3332)
* rename dts to ts file

* Create new-carrots-cough.md

* add back missing types
2022-05-10 14:54:01 -06:00
Chris Swithinbank
ee55d492b5
docs: Update server options configuration reference (#3295)
Based on https://github.com/withastro/docs/pull/422/

Co-Authored-By: Rafid Muhymin Wafi <63650415+RafidMuhymin@users.noreply.github.com>

Co-authored-by: Rafid Muhymin Wafi <63650415+RafidMuhymin@users.noreply.github.com>
2022-05-07 09:56:39 +02:00
[object Object]
2864d09ad4
Fix tailwind integration in markdown files (#3305)
* Fix tailwind integration in markdown files

* 3 character PR -> 9 character PR
2022-05-06 13:01:04 -04:00
github-actions[bot]
4639a048d7
[ci] release (#3308)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-06 09:28:57 -04:00
matthewp
adc94076f7 [ci] format 2022-05-06 13:23:09 +00:00
Matthew Phillips
8021998bb6
Add new configKeys prop for telemetry (#3299)
* Add new configKeys prop for telemetry

This property lets us known which AstroConfig keys are being used, for anonymous telemetry.

* Adds a changeset

* Restructure how the telemetry event is shaped
2022-05-06 09:22:27 -04:00
Tony Sullivan
19e1686b87
Allowing Vite to handle base config for deploying to subpaths (#3178)
* Revert "Improvements to build and dev when building for subpaths (#3156)"

This reverts commit 637919c8b6.

* letting Vite handle base paths

* test updates to expect Astro.request.url to no longer include subpaths

* bringing back the fix for including subpaths in injects scripts and styles

* fixing the static-build test to handle subpaths for injected CSS

* fixing asset import URLs when using base subpaths

* chore: fixing typo in the comments

* Astro needs to manage base in dev to maintain Astro.request.url

* fix: reverting dev routing tests to expect existing behavior

* reverting Astro global test to verify existing behavior

* chore: adding changeset

* test: update static-build tests to verify the subpath is used in asset imports
2022-05-05 22:39:16 +00:00
github-actions[bot]
f67832ebf7
[ci] release (#3307)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-05 18:21:27 -04:00
Ben Holmes
0efaf110fc
Fix: make RSS canonicalUrl required (#3301)
* chore: make canonicalUrl required

* docs: explain env variable on required canonicalUrl

* refactor: rename "canonicalUrl" to "site"

* chore: changeset
2022-05-05 18:03:25 -04:00
github-actions[bot]
9b98633cc8
[ci] release (#3302)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-05 16:27:40 -04:00
Matthew Phillips
3d901ca59d
Revert "refactor: remove serialize-javascript (#3278)" (#3304)
* Revert "refactor: remove serialize-javascript (#3278)"

This reverts commit 13c1f5ff6b.

* Adds a changeset
2022-05-05 15:56:29 -04:00
matthewp
b5b95e4fb4 [ci] format 2022-05-05 16:22:41 +00:00
Matthew Phillips
61e1a267a8
Implement the Astro.response RFC (#3289)
* Implement the Astro.response RFC

* Adds a changeset

* Mark Astro.response.headers as readonly
2022-05-05 12:21:53 -04:00
github-actions[bot]
d0a4064d80
[ci] release (#3293)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-05 09:56:45 -04:00
matthewp
e087f27a9b [ci] format 2022-05-04 18:56:21 +00:00
Matthew Phillips
6643a3931d
Conform to API route signature (#3272)
* Conform to API route signature

* Rename to API route

* Update ssr test

* Update packages/astro/test/fixtures/ssr-dynamic/src/pages/api/products/[id].js

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

* Adds a changeset

* Make PR review changes

Co-authored-by: Ben Holmes <hey@bholmes.dev>
2022-05-04 14:55:37 -04:00
Fred K. Schott
f697cd2857
readme fix (#3290) 2022-05-04 14:24:00 -04:00
github-actions[bot]
9b6a2e2d87
[ci] release (#3288)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-04 08:59:10 -04:00
matthewp
757790f4e8 [ci] format 2022-05-04 12:28:33 +00:00
Pascal Schilp
e5f6de4edb
feat: expose pages (#3286)
* feat: expose pages

* chore: changeset

* fix: build
2022-05-04 08:27:51 -04:00