remove-glob 0.4.3 → 0.4.5
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/README.md +1 -1
- package/dist/cli.js +3 -2
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/cli.ts +3 -2
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Options:
|
|
|
38
38
|
-d, --dryRun Show which files/dirs would be deleted but without actually removing them [boolean]
|
|
39
39
|
-g, --glob Glob pattern(s) to find which files/dirs to remove [array]
|
|
40
40
|
-s, --stat Show the stats of the items being removed [boolean]
|
|
41
|
-
-
|
|
41
|
+
-V, --verbose If true, it will log each file or directory being removed [boolean]
|
|
42
42
|
-h, --help Show help [boolean]
|
|
43
43
|
-v, --version Show version number [boolean]
|
|
44
44
|
```
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,8 @@ import { readFileSync } from 'node:fs';
|
|
|
3
3
|
import { dirname, resolve } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import { parseArgs } from 'cli-nano';
|
|
6
|
-
|
|
6
|
+
// @ts-expect-error
|
|
7
|
+
import { removeSync } from './index.ts';
|
|
7
8
|
function readPackage() {
|
|
8
9
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
10
|
const pkgPath = resolve(__dirname, '../package.json');
|
|
@@ -65,7 +66,7 @@ try {
|
|
|
65
66
|
type: 'boolean',
|
|
66
67
|
},
|
|
67
68
|
verbose: {
|
|
68
|
-
alias: '
|
|
69
|
+
alias: 'V',
|
|
69
70
|
type: 'boolean',
|
|
70
71
|
default: false,
|
|
71
72
|
describe: 'If true, it will log each file or directory being removed',
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RemoveOptions } from './interfaces.
|
|
1
|
+
import type { RemoveOptions } from './interfaces.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Remove the files or directories, the item(s) can be provided via positional arguments or via a `--glob` pattern.
|
|
4
4
|
* @param {RemoveOptions} options - CLI options
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remove-glob",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "A tiny utility to remove items or directories recursively, also supports glob",
|
|
5
5
|
"bin": {
|
|
6
6
|
"remove": "dist/cli.js"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/ghiscoding/remove-glob/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"cli-nano": "^1.2.
|
|
38
|
+
"cli-nano": "^1.2.2",
|
|
39
39
|
"tinyglobby": "^0.2.15"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
package/src/cli.ts
CHANGED
|
@@ -5,7 +5,8 @@ import { dirname, resolve } from 'node:path';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { parseArgs } from 'cli-nano';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// @ts-expect-error
|
|
9
|
+
import { removeSync } from './index.ts';
|
|
9
10
|
|
|
10
11
|
function readPackage() {
|
|
11
12
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -70,7 +71,7 @@ try {
|
|
|
70
71
|
type: 'boolean',
|
|
71
72
|
},
|
|
72
73
|
verbose: {
|
|
73
|
-
alias: '
|
|
74
|
+
alias: 'V',
|
|
74
75
|
type: 'boolean',
|
|
75
76
|
default: false,
|
|
76
77
|
describe: 'If true, it will log each file or directory being removed',
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, rmSync, statSync, unlinkSync } from 'node:fs';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { globSync } from 'tinyglobby';
|
|
4
4
|
|
|
5
|
-
import type { RemoveOptions } from './interfaces.
|
|
5
|
+
import type { RemoveOptions } from './interfaces.ts';
|
|
6
6
|
|
|
7
7
|
/** Helper to throw or callback with error */
|
|
8
8
|
function throwOrCallback(err?: Error, cb?: (e?: Error) => void) {
|