Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* First pass at transition:persist
* Persistent islands
* Changeset
* Updated compiler
* Use official release
* Upgrade again
* Refactor to allow head content to persist untouched
* >=
* Specify the types for "astro:persist"
* Automatically persist links
* Use reference for array
* Upgrade to latest compiler version
* Explain the feature
* Update .changeset/empty-experts-unite.md
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
* Update .changeset/empty-experts-unite.md
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
* Update .changeset/empty-experts-unite.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/empty-experts-unite.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix: res.writeHead is not a function
* fix: handler params type added
* fix: handler function params error
* Update packages/integrations/node/src/nodeMiddleware.ts
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Add astro:beforeload event
* Adding a changeset
* Update .changeset/chilled-elephants-develop.md
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
---------
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
* 7576 - initial support for HTML inside Markdoc.
This uses htmlparser2 to perform a pure token transform/mutation
on the markdown-it tokens, replacing the original raw HTML string
tokens with a richer set of tokens per HTML node, and in the process
Markdoc tags are interleaved in the resulting token graph at the
appropriate locations
This removes the legacy config of the @astrojs/markdoc integration
entirely (suggested by @bholmesdev) and introduces a new type for
options to be specified in the astro config, initially, with just the new
"enableHTML" option
When "enableHTML" is *not* enabled (the default), the behavior
of the entire @astrojs/markdoc integration should remain functionally
equivalent to before this change
* 7576 - fixed issues with whitespace preservation
also:
* cleaned up " to ' for astro project preferred linting
* made the html rendering test fixture use a dynamic path
* 7576 - detailed nested HTML test coverage
* 7576 - component + HTML interleaved tests
* 7576 - fix lint problems from previous changes
* 7576 - some commentary
* 7576 - file naming, refactor html under imports, package.json exports definition for html
* 7576
* move out of extensions dir, remove export
* cdata handling changes
* 7576
* inline license from third party code
* cleanup test class copy of HTML output
* remove // third party indicators for imports (clarification: not third party code, just a indicator this group of imports is third party)
* 7576 - fixed test before/after for DRY'ness
* 7576 - no need to React-ify HTML attribute case
* 7576 - rename "enableHTML" option to "allowHTML"
* Added Markdoc allowHTML feature changeset
* 7576 - updated README with allowHTML info
* 7576 - fixed changeset typo
* 7576 - minor edits based on PR feedback for docs
* 7576 - minor edits based on PR feedback for docs
Every regex that tries to match a substring with .* or .+ is
guaranteed to be wrong. In this case, it was giving incorrect matches
straddling multiple quoted attributes:
<img __ASTRO_IMAGE_="../assets/image.png"> and <a href="link">link</a>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes#7741.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Basic support
* Add the fade transition
* Move CSS into a separate file
* Add transition name
* View Transitions changeset
* Replace the boolean transition with 'morph'
* Update to use `transition:animate`
* Use head propagation
* Move CSS into a separate file
* Add builtin animations and namespaced module
* Misquote
* Remove unused code
* Add automatic prefetching to the View Transitions router
* Use a data attribute for back nav animations
* Use [data-astro-transition]
* Add view transitions to examples
* Wait on the HTML response before calling startViewTransition
* Updated stuff
* Update the compiler
* Fix
* Fallback support
* Properly do fallback
* Simplify the selectors
* Put viewTransitions support behind a flag
* Upgrade the compiler
* Remove unused import
* Add tests
* Use an explicit import instead of types
* Fix case where the click comes from within nested content
* Fix linting
* Add a test for the back button
* Prevent glitch in fallback
* Do not combine selectors
* Fallback to MPA nav if there is an issue fetching
* Fallback swap if there are no animations
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/components/ViewTransitions.astro
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update packages/astro/components/ViewTransitions.astro
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update the changeset
* PR review changes
* Update more based on review comments.
* Update the updateDOM default
* Pass in transitions options to the compiler
* Update broken tests
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* h2 -> h4
* Upgrade to stable compiler
* Remove exp redirects from sitemap
* Remove usage from examples
* Remove example updates
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Remove experimental flag for redirects config
* Remove experimental from tests
* Remove experimental CLI flag
* Add changeset
* Removing redirect test that is no longer relevant
* Remove experimental label"
* Update .changeset/dry-beers-grow.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/dry-beers-grow.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Remove old function
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix(#7301): load 404 page in dev server when returning 404 status code
* chore: add changeset
* fix(404): expose exact pathname/URL when rendering 404
* test: add custom-404-server test
* fix(#7080): sitemap should only add trailing slash to pages
* fix(sitemap): only include pages in sitemap
* chore: add test
* chore: remove unused import
* docs: update readme
* Allow SVG files when using Assets
* Fixed TypeScript error
* fix: some small nits and add a test
* chore: changeset
---------
Co-authored-by: Princesseuh <princssdev@gmail.com>
* modifies prefetch to add the option to only prefetch certain pages on hover
* adds new pages to the test website to showcase prefetch-intent functionality
* adds tests to verify prefetch-intent behavior
* adds changelog
* waits until networkidle to check if the prefetching worked instead of waiting on a specific url load
* allows intentSelector to be either a string or array of strings
* Revert "allows intentSelector to be either a string or array of strings"
This reverts commit b0268eb0d5.
* fixes the multiple selector logic and adds tests
* updates docs to include new prefetch-intent integration
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/little-cars-exist.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* docs: add docs link to markdoc error
* docs: add named exports guide to README
* chore: changeset
* edit: no like so
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* edit: exposed as named exports
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
---------
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* initial commit
* try to fix windows
* output files directly into the correct folder
* allow for rest parameters
* use fixed hook
* improve tests
* apply doc's team suggestions for README
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* try to fix prerendering
* apply doc's team suggestion for changeset
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* bump to minor
* readme update
* resolve review comments
* optimize memory allocation
* resolve review comments
* add removed link, to make sure old docs keep same
* resolve comment
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* start of vercel split support
* Split Mode with the Vercel Adapter
* Write routes into the config.json
* Add a changeset
* Add docs
* Better changeset
* Early out if `importedModule` has no `id`
We can do this as line 97 also has this guard for each `importedModules`
* Simplify `isPropagationStoppingPoint`
* Fix actual bug
* chore: changeset
---------
Co-authored-by: bholmesdev <hey@bholmes.dev>
* Prevent accidental CSS inclusion in dev
* Use ssrTransformResult.deps instead
* Fix types
* Get dynamic deps too
* Handle virtual module deps
* Fix test on windows
* feat: use persistent per turbo recs
* feat: preserve types yay
* fix: *actually* solve problem
* fix: type failures from content types template
* fix: bad JS doc comments
* fix: bad src/content/template path
* chore: changeset
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* wip: figure out stack issue, weird JSON stringify bug on zod issue
* refactor: return data instead of mutating
* refactor: remove need for reassignment
* fix: e.stack only
* chore: changeset
* fix: move `node:` libs out of utils
* fix: node -> default
* chore: remove kleur from markdoc ex (why was this there??)
* chore: lock
* chore: changeset
* fix: config, prism, shiki exports
* fix: type error for `render` property
* chore: use `.ts` files in select tests for type checks
* fix: type error on shiki() promise
* chore: changeset
* fix: propagate assets when using document `render: null`
* fix: reverse spread order
* refactor: use README rec in test
* chore: changeset
* chore: revert unneeded changes
* Utilizes the new standard WebAPI Fetch Headers.getSetCookie() function
to safely handle multiple set-cookie headers when converting from a
WebAPI Response to a NodeJS ServerResponse
Modifies the existing nodeMiddleware logic which first set AstroCookies
on ServerResponse.setHeader(...) and then called
ServerResponse.writeHead(status, Response.headers) which means any that
if the WebAPI Response had any set-cookie headers on it, they would
replace anything from AstroCookies.
The new logic delegates appending AstroCookie values onto the WebAPI
Response Headers object, so that a single unified function safely
converts the WebAPI Response Headers into a NodeJS compatible
OutgoingHttpHeaders object utilizing the new standard
Headers.getSetCookie() function provided by the undici WebAPI polyfills.
Plus extensive test coverage.
* #7226 - changeset for NodeJS adapter set-cookie fix
* fixing all double quotes to single quotes
---------
Co-authored-by: Alex Sherwin <alex.sherwin@acadia.inc>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fix: middleware for API endpoints
* feat: remove experimental flag middleware
* chore: rebase and update
* chore: check if physical file exists
* chore: restore change
* merge
* merge
* fix: remove options, not needed
* remove experimental from types
* chore: don't have the middleware inside the manifest
* Update how redirects work, slightly
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* changeset
* chore(inline stylesheets config): stabilize
* grammar
* not a major change
* Update inlineStylesheets version in the configuration reference
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Redirects spike
* Allow redirects in static mode
* Support in Netlify as well
* Adding a changeset
* Rename file
* Fix build problem
* Refactor to be more modular
* Fix location ref
* Late test should only run in SSR
* Support redirects in Netlify SSR configuration (#7167)
* Implement support for dynamic routes in redirects (#7173)
* Implement support for dynamic routes in redirects
* Remove the .only
* No need to special-case redirects in static build
* Implement support for redirects config in the Vercel adapter (#7182)
* Implement support for redirects config in the Vercel adapter
* Remove unused condition
* Move to a internal helper package
* Add support for the object notation in redirects
* Use status 308 for non-GET redirects (#7186)
* Implement redirects in Cloudflare (#7198)
* Implement redirects in Cloudflare
* Fix build
* Update tests b/c of new ordering
* Debug issue
* Use posix.join
* Update packages/underscore-redirects/package.json
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update based on review comments
* Update broken test
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Test that redirects can come from middleware (#7213)
* Test that redirects can come from middleware
* Allow non-promise returns for middleware
* Implement priority (#7210)
* Refactor
* Fix netlify test ordering
* Fix ordering again
* Redirects: Allow preventing the output of the static HTML file (#7245)
* Do a simple push for priority
* Adding changesets
* Put the implementation behind a flag.
* Self review
* Update .changeset/chatty-actors-stare.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update docs on dynamic restrictions.
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Code review changes
* Document netlify static adapter
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Slight reword
* Update .changeset/twenty-suns-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add a note about public/_redirects file
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* 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>