Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deno-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.2.4
deno-version: v2.4.2

- name: 'Install dependencies'
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
deno-version: v2.2.4
deno-version: v2.4.2
- name: Extract tag and version
id: extract
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
deno-version: v2.2.4
deno-version: v2.4.2
- name: Build
run: npm run build
if: ${{ steps.release.outputs.release_created }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
deno-version: v2.2.4
deno-version: v2.4.2
- name: "Install dependencies"
run: npm ci
run: npm install
- name: "Prepare Netlify CLI"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use
npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")"
# npm install -g ${{ github.workspace }}/netlify-cli-23.10.0.tgz
npx netlify login
- name: Get installed Playwright version
id: playwright-version
Expand Down Expand Up @@ -188,9 +188,9 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/edge-bundler/blob/e55f825bd985d3c92e21d1b765d71e70d5628fba/node/bridge.ts#L17
deno-version: v2.2.4
deno-version: v2.4.2
- name: "Install dependencies"
run: npm ci
run: npm install
- name: "Build"
run: npm run build
- name: "Vendor deno helpers for integration tests"
Expand Down Expand Up @@ -268,17 +268,17 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
deno-version: v2.2.4
deno-version: v2.4.2
- name: "Install dependencies"
run: npm ci
run: npm install
- name: "Build"
run: npm run build
- name: "Prepare Netlify CLI"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use
npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")"
# npm install -g ${{ github.workspace }}/netlify-cli-23.10.0.tgz
npx netlify login
- name: "Smoke tests"
run: npm run test:ci:smoke
Expand All @@ -303,7 +303,7 @@ jobs:
with:
node-version: 18
- name: Install dependencies
run: npm ci
run: npm install

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/size-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
deno-version: v2.2.4
deno-version: v2.4.2

- name: 'Install dependencies'
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
deno-version: v2.2.4
deno-version: v2.4.2

- name: install runtime
run: npm install --ignore-scripts
Expand Down
22 changes: 17 additions & 5 deletions edge-runtime/shim/node.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
// NOTE: This is a fragment of a JavaScript program that will be inlined with
// a Webpack bundle. You should not import this file from anywhere in the
// application.
import { AsyncLocalStorage } from 'node:async_hooks'

import { createRequire } from 'node:module' // used in dynamically generated part
import process from 'node:process'

import { registerCJSModules } from '../edge-runtime/lib/cjs.ts' // used in dynamically generated part

globalThis.process = process
if (typeof process === 'undefined') {
console.log('shimming node process')
globalThis.process = (await import('node:process')).default
}

console.log('deno version', process.versions.deno)

if (typeof AsyncLocalStorage === 'undefined') {
console.log('shimming node AsyncLocalStorage')
globalThis.AsyncLocalStorage = (await import('node:async_hooks')).AsyncLocalStorage
}

if (typeof Buffer === 'undefined') {
console.log('shimming node Buffer')
globalThis.Buffer = (await import('node:buffer')).Buffer
}

globalThis.AsyncLocalStorage = AsyncLocalStorage
console.log('snapshot', typeof AsyncLocalStorage.snapshot)

// needed for path.relative and path.resolve to work
Deno.cwd = () => ''
Binary file added netlify-build-35.2.11.tgz
Binary file not shown.
Binary file added netlify-cli-23.10.0.tgz
Binary file not shown.
Binary file added netlify-edge-bundler-14.8.4.tgz
Binary file not shown.
Binary file added netlify-functions-utils-6.2.12.tgz
Binary file not shown.
Binary file added netlify-zip-it-and-ship-it-14.1.12.tgz
Binary file not shown.
Loading
Loading