Skip to content

Commit d8bc15c

Browse files
committed
use the version export from ComponentizeJS
Signed-off-by: karthik2804 <[email protected]>
1 parent 849a357 commit d8bc15c

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/build-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript": "^5.7.3"
2929
},
3030
"dependencies": {
31-
"@bytecodealliance/componentize-js": "^0.16.0",
31+
"@bytecodealliance/componentize-js": "^0.17.0",
3232
"@types/yargs": "^17.0.33",
3333
"yargs": "^17.7.2"
3434
},

packages/build-tools/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env node
22

33
import { componentize } from "@bytecodealliance/componentize-js";
4+
//@ts-ignore https://github.com/bytecodealliance/ComponentizeJS/pull/198
5+
import { version } from "@bytecodealliance/componentize-js"
46
import { getPackagesWithWasiDeps, processWasiDeps } from "./wasiDepsParser.js";
57
import { basename } from 'node:path';
68

@@ -17,8 +19,8 @@ async function main() {
1719
let src = CliArgs.input;
1820
let outputPath = CliArgs.output;
1921

20-
// TODO: Once there is a new release of componentize-js, use the version exported from the module
21-
let componentizeVersion = await getPackageVersion("@bytecodealliance/componentize-js");
22+
// Can remove the explicit typing once https://github.com/bytecodealliance/ComponentizeJS/pull/198 is merged and released
23+
let componentizeVersion = version as string;
2224

2325
// Small optimization to skip componentization if the source file hasn't changed
2426
if (!await ShouldComponentize(src, outputPath, componentizeVersion)) {

0 commit comments

Comments
 (0)