Skip to content

Commit 1420b86

Browse files
authored
fix: remove references to edge_bundler_deno_v2 feature flag (#6764)
1 parent 8049f38 commit 1420b86

File tree

5 files changed

+7
-17
lines changed

5 files changed

+7
-17
lines changed

packages/edge-bundler/node/bridge.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import semver from 'semver'
99
import tmp, { DirectoryResult } from 'tmp-promise'
1010
import { test, expect } from 'vitest'
1111

12-
import { DenoBridge, LEGACY_DENO_VERSION_RANGE } from './bridge.js'
12+
import { DenoBridge, DENO_VERSION_RANGE } from './bridge.js'
1313
import { getPlatformTarget } from './platform.js'
1414

1515
const require = createRequire(import.meta.url)
1616
const archiver = require('archiver')
1717

1818
const getMockDenoBridge = function (tmpDir: DirectoryResult, mockBinaryOutput: string) {
19-
const latestVersion = semver.minVersion(LEGACY_DENO_VERSION_RANGE)?.version ?? ''
19+
const latestVersion = semver.minVersion(DENO_VERSION_RANGE)?.version ?? ''
2020
const data = new PassThrough()
2121
const archive = archiver('zip', { zlib: { level: 9 } })
2222

@@ -139,7 +139,7 @@ test('Does inherit environment variables if `extendEnv` is not set', async () =>
139139

140140
test('Provides actionable error message when downloaded binary cannot be executed', async () => {
141141
const tmpDir = await tmp.dir()
142-
const latestVersion = semver.minVersion(LEGACY_DENO_VERSION_RANGE)?.version ?? ''
142+
const latestVersion = semver.minVersion(DENO_VERSION_RANGE)?.version ?? ''
143143
const data = new PassThrough()
144144
const archive = archiver('zip', { zlib: { level: 9 } })
145145

packages/edge-bundler/node/bridge.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const LEGACY_DENO_VERSION_RANGE = '1.39.0 - 2.2.4'
1919
// When updating DENO_VERSION_RANGE, ensure that the deno version
2020
// on the netlify/buildbot build image satisfies this range!
2121
// https://github.com/netlify/buildbot/blob/f9c03c9dcb091d6570e9d0778381560d469e78ad/build-image/noble/Dockerfile#L410
22-
const DENO_VERSION_RANGE = '^2.4.2'
22+
export const DENO_VERSION_RANGE = '^2.4.2'
2323

2424
export type OnBeforeDownloadHook = () => void | Promise<void>
2525
export type OnAfterDownloadHook = (error?: Error) => void | Promise<void>
@@ -69,13 +69,7 @@ export class DenoBridge {
6969
this.onAfterDownload = options.onAfterDownload
7070
this.onBeforeDownload = options.onBeforeDownload
7171
this.useGlobal = options.useGlobal ?? true
72-
73-
const useNextDeno =
74-
options.featureFlags?.edge_bundler_dry_run_generate_tarball ||
75-
options.featureFlags?.edge_bundler_generate_tarball ||
76-
options.featureFlags?.edge_bundler_deno_v2
77-
78-
this.versionRange = options.versionRange ?? (useNextDeno ? DENO_VERSION_RANGE : LEGACY_DENO_VERSION_RANGE)
72+
this.versionRange = options.versionRange ?? DENO_VERSION_RANGE
7973
}
8074

8175
private async downloadBinary() {

packages/edge-bundler/node/bundler.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,6 @@ test('Is backwards compatible with Deno 1.x', async () => {
634634

635635
await bundle([sourceDirectory], distPath, [], {
636636
basePath,
637-
featureFlags: {
638-
edge_bundler_deno_v2: true,
639-
},
640637
systemLogger,
641638
vendorDirectory: vendorDirectory.path,
642639
})

packages/edge-bundler/node/feature_flags.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const defaultFlags = {
22
edge_bundler_generate_tarball: false,
33
edge_bundler_dry_run_generate_tarball: false,
4-
edge_bundler_deno_v2: true,
54
}
65

76
type FeatureFlag = keyof typeof defaultFlags

packages/edge-bundler/node/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import semver from 'semver'
99
import tmp from 'tmp-promise'
1010
import { test, expect, vi } from 'vitest'
1111

12-
import { DenoBridge, LEGACY_DENO_VERSION_RANGE } from './bridge.js'
12+
import { DenoBridge, DENO_VERSION_RANGE } from './bridge.js'
1313
import { getPlatformTarget } from './platform.js'
1414

1515
const require = createRequire(import.meta.url)
1616
const archiver = require('archiver')
1717

1818
test('Downloads the Deno CLI on demand and caches it for subsequent calls', async () => {
19-
const latestVersion = semver.minVersion(LEGACY_DENO_VERSION_RANGE)?.version ?? ''
19+
const latestVersion = semver.minVersion(DENO_VERSION_RANGE)?.version ?? ''
2020
const mockBinaryOutput = `#!/usr/bin/env sh\n\necho "deno ${latestVersion}"`
2121
const data = new PassThrough()
2222
const archive = archiver('zip', { zlib: { level: 9 } })

0 commit comments

Comments
 (0)