@dk/jolly 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/jolly CHANGED
@@ -2,9 +2,13 @@
2
2
  "use strict";
3
3
 
4
4
  // Jolly CLI launcher (feature 006, decision 2026-06-12): the published Jolly
5
- // CLI is a Node.js program. This launcher runs `src/index.ts` under
6
- // Node.js >= 23 via native type stripping and never invokes or requires Bun
7
- // (Bun is the project's development environment only).
5
+ // CLI is a Node.js program. This launcher runs the pre-built JavaScript bundle
6
+ // (`dist/index.js`, compiled from `src/`) under Node.js >= 23 and never invokes
7
+ // or requires Bun (Bun is the project's development/build environment only).
8
+ //
9
+ // The published package ships compiled JS, not raw TypeScript: Node's native
10
+ // type stripping is disabled for files under `node_modules`, so an installed
11
+ // `npx @dk/jolly` must run plain JavaScript (correction 2026-06-13).
8
12
  //
9
13
  // Deliberately plain CommonJS-compatible JavaScript so that an old Node can
10
14
  // parse it and reach the version guard below instead of dying with a raw
@@ -26,24 +30,6 @@ if (!(nodeMajor >= MIN_NODE_MAJOR)) {
26
30
  process.exit(1);
27
31
  }
28
32
 
29
- import("../src/index.ts").catch(function (error) {
30
- if (error && error.code === "ERR_UNKNOWN_FILE_EXTENSION") {
31
- // Node >= 23 but before 23.6: type stripping exists behind a flag rather
32
- // than by default. Re-run the entry point with the flag enabled.
33
- rerunWithStripTypes();
34
- return;
35
- }
33
+ import("../dist/index.js").catch(function (error) {
36
34
  throw error;
37
35
  });
38
-
39
- function rerunWithStripTypes() {
40
- var path = require("node:path");
41
- var spawnSync = require("node:child_process").spawnSync;
42
- var entry = path.join(__dirname, "..", "src", "index.ts");
43
- var result = spawnSync(
44
- process.execPath,
45
- ["--experimental-strip-types", entry].concat(process.argv.slice(2)),
46
- { stdio: "inherit" },
47
- );
48
- process.exit(result.status === null ? 1 : result.status);
49
- }