Skip to content

Commit 83c7d68

Browse files
committed
test: update legacy deno range usage
1 parent fc2ff2a commit 83c7d68

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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: 1 addition & 1 deletion
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>

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)