Skip to content

Commit 86f6699

Browse files
authored
add backward comp with lockfile v2
1 parent b843477 commit 86f6699

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/build-web.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export function buildWeb() {
88
const pkg = JSON.parse(fs.readFileSync(join(__dirname, "../package-lock.json")));
99

1010
const mainVersion = pkg.version;
11-
const binaryenVersion = pkg.packages["node_modules/binaryen"].version;
12-
const longVersion = pkg.packages["node_modules/long"].version;
11+
const binaryenVersion = pkg.packages["node_modules/binaryen"].version || pkg.dependencies.binaryen.version;
12+
const longVersion = pkg.packages["node_modules/long"].version || pkg.dependencies.long.version;
1313

1414
const distUrl = mainVersion === "0.0.0" ? `./` : `https://cdn.jsdelivr.net/npm/assemblyscript@${mainVersion}/dist/`;
1515
const binaryenUrl = `https://cdn.jsdelivr.net/npm/binaryen@${binaryenVersion}/index.js`;

0 commit comments

Comments
 (0)