Commit bce4c06

Anton Golub <antongolub@antongolub.com>
2025-03-31 22:15:16
build(jsr): exclude cli.ts (#1175)
1 parent d2ef742
build/index.cjs
@@ -39,9 +39,11 @@ __reExport(index_exports, require("./goods.cjs"), module.exports);
 var import_vendor2 = require("./vendor.cjs");
 var import_util = require("./util.cjs");
 var import_meta = {};
-var VERSION = import_vendor.fs.readJsonSync(
-  new URL("../package.json", import_meta_url)
-).version;
+var _a;
+var VERSION = (_a = import_vendor.fs.readJsonSync(
+  new URL("../package.json", import_meta_url),
+  { throws: false }
+)) == null ? void 0 : _a.version;
 var version = VERSION;
 function nothrow(promise) {
   return promise.nothrow();
scripts/build-jsr.mjs
@@ -51,10 +51,11 @@ fs.writeFileSync(
     {
       name: '@webpod/zx',
       version: pkgJson.version,
+      license: pkgJson.license,
       exports: {
         '.': './src/index.ts',
         './core': './src/core.ts',
-        './cli': './src/cli.ts',
+        // './cli': './src/cli.ts',
       },
       publish: {
         include: ['src', 'README.md', 'LICENSE'],
src/index.ts
@@ -20,8 +20,9 @@ export * from './goods.ts'
 export { minimist, dotenv, fs, YAML, glob, glob as globby } from './vendor.ts'
 
 export const VERSION: string = fs.readJsonSync(
-  new URL('../package.json', import.meta.url)
-).version
+  new URL('../package.json', import.meta.url),
+  { throws: false }
+)?.version
 export const version: string = VERSION
 
 export {
.size-limit.json
@@ -24,7 +24,7 @@
   {
     "name": "js parts",
     "path": "build/*.{js,cjs}",
-    "limit": "812.15 kB",
+    "limit": "812.2 kB",
     "brotli": false,
     "gzip": false
   },