Skip to content

Commit eaf5191

Browse files
authored
feat: support none bundler (#4981)
* feat: support `none` bundler * fix: update snapshots * fix: update snapshot
1 parent 32ad60d commit eaf5191

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

packages/build/tests/monitor/snapshots/tests.js.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,9 +1779,9 @@ Generated by [AVA](https://avajs.dev).
17791779
Error monitoring payload:␊
17801780
{␊
17811781
"errorClass": "functionsBundling",␊
1782-
"errorMessage": "Command failed with exit code 1: deno run --allow-all --no-config --import-map=/node_module/path --quiet /node_module/path {/"basePath/":/"packages/build/tests/monitor/fixtures/edge_function_error",/"destPath/":/"packages/build/tests/monitor/fixtures/edge_function_error/.netlify/edge-functions-dist/HEXADECIMAL_ID.eszip",/"externals/":[],/"functions/":[{/"name/":/"trouble/",/"path/":/"packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/trouble.ts"}],/"importMapData/":/"{//"imports//":{//"netlify:edge//"://"https://edge.netlify.com/v1.0.0/index.ts//"},//"scopes//":{}}/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/file.ts/n const ret = new Error(getStringFromWasm0(arg0, arg1));/n ^/n at __wbg_new_HEXADECIMAL_ID (/node_module/path)/n at <anonymous> (/node_module/path)/n at <anonymous> (/node_module/path)/n at <anonymous> (/node_module/path)/n at __wbg_adapter_40 (/node_module/path)/n at real (/node_module/path)",␊
1782+
"errorMessage": "Command failed with exit code 1: deno run --allow-all --no-config --import-map=/node_module/path --quiet /node_module/path {/"basePath/":/"packages/build/tests/monitor/fixtures/edge_function_error",/"destPath/":/"packages/build/tests/monitor/fixtures/edge_function_error/.netlify/edge-functions-dist/HEXADECIMAL_ID.eszip",/"externals/":[],/"functions/":[{/"name/":/"trouble/",/"path/":/"packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/trouble.ts"}],/"importMapData/":/"{//"imports//":{//"netlify:edge//"://"https://edge.netlify.com/v1.0.0/index.ts//"},//"scopes//":{}}/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/file.ts/n const ret = new Error(getStringFromWasm0(arg0, arg1));/n ^/n at __wbg_new_HEXADECIMAL_ID (/node_module/path)/n at <anonymous> (/node_module/path)/n at <anonymous> (/node_module/path)/n at <anonymous> (/node_module/path)/n at __wbg_adapter_40 (/node_module/path)/n at real (/node_module/path)/n at eventLoopTick (ext:core/01_core.js:80:80)",␊
17831783
"context": "Bundling of edge function failed",␊
1784-
"groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at <anonymous> /external/path at <anonymous> /external/path at <anonymous> /external/path at __wbg_adapter_0 /external/path at real /external/path",␊
1784+
"groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at <anonymous> /external/path at <anonymous> /external/path at <anonymous> /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path",␊
17851785
"severity": "info",␊
17861786
"unhandled": false,␊
17871787
"location": {␊
@@ -1792,7 +1792,7 @@ Generated by [AVA](https://avajs.dev).
17921792
"pluginPackageJson": false,␊
17931793
"BUILD_ID": "0",␊
17941794
"other": {␊
1795-
"groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at <anonymous> /external/path at <anonymous> /external/path at <anonymous> /external/path at __wbg_adapter_0 /external/path at real /external/path"␊
1795+
"groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at <anonymous> /external/path at <anonymous> /external/path at <anonymous> /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path"␊
17961796
}␊
17971797
}`
17981798

Binary file not shown.

packages/build/types/config/functions.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type FunctionsObject = {
1717
/**
1818
* the function bundling method used in [`@netlify/zip-it-and-ship-it`](https://github.com/netlify/zip-it-and-ship-it).
1919
*/
20-
node_bundler?: 'esbuild'
20+
node_bundler?: 'esbuild' | 'none'
2121

2222
/**
2323
* a list of Node.js modules that are copied to the bundled artifact without adjusting their source or references during the bundling process.

packages/config/src/functions_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import isPlainObj from 'is-plain-obj'
22

33
import { isDefined } from './utils/remove_falsy.js'
44

5-
export const bundlers = ['esbuild', 'nft', 'zisi']
5+
export const bundlers = ['esbuild', 'nft', 'zisi', 'none']
66
export const WILDCARD_ALL = '*'
77

88
// Removing the legacy `functions` from the `build` block.

packages/config/tests/validate/snapshots/tests.js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ Generated by [AVA](https://avajs.dev).
13621362
> Snapshot 1
13631363
13641364
`When resolving config file packages/config/tests/validate/fixtures/function_config_invalid_node_bundler/netlify.toml:␊
1365-
Configuration property functions.*.node_bundler must be one of: esbuild, nft, zisi␊
1365+
Configuration property functions.*.node_bundler must be one of: esbuild, nft, zisi, none
13661366
13671367
Invalid syntax␊
13681368
Binary file not shown.

0 commit comments

Comments
 (0)