Skip to content

ci: build with deno v2 #2888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions .github/workflows/deno-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x.x
deno-version: v2.x.x
- name: Vendor Deno modules
run: deno vendor edge-runtime/vendor.ts --output=edge-runtime/vendor --force
run: deno edge-runtime/vendor.ts --output=edge-runtime/vendor
- name: Test
run: deno test -A edge-runtime/
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: v1.46.3
deno-version: v2.3.1
- 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: v1.46.3
deno-version: v2.3.1
- name: Build
run: npm run build
if: ${{ steps.release.outputs.release_created }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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: v1.46.3
deno-version: v2.3.1
- name: 'Install dependencies'
run: npm ci
- name: 'Prepare Netlify CLI'
Expand Down Expand Up @@ -146,7 +146,7 @@ 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: v1.46.3
deno-version: v2.3.1
- name: 'Install dependencies'
run: npm ci
- name: 'Build'
Expand Down Expand Up @@ -213,7 +213,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: v1.46.3
deno-version: v2.3.1
- name: 'Install dependencies'
run: npm ci
- name: 'Build'
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 @@ -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: v1.46.3
deno-version: v2.3.1
- run: npm ci

- name: Package size report
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 @@ -162,7 +162,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: v1.46.3
deno-version: v2.3.1

- name: install runtime
run: npm install --ignore-scripts
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"imports": {
"@netlify/edge-functions": "https://edge.netlify.com/v1/index.ts"
},
"importMap": "./edge-runtime/vendor/import_map.json"
"vendor": true
}
4 changes: 2 additions & 2 deletions edge-runtime/lib/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Context } from '@netlify/edge-functions'

import type { ElementHandlers } from '../vendor/deno.land/x/htmlrewriter@v1.0.0/src/index.ts'
import { getCookies } from '../vendor/deno.land/std@0.175.0/http/cookie.ts'
import type { ElementHandlers } from '../../vendor/deno.land/x/htmlrewriter@v1.0.0/src/index.ts'
import { getCookies } from '../../vendor/deno.land/std@0.175.0/http/cookie.ts'

type NextDataTransform = <T>(data: T) => T

Expand Down
2 changes: 1 addition & 1 deletion edge-runtime/lib/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Context } from '@netlify/edge-functions'
import {
HTMLRewriter,
type TextChunk,
} from '../vendor/deno.land/x/htmlrewriter@v1.0.0/src/index.ts'
} from '../../vendor/deno.land/x/htmlrewriter@v1.0.0/src/index.ts'

import { updateModifiedHeaders } from './headers.ts'
import type { StructuredLogger } from './logging.ts'
Expand Down
3 changes: 1 addition & 2 deletions tools/build-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export async function vendorDeno({
}

console.log(`📦 Vendoring Deno modules for '${vendorSource}' into '${vendorDest}'...`)
// --output=${vendorDest}
await execaCommand(`deno vendor ${vendorSource} --force`, {
await execaCommand(`deno --allow-import ${vendorSource}`, {
cwd,
})

Expand Down
Loading