Skip to content

Commit ca81fc4

Browse files
authored
Merge pull request #12 from fastly/kats/package-updates
Consistent package.json
2 parents 437e9f9 + b5ff963 commit ca81fc4

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Node
1313
uses: actions/setup-node@v3
1414
with:
15-
node-version: '18'
15+
node-version: '20.11'
1616
- name: Setup Fastly CLI
1717
uses: fastly/compute-actions/setup@v5
1818
- name: Install Dependencies

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2-
"engines": {
3-
"node": "^18"
2+
"type": "module",
3+
"private": true,
4+
"dependencies": {
5+
"@fastly/js-compute": "^3.33.2"
46
},
57
"devDependencies": {
6-
"@fastly/cli": "^10.14.0",
8+
"@fastly/cli": "^11.0.0",
79
"buffer": "^6.0.3",
810
"core-js": "^3.33.1",
911
"g": "^2.0.1",
@@ -12,16 +14,16 @@
1214
"path-browserify": "^1.0.1",
1315
"process": "^0.11.10",
1416
"stream-http": "^3.2.0",
15-
"webpack": "^5.89.0",
17+
"webpack": "^5.98.0",
1618
"webpack-cli": "^5.1.4"
1719
},
18-
"dependencies": {
19-
"@fastly/js-compute": "^3.0.0"
20-
},
2120
"scripts": {
2221
"prebuild": "webpack",
2322
"build": "js-compute-runtime bin/index.js bin/main.wasm",
2423
"start": "fastly compute serve",
2524
"deploy": "fastly compute publish"
25+
},
26+
"engines": {
27+
"node": ">= 20.11"
2628
}
2729
}

webpack.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
const path = require("path");
2-
const webpack = require("webpack");
1+
import { createRequire } from "module";
2+
import path from "path";
3+
import webpack from "webpack";
34

4-
module.exports = {
5+
const require = createRequire(import.meta.url);
6+
7+
export default {
58
entry: "./src/index.js",
69
optimization: {
710
minimize: true,
811
},
912
target: "webworker",
1013
output: {
1114
filename: "index.js",
12-
path: path.resolve(__dirname, "bin"),
15+
path: path.resolve(import.meta.dirname, "bin"),
1316
libraryTarget: "this",
1417
},
1518
module: {

0 commit comments

Comments
 (0)