From cde35886c6d7f84217ebc6262a99ab18c79512f1 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Fri, 18 Jul 2025 09:11:20 +0200 Subject: [PATCH 1/4] ignore build artifacts --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3e86e2ea5..0550f0e6d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,12 +5,13 @@ # Generated ouput /target -/dist /jco.sh +dist/ # Typescript /src/**/*.d.ts /src/**/*.d.ts.map +*.tsbuildinfo # Docs /docs/book From 66744dd388fe3d77d53ec1051c0d13bc82dc8f1f Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Fri, 18 Jul 2025 09:20:03 +0200 Subject: [PATCH 2/4] build artifacts to dist --- package-lock.json | 309 ++----------------------------------- packages/jco/package.json | 3 + packages/jco/tsconfig.json | 23 +-- 3 files changed, 24 insertions(+), 311 deletions(-) diff --git a/package-lock.json b/package-lock.json index e925792db..6ae1278f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,39 +29,6 @@ "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/add/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/add/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/adder": { "name": "adder-wasm", "dependencies": { @@ -69,78 +36,12 @@ "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/adder/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/adder/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/host-logging": { "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/host-logging/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/host-logging/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/http-hello-world": { "name": "http-hello-world-wasm", "dependencies": { @@ -151,78 +52,12 @@ "terminate": "^2.8.0" } }, - "examples/components/http-hello-world/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/http-hello-world/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/http-server-fetch-handler": { "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/http-server-fetch-handler/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/http-server-fetch-handler/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/http-server-hono": { "license": "MIT", "dependencies": { @@ -238,80 +73,12 @@ "typescript": "^5.8.3" } }, - "examples/components/http-server-hono/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/http-server-hono/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "dev": true, - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/node-fetch": { "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/node-fetch/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/node-fetch/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/string-reverse": { "name": "string-reverse-wasm", "dependencies": { @@ -326,72 +93,6 @@ "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/string-reverse-upper/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/string-reverse-upper/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, - "examples/components/string-reverse/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/string-reverse/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/webidl-book-library": { "name": "webidl-book-library-wasm", "devDependencies": { @@ -1696,6 +1397,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@tsconfig/node22": { + "version": "22.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.2.tgz", + "integrity": "sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==", + "dev": true, + "license": "MIT" + }, "node_modules/@tybys/wasm-util": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz", @@ -5761,7 +5469,7 @@ }, "packages/jco": { "name": "@bytecodealliance/jco", - "version": "1.12.0-rc.1", + "version": "1.12.0", "license": "(Apache-2.0 WITH LLVM-exception)", "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", @@ -5778,6 +5486,7 @@ }, "devDependencies": { "@commitlint/config-conventional": "^19.8.1", + "@tsconfig/node22": "^22.0.2", "@types/node": "^22.15.17", "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", diff --git a/packages/jco/package.json b/packages/jco/package.json index ca8d19bcb..f3f49a69a 100644 --- a/packages/jco/package.json +++ b/packages/jco/package.json @@ -35,6 +35,7 @@ }, "exports": { ".": { + "types": "./dist/api.d.ts", "browser": "./src/browser.js", "default": "./src/api.js" }, @@ -49,6 +50,7 @@ "files": [ "lib", "src", + "dist", "obj/*.core*.wasm", "obj/*.js", "obj/*.ts", @@ -77,6 +79,7 @@ }, "devDependencies": { "@commitlint/config-conventional": "^19.8.1", + "@tsconfig/node22": "^22.0.2", "@types/node": "^22.15.17", "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", diff --git a/packages/jco/tsconfig.json b/packages/jco/tsconfig.json index 28aba98d9..d90953363 100644 --- a/packages/jco/tsconfig.json +++ b/packages/jco/tsconfig.json @@ -1,13 +1,14 @@ { - "include": ["src/**/*"], - "exclude": ["node_modules", "src/cmd/**", "src/*.d.ts"], - "compilerOptions": { - "module": "nodenext", - "moduleResolution": "nodenext", - "allowJs": true, - "declaration": true, - "emitDeclarationOnly": true, - "declarationMap": true, - "skipLibCheck": true, - } + "extends": "@tsconfig/node22", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "composite": true, + "allowJs": true + }, + "include": ["src/**/*"] } From 75c24339b7f4e79e3473585aa75faaf89d176119 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Fri, 18 Jul 2025 09:23:00 +0200 Subject: [PATCH 3/4] remove build artifacts from src --- packages/jco/src/api.d.ts | 42 ---------- packages/jco/src/api.d.ts.map | 1 - packages/jco/src/browser.d.ts | 4 - packages/jco/src/browser.d.ts.map | 1 - packages/jco/src/cmd/componentize.d.ts | 2 - packages/jco/src/cmd/componentize.d.ts.map | 1 - packages/jco/src/cmd/opt.d.ts | 20 ----- packages/jco/src/cmd/opt.d.ts.map | 1 - packages/jco/src/cmd/run.d.ts | 3 - packages/jco/src/cmd/run.d.ts.map | 1 - packages/jco/src/cmd/transpile.d.ts | 89 ---------------------- packages/jco/src/cmd/transpile.d.ts.map | 1 - packages/jco/src/cmd/types.d.ts | 33 -------- packages/jco/src/cmd/wasm-tools.d.ts | 8 -- packages/jco/src/cmd/wasm-tools.d.ts.map | 1 - packages/jco/src/common.d.ts | 17 ----- packages/jco/src/common.d.ts.map | 1 - packages/jco/src/jco.d.ts | 3 - packages/jco/src/jco.d.ts.map | 1 - packages/jco/src/ora-shim.d.ts | 8 -- packages/jco/src/ora-shim.d.ts.map | 1 - 21 files changed, 239 deletions(-) delete mode 100644 packages/jco/src/api.d.ts delete mode 100644 packages/jco/src/api.d.ts.map delete mode 100644 packages/jco/src/browser.d.ts delete mode 100644 packages/jco/src/browser.d.ts.map delete mode 100644 packages/jco/src/cmd/componentize.d.ts delete mode 100644 packages/jco/src/cmd/componentize.d.ts.map delete mode 100644 packages/jco/src/cmd/opt.d.ts delete mode 100644 packages/jco/src/cmd/opt.d.ts.map delete mode 100644 packages/jco/src/cmd/run.d.ts delete mode 100644 packages/jco/src/cmd/run.d.ts.map delete mode 100644 packages/jco/src/cmd/transpile.d.ts delete mode 100644 packages/jco/src/cmd/transpile.d.ts.map delete mode 100644 packages/jco/src/cmd/types.d.ts delete mode 100644 packages/jco/src/cmd/wasm-tools.d.ts delete mode 100644 packages/jco/src/cmd/wasm-tools.d.ts.map delete mode 100644 packages/jco/src/common.d.ts delete mode 100644 packages/jco/src/common.d.ts.map delete mode 100644 packages/jco/src/jco.d.ts delete mode 100644 packages/jco/src/jco.d.ts.map delete mode 100644 packages/jco/src/ora-shim.d.ts delete mode 100644 packages/jco/src/ora-shim.d.ts.map diff --git a/packages/jco/src/api.d.ts b/packages/jco/src/api.d.ts deleted file mode 100644 index 6bef5ad12..000000000 --- a/packages/jco/src/api.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @param {Parameters[0]} binary - * @return {Promise>} - */ -export function print(binary: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} wat - * @return {Promise>} - */ -export function parse(wat: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} binary - * @return {Promise>} - */ -export function componentWit(binary: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} binary - * @param {Parameters[1]} adapters - * @return {Promise>} - */ -export function componentNew(binary: Parameters[0], adapters: Parameters[1]): Promise>; -/** - * @param {Parameters[0]} embedOpts - * @return {Promise>} - */ -export function componentEmbed(embedOpts: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} binary - * @param {Parameters[1]} metadata - * @return {Promise>} - */ -export function metadataAdd(binary: Parameters[0], metadata: Parameters[1]): Promise>; -/** - * @param {Parameters[0]} binary - * @return {Promise>} - */ -export function metadataShow(binary: Parameters[0]): Promise>; -export function preview1AdapterCommandPath(): URL; -export function preview1AdapterReactorPath(): URL; -export { optimizeComponent as opt } from "./cmd/opt.js"; -export { transpileComponent as transpile, typesComponent as types } from "./cmd/transpile.js"; -//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/api.d.ts.map b/packages/jco/src/api.d.ts.map deleted file mode 100644 index da3dcb6e1..000000000 --- a/packages/jco/src/api.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["api.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,8BAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,2BAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD;;;;GAIG;AACH,qCAJW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAC1D,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD;;;GAGG;AACH,0CAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAK7E;AACD;;;;GAIG;AACH,oCAJW,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,YACzD,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAK1E;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD,kDAKC;AACD,kDAKC"} \ No newline at end of file diff --git a/packages/jco/src/browser.d.ts b/packages/jco/src/browser.d.ts deleted file mode 100644 index b4050040b..000000000 --- a/packages/jco/src/browser.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function generate(...args: any[]): Promise; -export function generateTypes(...args: any[]): Promise; -export { generate as transpile }; -//# sourceMappingURL=browser.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/browser.d.ts.map b/packages/jco/src/browser.d.ts.map deleted file mode 100644 index 70e8f2e14..000000000 --- a/packages/jco/src/browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["browser.js"],"names":[],"mappings":"AAMA,uDAGC;AAED,4DAGC"} \ No newline at end of file diff --git a/packages/jco/src/cmd/componentize.d.ts b/packages/jco/src/cmd/componentize.d.ts deleted file mode 100644 index c06790b79..000000000 --- a/packages/jco/src/cmd/componentize.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function componentize(jsSource: any, opts: any): Promise; -//# sourceMappingURL=componentize.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/cmd/componentize.d.ts.map b/packages/jco/src/cmd/componentize.d.ts.map deleted file mode 100644 index c65f88f10..000000000 --- a/packages/jco/src/cmd/componentize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"componentize.d.ts","sourceRoot":"","sources":["componentize.js"],"names":[],"mappings":"AAIA,sEAkBC"} \ No newline at end of file diff --git a/packages/jco/src/cmd/opt.d.ts b/packages/jco/src/cmd/opt.d.ts deleted file mode 100644 index 9171a6c3d..000000000 --- a/packages/jco/src/cmd/opt.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export function opt(componentPath: any, opts: any, program: any): Promise; -/** - * - * @param {Uint8Array} componentBytes - * @param {{ quiet: boolean, asyncify?: boolean, optArgs?: string[], noVerify?: boolean }} opts? - * @returns {Promise<{ component: Uint8Array, compressionInfo: { beforeBytes: number, afterBytes: number }[] >} - */ -export function optimizeComponent(componentBytes: Uint8Array, opts: { - quiet: boolean; - asyncify?: boolean; - optArgs?: string[]; - noVerify?: boolean; -}): Promise<{ - component: Uint8Array; - compressionInfo: { - beforeBytes: number; - afterBytes: number; - }[]; -}>; -//# sourceMappingURL=opt.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/cmd/opt.d.ts.map b/packages/jco/src/cmd/opt.d.ts.map deleted file mode 100644 index 0c2161c42..000000000 --- a/packages/jco/src/cmd/opt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"opt.d.ts","sourceRoot":"","sources":["opt.js"],"names":[],"mappings":"AAgBA,gFA2CC;AAgBD;;;;;GAKG;AACH,kDAJW,UAAU,QACV;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5E,OAAO,CAAC;IAAE,SAAS,EAAE,UAAU,CAAC;IAAC,eAAe,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAA,CAAE,CAkK7G"} \ No newline at end of file diff --git a/packages/jco/src/cmd/run.d.ts b/packages/jco/src/cmd/run.d.ts deleted file mode 100644 index c4a4b5647..000000000 --- a/packages/jco/src/cmd/run.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function run(componentPath: any, args: any, opts: any): Promise; -export function serve(componentPath: any, args: any, opts: any): Promise; -//# sourceMappingURL=run.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/cmd/run.d.ts.map b/packages/jco/src/cmd/run.d.ts.map deleted file mode 100644 index bb73c2fb9..000000000 --- a/packages/jco/src/cmd/run.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["run.js"],"names":[],"mappings":"AASA,6EAmBC;AAED,+EA2BC"} \ No newline at end of file diff --git a/packages/jco/src/cmd/transpile.d.ts b/packages/jco/src/cmd/transpile.d.ts deleted file mode 100644 index 468abee13..000000000 --- a/packages/jco/src/cmd/transpile.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -export function types(witPath: any, opts: any): Promise; -export function guestTypes(witPath: any, opts: any): Promise; -/** - * @param {string} witPath - * @param {{ - * name?: string, - * worldName?: string, - * instantiation?: 'async' | 'sync', - * tlaCompat?: bool, - * asyncMode?: string, - * asyncImports?: string[], - * asyncExports?: string[], - * outDir?: string, - * features?: string[] | 'all', - * guest?: bool, - * }} opts - * @returns {Promise<{ [filename: string]: Uint8Array }>} - */ -export function typesComponent(witPath: string, opts: { - name?: string; - worldName?: string; - instantiation?: "async" | "sync"; - tlaCompat?: boolean; - asyncMode?: string; - asyncImports?: string[]; - asyncExports?: string[]; - outDir?: string; - features?: string[] | "all"; - guest?: boolean; -}): Promise<{ - [filename: string]: Uint8Array; -}>; -export function transpile(componentPath: any, opts: any, program: any): Promise; -/** - * - * @param {Uint8Array} component - * @param {{ - * name: string, - * instantiation?: 'async' | 'sync', - * importBindings?: 'js' | 'optimized' | 'hybrid' | 'direct-optimized', - * map?: Record, - * asyncMode?: string, - * asyncImports?: string[], - * asyncExports?: string[], - * validLiftingOptimization?: bool, - * tracing?: bool, - * nodejsCompat?: bool, - * tlaCompat?: bool, - * base64Cutoff?: bool, - * js?: bool, - * minify?: bool, - * optimize?: bool, - * namespacedExports?: bool, - * outDir?: string, - * multiMemory?: bool, - * experimentalIdlImports?: bool, - * optArgs?: string[], - * }} opts - * @returns {Promise<{ files: { [filename: string]: Uint8Array }, imports: string[], exports: [string, 'function' | 'instance'][] }>} - */ -export function transpileComponent(component: Uint8Array, opts?: { - name: string; - instantiation?: "async" | "sync"; - importBindings?: "js" | "optimized" | "hybrid" | "direct-optimized"; - map?: Record; - asyncMode?: string; - asyncImports?: string[]; - asyncExports?: string[]; - validLiftingOptimization?: boolean; - tracing?: boolean; - nodejsCompat?: boolean; - tlaCompat?: boolean; - base64Cutoff?: boolean; - js?: boolean; - minify?: boolean; - optimize?: boolean; - namespacedExports?: boolean; - outDir?: string; - multiMemory?: boolean; - experimentalIdlImports?: boolean; - optArgs?: string[]; -}): Promise<{ - files: { - [filename: string]: Uint8Array; - }; - imports: string[]; - exports: [string, "function" | "instance"][]; -}>; -//# sourceMappingURL=transpile.d.ts.map diff --git a/packages/jco/src/cmd/transpile.d.ts.map b/packages/jco/src/cmd/transpile.d.ts.map deleted file mode 100644 index f9dceb062..000000000 --- a/packages/jco/src/cmd/transpile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transpile.d.ts","sourceRoot":"","sources":["transpile.js"],"names":[],"mappings":"AA+CA,8DAGC;AAED,mEAMC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wCAfW,MAAM,QACN;IACN,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC5B,KAAK,CAAC,EAAE,IAAI,CAAC;CACd,GACS,OAAO,CAAC;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC,CA+DvD;AAyCD,sFAoCC;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,8CAzBW,UAAU,SACV;IACN,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,cAAc,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,QAAQ,GAAG,kBAAkB,CAAC;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,wBAAwB,CAAC,EAAE,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,EAAE,CAAC,EAAE,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,GACS,OAAO,CAAC;IAAE,KAAK,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,EAAE,CAAA;CAAE,CAAC,CAyTnI"} \ No newline at end of file diff --git a/packages/jco/src/cmd/types.d.ts b/packages/jco/src/cmd/types.d.ts deleted file mode 100644 index 117bb09e8..000000000 --- a/packages/jco/src/cmd/types.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export function types(witPath: any, opts: any): Promise; -export function guestTypes(witPath: any, opts: any): Promise; -/** - * @param {string} witPath - * @param {{ - * name?: string, - * worldName?: string, - * instantiation?: 'async' | 'sync', - * tlaCompat?: bool, - * asyncMode?: string, - * asyncImports?: string[], - * asyncExports?: string[], - * outDir?: string, - * features?: string[] | 'all', - * guest?: bool, - * }} opts - * @returns {Promise<{ [filename: string]: Uint8Array }>} - */ -export function typesComponent(witPath: string, opts: { - name?: string; - worldName?: string; - instantiation?: "async" | "sync"; - tlaCompat?: boolean; - asyncMode?: string; - asyncImports?: string[]; - asyncExports?: string[]; - outDir?: string; - features?: string[] | "all"; - guest?: boolean; -}): Promise<{ - [filename: string]: Uint8Array; -}>; -//# sourceMappingURL=types.d.ts.map diff --git a/packages/jco/src/cmd/wasm-tools.d.ts b/packages/jco/src/cmd/wasm-tools.d.ts deleted file mode 100644 index a130192b7..000000000 --- a/packages/jco/src/cmd/wasm-tools.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function parse(file: any, opts: any): Promise; -export function print(file: any, opts: any): Promise; -export function componentWit(file: any, opts: any): Promise; -export function componentNew(file: any, opts: any): Promise; -export function componentEmbed(file: any, opts: any): Promise; -export function metadataAdd(file: any, opts: any): Promise; -export function metadataShow(file: any, opts: any): Promise; -//# sourceMappingURL=wasm-tools.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/cmd/wasm-tools.d.ts.map b/packages/jco/src/cmd/wasm-tools.d.ts.map deleted file mode 100644 index e6b76434a..000000000 --- a/packages/jco/src/cmd/wasm-tools.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wasm-tools.d.ts","sourceRoot":"","sources":["wasm-tools.js"],"names":[],"mappings":"AAOA,2DAKC;AAED,2DASC;AAED,kEASC;AAED,kEAsBC;AAED,oEAaC;AAED,iEAUC;AAED,kEAiCC"} \ No newline at end of file diff --git a/packages/jco/src/common.d.ts b/packages/jco/src/common.d.ts deleted file mode 100644 index 8c0f1be49..000000000 --- a/packages/jco/src/common.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function setShowSpinner(val: any): void; -export function getShowSpinner(): boolean; -export function sizeStr(num: any): string; -export function fixedDigitDisplay(num: any, maxChars: any): string; -export function table(data: any, align?: any[]): string; -/** - * Securely creates a temporary directory and returns its path. - * - * The new directory is created using `fsPromises.mkdtemp()`. - */ -export function getTmpDir(): Promise; -export function spawnIOTmp(cmd: any, input: any, args: any): Promise>; -export function writeFiles(files: any, summaryTitle: any): Promise; -export const isWindows: boolean; -export { readFileCli as readFile }; -declare function readFileCli(file: any, encoding: any): Promise>; -//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/common.d.ts.map b/packages/jco/src/common.d.ts.map deleted file mode 100644 index aff35feef..000000000 --- a/packages/jco/src/common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.js"],"names":[],"mappings":"AA2BA,+CAEC;AACD,0CAIC;AAED,0CASC;AAED,mEAcC;AAED,wDAoBC;AAED;;;;GAIG;AACH,6CAEC;AAWD,8FAiCC;AAED,yEAmBC;AArJD,gCAA8C;;AAsF9C,yFAMC"} \ No newline at end of file diff --git a/packages/jco/src/jco.d.ts b/packages/jco/src/jco.d.ts deleted file mode 100644 index 21be8ccad..000000000 --- a/packages/jco/src/jco.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=jco.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/jco.d.ts.map b/packages/jco/src/jco.d.ts.map deleted file mode 100644 index f5baa1351..000000000 --- a/packages/jco/src/jco.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jco.d.ts","sourceRoot":"","sources":["jco.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/jco/src/ora-shim.d.ts b/packages/jco/src/ora-shim.d.ts deleted file mode 100644 index bbf72b797..000000000 --- a/packages/jco/src/ora-shim.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** Browser shim for Ora */ -export default function ora(): Ora; -declare class Ora { - start(): void; - stop(): void; -} -export {}; -//# sourceMappingURL=ora-shim.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/ora-shim.d.ts.map b/packages/jco/src/ora-shim.d.ts.map deleted file mode 100644 index 407eb7910..000000000 --- a/packages/jco/src/ora-shim.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ora-shim.d.ts","sourceRoot":"","sources":["ora-shim.js"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,mCAEC;AAED;IACI,cAAU;IACV,aAAS;CACZ"} \ No newline at end of file From 6aff2bb98e03795d416c33cdbe4043c8df268f32 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Sat, 19 Jul 2025 15:52:30 +0200 Subject: [PATCH 4/4] chore(deps): remove @tsconfig/node --- package-lock.json | 8 -------- packages/jco/package.json | 1 - packages/jco/tsconfig.json | 10 ++++++---- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ae1278f4..315e56011 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1397,13 +1397,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@tsconfig/node22": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.2.tgz", - "integrity": "sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==", - "dev": true, - "license": "MIT" - }, "node_modules/@tybys/wasm-util": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz", @@ -5486,7 +5479,6 @@ }, "devDependencies": { "@commitlint/config-conventional": "^19.8.1", - "@tsconfig/node22": "^22.0.2", "@types/node": "^22.15.17", "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", diff --git a/packages/jco/package.json b/packages/jco/package.json index f3f49a69a..1d6097403 100644 --- a/packages/jco/package.json +++ b/packages/jco/package.json @@ -79,7 +79,6 @@ }, "devDependencies": { "@commitlint/config-conventional": "^19.8.1", - "@tsconfig/node22": "^22.0.2", "@types/node": "^22.15.17", "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", diff --git a/packages/jco/tsconfig.json b/packages/jco/tsconfig.json index d90953363..7e94a99ef 100644 --- a/packages/jco/tsconfig.json +++ b/packages/jco/tsconfig.json @@ -1,14 +1,16 @@ { - "extends": "@tsconfig/node22", "compilerOptions": { - "rootDir": "src", - "outDir": "dist", + "module": "nodenext", + "moduleResolution": "nodenext", + "strict": true, "sourceMap": true, "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, "composite": true, - "allowJs": true + "allowJs": true, + "rootDir": "src", + "outDir": "dist", }, "include": ["src/**/*"] }