summaryrefslogtreecommitdiff
path: root/packages/integrations/netlify/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-27Remove Netlify adapter from core (#8574)Gravatar Matthew Phillips 6-588/+0
* New link * More explicit * Add placeholder package.json * lockfile * add keyworkds
2023-09-25[ci] formatGravatar ematipico 1-8/+8
2023-09-25fix(netlify): bundle netlify functions as ESM to support top-level await (#8661)Gravatar Simon Knott 1-1/+11
2023-08-15Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 1-1/+16
2023-08-11[ci] formatGravatar lilnasy 1-2/+6
2023-08-11Add Incremental Static Regeneration support for the Netlify's on-demand ↵Gravatar Arsh 1-1/+12
builders adapter (#7975) * feat(netlify): expose builders ttl as a local * add changeset * docs(netlify): caching using on-demand builders * reword readme section * Update packages/integrations/netlify/package.json Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> * include builders-types.d.ts in the distribution * document caveat regarding query params * update changeset * mutation -> function * locals.netlify -> locals.runtime * update types and changeset * Apply suggestions from code review Co-authored-by: Elian ☕️ <hello@elian.codes> * Apply suggestions from code review Co-authored-by: Elian ☕️ <hello@elian.codes> --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Elian ☕️ <hello@elian.codes>
2023-08-10Remove the Nelify Edge adapter (#8029)Gravatar Matthew Phillips 3-133/+0
2023-08-08feat: astro features (#7815)Gravatar Emanuele Stoppa 2-0/+20
2023-08-08feat: adapter features, deprecate astro configs (#7839)Gravatar Emanuele Stoppa 2-2/+12
2023-08-08feat: remove webapi in favor of a smaller polyfill (#7840)Gravatar Erika 1-4/+2
* feat: remove webapi in favor of a smaller polyfill * test: remove old test * test: 🤦‍♀️ * chore: changeset
2023-08-01[ci] formatGravatar bluwy 1-1/+1
2023-08-01Refactor 404 and 500 approach (#7754)Gravatar Nate Moore 2-26/+12
* fix(app): refactor 404 and 500 approach * chore: refactor logic * fix: always treat error as page * test: migrate ssr-prerender-404 to node adapter * feat: merge original response metadata with error response * chore: update lockfile * chore: trigger ci * chore(lint): fix lint issue * fix: ensure merged request has proper status * fix(node): prerender test * chore: update test label * fix(node): improve 404 behavior in middleware mode * fix(vercel): improve 404 behavior * fix(netlify): improve 404 behavior * chore: update test labels * chore: force ci * chore: fix lint * fix: avoid infinite loops * test: fix failing test in Node 18 * chore: remove volta
2023-07-26Prevent building .html files in hybrid mode (#7805)Gravatar Matthew Phillips 1-0/+1
* Prevent building .html files in hybrid mode * Adding a changeset
2023-07-20Fix organize-imports-cli with satisfies operator (#7727)Gravatar Bjorn Lu 1-1/+1
2023-07-18nit: use `node:` prefix everywhere (#7692)Gravatar Erika 1-2/+2
* nit: use `node:` prefix everywhere * nit: fs/promises too * test: workaround issue in node builtin detection
2023-07-17[ci] formatGravatar ematipico 3-6/+6
2023-07-17feat(@astrojs/netlify): edge middleware support (#7632)Gravatar Emanuele Stoppa 5-105/+206
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-13[ci] formatGravatar ematipico 1-2/+2
2023-07-13feat(@astrojs/netlify): add `build.split` support (#7615)Gravatar Emanuele Stoppa 4-15/+51
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-06-05[ci] formatGravatar matthewp 2-6/+8
2023-06-05Redirects (#7067)Gravatar Matthew Phillips 3-130/+37
* 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>
2023-05-17feat: hybrid output (#6991)Gravatar Happydev 2-2/+6
* 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-04-10Fix no edge functions deployed to netlify (#6793)Gravatar André Alves 1-1/+2
2023-04-06[ci] formatGravatar matthewp 1-4/+5
2023-04-06Use Deno API to set Astro.clientAddress (#6651)Gravatar Matthew Phillips 1-2/+5
* Use Deno API to set Astro.clientAddress * Add types
2023-03-20feat(all): Migrate to TypeScript 5.0 (#6579)Gravatar Erika 1-1/+1
2023-03-10fix: Enforce the usage of type imports when possible (#6502)Gravatar Erika 1-1/+1
2023-02-21Use .mjs extension when building for netlify edge and vercel serverless (#6317)Gravatar Bjorn Lu 1-1/+1
2023-02-21fix(cookies): Update Undici to 5.20 and fix cookies behaviour (#6323)Gravatar Erika 1-28/+5
* fix(cookies): Update Undici to 5.20 and fix cookies behaviour * chore: changeset
2023-01-27[ci] formatGravatar matthewp 2-2/+2
2023-01-27feat(@astrojs/netlify): Add on-demand builders Netlify functions (#5874)Gravatar Juan Miguel Guerrero 4-7/+14
* Add on-demand builders option * chore: add changeset * docs: add documentation in configuration section * Update packages/integrations/netlify/README.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/integrations/netlify/README.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/integrations/netlify/README.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/twenty-pans-agree.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-23[ci] formatGravatar matthewp 1-23/+34
2023-01-23Support prerender in Netlify redirects (#5904)Gravatar Matthew Phillips 3-16/+104
* Support prerender in Netlify redirects * Updated sorting algorithm * Update packages/integrations/netlify/src/shared.ts Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-01-18[ci] formatGravatar natemoo-re 1-1/+0
2023-01-18fix(#5723): build prerendered pages with Netlify edge functions (#5885)Gravatar Nate Moore 1-15/+0
* fix(#5723): build prerendered pages with Netlify edge functions * chore: add changeset Co-authored-by: Nate Moore <nate@astro.build>
2023-01-09Output assets to `_astro` directory (#5772)Gravatar Nate Moore 1-1/+2
* WIP: emit assets to _astro * chore: better _astro handling * refactor: emit server assets to `chunks/` * chore: update /asset tests * test: add explicit build output tests * fix: update image to emit to configured asset path * chore: update changeset * chore: update image tests * chore: update image tests * test: update css test * test: update bundling test * test: update tests * 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> * chore: add clarifying comment Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-01-06Drop Node 14 in CI for Node 16 and add Node 18 to the matrix (#5768)Gravatar Erika 1-12/+105
* ci(node): Move CI to Node 16 and add Node 18 to the matrix * fix(netlify): Fix set-cookie not working on Node 18 * fix(netlify): Handle if `set-cookie` is already somehow an array (apparently it can?) * test(node): Fix `toPromise` to match Astro's * fix(tests): Use the actual underlying ArrayBuffer instance to create the buffer in toPromise * chore: changeset
2023-01-05feat: change path into assets (#5584)Gravatar wulinsheng123 1-1/+1
* feat: change path * feat: fix bug #5502 * fix: astro fix to patch * feat: change to major * chore: update changelog * fix: change entryFileNames into assets folder * fix: fix error message in test Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2023-01-03Remove deprecated APIs (#5707)Gravatar Bjorn Lu 2-20/+0
* Remove deprecated Astro globals * Remove deprecated hook param * Fix test * Add changeset * Add TODO
2022-12-19Fix spelling mistakes found by codespell and mwic (#5627)Gravatar Anders Kaseorg 1-1/+1
2022-12-16Experimental Prerender API (#5297)Gravatar Nate Moore 1-4/+14
* wip: hybrid output * wip: hybrid output mvp * refactor: move hybrid => server * wip: hybrid support for `output: 'server'` * feat(hybrid): overwrite static files * fix: update static build * feat(hybrid): skip page generation if no static entrypoints * feat: migrate from hybrid output => prerender flag * fix: appease typescript * fix: appease typescript * fix: appease typescript * fix: appease typescript * fix: improve static cleanup * attempt: avoid preprocess scanning * hack: force generated .js files to be treated as ESM * better handling for astro metadata * fix: update scanner plugin * fix: page name bug * fix: keep ssr false when generating pages * fix: force output to be treated as ESM * fix: client output should respect buildConfig * fix: ensure outDir is always created * fix: do not replace files with noop * fix(netlify): add support for `experimental_prerender` pages * feat: switch to `experimental_prerender` * chore: update es-module-lexer code in test * feat: improved code-splitting, cleanup * feat: move prerender behind flag * test: prerender * test: update prerender test * chore: update lockfile * fix: only match `.html` files when resolving assets * chore: update changeset * chore: remove ESM hack * chore: allow `--experimental-prerender` flag, move `--experimental-error-overlay` into subobject * chore: update changeset * test(vite-plugin-scanner): add proper unit tests for vite-plugin-scanner * chore: remove leftover code * chore: add comment on cleanup task * refactor: move manual chunks logic to vite-plugin-prerender * fix: do not support let declarations * test: add var test * refactor: prefer existing util * Update packages/astro/src/@types/astro.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/astro/src/core/errors/errors-data.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/astro/src/@types/astro.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-11-08Support environment variables in Cloudflare and Netlify Edge functions (#5301)Gravatar Bjorn Lu 1-1/+1
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-10-12[ci] formatGravatar matthewp 2-3/+3
2022-10-12Node.js standalone mode + support for astro preview (#5056)Gravatar Matthew Phillips 2-27/+47
* wip * Deprecate buildConfig and move to config.build * Implement the standalone server * Stay backwards compat * Add changesets * correctly merge URLs * Get config earlier * update node tests * Return the preview server * update remaining tests * swap usage and config ordering * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/metal-pumas-walk.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/metal-pumas-walk.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/stupid-points-refuse.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/stupid-points-refuse.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Link to build.server config Co-authored-by: Fred K. Schott <fkschott@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-09-28[ci] formatGravatar matthewp 2-4/+4
2022-09-28Astro.cookies implementation (#4876)Gravatar Matthew Phillips 2-1/+17
* Astro.cookies implementation * Remove unused var * Fix build * Add a changesetp * Remove spoken-word expires
2022-09-20[ci] formatGravatar matthewp 1-1/+1
2022-09-20Fixes processing of images in Netlify functions (#4820)Gravatar Matthew Phillips 1-3/+8
2022-09-12Fix route validation for Netlify Edge (#4722)Gravatar Ben Holmes 1-1/+4
* fix: serialize route pattern for Netlify edge Co-authored-by: Jackie Macharia <jackiewmacharia> * chore: changeset
2022-08-11[ci] formatGravatar FredKSchott 1-1/+1