@netlify/edge-bundler 5.3.1 → 5.3.2

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.
@@ -8,6 +8,7 @@ import { useFixture } from '../test/util.js';
8
8
  import { BundleError } from './bundle_error.js';
9
9
  import { bundle } from './bundler.js';
10
10
  import { isNodeError } from './utils/error.js';
11
+ import { validateManifest } from './validation/manifest/index.js';
11
12
  test('Produces an ESZIP bundle', async () => {
12
13
  const { basePath, cleanup, distPath } = await useFixture('with_import_maps');
13
14
  const declarations = [
@@ -27,6 +28,7 @@ test('Produces an ESZIP bundle', async () => {
27
28
  expect(generatedFiles.length).toBe(3);
28
29
  const manifestFile = await fs.readFile(resolve(distPath, 'manifest.json'), 'utf8');
29
30
  const manifest = JSON.parse(manifestFile);
31
+ expect(() => validateManifest(manifest)).not.toThrowError();
30
32
  const { bundles, import_map: importMapURL } = manifest;
31
33
  expect(bundles.length).toBe(1);
32
34
  expect(bundles[0].format).toBe('eszip2');
@@ -115,12 +115,12 @@ describe('layers', () => {
115
115
  describe('import map URL', () => {
116
116
  test('should accept string value', () => {
117
117
  const manifest = getBaseManifest();
118
- manifest.importMapURL = 'file:///root/.netlify/edge-functions-dist/import_map.json';
118
+ manifest.import_map = 'file:///root/.netlify/edge-functions-dist/import_map.json';
119
119
  expect(() => validateManifest(manifest)).not.toThrowError();
120
120
  });
121
121
  test('should throw on wrong type', () => {
122
122
  const manifest = getBaseManifest();
123
- manifest.importMapURL = ['file:///root/.netlify/edge-functions-dist/import_map.json'];
123
+ manifest.import_map = ['file:///root/.netlify/edge-functions-dist/import_map.json'];
124
124
  expect(() => validateManifest(manifest)).toThrowErrorMatchingSnapshot();
125
125
  });
126
126
  });
@@ -80,7 +80,7 @@ declare const edgeManifestSchema: {
80
80
  additionalProperties: boolean;
81
81
  };
82
82
  };
83
- importMapURL: {
83
+ import_map: {
84
84
  type: string;
85
85
  };
86
86
  bundler_version: {
@@ -51,7 +51,7 @@ const edgeManifestSchema = {
51
51
  type: 'array',
52
52
  items: layersSchema,
53
53
  },
54
- importMapURL: { type: 'string' },
54
+ import_map: { type: 'string' },
55
55
  bundler_version: { type: 'string' },
56
56
  },
57
57
  additionalProperties: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/edge-bundler",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "description": "Intelligently prepare Netlify Edge Functions for deployment",
5
5
  "type": "module",
6
6
  "main": "./dist/node/index.js",