@netlify/edge-bundler 14.8.5 → 14.8.7

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.
@@ -3,6 +3,7 @@ import { type ExecaChildProcess } from 'execa';
3
3
  import { FeatureFlags } from './feature_flags.js';
4
4
  import { Logger } from './logger.js';
5
5
  export declare const LEGACY_DENO_VERSION_RANGE = "1.39.0 - 2.2.4";
6
+ export declare const DENO_VERSION_RANGE = "^2.4.2";
6
7
  export type OnBeforeDownloadHook = () => void | Promise<void>;
7
8
  export type OnAfterDownloadHook = (error?: Error) => void | Promise<void>;
8
9
  export interface DenoOptions {
@@ -13,7 +13,7 @@ export const LEGACY_DENO_VERSION_RANGE = '1.39.0 - 2.2.4';
13
13
  // When updating DENO_VERSION_RANGE, ensure that the deno version
14
14
  // on the netlify/buildbot build image satisfies this range!
15
15
  // https://github.com/netlify/buildbot/blob/f9c03c9dcb091d6570e9d0778381560d469e78ad/build-image/noble/Dockerfile#L410
16
- const DENO_VERSION_RANGE = '^2.4.2';
16
+ export const DENO_VERSION_RANGE = '^2.4.2';
17
17
  export class DenoBridge {
18
18
  cacheDirectory;
19
19
  currentDownload;
@@ -32,10 +32,7 @@ export class DenoBridge {
32
32
  this.onAfterDownload = options.onAfterDownload;
33
33
  this.onBeforeDownload = options.onBeforeDownload;
34
34
  this.useGlobal = options.useGlobal ?? true;
35
- const useNextDeno = options.featureFlags?.edge_bundler_dry_run_generate_tarball ||
36
- options.featureFlags?.edge_bundler_generate_tarball ||
37
- options.featureFlags?.edge_bundler_deno_v2;
38
- this.versionRange = options.versionRange ?? (useNextDeno ? DENO_VERSION_RANGE : LEGACY_DENO_VERSION_RANGE);
35
+ this.versionRange = options.versionRange ?? DENO_VERSION_RANGE;
39
36
  }
40
37
  async downloadBinary() {
41
38
  await this.onBeforeDownload?.();
@@ -61,6 +61,9 @@ export const bundle = async (sourceDirectories, distDirectory, tomlDeclarations
61
61
  rootPath: rootPath ?? basePath,
62
62
  vendorDirectory,
63
63
  });
64
+ if (vendor) {
65
+ importMap.add(vendor.importMap);
66
+ }
64
67
  const bundles = [];
65
68
  if (featureFlags.edge_bundler_generate_tarball || featureFlags.edge_bundler_dry_run_generate_tarball) {
66
69
  const tarballPromise = bundleTarball({
@@ -92,9 +95,6 @@ export const bundle = async (sourceDirectories, distDirectory, tomlDeclarations
92
95
  bundles.push(await tarballPromise);
93
96
  }
94
97
  }
95
- if (vendor) {
96
- importMap.add(vendor.importMap);
97
- }
98
98
  bundles.push(await bundleESZIP({
99
99
  basePath,
100
100
  buildID,
@@ -1,14 +1,12 @@
1
1
  declare const defaultFlags: {
2
2
  edge_bundler_generate_tarball: boolean;
3
3
  edge_bundler_dry_run_generate_tarball: boolean;
4
- edge_bundler_deno_v2: boolean;
5
4
  };
6
5
  type FeatureFlag = keyof typeof defaultFlags;
7
6
  type FeatureFlags = Partial<Record<FeatureFlag, boolean>>;
8
7
  declare const getFlags: (input?: Record<string, boolean>, flags?: {
9
8
  edge_bundler_generate_tarball: boolean;
10
9
  edge_bundler_dry_run_generate_tarball: boolean;
11
- edge_bundler_deno_v2: boolean;
12
10
  }) => FeatureFlags;
13
11
  export { defaultFlags, getFlags };
14
12
  export type { FeatureFlag, FeatureFlags };
@@ -1,7 +1,6 @@
1
1
  const defaultFlags = {
2
2
  edge_bundler_generate_tarball: false,
3
3
  edge_bundler_dry_run_generate_tarball: false,
4
- edge_bundler_deno_v2: true,
5
4
  };
6
5
  const getFlags = (input = {}, flags = defaultFlags) => Object.entries(flags).reduce((result, [key, defaultValue]) => ({
7
6
  ...result,
@@ -44,6 +44,7 @@ export const bundle = async ({ basePath, buildID, deno, distDirectory, functions
44
44
  '--quiet',
45
45
  '--code-splitting',
46
46
  '--allow-import',
47
+ '--node-modules-dir=manual',
47
48
  '--outdir',
48
49
  bundleDir.path,
49
50
  ...functions.map((func) => func.path),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/edge-bundler",
3
- "version": "14.8.5",
3
+ "version": "14.8.7",
4
4
  "description": "Intelligently prepare Netlify Edge Functions for deployment",
5
5
  "type": "module",
6
6
  "main": "./dist/node/index.js",
@@ -80,5 +80,5 @@
80
80
  "urlpattern-polyfill": "8.0.2",
81
81
  "uuid": "^11.0.0"
82
82
  },
83
- "gitHead": "317012ff90f864e30a3e7504d8b6320d411033eb"
83
+ "gitHead": "ef6aea3b70696540950c44602c559d040388af23"
84
84
  }