-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: add support for Edge Functions #4550
Conversation
* chore: change package details * chore: update package * chore: bump * chore: add @netlify/edge-bundler * chore: bump * chore: remove npmrc line * chore: bump version * chore: update @netlify/edge-bundler * feat: deploy Edge Handlers to internal path * feat: add local development experience * chore: bump version * chore: update @netlify/edge-bundler * refactor: move `watcher` util * feat: add `configWatcher` * feat: updates to Edge Handlers dev server * chore: update @netlify/edge-bundler * refactor: remove unused error binding * chore: update package name * chore: update deps * fix: use correct URL path when matching Edge Handlers * chore: bump version * chore: bump version * feat: add support for internal handlers in local dev (#1) * feat: add support for internal handlers in local dev * refactor: correctly merge declarations * chore: bump version * fix: run config watcher only on certain commands (#2) * chore: bump version * chore: bump version * feat: add support for user import maps (#3) * feat: add support for user import maps * feat: warn when failing to read import map file * chore: bump version * chore: bump version * fix: improve error handling for Edge Handlers (#4) * chore: bump version * feat: listen for `NETLIFY_DENO_DEBUG` environment variable (#5) * feat: listen for `NETLIFY_DENO_DEBUG` environment variable * chore: upgrade @netlify-labs/edge-bundler * chore: bump version * fix: use `0.0.0.0` for Deno server host (#6) * fix: wait for Edge Handlers server to become available (#7) * fix: wait for Edge Handlers server to become available * refactor: wait for server inside request * refactor: increase timeout * refactor: use watcher from correct location * chore: update package.json * chore: disable release-please * feat: replace @netlify/build with @netlify-labs/build-internal * chore: use token in CI * refactor: use existing config watcher * chore: remove unused variables * chore: remove actions * chore: remove action * chore: update test * chore: add tests * chore: move env to job * chore: remove duplicate env * chore: fix tests * chore: remove unused imports * fix: check if EH directory exists before deploy * feat: rename Edge Handlers to Edge Functions (#9) * chore: fix linting issue * chore: fix tests * chore: fix test * chore: add `withEdgeFunction` test helper * chore: remove `console.log` * refactor: remove old Edge Handlers code * chore: update packages * fix: remove reference to traffic-mesh * chore: fix linting issue * chore: fix linting issue * refactor: remove unused code * refactor: remove `dev:trace` command * chore: setup Deno in the CI * refactor: use different localhost IP * chore: simplify test * chore: simplify test
* chore: change package details * chore: update package * chore: bump * chore: add @netlify/edge-bundler * chore: bump * chore: remove npmrc line * chore: bump version * chore: update @netlify/edge-bundler * feat: deploy Edge Handlers to internal path * feat: add local development experience * chore: bump version * chore: update @netlify/edge-bundler * refactor: move `watcher` util * feat: add `configWatcher` * feat: updates to Edge Handlers dev server * chore: update @netlify/edge-bundler * refactor: remove unused error binding * chore: update package name * chore: update deps * fix: use correct URL path when matching Edge Handlers * chore: bump version * chore: bump version * feat: add support for internal handlers in local dev (#1) * feat: add support for internal handlers in local dev * refactor: correctly merge declarations * chore: bump version * fix: run config watcher only on certain commands (#2) * chore: bump version * chore: bump version * feat: add support for user import maps (#3) * feat: add support for user import maps * feat: warn when failing to read import map file * chore: bump version * chore: bump version * fix: improve error handling for Edge Handlers (#4) * chore: bump version * feat: listen for `NETLIFY_DENO_DEBUG` environment variable (#5) * feat: listen for `NETLIFY_DENO_DEBUG` environment variable * chore: upgrade @netlify-labs/edge-bundler * chore: bump version * fix: use `0.0.0.0` for Deno server host (#6) * fix: wait for Edge Handlers server to become available (#7) * fix: wait for Edge Handlers server to become available * refactor: wait for server inside request * refactor: increase timeout * refactor: use watcher from correct location * chore: update package.json * chore: disable release-please * feat: replace @netlify/build with @netlify-labs/build-internal * chore: use token in CI * refactor: use existing config watcher * chore: remove unused variables * chore: remove actions * chore: remove action * chore: update test * chore: add tests * chore: move env to job * chore: remove duplicate env * chore: fix tests * chore: remove unused imports * fix: check if EH directory exists before deploy * feat: rename Edge Handlers to Edge Functions (#9) * chore: fix linting issue * chore: fix tests * chore: fix test * chore: add `withEdgeFunction` test helper * chore: remove `console.log` * feat: add `generate` command * chore: add tests * refactor: rename variable * refactor: remove old Edge Handlers code * chore: update packages * fix: remove reference to traffic-mesh * chore: fix linting issue * chore: fix linting issue * refactor: remove unused code * refactor: remove `dev:trace` command * chore: setup Deno in the CI * refactor: use different localhost IP * chore: fix linting issues * refactor: remove nullish coalesce * refactor: remove nullish coalesce * chore: undo test change * fix: unixify Windows paths * feat: set `deno.path` in VS Code settings * chore: update test snapshot * refactor: update message * refactor: rename command * chore: update command name in test * chore: update test snapshot * chore: add test snapshot
* chore: change package details * chore: update package * chore: bump * chore: add @netlify/edge-bundler * chore: bump * chore: remove npmrc line * chore: bump version * chore: update @netlify/edge-bundler * feat: deploy Edge Handlers to internal path * feat: add local development experience * chore: bump version * chore: update @netlify/edge-bundler * refactor: move `watcher` util * feat: add `configWatcher` * feat: updates to Edge Handlers dev server * chore: update @netlify/edge-bundler * refactor: remove unused error binding * chore: update package name * chore: update deps * fix: use correct URL path when matching Edge Handlers * chore: bump version * chore: bump version * feat: add support for internal handlers in local dev (#1) * feat: add support for internal handlers in local dev * refactor: correctly merge declarations * chore: bump version * fix: run config watcher only on certain commands (#2) * chore: bump version * chore: bump version * feat: add support for user import maps (#3) * feat: add support for user import maps * feat: warn when failing to read import map file * chore: bump version * chore: bump version * fix: improve error handling for Edge Handlers (#4) * chore: bump version * feat: listen for `NETLIFY_DENO_DEBUG` environment variable (#5) * feat: listen for `NETLIFY_DENO_DEBUG` environment variable * chore: upgrade @netlify-labs/edge-bundler * chore: bump version * fix: use `0.0.0.0` for Deno server host (#6) * fix: wait for Edge Handlers server to become available (#7) * fix: wait for Edge Handlers server to become available * refactor: wait for server inside request * refactor: increase timeout * refactor: use watcher from correct location * chore: update package.json * chore: disable release-please * feat: replace @netlify/build with @netlify-labs/build-internal * chore: use token in CI * refactor: use existing config watcher * chore: remove unused variables * chore: remove actions * chore: remove action * chore: update test * chore: add tests * chore: move env to job * chore: remove duplicate env * chore: fix tests * chore: remove unused imports * fix: check if EH directory exists before deploy * feat: rename Edge Handlers to Edge Functions (#9) * chore: fix linting issue * chore: fix tests * chore: fix test * chore: add `withEdgeFunction` test helper * chore: remove `console.log` * refactor: remove old Edge Handlers code * chore: update packages * fix: remove reference to traffic-mesh * chore: fix linting issue * chore: fix linting issue * refactor: remove unused code * refactor: remove `dev:trace` command * chore: setup Deno in the CI * refactor: use different localhost IP * chore: simplify test * chore: simplify test * feat: generate ETag header * chore: remove debug statement * chore: add etag module * refactor: use `const` * refactor: make `shouldGenerateETag` a function * chore: add tests * chore: use node-fetch in test
* feat: add own file watcher * chore: fix linting errors * chore: remove unused imports * chore: add comment
* fix(deps): update dependency @netlify/plugins-list to ^6.17.0 (#4472) * fix(deps): update dependency @netlify/plugins-list to ^6.17.0 * chore: update contributors field Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> * fix(deps): update dependency commander to v9.1.0 (#4466) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> * chore(main): release 9.13.4 (#4470) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency netlify to ^11.0.1 (#4473) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency @netlify/build to ^26.5.1 (#4475) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency @netlify/config to ^17.0.19 (#4476) Co-authored-by: Renovate Bot <bot@renovateapp.com> * chore(deps): bump minimist from 1.2.5 to 1.2.6 in /tests/integration/eleventy-site (#4477) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump minimist from 1.2.5 to 1.2.6 in /site (#4478) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ehmicky <ehmicky@users.noreply.github.com> * fix(deps): update dependency stripe to v8.211.0 (#4467) * fix(deps): update dependency stripe to v8.211.0 * style: don't format lock files Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: erezrokah <erezrokah@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore(main): release 9.13.5 (#4474) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency minimist to v1.2.6 (#4480) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency typescript to v4.6.3 (#4481) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix(deps): update rust crate log to 0.4.16 (#4482) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix(deps): update dependency stripe to v8.212.0 (#4483) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix(deps): update dependency gh-release-fetch to v3.0.2 (#4479) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore(main): release 9.13.6 (#4485) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * chore(deps): update dependency @netlify/eslint-config-node to ^5.1.8 (#4487) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix: polling for API Authentication (#4490) * feat: add local dev support for Go scheduled functions (#4491) * fix: detection for Go scheduled functions * fix: incompatible fs import * chore: fix conventional message error * fix: parse schedule from config * fix: unsupported optional chaining * fix: broken function test without config * chore: fix prettier warnings * fix: additional checks in NetlifyFunction * feat: assert valid next_run in test * chore: update names and tests * feat(dev-graph): populate X-Nf-Graph-Token header (#4493) * feat(dev-graph): populate X-Nf-Graph-Token header * chore: update contributors field * chore: update contributors field Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore(main): release 9.14.0 (#4492) * chore(main): release 9.14.0 * chore: update contributors field * chore: update contributors field * chore: update contributors field Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com> * feat: added scheduled functions template for Go (#4495) * feat: go scheduled functions template * chore: update contributors field * chore: placeholder for github handle in go mod * chore: remove unnecessary makefile * chore: go version update Co-authored-by: karagulamos <karagulamos@users.noreply.github.com> * chore(main): release 9.15.0 (#4496) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency @netlify/plugins-list to ^6.18.1 (#4494) * fix(deps): update dependency @netlify/plugins-list to ^6.18.1 * chore: update contributors field Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * feat: improve functions error messages (#4486) * feat: implement better error pages for functions in CLI * chore(main): release 9.16.0 (#4497) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix: fallback should there be an error getting the functions error page template (#4499) * fix: wrap render template in try catch * chore: include template in files tracked by npm * chore(main): release 9.16.1 (#4500) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency cron-parser to v4.3.0 (#4504) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency stripe to v8.215.0 (#4505) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore(main): release 9.16.2 (#4510) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency @netlify/build to ^26.5.2 (#4512) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency @netlify/config to ^17.0.20 (#4513) Co-authored-by: Renovate Bot <bot@renovateapp.com> * chore(main): release 9.16.3 (#4514) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency @netlify/plugins-list to ^6.19.0 (#4516) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency lambda-local to v2.0.2 (#4443) * fix(deps): update dependency lambda-local to v2.0.2 * chore: update contributors field * feat: update to correctly mirror synchronous execution (closes #4304) * chore: update contributors field * chore: update contributors field * fix: format * chore: update contributors field * chore: update contributors field * fix: tests * chore: update contributors field * chore: update contributors field * fix: another test * chore: update contributors field * fix: another test Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Co-authored-by: Netlify Team Account 1 <netlify-team-account-1@users.noreply.github.com> Co-authored-by: Skn0tt <Skn0tt@users.noreply.github.com> Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com> Co-authored-by: Simon Knott <info@simonknott.de> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> * chore(main): release 9.16.4 (#4517) * chore(main): release 9.16.4 * chore: update contributors field Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com> * fix(deps): update dependency stripe to v8.216.0 (#4520) Co-authored-by: Renovate Bot <bot@renovateapp.com> * fix(deps): update dependency semver to v7.3.6 (#4518) Co-authored-by: Renovate Bot <bot@renovateapp.com> * chore(deps): update dependency ava to v4.2.0 (#4519) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix(deps): update dependency winston to v3.7.2 (#4521) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> * chore(main): release 9.16.5 (#4525) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> * chore(deps): update codecov/codecov-action action to v3 (#4522) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix(deps): update dependency @netlify/build to ^26.5.3 (#4529) Co-authored-by: Renovate Bot <bot@renovateapp.com> * chore(deps): update dependency @netlify/eslint-config-node to v6 (#4501) * chore(deps): update dependency @netlify/eslint-config-node to v6 * chore: fix eslintrc * chore: fix linting * chore: update shrinkwrap file Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: ehmicky <ehmicky@gmail.com> Co-authored-by: erezrokah <erezrokah@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore(main): release 9.16.6 (#4530) Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore: merge main * chore: remove dependency * chore: fix linting errors * chore: fix test * chore: remove duplicate test Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ehmicky <ehmicky@users.noreply.github.com> Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Co-authored-by: Karagulamos <karagulamos@gmail.com> Co-authored-by: Daniel Woelfel <dwwoelfel@gmail.com> Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com> Co-authored-by: karagulamos <karagulamos@users.noreply.github.com> Co-authored-by: Jackie Macharia <jackline.macharia@netlify.com> Co-authored-by: Netlify Team Account 1 <netlify-team-account-1@users.noreply.github.com> Co-authored-by: Skn0tt <Skn0tt@users.noreply.github.com> Co-authored-by: Simon Knott <info@simonknott.de> Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com> Co-authored-by: ehmicky <ehmicky@gmail.com>
* fix: adjust Edge Functions deploy message * refactor: reinstate internal count
📊 Benchmark resultsComparing with fbd4510 Package size: 273 MB⬇️ 38.94% decrease vs. fbd4510
Legend
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really high-quality PR with lots of tests! 💯 🐳
@@ -5,18 +5,20 @@ const { Buffer } = require('buffer') | |||
* questions correctly typed or the process will keep waiting for input. | |||
* @param {ExecaChildProcess<string>} process | |||
* @param {Array<{question: string, answer: string}>} questions | |||
* @param {Array<number>} prompts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you added tests for the question handling 👍
log(`${NETLIFYDEVLOG} VS Code settings file ${fileExists ? 'updated' : 'created'}.`) | ||
log( | ||
`${NETLIFYDEVWARN} If you don't have the Deno VS Code extension, install it by visiting ${chalk.blue( | ||
'https://ntl.fyi/deno-vscode', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 🔥 🔥
No description provided.