Commit graph

1512 commits

Author SHA1 Message Date
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
github-actions[bot]
58862fbf76
[ci] release (#3284)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 17:14:26 -07:00
Fred K. Schott
224c181cbd
deprecate the markdown component in SSR (#3240) 2022-05-03 17:08:53 -07:00
Fred K. Schott
860357388f
new readme (#3237)
* new readme

* New readme plus (#3239)

* Test light/dark

* More tests

* test

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

* style the readme

Co-authored-by: JuanM04 <me@juanm04.com>
2022-05-03 17:06:04 -07:00
Fred K. Schott
1032e450cc Revert "[ci] release (#3279)"
This reverts commit 9fb2c4744c.
2022-05-03 17:04:44 -07:00
github-actions[bot]
9fb2c4744c
[ci] release (#3279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 18:33:18 -04:00
Tony Sullivan
9ad8aefdd7
Turbolinks: clean up injected scripts and styles on page navigation (#3283)
* client hydration scripts should be removed before navigation

* chore: adding a changeset

* also cleanup injected styles on page navigation
2022-05-03 22:30:46 +00:00
bholmesdev
204ff2c223 [ci] format 2022-05-03 22:27:01 +00:00
Ben Holmes
fbfb6190ab
Feat: @astrojs/rss package! (#3271)
* feat: introduce @astrojs/rss package!

* feat: add config "site" to env variable

* docs: add @astrojs/rss readme

* chore: changeset

* fix: testing script

* deps: add mocha, chai, chai-promises

* tests: add rss test!

* feat: add canonicalUrl arg

* chore: remove console.log

* fix: remove null check on env (breaks build)

* docs: stray `

* chore: update error message to doc link

* chore: remove getStylesheet

* docs: update stylesheet reference
2022-05-03 18:26:13 -04:00
Juan Martín Seery
e2a037be94
refactor: internalize shorthash (#3281)
* Shorthash has been internalized

* Remove shorthash

* Optimized shorthash

* Changeset

* Added license
2022-05-03 19:25:35 -03:00
Juan Martín Seery
13c1f5ff6b
refactor: remove serialize-javascript (#3278)
* Replaced serialize-javascript with devalue

* Changeset
2022-05-03 17:55:12 -03:00
github-actions[bot]
1de48ce4eb
[ci] release (#3277)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 15:50:21 -04:00
Matthew Phillips
3854acdb7d Add typescript to match peerDep 2022-05-03 15:42:19 -04:00
Fred K. Schott
6d5ef41b1e
fix cannot exit astro bug (#3276)
* fix cannot exit astro bug

* Create loud-tigers-draw.md
2022-05-03 15:29:34 -04:00
Matthew Phillips
8f8f05c1b9
Revert "Consolidate inline hydration scripts into one (#3244)" (#3275)
* Revert "Consolidate inline hydration scripts into one (#3244)"

This reverts commit 48a35e6042.

* Fix types

* Adds changeset
2022-05-03 15:18:17 -04:00
matthewp
5aec49e5e8 [ci] format 2022-05-03 14:56:07 +00:00
Pascal Schilp
adada1ba01
Feat/ssr manifest (#3262)
* feat: expose pagesVirtualModuleId

* feat: add astro:build:ssr hook

* fix: missing import for pagesVirtualModuleId

* test: fix tests

* refactor: move exports to index.ts

* chore: changeset
2022-05-03 10:55:25 -04:00
github-actions[bot]
8b17d3ebcf
[ci] release (#3243)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 09:16:57 -04:00
matthewp
f7335c76a7 [ci] format 2022-05-03 13:08:46 +00:00
Matthew Phillips
f76038ac7d
Telemetry (#3256)
* feat: add @astrojs/telemetry

* feat: add telemetry events, add queueing system

* feat(telemetry): record CLI events

* chore: add note

* feat: support generic TELEMETRY_DISABLED env var

* Fix test script

* shim telemetry in tests

* Shim telemetry in other commands

* Stub telemetry in the memory leak test

* Disable telemetry in smoke tests

* Adds a changeset

* Run the formatter

* few updates

* Include config keys

* Add shallow viteKeys array:
:

* Add vite keys and tests

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-05-03 09:07:28 -04:00
Matthew Phillips
48a35e6042
Consolidate inline hydration scripts into one (#3244)
* Consolidate inline hydration scripts into one

* Adds changeset

* Update custom element test

* Provide a better name for tracking if we have added a hydration script
2022-05-03 09:07:16 -04:00
Juan Martín Seery
de123b28b3
refactor(markdown): removed rehype-slug in favor of our own implementation (#3234)
* Moved types arround

* Removed `rehype-slug` in favor of our own implementation

* Changeset

* Removed rehype-slug from examples

* Remove rehype-slug from tests

* Updated reference

* rehypeCollectHeaders is a function again

* Reverted rehype-slug removes

* Re-added rehype-slug to reference
2022-04-29 21:07:09 -03:00
github-actions[bot]
9984f8ea24
[ci] release (#3242)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-29 22:30:12 +00:00
tony-sull
527a3634d4 [ci] format 2022-04-29 21:16:50 +00:00
Tony Sullivan
d25dc4c448
Fixes variable definitions in <style define:vars> (#3241)
* adding SSRResult.styles back to the rendered head

* adding test for define:vars in static build

* chore: adding changeset
2022-04-29 21:15:56 +00:00
github-actions[bot]
f244b1c6e4
[ci] release (#3238)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-29 15:16:18 -04:00
Ben Holmes
c8f5fa35c4
Feat: [create astro] git step (#3227)
* feat: add git init step

* fix: update unit tests

* feat: simplify next steps for copy pasteability

* docs: add clarifying comment on test stdin spoofing

* docs: remove "empty" from git repo message

* fix: update git step text for test

* fix: remove redundant --dryrun flag

* refactor: simplify next steps with &&

* chore: changeset
2022-04-29 11:45:43 -04:00
github-actions[bot]
ed7aba2e8b
[ci] release (#3229)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-29 09:31:47 -04:00
Rafid Muhymin Wafi
ae7fc463b5
removed unnecessary space from warning 2022-04-28 17:31:22 +06:00
bholmesdev
e2f7ef8b44 [ci] format 2022-04-28 00:59:36 +00:00
Ben Holmes
b7cd695884
Feat: [create astro] replace component selector with "astro add" (#3223)
* feat: remove component framework selector

* feat: update templates to use "basics"

* feat: add "astro add" cli step

* tests: astro add step

* fix: reset env for pnpm tests

* fix: update install step test

* chore: remove "frameworks" step from tests

* deps: remove node-fetch from create-astro

* chore: changeset

* fix: use "preferLocal" for astro add command

* refactor: remove POSTPROCESS_FILES

* feat: add --yes flag to simplify astro add

* feat: bring back minimal option as "completely empty"
2022-04-27 20:58:18 -04:00