rust-just 1.48.1 → 1.49.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/lib/index.mjs +10 -16
  2. package/package.json +10 -10
package/lib/index.mjs CHANGED
@@ -27,32 +27,26 @@ async function getExePath() {
27
27
  }
28
28
  }
29
29
  __name(getExePath, "getExePath");
30
- function safeParse(jsonString) {
31
- try {
32
- return JSON.parse(jsonString);
33
- } catch (e) {
34
- console.error("Invalid JSON format in --options");
35
- process.exit(1);
36
- }
37
- }
38
- __name(safeParse, "safeParse");
39
30
  async function run() {
40
31
  const exePath = await getExePath();
41
32
  const argv = yargs(hideBin(process.argv)).option("execaoptions", {
42
33
  type: "string",
43
34
  description: "Execa options in JSON format"
35
+ }).coerce("execaoptions", (arg) => {
36
+ try {
37
+ return JSON.parse(arg);
38
+ } catch (e) {
39
+ throw new Error("Invalid JSON format in --execaoptions");
40
+ }
44
41
  }).parserConfiguration({
45
42
  "unknown-options-as-args": true
46
- }).help(false).version(false).parse();
43
+ }).help(false).version(false).parseSync();
47
44
  const args = argv._;
48
- let execaOptions = {
45
+ const execaOptions = {
49
46
  stdio: "inherit",
50
- reject: false
47
+ reject: false,
48
+ ...argv.execaoptions || {}
51
49
  };
52
- if (argv.execaoptions) {
53
- const userOptions = safeParse(argv.execaoptions);
54
- execaOptions = { ...execaOptions, ...userOptions };
55
- }
56
50
  const processResult = await execa(fileURLToPath(exePath), args, execaOptions);
57
51
  process.exit(processResult.exitCode ?? 0);
58
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rust-just",
3
- "version": "1.48.1",
3
+ "version": "1.49.0",
4
4
  "description": "🤖 Just a command runner",
5
5
  "bin": {
6
6
  "just": "lib/index.mjs",
@@ -49,16 +49,16 @@
49
49
  "@typescript-eslint/parser": "^8.21.0",
50
50
  "eslint": "^10.0.0",
51
51
  "tsup": "^8.3.5",
52
- "typescript": "^5.7.3"
52
+ "typescript": "^6.0.2"
53
53
  },
54
54
  "optionalDependencies": {
55
- "rust-just-darwin-arm64": "1.48.1",
56
- "rust-just-darwin-x64": "1.48.1",
57
- "rust-just-linux-arm": "1.48.1",
58
- "rust-just-linux-arm64": "1.48.1",
59
- "rust-just-linux-x64": "1.48.1",
60
- "rust-just-windows-arm64": "1.48.1",
61
- "rust-just-windows-x64": "1.48.1"
55
+ "rust-just-darwin-arm64": "1.49.0",
56
+ "rust-just-darwin-x64": "1.49.0",
57
+ "rust-just-linux-arm": "1.49.0",
58
+ "rust-just-linux-arm64": "1.49.0",
59
+ "rust-just-linux-x64": "1.49.0",
60
+ "rust-just-windows-arm64": "1.49.0",
61
+ "rust-just-windows-x64": "1.49.0"
62
62
  },
63
63
  "eslintConfig": {
64
64
  "extends": [
@@ -74,7 +74,7 @@
74
74
  ],
75
75
  "root": true
76
76
  },
77
- "packageManager": "yarn@4.12.0",
77
+ "packageManager": "yarn@4.13.0",
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },