@shibanet0/datamitsu-config 0.0.1-alpha-1 → 0.0.1-alpha-2
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/datamitsu.mjs +9 -13
- package/bin/tsc.mjs +5 -8
- package/bin/tsx.mjs +5 -2
- package/bin/utils.mjs +6 -0
- package/package.json +2 -1
package/bin/datamitsu.mjs
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
|
|
6
|
+
import { getBinaryFilepath } from "./utils.mjs";
|
|
7
|
+
|
|
6
8
|
const args = process.argv.slice(2);
|
|
7
9
|
|
|
8
10
|
if (!args.includes("--binary-command")) {
|
|
@@ -20,19 +22,13 @@ const child = spawn(
|
|
|
20
22
|
{
|
|
21
23
|
env: {
|
|
22
24
|
...process.env,
|
|
23
|
-
DATAMITSU_APP_COMMITLINT_BINARY_FILEPATH:
|
|
24
|
-
DATAMITSU_APP_ESLINT_BINARY_FILEPATH:
|
|
25
|
-
DATAMITSU_APP_KNIP_BINARY_FILEPATH:
|
|
26
|
-
DATAMITSU_APP_PRETTIER_BINARY_FILEPATH:
|
|
27
|
-
DATAMITSU_APP_SORT_PACKAGE_JSON_BINARY_FILEPATH:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
),
|
|
31
|
-
DATAMITSU_APP_SYNCPACK_BINARY_FILEPATH: join(import.meta.dirname, "../node_modules/syncpack/index.cjs"),
|
|
32
|
-
DATAMITSU_APP_TSC_BINARY_FILEPATH: join(
|
|
33
|
-
import.meta.dirname,
|
|
34
|
-
"../node_modules/@typescript/native-preview/bin/tsgo.js",
|
|
35
|
-
),
|
|
25
|
+
DATAMITSU_APP_COMMITLINT_BINARY_FILEPATH: getBinaryFilepath("@commitlint/cli", "../cli.js"),
|
|
26
|
+
DATAMITSU_APP_ESLINT_BINARY_FILEPATH: getBinaryFilepath("eslint", "../../bin/eslint.js"),
|
|
27
|
+
DATAMITSU_APP_KNIP_BINARY_FILEPATH: getBinaryFilepath("knip", "../../bin/knip.js"),
|
|
28
|
+
DATAMITSU_APP_PRETTIER_BINARY_FILEPATH: getBinaryFilepath("prettier", "../bin/prettier.cjs"),
|
|
29
|
+
DATAMITSU_APP_SORT_PACKAGE_JSON_BINARY_FILEPATH: getBinaryFilepath("sort-package-json", "../cli.js"),
|
|
30
|
+
DATAMITSU_APP_SYNCPACK_BINARY_FILEPATH: getBinaryFilepath("syncpack/index.cjs", ""),
|
|
31
|
+
DATAMITSU_APP_TSC_BINARY_FILEPATH: getBinaryFilepath("@typescript/native-preview/package.json", "../bin/tsgo.js"),
|
|
36
32
|
DATAMITSU_PACKAGE_NAME: process.env.DATAMITSU_PACKAGE_NAME || "@shibanet0/datamitsu-config",
|
|
37
33
|
},
|
|
38
34
|
stdio: "inherit",
|
package/bin/tsc.mjs
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
import { getBinaryFilepath } from "./utils.mjs";
|
|
5
6
|
|
|
6
7
|
const args = process.argv.slice(2);
|
|
7
8
|
|
|
8
|
-
const child = spawn(
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
stdio: "inherit",
|
|
13
|
-
},
|
|
14
|
-
);
|
|
9
|
+
const child = spawn("node", [getBinaryFilepath("@typescript/native-preview/package.json", "../bin/tsgo.js"), ...args], {
|
|
10
|
+
stdio: "inherit",
|
|
11
|
+
});
|
|
15
12
|
|
|
16
13
|
child.on("exit", (code) => {
|
|
17
14
|
if (code !== 0) {
|
package/bin/tsx.mjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
import { getBinaryFilepath } from "./utils.mjs";
|
|
6
|
+
|
|
7
|
+
console.log(getBinaryFilepath("tsx", "../../dist/cli.mjs"));
|
|
5
8
|
|
|
6
9
|
const args = process.argv.slice(2);
|
|
7
10
|
|
|
8
|
-
const child = spawn("node", [
|
|
11
|
+
const child = spawn("node", [getBinaryFilepath("tsx", "../../dist/cli.mjs"), ...args], {
|
|
9
12
|
stdio: "inherit",
|
|
10
13
|
});
|
|
11
14
|
|
package/bin/utils.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shibanet0/datamitsu-config",
|
|
3
|
-
"version": "0.0.1-alpha-
|
|
3
|
+
"version": "0.0.1-alpha-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"./tsconfig/base.json": "./tsconfig/base.json",
|
|
35
|
+
"./package.json": "./package.json",
|
|
35
36
|
"./knip": {
|
|
36
37
|
"import": {
|
|
37
38
|
"types": "./dist/knip/index.d.ts",
|