@netlify/edge-bundler 14.5.4 → 14.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -581,7 +581,7 @@ test('Loads edge functions from the Frameworks API', async () => {
|
|
|
581
581
|
});
|
|
582
582
|
await cleanup();
|
|
583
583
|
});
|
|
584
|
-
describe.skipIf(lt(denoVersion, '2.4.
|
|
584
|
+
describe.skipIf(lt(denoVersion, '2.4.3'))('Produces a tarball bundle', () => {
|
|
585
585
|
test('With only local imports', async () => {
|
|
586
586
|
const systemLogger = vi.fn();
|
|
587
587
|
const { basePath, cleanup, distPath } = await useFixture('imports_node_builtin', { copyDirectory: true });
|
|
@@ -623,8 +623,7 @@ describe.skipIf(lt(denoVersion, '2.4.2'))('Produces a tarball bundle', () => {
|
|
|
623
623
|
await cleanup();
|
|
624
624
|
await rm(vendorDirectory.path, { force: true, recursive: true });
|
|
625
625
|
});
|
|
626
|
-
|
|
627
|
-
test.todo('Using npm modules', async () => {
|
|
626
|
+
test('Using npm and remote modules', async () => {
|
|
628
627
|
const systemLogger = vi.fn();
|
|
629
628
|
const { basePath, cleanup, distPath } = await useFixture('imports_npm_module', { copyDirectory: true });
|
|
630
629
|
const sourceDirectory = join(basePath, 'functions');
|
|
@@ -37,7 +37,7 @@ const getLocalEntryPoint = (functions, { bootstrapURL, formatExportTypeError = d
|
|
|
37
37
|
}
|
|
38
38
|
`;
|
|
39
39
|
});
|
|
40
|
-
const bootCall = `boot(functions
|
|
40
|
+
const bootCall = `boot(() => Promise.resolve(functions));`;
|
|
41
41
|
return [bootImport, declaration, ...imports, bootCall].join('\n\n');
|
|
42
42
|
};
|
|
43
43
|
export { generateStage2, getLocalEntryPoint };
|
|
@@ -10,7 +10,15 @@ test('`getLocalEntryPoint` returns a valid stage 2 file for local development',
|
|
|
10
10
|
// This is a fake bootstrap that we'll create just for the purpose of logging
|
|
11
11
|
// the functions and the metadata that are sent to the `boot` function.
|
|
12
12
|
const printer = `
|
|
13
|
-
export const boot = async (
|
|
13
|
+
export const boot = async (functionsLoader) => {
|
|
14
|
+
const functions = await functionsLoader()
|
|
15
|
+
const metadata = { functions: {} }
|
|
16
|
+
|
|
17
|
+
// Generate metadata for each function (simulating what the real bootstrap would have)
|
|
18
|
+
for (const name in functions) {
|
|
19
|
+
metadata.functions[name] = { url: new URL('./' + name + '.mjs', import.meta.url).href }
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
const responses = {}
|
|
15
23
|
|
|
16
24
|
for (const name in functions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/edge-bundler",
|
|
3
|
-
"version": "14.5.
|
|
3
|
+
"version": "14.5.6",
|
|
4
4
|
"description": "Intelligently prepare Netlify Edge Functions for deployment",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/node/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test": "test/node"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@netlify/edge-functions-bootstrap": "^2.
|
|
45
|
+
"@netlify/edge-functions-bootstrap": "^2.17.1",
|
|
46
46
|
"@types/node": "^18.19.111",
|
|
47
47
|
"@types/semver": "^7.3.9",
|
|
48
48
|
"@types/uuid": "^10.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"better-ajv-errors": "^1.2.0",
|
|
66
66
|
"common-path-prefix": "^3.0.0",
|
|
67
67
|
"env-paths": "^3.0.0",
|
|
68
|
-
"esbuild": "0.25.
|
|
68
|
+
"esbuild": "0.25.10",
|
|
69
69
|
"execa": "^8.0.0",
|
|
70
70
|
"find-up": "^7.0.0",
|
|
71
71
|
"get-port": "^7.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"urlpattern-polyfill": "8.0.2",
|
|
81
81
|
"uuid": "^11.0.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "ce591ef6a6fb974be2a38812a1e0abc98c3c14f6"
|
|
84
84
|
}
|