madrun 10.0.1 → 10.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.
- package/ChangeLog +11 -1
- package/README.md +1 -4
- package/bin/init.mjs +1 -4
- package/bin/madrun-completion.js +3 -3
- package/bin/madrun.mjs +7 -10
- package/lib/madrun.js +11 -3
- package/package.json +7 -9
package/ChangeLog
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
2024.07.16, v10.1.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 2b73d5e madrun: find-up v7.0.0
|
|
5
|
+
- 4914a09 madrun: eslint v9.7.0
|
|
6
|
+
- 12b1a56 madrun: @putout/formatter-dump v5.0.0
|
|
7
|
+
- 1b4748f madrun: c8 v10.1.2
|
|
8
|
+
- 4755c8c madrun: putout v36.0.0
|
|
9
|
+
- 125f774 madrun: supertape v10.0.0
|
|
10
|
+
|
|
1
11
|
2024.01.19, v10.0.1
|
|
2
12
|
|
|
3
13
|
feature:
|
|
4
14
|
- 3222754 madrun: eslint-plugin-putout v22.3.0
|
|
5
|
-
-
|
|
15
|
+
- edge4dad madrun: c8 v9.1.0
|
|
6
16
|
- 57f7b7a madrun: mock-import v4.0.2
|
|
7
17
|
- 1a91317 madrun: supertape v9.5.0
|
|
8
18
|
- d523038 madrun: putout v35.0.0
|
package/README.md
CHANGED
package/bin/init.mjs
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {createRequire} from 'node:module';
|
|
2
2
|
import {join} from 'node:path';
|
|
3
|
-
import {
|
|
4
|
-
writeFile,
|
|
5
|
-
access,
|
|
6
|
-
} from 'node:fs/promises';
|
|
3
|
+
import {writeFile, access} from 'node:fs/promises';
|
|
7
4
|
import tryToCatch from 'try-to-catch';
|
|
8
5
|
import montag from 'montag';
|
|
9
6
|
|
package/bin/madrun-completion.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
const process = require('process');
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
5
|
+
const process = require('node:process');
|
|
6
|
+
const fs = require('node:fs');
|
|
7
|
+
const path = require('node:path');
|
|
8
8
|
|
|
9
9
|
const filename = path.join(__dirname, '..', 'shell/redrun-completion.sh');
|
|
10
10
|
const read = fs.createReadStream(filename);
|
package/bin/madrun.mjs
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import {createRequire} from 'node:module';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from 'node:path';
|
|
8
|
-
import findUp from 'find-up';
|
|
4
|
+
import {dirname, basename} from 'node:path';
|
|
5
|
+
import process from 'node:process';
|
|
6
|
+
import {findUpSync} from 'find-up';
|
|
9
7
|
import tryToCatch from 'try-to-catch';
|
|
10
8
|
import yargsParser from 'yargs-parser';
|
|
11
|
-
import process from 'node:process';
|
|
12
9
|
import {series} from '../lib/madrun.js';
|
|
13
10
|
import check from '../lib/check.js';
|
|
14
11
|
import {choose} from '../lib/choose.mjs';
|
|
@@ -132,7 +129,7 @@ function getOutput({cmd, cwd}) {
|
|
|
132
129
|
}
|
|
133
130
|
|
|
134
131
|
async function execute(cmd) {
|
|
135
|
-
const {execSync} = await import('child_process');
|
|
132
|
+
const {execSync} = await import('node:child_process');
|
|
136
133
|
const tryCatch = (await import('try-catch')).default;
|
|
137
134
|
|
|
138
135
|
const [error] = tryCatch(execSync, cmd, {
|
|
@@ -154,9 +151,9 @@ function getOptions(args) {
|
|
|
154
151
|
}
|
|
155
152
|
|
|
156
153
|
async function getScript() {
|
|
157
|
-
const {pathToFileURL} = require('url');
|
|
154
|
+
const {pathToFileURL} = require('node:url');
|
|
158
155
|
const supported = require('../supported.json');
|
|
159
|
-
const path =
|
|
156
|
+
const path = findUpSync(supported);
|
|
160
157
|
|
|
161
158
|
if (!path) {
|
|
162
159
|
console.error('file ".madrun.js" not found!');
|
|
@@ -175,7 +172,7 @@ async function getScript() {
|
|
|
175
172
|
async function putoutMadrun(dir, {fix}) {
|
|
176
173
|
const name = `${dir}/.madrun.js`;
|
|
177
174
|
const {runPutout} = await import('../lib/fix.mjs');
|
|
178
|
-
const {readFile, writeFile} = await import('fs/promises');
|
|
175
|
+
const {readFile, writeFile} = await import('node:fs/promises');
|
|
179
176
|
const data = await readFile(name, 'utf8');
|
|
180
177
|
const {places, code} = await runPutout(data);
|
|
181
178
|
|
package/lib/madrun.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {pathToFileURL} = require('url');
|
|
3
|
+
const {pathToFileURL} = require('node:url');
|
|
4
4
|
const keys = require('all-object-keys');
|
|
5
5
|
const jessy = require('jessy');
|
|
6
|
-
const findUp = require('find-up');
|
|
7
6
|
|
|
8
7
|
const wildcard = require('./wildcard');
|
|
9
8
|
const check = require('./check');
|
|
@@ -12,8 +11,17 @@ const maybeArray = (a) => isArray(a) ? a : [a];
|
|
|
12
11
|
const isStr = (a) => typeof a === 'string';
|
|
13
12
|
const {isArray} = Array;
|
|
14
13
|
|
|
14
|
+
async function getFindUp() {
|
|
15
|
+
if (global.MADRUN_FINDUP)
|
|
16
|
+
return global.MADRUN_FINDUP;
|
|
17
|
+
|
|
18
|
+
const {findUpSync} = await import('find-up');
|
|
19
|
+
return findUpSync;
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
async function getScripts() {
|
|
16
|
-
const
|
|
23
|
+
const findUp = await getFindUp();
|
|
24
|
+
const path = findUp(supported);
|
|
17
25
|
|
|
18
26
|
if (!path)
|
|
19
27
|
throw Error('.madrun.js is missing!');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "madrun",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "CLI tool to run multiple npm-scripts in a madly comfortable way",
|
|
5
5
|
"main": "lib/madrun.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -54,32 +54,30 @@
|
|
|
54
54
|
"node": ">=18"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@putout/formatter-dump": "^
|
|
57
|
+
"@putout/formatter-dump": "^5.0.0",
|
|
58
58
|
"all-object-keys": "^2.0.0",
|
|
59
59
|
"enquirer": "^2.3.6",
|
|
60
|
-
"find-up": "^
|
|
60
|
+
"find-up": "^7.0.0",
|
|
61
61
|
"jessy": "^3.0.0",
|
|
62
62
|
"mapsome": "^1.0.0",
|
|
63
63
|
"montag": "^1.0.0",
|
|
64
64
|
"once": "^1.4.0",
|
|
65
|
-
"putout": "^
|
|
65
|
+
"putout": "^36.0.0",
|
|
66
66
|
"try-catch": "^3.0.0",
|
|
67
67
|
"try-to-catch": "^3.0.0",
|
|
68
68
|
"yargs-parser": "^21.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@putout/formatter-json": "^2.0.0",
|
|
72
|
-
"c8": "^
|
|
72
|
+
"c8": "^10.1.2",
|
|
73
73
|
"escover": "^4.0.0",
|
|
74
|
-
"eslint": "^
|
|
75
|
-
"eslint-plugin-n": "^16.0.1",
|
|
74
|
+
"eslint": "^9.7.0",
|
|
76
75
|
"eslint-plugin-putout": "^22.3.0",
|
|
77
76
|
"mock-import": "^4.0.2",
|
|
78
77
|
"mock-require": "^3.0.3",
|
|
79
78
|
"nodemon": "^3.0.1",
|
|
80
|
-
"nyc": "^15.0.0",
|
|
81
79
|
"runsome": "^1.0.0",
|
|
82
|
-
"supertape": "^
|
|
80
|
+
"supertape": "^10.0.0"
|
|
83
81
|
},
|
|
84
82
|
"publishConfig": {
|
|
85
83
|
"access": "public"
|