File tree Expand file tree Collapse file tree 10 files changed +39
-15
lines changed Expand file tree Collapse file tree 10 files changed +39
-15
lines changed Original file line number Diff line number Diff line change 8
8
steps :
9
9
- name : Checkout
10
10
uses : actions/checkout@v5
11
+
12
+ - name : ' Install Node'
13
+ uses : actions/setup-node@v4
14
+ with :
15
+ node-version : ' 18.x'
16
+ cache : ' npm'
17
+ cache-dependency-path : ' **/package-lock.json'
18
+
11
19
- name : Setup Deno
12
20
uses : denoland/setup-deno@v1
13
21
with :
14
- deno-version : v1.x.x
22
+ deno-version : v2.2.4
23
+
24
+ - name : ' Install dependencies'
25
+ run : npm ci
26
+
15
27
- name : Vendor Deno modules
16
- run : deno vendor edge-runtime/vendor.ts --output=edge-runtime/vendor --force
28
+ run : deno --allow-import --vendor edge-runtime/vendor.ts
29
+
17
30
- name : Test
18
31
run : deno test -A edge-runtime/
Original file line number Diff line number Diff line change 24
24
uses : denoland/setup-deno@v1
25
25
with :
26
26
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
27
- deno-version : v1.46.3
27
+ deno-version : v2.2.4
28
28
- name : Extract tag and version
29
29
id : extract
30
30
run : |-
Original file line number Diff line number Diff line change 32
32
uses : denoland/setup-deno@v1
33
33
with :
34
34
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
35
- deno-version : v1.46.3
35
+ deno-version : v2.2.4
36
36
- name : Build
37
37
run : npm run build
38
38
if : ${{ steps.release.outputs.release_created }}
Original file line number Diff line number Diff line change 68
68
uses : denoland/setup-deno@v1
69
69
with :
70
70
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
71
- deno-version : v1.46.3
71
+ deno-version : v2.2.4
72
72
- name : ' Install dependencies'
73
73
run : npm ci
74
74
- name : ' Prepare Netlify CLI'
@@ -151,7 +151,7 @@ jobs:
151
151
uses : denoland/setup-deno@v1
152
152
with :
153
153
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/edge-bundler/blob/e55f825bd985d3c92e21d1b765d71e70d5628fba/node/bridge.ts#L17
154
- deno-version : v1.46.3
154
+ deno-version : v2.2.4
155
155
- name : ' Install dependencies'
156
156
run : npm ci
157
157
- name : ' Build'
@@ -218,7 +218,7 @@ jobs:
218
218
uses : denoland/setup-deno@v1
219
219
with :
220
220
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
221
- deno-version : v1.46.3
221
+ deno-version : v2.2.4
222
222
- name : ' Install dependencies'
223
223
run : npm ci
224
224
- name : ' Build'
Original file line number Diff line number Diff line change @@ -20,12 +20,15 @@ jobs:
20
20
node-version : ' 18.x'
21
21
cache : ' npm'
22
22
cache-dependency-path : ' **/package-lock.json'
23
+
23
24
- name : Install Deno
24
25
uses : denoland/setup-deno@v1
25
26
with :
26
27
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
27
- deno-version : v1.46.3
28
- - run : npm ci
28
+ deno-version : v2.2.4
29
+
30
+ - name : ' Install dependencies'
31
+ run : npm ci
29
32
30
33
- name : Package size report
31
34
uses : pkg-size/action@v1
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ jobs:
165
165
uses : denoland/setup-deno@v1
166
166
with :
167
167
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L20
168
- deno-version : v1.46.3
168
+ deno-version : v2.2.4
169
169
170
170
- name : install runtime
171
171
run : npm install --ignore-scripts
Original file line number Diff line number Diff line change 6
6
},
7
7
"imports" : {
8
8
"@netlify/edge-functions" : " https://edge.netlify.com/v1/index.ts"
9
- },
10
- "importMap" : " ./edge-runtime/vendor/import_map.json"
9
+ }
11
10
}
Original file line number Diff line number Diff line change @@ -14,3 +14,11 @@ import 'https://deno.land/x/path_to_regexp@v6.2.1/index.ts'
14
14
import 'https://deno.land/x/htmlrewriter@v1.0.0/src/index.ts'
15
15
16
16
import 'https://v1-7-0--edge-utils.netlify.app/logger/mod.ts'
17
+
18
+ // Types
19
+ import 'https://deno.land/std@0.175.0/node/_global.d.ts'
20
+ import 'https://deno.land/std@0.175.0/node/_events.d.ts'
21
+ import 'https://deno.land/std@0.175.0/node/_stream.d.ts'
22
+ import 'https://deno.land/std@0.175.0/node/internal/buffer.d.ts'
23
+ import 'https://deno.land/std@0.175.0/types.d.ts'
24
+ import 'https://deno.land/x/htmlrewriter@v1.0.0/src/types.d.ts'
Original file line number Diff line number Diff line change 7
7
"files" : [
8
8
" dist" ,
9
9
" edge-runtime" ,
10
+ " !edge-runtime/deno.json" ,
11
+ " !edge-runtime/deno.lock" ,
10
12
" manifest.yml"
11
13
],
12
14
"engines" : {
Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ export async function vendorDeno({
38
38
}
39
39
40
40
console . log ( `📦 Vendoring Deno modules for '${ vendorSource } ' into '${ vendorDest } '...` )
41
- // --output=${vendorDest}
42
- await execaCommand ( `deno vendor ${ vendorSource } --force` , {
41
+ await execaCommand ( `deno --allow-import --vendor ${ vendorSource } ` , {
43
42
cwd,
44
43
} )
45
44
@@ -50,7 +49,7 @@ export async function vendorDeno({
50
49
// see https://github.com/denoland/deno/issues/14123
51
50
// to workaround this we copy the wasm files manually
52
51
// (note Deno 2 allows to vendor wasm files, but it also require modules to import them and not fetch and instantiate them
53
- // se being able to drop downloading is dependent on implementation of wasm handling in external modules as well)
52
+ // so being able to drop downloading is dependent on implementation of wasm handling in external modules as well)
54
53
await Promise . all (
55
54
wasmFilesToDownload . map ( async ( urlString ) => {
56
55
const url = new URL ( urlString )
You can’t perform that action at this time.
0 commit comments