Skip to content

Commit 8dceead

Browse files
committed
Upgrade modules
1 parent 8f2f9df commit 8dceead

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed
File renamed without changes.
File renamed without changes.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"main": "dist/cjs/index.cjs",
3030
"types": "dist/types/index.d.ts",
3131
"bin": {
32-
"dad": "./bin/dad.js",
33-
"dtd": "./bin/dtd.js"
32+
"dad": "./bin/dad.cjs",
33+
"dtd": "./bin/dtd.cjs"
3434
},
3535
"files": [
3636
"dist",

src/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export default (argv, name) => {
3434

3535
if (!options.silent) {
3636
console.log('\n======================');
37-
console.log(`nvu ${args.join(' ')} ${errors.length ? 'failed' : 'succeeed'}`);
38-
results.forEach((res) => console.log(`${res.error ? figures.cross : figures.tick} ${res.version}${res.error ? ` Error: ${res.error.message}` : ''}`));
37+
console.log(`nvu ${args.join(' ')} ${errors.length ? 'failed' : 'succeeded'}`);
38+
results.forEach((res) => console.log(`${res.error ? figures.cross : figures.tick} ${args.join(' ')}${res.error ? ` Error: ${res.error.message}` : ''}`));
3939
}
4040

4141
exit(errors.length ? -1 : 0);

src/worker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ module.exports = function run(commands, options, callback) {
1515
const command = commands[index];
1616
const match = commands[index].match(bracketsRegEx);
1717
const argv = match ? parse(match[1]) : parse(command);
18+
const args = argv.slice(1);
1819

1920
!options.header || options.header(command);
20-
spawn(argv[0], argv.slice(1), spawnOptions, (err, result) => {
21+
spawn(argv[0], args, spawnOptions, (err, result) => {
2122
// suppress error
2223
if (err && match) {
2324
result = err;
2425
err = null;
2526
}
2627

27-
results.push({ index, command, error: err, result });
28+
results.push({ index, command: argv[0], args, error: err, result });
2829
if (err && options.concurrency === 1) return cb(err); // break early
2930
cb();
3031
});

test/spec/cli.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const isVersion = require('is-version');
55
const cr = require('cr');
66

77
const BIN = path.join(__dirname, '..', '..', 'bin');
8-
const CLI_DTD = path.join(BIN, 'dtd.js');
9-
const CLI_DAD = path.join(BIN, 'dad.js');
8+
const CLI_DTD = path.join(BIN, 'dtd.cjs');
9+
const CLI_DAD = path.join(BIN, 'dad.cjs');
1010

1111
describe('cli', () => {
1212
describe('happy path', () => {

0 commit comments

Comments
 (0)