Commit graph

1847 commits

Author SHA1 Message Date
tony-sull
e990b9f42d [ci] format 2022-06-23 17:30:21 +00:00
Tony Sullivan
c7cb5df450
centralizing test setup with a universal resetAllFiles hook (#3693) 2022-06-23 17:28:54 +00:00
bholmesdev
589b840f5a [ci] format 2022-06-23 15:33:20 +00:00
Ben Holmes
3f8ee70e2b
Fix: document sitemap + SSR use case (#3689)
* fix: offer suggestion for SSR sitemap users

* docs: add customPages to README

* chore: changeset
2022-06-23 11:31:54 -04:00
natemoo-re
059d00bd5d [ci] format 2022-06-23 15:12:46 +00:00
Nate Moore
7373d61cdc
Enable named slots in renderers (#3652)
* feat: pass all slots to renderers

* refactor: pass `slots` as top-level props

* test: add named slot test for frameworks

* fix: nested hydration, slots that are not initially rendered

* test: add nested-recursive e2e test

* fix: render unmatched custom element children

* chore: update lockfile

* fix: unrendered slots for client:only

* fix(lit): ensure lit integration uses new slots API

* chore: add changeset

* chore: add changesets

* fix: lit slots

* feat: convert dash-case or snake_case slots to camelCase for JSX

* feat: remove tmpl special logic

* test: add slot components-in-markdown test

* refactor: prefer Object.entries.map() to for/of loop

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-23 10:10:54 -05:00
github-actions[bot]
19cd962d0b
[ci] release (#3684)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-23 09:14:17 -04:00
matthewp
16cdfeef81 [ci] format 2022-06-23 13:05:55 +00:00
Matthew Phillips
b36ecb717e
Include partytown scripts in SSR manifest (#3686)
* Include partytown scripts in SSR manifst

* Adds a changeset
2022-06-23 09:03:43 -04:00
bholmesdev
9133a42831 [ci] format 2022-06-22 23:55:00 +00:00
Ben Holmes
3d554fdbfb
Fix: pass Astro config postcss to Svelte preprocess (#3685)
* fix: pass Astro config postcss to Svelte preprocess

* test: preset env for nested styles

* chore: changeset
2022-06-22 19:52:32 -04:00
natemoo-re
a3654a7537 [ci] format 2022-06-22 21:15:21 +00:00
Fred K. Schott
921d9a27e2
simplify a complex peer semver used by astro add (#3633)
* fix peer semver used by astro add

* Create pink-shirts-mix.md

* update with regex over `' '` split

Co-authored-by: Ben Holmes <hey@bholmes.dev>
2022-06-22 16:13:32 -05:00
matthewp
b9f891b8a6 [ci] format 2022-06-22 16:49:59 +00:00
Matthew Phillips
9a813268db
Allow TypeScript in hoisted scripts (#3665)
* Allow TypeScript in hoisted scripts

* Pass skipSelf

* Fix linting
2022-06-22 12:47:52 -04:00
matthewp
c2dffc1c38 [ci] format 2022-06-22 16:33:56 +00:00
Matthew Phillips
85c33751c2
Allow specifying entryFileNames for client JS (#3676)
* Allow specifying entryFileNames for client JS

* Adds a changeset
2022-06-22 12:32:17 -04:00
matthewp
c97bdf1a45 [ci] format 2022-06-22 16:21:26 +00:00
github-actions[bot]
8ad146a5d7
[ci] release (#3683)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-22 12:19:43 -04:00
matthewp
5a41ea1202 [ci] format 2022-06-22 16:04:06 +00:00
Matthew Phillips
aeab890971
Inline small hoisted scripts (#3658)
* Inline small hoisted scripts

This makes it so that small hoisted scripts get inlined into the page rather than be fetched externally.

* Ensure we don't inline when there are imports

* Fix ts

* Update tests with new url structure

* Adds a changeset
2022-06-22 12:02:42 -04:00
tony-sull
ae7415612e [ci] format 2022-06-22 16:01:42 +00:00
Tony Sullivan
b8c6dabfb7
Enables eslint on the full repo and adds a rule for no only() tests (#3659)
* enabling eslint on the all packages and tests

* enabling for all packages

* TEMP: adding an only() test to verify it fails CI

* using our eslint config and ignore in CI

* removing the temporary .only() test

* update lock file

* lint: fixing new test with a no-shadow warning

* chore: update lock file
2022-06-22 15:59:49 +00:00
bholmesdev
f6400e694e [ci] format 2022-06-22 15:41:50 +00:00
Ben Holmes
df02fad13e
Add @nanostores/preact to ALWAYS_NOEXTERNAL (#3667)
* chore: add nanostores/preact to ALWAYS_NOEXTERNAL

* chore: update comment to reference pR

* chore: changeset
2022-06-22 11:38:59 -04:00
matthewp
fc74dc4a8c [ci] format 2022-06-22 15:37:47 +00:00
Matthew Phillips
898845402c
Include all client build artifacts in SSRManifest (#3678)
* Include all client build artifacts in SSRManifest

* Adds a changeset
2022-06-22 11:35:54 -04:00
github-actions[bot]
119283775a
[ci] release (#3666)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-22 10:05:21 -04:00
hippotastic
ba5ad7855c
Fix react dependencies to improve test reliability (#3673)
* Fix local react tests by unifying versions

* Add missing dependencies to react tests

* Add changeset

* Fix lockfile

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-06-22 09:11:48 -04:00
hippotastic
ef6282d5d9
Fix import.meta.env also without trailing dot (#3675)
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-06-22 08:58:20 -04:00
github-actions[bot]
b4db008e53
[ci] release (#3664)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-21 12:47:04 -04:00
matthewp
0d3a7de527 [ci] format 2022-06-21 16:36:57 +00:00
Matthew Phillips
c20b93c484
Resolve .jsx -> .tsx in hydrated components (#3663) 2022-06-21 12:35:11 -04:00
github-actions[bot]
e13ce4d751
[ci] release (#3662)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-21 11:50:06 -04:00
Matthew Phillips
2ff11df438
Add .js to imports in the sitemap package (#3661)
* Add .js to imports in the sitemap package

* Adds a smoke test

* Adds a changeset
2022-06-21 11:29:18 -04:00
Yuji Sugiura
7d4699b8f9
Check null for props serialization (#3657)
* Check null for props serialization

* Add changeset
2022-06-21 10:26:27 -05:00
github-actions[bot]
e67171252c
[ci] release (#3615)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-06-21 09:43:19 -04:00
matthewp
948f82048b [ci] format 2022-06-21 12:33:55 +00:00
Matthew Phillips
f5afaf2498
Support re-exporting astro components containing client components (#3625)
* Support re-exporting astro components containing client components

* Include metadata for markdown too

* Fix ssr, probably

* Inject post-build

* Remove tagName custom element test

* Allows using the constructor for lit elements

* Fix hoisted script scanning

* Pass through plugin context

* Get edge functions working in the edge tests

* Fix types for the edge function integration

* Upgrade the compiler

* Upgrade compiler version

* Better release notes for lit

* Update .changeset/unlucky-hairs-camp.md

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

* Properly test that the draft was not rendered

* Prevent from rendering draft posts

* Add a changeset about the build perf improvement.

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-21 08:32:05 -04:00
Nate Moore
bb02bca36c
Remove it.only (#3655)
* chore: remove it.only

* test: fix failing test

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-20 17:40:53 -05:00
natemoo-re
9532d56b50 [ci] format 2022-06-20 19:31:39 +00:00
Oleksii Tymoshenko
facfc4682f
refactor: better typings (#3634) 2022-06-20 14:29:53 -05:00
Nate Moore
d9f6dcf6ea
fix: properly catch falsy components (#3650)
Co-authored-by: Nate Moore <nate@astro.build>
2022-06-20 14:14:54 -05:00
tony-sull
0519601b52 [ci] format 2022-06-20 19:10:59 +00:00
Tony Sullivan
48e67fe053
Encode ampersands in markdown code blocks (#3630)
* encode ampersands in markdown code blocks

* chore: add changeset

* nit: fixing test case description
2022-06-20 19:09:35 +00:00
natemoo-re
509b4f122f [ci] format 2022-06-20 19:06:53 +00:00
Nate Moore
8e3e4894c9
Add private addPageExtension hook (#3628)
* feat: add private `addPageExtensions` hook

* chore: remove renderer binding

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-20 14:05:16 -05:00
tony-sull
9502fbf4a9 [ci] format 2022-06-20 17:14:08 +00:00
Tony Sullivan
80c71c7c56
Fixes rendering of HTML comments inside markdown code blocks (#3638)
* JS comment wrappers should be removed from HTML comments in code blocks

* chore: add changeset
2022-06-20 17:12:42 +00:00
tony-sull
9b530bdece [ci] format 2022-06-17 22:36:22 +00:00
Nate Moore
12ec35feff
docs: update incorrect example in changelog (#3609)
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
2022-06-17 22:34:47 +00:00
hippotastic
6ab749be5c
Add component hydration in .md E2E tests, refactor (#3610)
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-17 22:34:19 +00:00
Tony Sullivan
56937563c3
disabling Netlify Edge Functions tests for now (#3631) 2022-06-17 22:12:04 +00:00
hippotastic
05aa72442c
Remove extra newlines around Markdown components (#3620) 2022-06-17 11:52:37 -05:00
bholmesdev
8ce5b824ab [ci] format 2022-06-17 00:32:29 +00:00
Ben Holmes
fca58cfd91
Fix: Netlify edge deployment when using markdown (#3612)
* wip: revert sitemap PR

* fix: extract SSR-ready "slug" helper to separate module

* Un-revert sitemap PR. Not to blame!

This reverts commit 7cd2a8a5ea.

* fix: use .netlify for edge deployment test

* refactor: add md file to edge function fixture

* fix: add netlify edge tests to ci

* chore: remove stray console log

* wip: undo "dist" change on edge tests

* chore: changeset

* Revert "wip: undo "dist" change on edge tests"

This reverts commit 70e565ef06.

* temp: add ignore to breaking edge tests
2022-06-16 20:31:08 -04:00
tony-sull
fb80e384e3 [ci] format 2022-06-16 22:11:13 +00:00
Tony Sullivan
e02097d0b9
Investiging a flaky error test (#3613)
* restarting dev server between each error test

* re-enabling the test on Linux CI

* trying separate describe() suites per error test

* narrowed the issue down, disabling for more investigation

* not: removing unrelated whitespace change
2022-06-16 22:09:47 +00:00
Richard Cooke
9716747879
feat: update @astrojs/cloudflare readme (#3616) 2022-06-16 15:16:25 -05:00
tony-sull
1c944a148a [ci] format 2022-06-16 19:08:44 +00:00
Oleksii Tymoshenko
1031c06f9c
feat: improved sitemap (#3579)
* feat: extended sitemap functionality

* docs: del samples

* docs: readme

* feat: new sitemap

* feat: createLinkInHead removed

* docs: updated changeset text

* refactor: 'zod' function() instead of self made refine()

* Revert "refactor: 'zod' function() instead of self made refine()"

This reverts commit 036bac730d.

undo function()
2022-06-16 19:06:48 +00:00
matthewp
44ba4e1ed9 [ci] format 2022-06-16 18:54:57 +00:00
Okiki Ojo
9c8a7c0b09
fix(@astrojs/telemetry): add optional integrations field (#3614)
* fix: filter out falsy integration from telemetry

Falsy integrations are now ignored in `@astrojs/telemetry`

This error should no longer occur,
```ts
 error   Cannot read properties of null (reading 'name')
    at file:///workspaces/bundle/node_modules/.pnpm/@astrojs+telemetry@0.1.2/node_modules/@astrojs/telemetry/dist/events/session.js:53:117
    ...
```

* ci: add tests for optional integrations

* ci: add changeset

* fix(@astrojs/telemetry): count number of optional integrations in use

* ci: add test for counting the total number of optional integrations in use

* ci: update changeset

* chore: make the changes @tony-sull sugested

* revert(@astrojs/webapi): mod.d.ts -> a4c78b5: [ci] format

* ci: remove `@astrojs/webapi` patch change

* chore(@astrojs/telemetry): remove totalIntegrations payload field

* fix(@astrojs/telemetry): add optional integrations field

* ci: add changeset
2022-06-16 14:53:07 -04:00
Tony Sullivan
493441f57b Revert "restarting dev server between each error test"
This reverts commit 49e4453acc.
2022-06-16 12:56:57 -05:00
Tony Sullivan
49e4453acc restarting dev server between each error test 2022-06-16 12:49:48 -05:00
github-actions[bot]
81104a9335
[ci] release (#3604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-16 12:05:10 -04:00
matthewp
5d11c6d56f [ci] format 2022-06-16 14:14:44 +00:00
Richard Cooke
7f42358141
feat: add SSR adaptor for cloudflare pages functions (#3600) 2022-06-16 10:12:25 -04:00
matthewp
f6cdf1202e [ci] format 2022-06-16 13:55:54 +00:00
Matthew Phillips
4916b733c2
Inline hydration directive scripts (#3605)
* Inline hydration scripts

* Adds a changeset

* Update directiveAstroKeys type
2022-06-16 09:54:09 -04:00
tony-sull
a4c78b544e [ci] format 2022-06-15 19:50:36 +00:00
Tony Sullivan
0ddcef2043
Adds support base64 encoding in Netlify Functions (#3592)
* Adding support for base64 encoded responses in Netlify Functions

* chore: add changeset

* removing the regex check for a more simple header-based check

* nit: cleaning up the readme a bit
2022-06-15 19:49:09 +00:00
Ari Gibson
0ffc350c8d
fix: check node version and find acceptable host accordingly (#3599) 2022-06-15 10:26:55 -05:00
matthewp
f1f207839a [ci] format 2022-06-15 12:52:13 +00:00
Matthew Phillips
fc52321a88
Consolidate hydration scripts into just one (#3571)
* Remove redundant hydration scripts

* Prebuild the island JS

* Fix build

* Updates to tests

* Update more references

* Custom element test now has two classic scripts

* Account for non-default exports

* Restructure hydration directives

* Move nested logic into the island component

* Remove try/catch
2022-06-15 08:50:05 -04:00
github-actions[bot]
31e3224319
[ci] release (#3596)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-14 15:46:51 -05:00
natemoo-re
b49bf0c480 [ci] format 2022-06-14 20:32:18 +00:00
Nate Moore
5ab9d573f6
Collect project meta info (#3587)
* chore: add project meta

* Update index.ts
2022-06-14 15:30:39 -05:00
matthewp
7832c6a260 [ci] format 2022-06-14 20:28:50 +00:00
Matthew Phillips
330fef448e
Handle importing multiple CSS packages in same bundle (#3595)
* Handle importing multiple CSS packages in same bundle

* Changeset
2022-06-14 16:27:21 -04:00
natemoo-re
d32f6723a0 [ci] format 2022-06-14 20:23:09 +00:00
Pascal Schilp
23fceb93ac
feat: implement injectRoute (#3457)
* feat: implement injectRoute

* chore: make ts happy

* feat: add route collision detection and error message

* fix: case sensitivity in route collision detection

* chore: ts

* fix: improve route collision logic

* chore: make ts happy

* chore: update error message

* refactor: lowercase route

* fix: inject routes when no pages

* Update packages/astro/src/integrations/index.ts

Co-authored-by: Nate Moore <nate@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-14 15:21:23 -05:00
Don Denton
48161b77ca
Fix unintentional missing type data in MarkdownInstance (#3397)
* Update MarkdownInstance type

The return of the `default` function includes the same `frontmatter`
data as the parent object, merged with the `astro` data. The inclusion
of that frontmatter type was previously not recognized by TS, and fell
back to a `Record<string, any>`. This change persists the more accurate
type, as the runtime code does.

* fixup! Update MarkdownInstance type

(This change is what I'd personally do, but I don't really know how you
expect people to use `MarkdownContent` in practice, or if there is some
deeper benefit you wish to exploit by leaving it as an interface instead
of a type.
2022-06-14 15:20:13 -05:00
github-actions[bot]
acc8afbdda
[ci] release (#3594)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-14 15:51:10 -04:00
Matthew Phillips
0e2314d8e5
Fix inlined hoisted scripts and SSR (#3593)
* Fix inlined hoisted scripts and SSR

* Adds a changeset
2022-06-14 15:14:15 -04:00
(◕ᴥ◕)
56a99bebbe
Generate tailwind config with type imported (#3585) 2022-06-14 14:13:32 -05:00
matthewp
60653c7340 [ci] format 2022-06-14 18:10:04 +00:00
Okiki Ojo
d46f8fb14d
feat: support optional and conditional integrations (#3590)
* feat(integrations): support optional integrations

By making integration optional, Astro can now ignore null or undefined Integrations instead of giving an internal error most devs can't read/won't understand.

This also enables optional integrations,
e.g.
```ts
integration: [
  // Only run `compress` integration in production environments, etc...
  import.meta.env.production ? compress() : null
]
```

* ci: add tests for optional integration

* docs: add changelog
2022-06-14 14:08:14 -04:00
github-actions[bot]
c54b024803
[ci] release (#3569)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-10 21:07:03 -05:00
hippotastic
5c73f614e8
Fix remarkMdxish performance issue on huge sites (#3572) 2022-06-10 17:32:23 -05:00
natemoo-re
43dda86ce2 [ci] format 2022-06-10 18:20:21 +00:00
Nate Moore
3ec41f284c
Improve YAML error handling (#3557)
* chore: improve YAML errors

* chore: add changeset
2022-06-10 13:18:29 -05:00
Tony Sullivan
99ee40ced0
Disabling unreliable E2E test for further investigation (#3560)
* fixing reliability issue in component HMR tests

* fix: test change snuck into the last commit

* TEMP: logging to track down ubuntu CI failure

* disabling svelte test for now

* reverting unrelated .d.ts change
2022-06-10 13:18:11 -05:00
Félix Sanz
6e8391365a
Changed astro.config.js text to a link to the supported config file types (#3565)
Changed astro.config.js text to a link to the supported config file types, since above it appears astro.config.mjs and mixing extensions could lead to confusion (plus in that page linked we can see the valid extensions)
2022-06-10 13:17:52 -05:00
Oleksii Tymoshenko
098031294f
unused dependency 'sitemap', 'filter' option should return boolean (#3563)
* refactor: @astrojs/sitemap does't use 'sitemap' pkg

* refactor: 'filter' option should return boolean instead of string

* fix: forgotten `pnpm install`

* chore: add changeset

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-06-10 13:16:08 -05:00
matthewp
72587eccc5 [ci] format 2022-06-10 16:40:13 +00:00
Matthew Phillips
614769a39b
Preoptimize renderers and hydration directives (#3568)
* Preoptimize renderers and hydration directives

* Adds a changeset

* Upgrade to Vite 2.9.12
2022-06-10 12:38:19 -04:00
github-actions[bot]
d02578fd4c
[ci] release (#3549)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-10 15:03:52 +00:00
natemoo-re
4eb39d57b9 [ci] format 2022-06-10 03:33:13 +00:00
Nate Moore
7f5e71982d
chore: update types (#3558) 2022-06-09 22:31:48 -05:00
hippotastic
76fb01cff1
Fix autolinking of URLs inside links in Markdown (#3564) 2022-06-09 22:31:36 -05:00
natemoo-re
c15e7ebc5e [ci] format 2022-06-08 17:43:10 +00:00
hippotastic
c549f161ca
Allow AlpineJS syntax extensions in Markdown (#3554)
* Allow AlpineJS syntax extensions in Markdown

* Remove unwanted MDX ESM import/export support
2022-06-08 12:41:36 -05:00
natemoo-re
073bab5ec1 [ci] format 2022-06-08 15:09:17 +00:00
Caio Ferrarezi
c601ce59b5
Prevent sitemap URLs without pathname (#3553)
* fix(@astrojs/sitemap): handle base/pathname correctly

* chore: add changeset
2022-06-08 10:07:12 -05:00
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