Commit graph

1196 commits

Author SHA1 Message Date
JuanM04
20c3969a43
Merge branch 'main' into feat/vercel-adapter 2022-03-30 21:50:41 -03:00
matthewp
52d7fec248 [ci] format 2022-03-30 19:56:27 +00: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
matthewp
6a1a40eef8 [ci] format 2022-03-30 12:43:13 +00: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
JuanM04
8c65f13327
Updated readme 2022-03-29 23:11:27 -03:00
JuanM04
fc2dc973f2
Reverted changes in core/build 2022-03-29 23:06:06 -03:00
JuanM04
0555099619
Removed changes no longer necessary 2022-03-29 23:04:53 -03:00
JuanM04
697ff4dfb4
Rework - now it's all SSR 2022-03-29 23:01:37 -03:00
JuanM04
1278d39b86
Added readonly config to more hooks 2022-03-29 19:02:56 -03:00
Fred K. Schott
fff83bb5c2
remove docs jsdoc tag from adapter (#2927) 2022-03-29 16:03:45 -05:00
matthewp
c24e5c9687 [ci] format 2022-03-29 20:59:59 +00: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
JuanM04
7e5f6f1cbb
Merge branch 'main' into feat/vercel-adapter 2022-03-29 17:36:10 -03:00
Fred K. Schott
23b8ee2738
[ci] update lockfile (#2930)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-03-29 08:59:46 -07:00
matthewp
9fa013b4fa [ci] format 2022-03-29 12:19:10 +00:00
Matthew Phillips
ecbcc8c42c
Make it deployable to Netlify (#2931) 2022-03-29 08:18:11 -04:00
matthewp
f0275298bd [ci] format 2022-03-29 11:36:02 +00: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
FredKSchott
1e3550d5ac [ci] format 2022-03-29 00:17:02 +00: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
FredKSchott
7d29feace1 [ci] format 2022-03-28 23:56:17 +00: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
FredKSchott
ab9e3d5988 [ci] format 2022-03-28 23:52:58 +00: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
Fred K. Schott
9904c4c89d
[ci] update lockfile (#2900)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-03-28 15:47:17 -07:00
JuanM04
d6f0d5cf3c
Merge branch 'main' into feat/vercel-adapter 2022-03-28 19:44:29 -03: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
natemoo-re
9b7e419989 [ci] format 2022-03-28 22:06:23 +00:00
Rafid Muhymin Wafi
30d0fcedbb
Corrected package name in warning message (#2911)
* fixed typo in warning message

* added missing type
2022-03-28 17:05:40 -05:00
JuanM04
a878a5cb77
Updated some types + added webapi 2022-03-28 17:55:03 -03:00
matthewp
6667c41f00 [ci] format 2022-03-28 20:53:24 +00: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
matthewp
5c9312620d [ci] format 2022-03-28 20:49:06 +00: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
JuanM04
f946687bea
Build API Routes 2022-03-28 15:13:14 -03:00
JuanM04
d4cff2333d
Basic Filesystem API 2022-03-28 10:05:55 -03:00
FredKSchott
a812586b58 [ci] format 2022-03-26 00:17:33 +00: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
FredKSchott
8b1b4315b8 [ci] format 2022-03-26 00:12:26 +00: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
natemoo-re
068e3b4dee [ci] format 2022-03-25 23:04:57 +00: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
natemoo-re
192d703563 [ci] format 2022-03-25 22:01:50 +00: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
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
natemoo-re
145e418edd [ci] format 2022-03-25 21:27:41 +00: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
bholmesdev
07a64be4d3 [ci] format 2022-03-25 21:14:21 +00:00
Ben Holmes
046bf7281f
refactor: move Prism comp to default exp (#2887) 2022-03-25 17:13:28 -04:00
Ben Holmes
7c39389a3f
Docs: READMEs for component framework integrations (#2880)
* docs: add base integration readme temp for Vue

* docs: copy integration temp across renderers

* feat: add get started with components section

* feat: adapt comp integration docs for lit

* nit: THERES TWO WAYS SPECIFICALLY

* nit: there's more edits wait "there are" dangit
2022-03-25 12:15:38 -04:00
matthewp
4edccae534 [ci] format 2022-03-25 16:08:51 +00: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
natemoo-re
1e5ea20694 [ci] format 2022-03-24 22:38:47 +00: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
matthewp
f5b48bc0ae [ci] format 2022-03-24 21:09:40 +00: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
natemoo-re
e2885df50b [ci] format 2022-03-24 20:11:31 +00:00
Fred K. Schott
1026345715
[ci] update lockfile (#2854)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-03-24 15:10:43 -05:00
Nate Moore
671727ba83
fix(#2846): handle destructured private env usage during SSR (#2861)
* fix(#2846): handle destructured private env usage during SSR

* test: add destructured env vars test

* fix: support destructured env vars

* fix: only inline referenced vars
2022-03-24 15:10:08 -05:00
natemoo-re
eb4ac82acf [ci] format 2022-03-24 19:44:54 +00:00
Nate Moore
a49f0490c0
test: update error test for vite@2.9.x (#2877)
* test: update error test for vite@2.9.x

* chore: add link to old tests
2022-03-24 14:44:08 -05:00
FredKSchott
bababd8461 [ci] format 2022-03-24 19:32:18 +00: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
matthewp
99414f76cf [ci] format 2022-03-24 11:27:15 +00: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
5c96145527
add build:ci command which skips tsc (#2869) 2022-03-23 19:46:16 -05:00
Nate Moore
374c3edcf2 chore: add build:ci command 2022-03-23 16:23:25 -05:00
Nate Moore
99518c8d52
Pin rollup to same version as vite (#2863)
* chore: pin rollup to same version as Vite

* fix: improve implicit types

* fix: revert rollup change
2022-03-23 15:57:53 -05:00
RafidMuhymin
29f420bb0e [ci] format 2022-03-23 15:48:26 +00:00
Rafid Muhymin Wafi
52e75475ae
Updated markdownOptions config type (#2826)
* Updated markdownOptions config type

* removed rehype-toc
2022-03-23 21:47:43 +06:00
Fred K. Schott
8ec3d0da19
audit file urls (#2853) 2022-03-22 16:49:27 -05:00
natemoo-re
1cab405460 [ci] format 2022-03-22 21:28:14 +00:00
Nate Moore
c781b12f87
fix: ensure private API is not enumerable (#2859) 2022-03-22 16:27:35 -05:00
Tony Sullivan
5869e015d4
marking Astro.resolve() as deprecated (#2856) 2022-03-22 14:15:36 -04:00
FredKSchott
1378a9ed7c [ci] format 2022-03-22 03:28:33 +00: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
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
0c5378b8cf
[ci] update lockfile (#2841)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-03-21 10:32:25 -05:00
FredKSchott
fd7ab4e11c [ci] format 2022-03-21 04:03:05 +00: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
natemoo-re
d812fbda97 [ci] format 2022-03-18 23:23:25 +00: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