Ben Holmes
563293c5d6
Markdoc: strip HTML comments from output ( #7224 )
...
* feat: strip HTML comments from output
* chore: changeset
2023-05-31 10:09:49 -04:00
Houston (Bot)
ba865f5d64
[ci] release ( #7190 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-30 16:53:55 -04:00
Ben Holmes
f5063d0a01
Content collections - fix .json
collection errors ( #7246 )
...
* fix: avoid error on collectionType === 'unknown'
* fix: ignore underscores in file globs
* chore: clarify [!_]
* fix: mismatch error not throwing
* fix: bad collectionType var
* test: no error for empty collection
* chore: changeset
2023-05-30 16:27:47 -04:00
Ben Holmes
bef3a75dbc
Markdoc - remove $entry
variable ( #7244 )
...
* refactor: remove entry prop from `getRenderModule()`
* refactor: remove `$entry` from markdoc
* test: update entry-prop -> variables test
* refactor: unify `getEntryConfigByExt`
* chore: clean up shared content / data get logic
* docs: update `$entry` recommendation
* chore: rename entry-prop -> variables
* chore: changeset
* chore: missed a spot
2023-05-30 16:18:20 -04:00
Happydev
ee2aca80a7
fix: prioritize dynamic prerendered routes over dynamic server routes ( #7235 )
...
* test: add unit tests
* fix: prioritize prerendered routes
* chore: fix test
* add comment
* test: try avoiding race condition
* chore: changeset
* try avoiding race conditions attempt #2
* try avoiding race conditions (attempt 3)
* final fix hopefuly
* tet: add more tests
* sort conflicting dynamic routes aplhabetically
* test: fix test
2023-05-30 14:12:16 +00:00
wulinsheng123
cf621340b0
Bug 6672 ( #7062 )
...
* fix miss a head when the templaterender has a promise
* fix
* add some test
* test files move to md directory
* fix add
* delect file
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>
2023-05-30 08:05:48 -04:00
Bjorn Lu
af3c5a2e25
Use AstroError for Astro.glob errors ( #7219 )
...
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: sarah11918 <sarah11918@users.noreply.github.com>
2023-05-29 20:42:31 +08:00
Erika
f2f18b4405
feat: support images outside the project ( #7139 )
2023-05-26 22:03:06 +02:00
Bjorn Lu
1c77779dd6
Fix astro-static-slot
hydration mismatch error ( #7196 )
2023-05-26 22:37:33 +08:00
Bjorn Lu
6c7df28ab3
Fix CSS deduping and missing chunks ( #7218 )
2023-05-26 21:30:42 +08:00
André Alves
bf63f615fc
Add global crypto to @astrojs/webapi ( #6981 )
...
* add crypto to be polyfilled
* chore: changeset
* chore: update deps for node types
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Princesseuh <princssdev@gmail.com>
2023-05-26 15:02:35 +02:00
Bjorn Lu
52af9ad188
Add error message if Astro.glob
is called outside ( #7204 )
2023-05-26 16:59:51 +08:00
Ben Holmes
16b8364119
Markdoc - improve syntax highlighting support ( #7209 )
...
* feat: prism and shiki support, with better exports!
* chore: update tests
* chore: fix lock
* chore: add prism test
* chore: remove `async` from prism
* docs: update syntax highlight readme
* chore: changeset
* edit: remove `await` from prism docs
* chore: update old changest with new shiki instructions
* fix: add trailing newline on ts-expect-error
* refactor: resolve promises internally
* docs: remove `await` from shiki examples
2023-05-25 11:35:07 -04:00
Emanuele Stoppa
8b041bf57c
refactor: emit pages as physical entry points ( #7193 )
2023-05-25 14:28:40 +01:00
Erika
f5a8cffac2
fix(vercel): Fix typo in README 🤦♀️ ( #7208 )
2023-05-25 14:59:25 +02:00
Bjorn Lu
ea16570b1e
Add MDX optimize option ( #7151 )
...
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-25 19:43:29 +08:00
Alexander Niebuhr
6ca3b5a9e8
Export ChangeFreqEnum type for sitemap integration ( #7028 )
2023-05-25 17:15:26 +08:00
Akash Rajpurohit
59d8c50b84
fix: 🩹 update partytown options ts type ( #7175 )
2023-05-25 16:24:59 +08:00
Ben Holmes
1efaef6be0
Markdoc - Shiki ( #7187 )
...
* chore: remove unused util
* chore: changeset
* deps: shiki
* wip: first stab at shiki markdoc config
* feat: get shiki working!
* refactor: return HTML string directly from transform
* chore: move shiki to markdoc dev dep
* refactor: use async cache with clear docs on why
* test: transform units with Shiki config options
* refactor: switch to `extends` model
* refactor: nodes/ -> extensions/
* feat: raise friendly error for Promise extensions
* docs: README
* chore: lint
* chore: dead file
* chore: lowercase for fuzzy find please
* fix: bad ctx spread
* chore: clean up cache, add shiki imp error
* chore: add shiki to optional peer deps
* chore: hoist those consts
* docs: more explicit "install shiki now please"
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* oops bad find and replace
* chore: update changeset
* nit: period haunts me
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-24 16:52:22 -04:00
Emanuele Stoppa
7851f9258f
fix: detect mdx
files using full extension ( #7192 )
2023-05-24 10:20:06 +01:00
Bjorn Lu
27c6e01826
Remove @mdx-js/rollup
dependency ( #7191 )
2023-05-24 17:02:04 +08:00
Barthélémy Ledoux
2bda7fb0bc
fix: add astro-static-slot to the list of inert tags in astro css ( #7189 )
2023-05-24 15:10:10 +08:00
Houston (Bot)
55a0439e00
[ci] release ( #7181 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-23 16:24:16 -04:00
wulinsheng123
904131aec3
fix a bug when Fragment is as a slot ( #6832 )
...
* fix a bug when Fragment is as a slot
* update yaml
* fix ts errpr
* fix astro name of md
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>
2023-05-23 15:40:21 -04:00
Ben Holmes
57e65d247f
revert: markdoc asset bleed ( #7178 )
...
* revert: markdoc asset bleed
* chore: changeset
2023-05-23 12:16:50 -04:00
Houston (Bot)
cbdb0fdbd6
[ci] release ( #7169 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-23 11:06:53 -04:00
Bjorn Lu
79ba74832f
Prevent Vite watching on Astro config load ( #7171 )
2023-05-23 22:40:40 +08:00
Emanuele Stoppa
92d1f017e5
chore(middleware): lift restriction around serializable data ( #7174 )
2023-05-23 15:10:30 +01:00
Emanuele Stoppa
626dd41d0a
refactor: move renderers to their own plugin ( #7166 )
2023-05-23 14:55:34 +01:00
Bjorn Lu
4ce8bf7c62
Make vite-plugin-content-virtual-mod run getEntrySlug
10 at a time ( #7125 )
2023-05-23 21:54:59 +08:00
Erika
2ca94269ed
Add types for import.meta.env.ASSETS_PREFIX
and import.meta.env.SITE
( #7172 )
2023-05-23 14:13:10 +02:00
Alex Vukadinov
5b6a0312a8
fix: value of var could be undefined when using define:vars
( #7134 )
2023-05-23 12:28:44 +08:00
Houston (Bot)
64d2aba583
[ci] release ( #7163 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-22 15:16:13 -04:00
Ben Holmes
f558a9e205
[Markdoc] Fix global asset bleed ( #6758 )
...
* wip: propagatedAssets flag per-component
* Propagate in TreeNode
* fix: remove unused inject comment
* feat: make asset propagation an integration opt-in
* fix: remove crawlGraph stopper
* wip: logs to understand what's happening
* SSR mdoc files in dev
* feat: add astroPropagatedAssets flag with vite
* chore: remove console logs
* chore: cleanup hasContentFlag
* fix: set handlePropagation default for legacy integrations
* chore: changeset
* temp: silence acorn type error
* chore: revert pnpm-lock changes
* fix: check correct flag
* We need to handle propagation on markdown because of layouts
* Remove use of renderStyleElement
* Fix heading tests
* Fix merge conflict
* typeof function
* Switch the check
* Add comment on injection detection regexp
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-05-22 13:50:01 -04:00
Johannes Spohr
b41963b775
Render 404 page content when a Response
with status 404 is returned from a page ( #7143 )
2023-05-22 12:06:06 -04:00
Houston (Bot)
d880293f79
[ci] release ( #7161 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-22 09:48:21 -04:00
Akash Rajpurohit
e17ed0727e
feat: 🎨 export rss feeditem type ( #7153 )
2023-05-22 21:20:10 +08:00
Arsh
ba06362409
fix(hoisted scripts): consider script's dependents ( #7144 )
2023-05-22 09:15:21 -04:00
Happydev
8f418d13c5
fix(hybrid-output): no matched route when using getStaticPaths
( #7150 )
...
* `isPrenderDefault` ---> `isPrerenderDefault`
* test: add test fixture
* test: add hybrid getStaticPaths tests
* try fix in ci
* bring back edit lost on merge conflict fix
* back static paths guard
* move function to new file to avoid bundling issues
* remove unsued import
* debugging cleanup
* chore: update fixture's package.json
* cleanup test
* small test refactoring
* `status.ts` --> `metadata.ts`
* smol refactor
* chore: changeset
* just return the prerender metadata
* refactor tests
* chore: update lock file
2023-05-22 12:58:03 +00:00
Houston (Bot)
0616ef2551
[ci] release ( #7130 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-21 00:00:31 +08:00
Ben Holmes
a9e1cd7e58
Fix: Heading ID CI flakiness ( #7141 )
...
* feat: use `ctx` object instead of leaky global
* test: heading IDs stale caches
* chore: changeset
2023-05-19 14:12:45 -04:00
Connor Bär
147373722b
fix(prefetch): Fix the inclusion of @types/network-information
( #7123 )
2023-05-19 23:34:34 +08:00
Johannes Spohr
72f686a689
Fix injectRoute for SSR ( #7128 )
...
* Use manifest routes for SSR app manifest instead of page components to enable injected routes with SSR
* Small refactoring
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-05-19 10:52:46 -04:00
Emanuele Stoppa
852d59a8d6
refactor(astro): emit entry.mjs
to import pages via dynamic import ( #7036 )
2023-05-19 15:30:03 +01:00
Emanuele Stoppa
319a0a7a0a
refactor: create virtual module for middleware ( #7132 )
2023-05-19 13:51:47 +01:00
Erika
3257dd2890
Improve content collection error message for empty folders ( #7118 )
2023-05-19 13:53:46 +02:00
Bjorn Lu
530fb9ebee
Add route information for getStaticPaths warning ( #7126 )
2023-05-19 18:13:46 +08:00
Houston (Bot)
31cbf4357e
[ci] release ( #7090 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-18 12:31:59 -04:00
Johannes Spohr
e186ecc5e2
Parallelize rendering of sibling components to avoid async waterfalls ( #7071 )
...
* Parallelize rendering of sibling components to avoid async waterfalls
* Catch and rethrow errors when eagerly rendering children
* Catch `Response` in rendering stage and throw error
* Add changeset
* Fix test error message
* Improve unit tests
* Start async generators in non-buffered mode, and only start buffering once a component doesn't resolve immediatly
* Add more documentation
2023-05-18 09:54:23 -04:00
Reuben Tier
cada10a466
Add errors for unknown experimental keys ( #7011 )
2023-05-18 17:39:39 +08:00
Ben Holmes
6b4fcde376
Fix: add headings
to .mdoc
render type ( #7111 )
...
* fix: add `headings` to `.mdoc` render type
* chore: changeset
2023-05-17 16:35:48 -04:00
Ben Holmes
c6d7ebefdd
Data collections and references ( #6850 )
...
* feat: add generated lookup-map
* feat: wire up fast getEntryBySlug() lookup
* fix: consider frontmatter slugs
* chore: changeset
* chore: lint no-shadow
* fix: revert bad rootRelativePath change
* chore: better var name
* refactor: generated `.json` to in-memory map
* chore: removed unneeded await
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* chore: removed unneeded await
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* Revert "chore: removed unneeded await"
This reverts commit 1b0a8b00c2
.
* fix: bad `GetEntryImport` type
* chore: remove unused variable
* refactor: for -> Promise.all
* refactor: replace duplicate parseSlug
* refactor: add cache layer
* Revert "refactor: add cache layer"
This reverts commit 1c3bfdc6b3
.
* feat: json collection POC
* wip: add test json file
* wip: playing with api ideas
* refactor: extract getCollectionName
* feat: add defineDataCollection
* refactor: variable destructure
* wip: basic data entry pipeline
* chore: revert fixture playing
* wip: basic entry array parser
* feat: basic data type gen
* chore: add with-data playground
* feat: add error when `defineDataCollection()` isn't used
* fix: missing error message
* feat: data collections are here!
* wip: play with data query APIs
* feat: reference() util!
* fix: Markdoc `$entry` variable
* play: add reference util with markdoc
* chore: delete console logs
* feat: `src/data/`!
* feat: reference() errors
* fix: handle hoisted schema parse errors
* fix: reload config and invalid on collection changes
* feat: separate maps for content and data entries
* feat: new `reference()` API that fixes type inference
* feat: support `defineCollection()` for data config
* fix: defineCollection `type` inferenenceπinference
* chore: lock
* feat: getCollection() for everything!
* feat: get full entry access from reference()
* chore: changeset
* wip: type error on acorn?
* chore: lint
* chore: add slugger to data ID processing
* chore: astro/zod -> zod
* chore: example version
* chore: remove slugifier from data id
* chore: remove dead getDataCollection
* chore: remove dead defineDataCollection
* fix: bad collection import
* chore: lock
* feat: add data collections to lookup map
* refactor: stop resolving data from reference
* feat: introduce getEntry and new reference()
* fix: update config loader
* fix: reference() type
* feat: test self references (they work 🎉 )
* fix: use `slug` for content references
* fix: bad getEntry content type
* chroe: remove console logs
* fix: strict null checks on with-data
* feat: add getEntries for ref arrays
* chore: fix type hints for reference strings
* chore: change to type never for clarity
* play: try getEntries
* Return to "everything goes in `src/content/`
This reverts commit cc637ec6db4fc23afab585df5f240b7f7c0abc8a.
* fix: remove old function
* chore: update to AstroErrors
* chore: remove unused fixture files
* play: names
* deps: js-yaml
* feat: data collection YAML with error handling
* refactor: remove console log
* refactor: code cleanup
* fix: allow mixed content to pass through glob imports
* chore: move lookupMap util to virtual-mod
* refactor: new lookupMap logic, better errors
* chore: change MixedContent title
* refactor: remove unneeded try / catch
* fix: use `ws.send` for type gen errors
* fix: bubble `ws.send` errors from astro sync
* refactor: revert verbose astroContentCollectionEntry
* fix: bad with-data package name
* fix: bad virtual mod flag
* chore: remove with-data playground
* test: data collection authors
* test: translations data collection
* fix: add `.yml` support
* refactor: mix in `.yaml` just for fun
* refactor: i18n -> translations
* chore: content-collection-references fixture
* chore: bad lockfile
* fix: bad ContentLookupMap import
* chore: revert back to astroContentCollectionEntry
* test: collection references
* fix: bad error code override
* chore: remove unused asset
* test: sync errors
* chore: remove stray console log
* chore: lock
* chore: revert with-markdoc changes
* chore: doc error states, remove bad merge code
* chore: remove bad `as any`
* chore: lint
* chore: inline ContentLookupMap comments
* chore: settings -> config
* fix: put back `defineCollection()`
* fix: entry.slug for get content collection
* chore: update get-entry-type tests
* docs: totally shorten "missing a `type`"
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* docs: truncate share a `schema`
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* chore: add `test:unit` and `test:unit:match`to base
* chore: update changeset
* refactor: cleanup runtime types and inline comments
* nit: [0] instead of shift()
* refactor: `getRelativeEntryPath()` util
* chore: capitalized Collections for test:match
* nit: ?? viteId on split
* nit: separate Params obj
* chore: add try / catch on readFile
* nit: `const data`
* chore: clean up data collection exceptions
* nit: `?? ''` for search params
* chore: remove TODO on hoisted error
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-17 11:36:27 -04:00
Chris Swithinbank
fc52681ba2
Fix weird periods in NoMatchingRenderer
error ( #7110 )
...
* Fix weird periods in `NoMatchingRenderer` error
* Add changeset
2023-05-17 17:30:47 +02:00
Erika
410428672e
Fix imports using ?raw and ?url not working when experimental.assets
is enabled ( #7108 )
2023-05-17 17:07:57 +02:00
Matthew Phillips
3d525efc95
Prevent removal of nested slots within islands ( #7093 )
...
* Prevent removal of nested slots within islands
* Fix build errors
2023-05-17 10:18:04 -04:00
Timo Zander
e9fc2c2213
add warn message when using unsupported file types in pages/ ( #6851 )
...
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2023-05-17 16:02:33 +02:00
Erika
c1669c0011
feat: uncomment polymorphic type ( #7069 )
2023-05-17 15:38:27 +02:00
wulinsheng123
763ff2d1e4
HTML minification ( #6706 )
...
* TDD pattern development
* add compact property when the user run pnpm run build
* add minification for pro
* fix yaml file collision
* fix yaml collision
* fix pageage file
* optimize unit test
* fix revert code
* fix comment
* update yaml
* fix default value
* add test for dev
* Update packages/astro/test/astro-minification-html.test.js
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update packages/astro/test/astro-minification-html.test.js
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update packages/astro/test/astro-minification-html.test.js
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update packages/astro/test/astro-minification-html.test.js
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update packages/astro/test/astro-minification-html.test.js
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update the docs to reflect it's opt-in
* Add tests for SSR
* Document how the tests remove the doctype line
* Expand on the changeset
* rename for slice -100
* Updates based on PR comments
* optimize description
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-17 09:26:49 -04:00
Happydev
719002ca5b
feat: hybrid output ( #6991 )
...
* update config schema
* adapt default route `prerender` value
* adapt error message for hybrid output
* core hybrid output support
* add JSDocs for hybrid output
* dev server hybrid output support
* defer hybrid output check
* update endpoint request warning
* support `output=hybrid` in integrations
* put constant variable out of for loop
* revert: reapply back ssr plugin in ssr mode
* change `prerender` option default
* apply `prerender` by default in hybrid mode
* simplfy conditional
* update config schema
* add `isHybridOutput` helper
* more readable prerender condition
* set default prerender value if no export is found
* only add `pagesVirtualModuleId` ro rollup input in `output=static`
* don't export vite plugin
* remove unneeded check
* don't prerender when it shouldn't
* extract fallback `prerender` meta
Extract the fallback `prerender` module meta out of the `scan` function.
It shouldn't be its responsibility to handle that
* pass missing argument to function
* test: update cloudflare integration tests
* test: update tests of vercel integration
* test: update tests of node integration
* test: update tests of netlify func integration
* test: update tests of netlify edge integration
* throw when `hybrid` mode is malconfigured
* update node integraiton `output` warning
* test(WIP): skip node prerendering tests for now
* remove non-existant import
* test: bring back prerendering tests
* remove outdated comments
* test: refactor test to support windows paths
* remove outdated comments
* apply sarah review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* docs: `experiment.hybridOutput` jsodcs
* test: prevent import from being cached
* refactor: extract hybrid output check to function
* add `hybrid` to output warning in adapter hooks
* chore: changeset
* add `.js` extension to import
* chore: use spaces instead of tabs for gh formating
* resolve merge conflict
* chore: move test to another file for consitency
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-05-17 09:23:20 -04:00
Ben Holmes
fb84622af0
[Markdoc] headings
and heading IDs ( #7095 )
...
* deps: markdown-remark
* wip: heading-ids function
* chore: add `@astrojs/markdoc` to external
* feat: `headings` support
* fix: allow `render` config on headings
* fix: nonexistent `userConfig`
* test: headings, toc, astro component render
* docs: README
* chore: changeset
* refactor: expose Markdoc helpers from runtime
* fix: bad named exports (commonjsssss)
* refactor: defaultNodes -> nodes
* deps: github-slugger
* fix: reset slugger cache on each render
* fix: bad astroNodes import
* docs: explain headingSlugger export
* docs: add back double stringify comment
* chore: bump to minor for internal exports change
2023-05-17 09:13:10 -04:00
Bjorn Lu
c91e837e96
Add edge-light
and worker
to vercel edge bundling ( #7103 )
2023-05-17 09:06:18 -04:00
Bjorn Lu
73ec6f6c16
Implement custom client directives ( #7074 )
...
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-17 20:51:27 +08:00
Emanuele Stoppa
075eee08f2
fix: middleware for API endpoints ( #7106 )
...
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-05-17 11:48:02 +01:00
Bjorn Lu
826e028900
Add files field to packages ( #7104 )
2023-05-17 16:54:00 +08:00
Bjorn Lu
2994bc52d3
Build edge/worker runtime with webworker ssr target ( #7101 )
2023-05-17 15:44:20 +08:00
Erika
4516d7b22c
refactor(assets): Move generation logic out of internal.ts ( #7102 )
2023-05-16 16:40:32 +02:00
Johannes Spohr
2a1fa09b31
Add workerd
and worker
to cloudflare adapter bundling ( #7092 )
2023-05-16 20:00:29 +08:00
Happydev
cd410c5eb7
Fix double prepended forward slash in certain cases ( #7091 )
...
* test: add test with no base
* fix: don't always prepend a forward slash
* chore: changeset
* `'/' + base` ------> `prependForwardSlash(base)`
2023-05-15 08:53:34 -04:00
Steffan
914c439bcc
Escape closing script tag when using define:vars ( #7044 )
2023-05-15 14:35:54 +08:00
Nathaniel Blackburn
06ca3702f8
Inject analytics env ( #6876 )
2023-05-15 14:13:47 +08:00
Reuben Tier
a37e67b520
RSS: Fix string validation of pubDate ( #7066 )
2023-05-15 14:10:32 +08:00
Houston (Bot)
d68e736545
[ci] release ( #7088 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-15 01:06:45 +08:00
Happydev
c5f1275e9d
Fix create-astro
regression ( #7086 )
2023-05-15 00:57:37 +08:00
Houston (Bot)
8d09a14a7b
[ci] release ( #7077 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-12 15:00:17 -04:00
Emanuele Stoppa
8c14bffbd9
fix: don't exit the program if dependencies don't install ( #7052 )
2023-05-12 16:00:20 +01:00
Matthew Phillips
781f558c40
Correct handle directory finds when using base in the Node adapter ( #7076 )
2023-05-12 10:01:05 -04:00
Houston (Bot)
0fc026f63c
[ci] release ( #7065 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-11 15:14:17 -04:00
Erika
4f1073a6a4
fix(image): Fix astro:assets from interfering with SSR query params ending with image extensions ( #7055 )
...
* fix(image): Fix `astro:assets` from interfering with SSR query params ending with image extensions
* test: add test
* nit: nit
* chore: changeset
2023-05-11 14:29:32 -04:00
Caleb Jasik
ebb40f5cb0
@astrojs/image
: Add fetchpriority
to Picture
types (#7059 )
...
* Add `fetchpriority` to `Picture` types
* Add changeset
2023-05-11 14:40:53 +02:00
Craig Jennings
c87d42e766
fix: don't require 'paths' object in tsconfig to alias paths ( #7000 )
2023-05-11 17:08:16 +08:00
Houston (Bot)
a44e755cc6
[ci] release ( #7043 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-09 17:37:15 -04:00
Ben Holmes
3a9f72c7f3
[Markdoc] Validation and debugging improvements ( #7045 )
...
* feat: better validation logs
* chore: add warning to restart server on config chnage
* feat: expose Markdoc global from markdoc/config
* docs: update `nodes` reference
* chore: changeset
* docs: simplify headings explainer
* chore: ignore eslint log errors
* fix: make legacyConfig prop optional
2023-05-09 17:20:55 -04:00
Erika
48395c8152
fix: properly prefix endpoint path with base in SSR ( #7047 )
...
* fix: properly prefix endpoint path with base in SSR
* chore: sssss
* chore: changeset
2023-05-09 20:53:06 +02:00
Ben Holmes
630f8c8ef6
[Content collections] Fast getEntryBySlug()
lookup ( #6916 )
...
* feat: add generated lookup-map
* feat: wire up fast getEntryBySlug() lookup
* fix: consider frontmatter slugs
* chore: changeset
* chore: lint no-shadow
* fix: revert bad rootRelativePath change
* chore: better var name
* refactor: generated `.json` to in-memory map
* chore: removed unneeded await
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* chore: removed unneeded await
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* Revert "chore: removed unneeded await"
This reverts commit 1b0a8b00c2
.
* fix: bad `GetEntryImport` type
* chore: remove unused variable
* refactor: for -> Promise.all
* refactor: replace duplicate parseSlug
* refactor: add cache layer
* Revert "refactor: add cache layer"
This reverts commit 1c3bfdc6b3
.
* refactor: add comment, move to virtual-mod
* chore: add jsdocs
* refactor: fiiiiine no more `??=`
* fix: ignore underscore files in lookup map
* chore: add unknowncollectionerror on bad file contents
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-05-09 12:17:08 -04:00
Reuben Tier
1b90a7a5d5
Fix generation for routes defined using getStaticPaths ( #7029 )
...
* Fix static site dynamic routes for sitemap integration
* Add changeset
* Update pnpm-lock
* Remove console.log
2023-05-08 16:12:41 -04:00
Houston (Bot)
e54dcd5943
[ci] release ( #7037 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-08 13:17:09 -04:00
Raul Melo
157357e1fb
fix middleware typing export ( #7032 )
...
* fix middleware typing export
* Update .changeset/new-seals-hear.md
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-05-08 09:01:23 -04:00
Bjorn Lu
c009970333
Fix astro:assets
SSR error ( #7034 )
2023-05-08 19:33:08 +08:00
Houston (Bot)
50bf66e4df
[ci] release ( #7005 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-05 13:23:18 -04:00
Emanuele Stoppa
e9f0dd9b47
fix(middleware): emit warning if next
is called and nothing is returned ( #7010 )
...
* fix(middleware): emit warning if `next` is called and nothing is returned
* chore: add test case
* chore: changeset
* chore: restore code, ooops!
* chore: change logic
* change namespace
2023-05-05 13:20:33 -04:00
Erika
1d4db68e64
fix: declare namespace so client-base.d.ts stays an ambient definition ( #7009 )
2023-05-05 16:20:37 +02:00
Waxer59
ad5c75447a
Fix partytown
README ( #7001 )
...
* fix README
* add changeset
2023-05-05 09:52:41 +02:00
Houston (Bot)
170140083c
[ci] release ( #6996 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-04 16:19:01 -04:00
Erika
71332cf969
fix: move service functions from astro/assets to astro/config so it can be imported ( #6995 )
...
* fix: move service functions from astro/assets to astro/config so people can import it
* chore: changeset
2023-05-04 15:57:23 -04:00
Houston (Bot)
51c8e7fe29
[ci] release ( #6977 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-04 12:49:17 -04:00
Erika
818252acda
Add caching for optimized images ( #6990 )
2023-05-04 17:49:55 +02:00
Robin Neal
ca329bbcae
Generate unique ids within each React island ( #6976 )
2023-05-04 15:23:00 +01:00
Emanuele Stoppa
17c074b202
chore: update middleware changeset ( #6986 )
2023-05-04 08:03:52 -04:00
Arsh
80e3d4d3d0
feature: configuration for css inlining behavior ( #6659 )
...
* feature(inline stylesheets): implement as experimental
* test: rename css-inline -> css-import-as-inline
* test(content collections): add de-duplication of css
* test: add new suite for inlineStylesheets configuration
* fix(inline stylesheets): did not act on propagated styles
* hack(inline stylesheets testing): duplicate fixtures
Content collections reuses build data across multiple fixture.builds, even though a configuration change may have changed it.
Duplicating fixtures avoids usage of the stale cache.
https://cdn.discordapp.com/attachments/1039830843440504872/1097795182340092024/Screenshot_87_colored.png
* refactor(css plugin): reduce nesting
* optimization(css rendering): merge <style> tags
Chrome, but not Safari or Firefox, is slower to match rules when they are split across multiple files or style tags.
https://nolanlawson.com/2022/06/22/style-scoping-versus-shadow-dom-which-is-fastest/
Having the abiility to inline stylesheets opens us up to this optimization.
Ideally, it would extend to propagated styles, but that ended up being a rabbit hole.
* typedocs(inlineStylesheets config): ensure consistency
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* chore(build internals): update comment
* correct minor mistake in test
* test(inline stylesheets): unique package names for duplicate fixtures
* refactor(css build plugin): maps -> records
* refactor(css build plugin): remove use of spread operator
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-03 14:49:06 -04:00
Emanuele Stoppa
831b67cdb8
feat(astro): experimental middleware ( #6721 )
...
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-03 17:40:47 +01:00