Commit graph

1610 commits

Author SHA1 Message Date
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