@fynjs/run 1.0.1 → 1.1.0

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.
Files changed (2) hide show
  1. package/cli/ts-runner.js +13 -2
  2. package/package.json +7 -7
package/cli/ts-runner.js CHANGED
@@ -12,7 +12,18 @@ import path from "path";
12
12
  import WrapProcess from "./wrap-process.js";
13
13
 
14
14
  const TsRunner = {
15
- "runner-tsx": "tsx",
15
+ //
16
+ // `@fynjs/ts-resolve` is ESM-only, but it stays on this same require path: node's
17
+ // `require(esm)` is unflagged from 22.12, which is already this package's floor, and
18
+ // `./register` has no top-level await - the one graph `require(esm)` refuses. So it is
19
+ // required like the others and returns a (truthy) namespace object.
20
+ //
21
+ // It is first because it is the cheapest: a resolve hook feeding node's own type
22
+ // stripping, no transpiler and no native binary. Its only hard requirement is node
23
+ // >= 22.15 for `module.registerHooks`; below that the require throws, optional-require
24
+ // routes that to `fail`, and tsx / ts-node still get their turn.
25
+ //
26
+ "runner-ts-resolve": "@fynjs/ts-resolve/register",
16
27
  "runner-ts-node": "ts-node/register/transpile-only",
17
28
  loaded: undefined,
18
29
  runner: undefined,
@@ -32,7 +43,7 @@ const TsRunner = {
32
43
  return runner;
33
44
  },
34
45
  startRunner() {
35
- const runners = ["tsx", "ts-node"];
46
+ const runners = ["ts-resolve", "ts-node"];
36
47
  for (const runner of runners) {
37
48
  if (TsRunner.load(runner)) {
38
49
  break;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@fynjs/run",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "concurrent or serial run npm scripts, javascript tasks, and more",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/xrun.d.ts",
7
7
  "engines": {
8
- "node": ">=22.12.0"
8
+ "node": ">=22.18.0"
9
9
  },
10
10
  "scripts": {
11
11
  "pretest": "echo hello",
@@ -77,17 +77,17 @@
77
77
  "homepage": "https://github.com/jchip/fynjs/tree/main/packages/xarc-run",
78
78
  "dependencies": {
79
79
  "chalk": "^6.0.0",
80
- "chalker": "^2.0.1",
80
+ "chalker": "^2.1.0",
81
81
  "insync": "^2.1.1",
82
82
  "jaro-winkler": "^0.2.8",
83
83
  "lodash.foreach": "^4.5.0",
84
- "@fynjs/cli-args": "^1.0.1",
84
+ "@fynjs/cli-args": "^1.1.0",
85
85
  "optional-require": "^2.1.0",
86
86
  "read-pkg-up": "^7.0.1",
87
87
  "require-at": "^1.0.6",
88
- "string-array": "^2.0.0",
89
- "unwrap-npm-cmd": "^2.0.0",
90
- "xsh": "^1.0.1"
88
+ "string-array": "^2.1.0",
89
+ "unwrap-npm-cmd": "^2.1.0",
90
+ "xsh": "^1.1.0"
91
91
  },
92
92
  "type": "module"
93
93
  }