binary-collections 2.0.6 → 2.0.8
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/dir-tree.cmd +7 -0
- package/bin/git-diff +4 -0
- package/bin/git-diff.cmd +7 -0
- package/bin/{git-fix-encoding → git-fix} +1 -4
- package/bin/git-fix.cmd +7 -0
- package/bin/nodekill +0 -0
- package/bin/nodekill.cmd +0 -0
- package/bin/{submodule-install → submodule-install.txt} +0 -0
- package/bin/{submodule → submodule.txt} +0 -0
- package/lib/binary-collections-config.cjs +14 -0
- package/lib/binary-collections-config.d.mts +18 -0
- package/lib/binary-collections-config.d.ts +16 -0
- package/lib/binary-collections-config.js +39 -0
- package/lib/binary-collections-config.mjs +6 -0
- package/lib/binary-collections.cjs +105 -0
- package/lib/binary-collections.d.cts +2 -0
- package/lib/binary-collections.d.mts +121 -0
- package/lib/binary-collections.d.ts +121 -0
- package/lib/binary-collections.mjs +108 -0
- package/lib/chunk-4BYBVEYC.mjs +30 -0
- package/lib/chunk-AASHBCRW.mjs +57 -0
- package/lib/chunk-APBWENF6.mjs +135 -0
- package/lib/{chunk-M4IBUK4H.mjs → chunk-DPKAJKFO.mjs} +2 -4
- package/lib/chunk-EGSSKVDH.mjs +66 -0
- package/lib/{chunk-GA4DDV65.mjs → chunk-G3THLIDT.mjs} +3 -5
- package/lib/chunk-JGR2NW6D.mjs +187 -0
- package/lib/chunk-ONIBBBQ3.mjs +108 -0
- package/lib/chunk-SH3L6HHV.mjs +27 -0
- package/lib/chunk-VVEZVNIV.mjs +81 -0
- package/lib/{chunk-E75HJFJO.mjs → chunk-W3ENOM53.mjs} +2 -4
- package/lib/chunk-YV7DO3YV.mjs +48 -0
- package/lib/chunk-YX5U7XDR.mjs +58 -0
- package/lib/chunk-ZYAQRPUL.mjs +28 -0
- package/lib/clean-github-actions-caches.cjs +162 -0
- package/lib/clean-github-actions-caches.d.cts +1 -0
- package/lib/clean-github-actions-caches.d.mts +169 -0
- package/lib/clean-github-actions-caches.d.ts +169 -0
- package/lib/clean-github-actions-caches.mjs +132 -0
- package/lib/del-gradle.cjs +99 -15
- package/lib/del-gradle.d.ts +1 -2
- package/lib/del-gradle.js +12 -69
- package/lib/del-gradle.mjs +4 -6
- package/lib/del-node-modules.cjs +98 -14
- package/lib/del-node-modules.d.ts +1 -2
- package/lib/del-node-modules.js +11 -68
- package/lib/del-node-modules.mjs +3 -5
- package/lib/del-ps.cjs +98 -627
- package/lib/del-ps.d.ts +1 -2
- package/lib/del-ps.js +27 -702
- package/lib/del-ps.mjs +7 -12
- package/lib/del-yarn-caches.cjs +98 -14
- package/lib/del-yarn-caches.d.ts +1 -2
- package/lib/del-yarn-caches.js +6 -63
- package/lib/del-yarn-caches.mjs +3 -5
- package/lib/find-node-modules-cli.cjs +67 -0
- package/lib/find-node-modules-cli.d.mts +1 -0
- package/lib/find-node-modules-cli.d.ts +2 -0
- package/lib/find-node-modules-cli.js +3 -0
- package/lib/find-node-modules-cli.mjs +13 -0
- package/lib/find-node-modules.cjs +39 -9
- package/lib/find-node-modules.d.mts +12 -1
- package/lib/find-node-modules.d.ts +12 -2
- package/lib/find-node-modules.js +53 -12
- package/lib/find-node-modules.mjs +4 -19
- package/lib/git/gitattributes.cjs +171 -0
- package/lib/git/gitattributes.d.mts +35 -0
- package/lib/git/gitattributes.d.ts +33 -0
- package/lib/git/gitattributes.js +223 -0
- package/lib/git/gitattributes.mjs +6 -0
- package/lib/git/line-endings.cjs +74 -0
- package/lib/git/line-endings.d.cts +7 -0
- package/lib/git/line-endings.d.mts +83 -0
- package/lib/git/line-endings.d.ts +83 -0
- package/lib/git/line-endings.mjs +8 -0
- package/lib/git/normalize.cjs +42 -0
- package/lib/git/normalize.d.cts +6 -0
- package/lib/git/normalize.d.mts +43 -0
- package/lib/git/normalize.d.ts +43 -0
- package/lib/git/normalize.mjs +6 -0
- package/lib/git/permissions.cjs +15 -0
- package/lib/git/permissions.d.cts +6 -0
- package/lib/git/permissions.d.mts +17 -0
- package/lib/git/permissions.d.ts +17 -0
- package/lib/git/permissions.mjs +7 -0
- package/lib/git/pull-strategy.cjs +13 -0
- package/lib/git/pull-strategy.d.cts +5 -0
- package/lib/git/pull-strategy.d.mts +15 -0
- package/lib/git/pull-strategy.d.ts +15 -0
- package/lib/git/pull-strategy.mjs +7 -0
- package/lib/git/user-config.cjs +100 -0
- package/lib/git/user-config.d.cts +10 -0
- package/lib/git/user-config.d.mts +105 -0
- package/lib/git/user-config.d.ts +105 -0
- package/lib/git/user-config.mjs +8 -0
- package/lib/git/utils.cjs +70 -0
- package/lib/git/utils.d.cts +20 -0
- package/lib/git/utils.d.mts +69 -0
- package/lib/git/utils.d.ts +69 -0
- package/lib/git/utils.mjs +6 -0
- package/lib/git-diff.cjs +73 -0
- package/lib/git-diff.d.cts +2 -0
- package/lib/git-diff.d.mts +84 -0
- package/lib/git-diff.d.ts +84 -0
- package/lib/git-diff.mjs +88 -0
- package/lib/git-fix.cjs +129 -0
- package/lib/git-fix.d.cts +2 -0
- package/lib/git-fix.d.mts +141 -0
- package/lib/git-fix.d.ts +141 -0
- package/lib/git-fix.mjs +151 -0
- package/lib/git-purge.cjs +92 -621
- package/lib/git-purge.d.ts +1 -2
- package/lib/git-purge.js +53 -698
- package/lib/git-purge.mjs +4 -9
- package/lib/index.cjs +99 -1
- package/lib/index.d.mts +1 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +8 -2
- package/lib/index.mjs +10 -3
- package/lib/npm-run-series.cjs +140 -1
- package/lib/npm-run-series.d.ts +1 -0
- package/lib/npm-run-series.js +81 -56
- package/lib/npm-run-series.mjs +7 -5
- package/lib/package-resolutions-updater.cjs +274 -0
- package/lib/package-resolutions-updater.d.mts +1 -0
- package/lib/package-resolutions-updater.d.ts +326 -0
- package/lib/package-resolutions-updater.mjs +316 -0
- package/lib/print-directory-tree.cjs +241 -0
- package/lib/print-directory-tree.d.cts +1 -0
- package/lib/print-directory-tree.d.mts +234 -0
- package/lib/print-directory-tree.d.ts +234 -0
- package/lib/print-directory-tree.mjs +182 -0
- package/lib/ps/connected-domain.cjs +0 -0
- package/lib/ps/connected-domain.d.ts +1 -2
- package/lib/ps/connected-domain.js +196 -150
- package/lib/ps/connected-domain.mjs +2 -3
- package/lib/ps/index.cjs +3 -3
- package/lib/ps/index.d.mjs +1 -2
- package/lib/ps/index.d.ts +2 -26
- package/lib/ps/index.js +233 -535
- package/lib/ps/index.mjs +9 -11
- package/lib/ps/isWin.cjs +0 -0
- package/lib/ps/isWin.d.ts +1 -2
- package/lib/ps/isWin.js +1 -2
- package/lib/ps/isWin.mjs +2 -3
- package/lib/ps/table-parser.cjs +0 -0
- package/lib/ps/table-parser.d.ts +1 -3
- package/lib/ps/table-parser.js +254 -345
- package/lib/ps/table-parser.mjs +3 -4
- package/lib/submodule-install.cjs +100 -0
- package/lib/submodule-install.d.cts +2 -0
- package/lib/submodule-install.d.mts +121 -0
- package/lib/submodule-install.d.ts +121 -0
- package/lib/submodule-install.mjs +107 -0
- package/lib/utils.cjs +98 -14
- package/lib/utils.d.mts +29 -9
- package/lib/utils.d.ts +30 -14
- package/lib/utils.js +173 -27
- package/lib/utils.mjs +2 -3
- package/lib/yarn-reinstall.cjs +44 -0
- package/lib/yarn-reinstall.d.cts +1 -0
- package/lib/yarn-reinstall.d.mts +49 -0
- package/lib/yarn-reinstall.d.ts +49 -0
- package/lib/yarn-reinstall.mjs +54 -0
- package/package.json +126 -99
- package/readme.md +238 -50
- package/src/package-resolutions-updater.mjs +325 -0
- package/src/print-directory-tree.cjs +234 -0
- package/src/ps/index.js +4 -3
- package/src/yarn-reinstall.cjs +49 -0
- package/test-project/package.json +16 -0
- package/tmp/test-repo/package.json +7 -0
- package/bin/git-fix-encoding.cmd +0 -6
- package/eslint.config.cjs +0 -97
- package/lib/chunk-7MSZ52XC.mjs +0 -14
- package/lib/chunk-AVDT32AY.mjs +0 -20
- package/lib/chunk-LPLPQBYP.mjs +0 -53
- package/lib/chunk-S4SJ7SDW.mjs +0 -625
- package/lib/package-resolutions.cjs +0 -28
- package/lib/package-resolutions.d.mts +0 -25
- package/lib/package-resolutions.d.ts +0 -25
- package/lib/package-resolutions.js +0 -28
- package/lib/package-resolutions.mjs +0 -31
- package/lib/ps/index.d.js +0 -17
package/package.json
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "binary-collections",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Utility to clean any programming caches and more",
|
|
5
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cache",
|
|
7
|
+
"cleaner",
|
|
8
|
+
"utility"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://www.webmanajemen.com/",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/dimaslanjaka/bin/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": {
|
|
16
|
+
"email": "dimaslanjaka@gmail.com",
|
|
17
|
+
"name": "dimaslanjaka",
|
|
18
|
+
"url": "https://webmanajemen.com"
|
|
19
|
+
},
|
|
20
|
+
"main": "lib/index.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"require": {
|
|
24
|
+
"default": "./lib/index.cjs",
|
|
25
|
+
"types": "./lib/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"import": {
|
|
28
|
+
"default": "./lib/index.mjs",
|
|
29
|
+
"types": "./lib/index.d.mts"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"types": "lib/index.d.ts",
|
|
6
34
|
"files": [
|
|
7
35
|
"bin",
|
|
8
36
|
"lib",
|
|
@@ -10,135 +38,134 @@
|
|
|
10
38
|
"!test",
|
|
11
39
|
"package.json"
|
|
12
40
|
],
|
|
13
|
-
"
|
|
14
|
-
"
|
|
41
|
+
"bin": {
|
|
42
|
+
"binary-collections": "lib/binary-collections.cjs",
|
|
43
|
+
"clean-github-actions-cache": "lib/clean-github-actions-caches.cjs",
|
|
44
|
+
"clean-github-actions-caches": "lib/clean-github-actions-caches.cjs",
|
|
45
|
+
"clean-nodemodule": "bin/clean-nodemodule",
|
|
46
|
+
"clean-nodemodules": "bin/clean-nodemodules",
|
|
47
|
+
"clear-gh-caches": "lib/clean-github-actions-caches.cjs",
|
|
48
|
+
"clear-github-actions-cache": "lib/clean-github-actions-caches.cjs",
|
|
49
|
+
"clear-github-actions-caches": "lib/clean-github-actions-caches.cjs",
|
|
50
|
+
"del-gradle": "lib/del-gradle.cjs",
|
|
51
|
+
"del-node-modules": "lib/del-node-modules.mjs",
|
|
52
|
+
"del-nodemodules": "lib/del-node-modules.cjs",
|
|
53
|
+
"del-ps": "lib/del-ps.cjs",
|
|
54
|
+
"del-yarn-caches": "lib/del-yarn-caches.mjs",
|
|
55
|
+
"del-yarncaches": "lib/del-yarn-caches.cjs",
|
|
56
|
+
"dev": "bin/dev",
|
|
57
|
+
"dir-tree": "lib/print-directory-tree.cjs",
|
|
58
|
+
"empty": "bin/empty",
|
|
59
|
+
"find-node-modules": "lib/find-node-modules.mjs",
|
|
60
|
+
"find-node-modules-cli": "lib/find-node-modules-cli.mjs",
|
|
61
|
+
"git-diff": "lib/git-diff.cjs",
|
|
62
|
+
"git-fix": "lib/git-fix.cjs",
|
|
63
|
+
"git-purge": "lib/git-purge.cjs",
|
|
64
|
+
"git-reduce-size": "bin/git-reduce-size",
|
|
65
|
+
"index": "lib/index.mjs",
|
|
66
|
+
"javakill": "bin/javakill.cmd",
|
|
67
|
+
"kill-process": "bin/kill-process",
|
|
68
|
+
"nodekill": "bin/nodekill.ps1",
|
|
69
|
+
"npm-run-series": "lib/npm-run-series.cjs",
|
|
70
|
+
"nrs": "lib/npm-run-series.cjs",
|
|
71
|
+
"package-resolutions-updater": "src/package-resolutions-updater.mjs",
|
|
72
|
+
"pkg-res-updater": "lib/package-resolutions-updater.cjs",
|
|
73
|
+
"pkg-resolutions-updater": "lib/package-resolutions-updater.cjs",
|
|
74
|
+
"print-directory-tree": "src/print-directory-tree.cjs",
|
|
75
|
+
"print-tree": "lib/print-directory-tree.cjs",
|
|
76
|
+
"prod": "bin/prod",
|
|
77
|
+
"rmfind": "bin/rmfind",
|
|
78
|
+
"rmpath": "bin/rmpath",
|
|
79
|
+
"rmx": "bin/rmx",
|
|
80
|
+
"run-s": "lib/npm-run-series.cjs",
|
|
81
|
+
"run-series": "lib/npm-run-series.cjs",
|
|
82
|
+
"submodule-install": "lib/submodule-install.cjs",
|
|
83
|
+
"submodule-remove": "bin/submodule-remove",
|
|
84
|
+
"submodule-token": "bin/submodule-token",
|
|
85
|
+
"yarn-reinstall": "src/yarn-reinstall.cjs"
|
|
15
86
|
},
|
|
16
87
|
"scripts": {
|
|
17
88
|
"update:packer": "curl -L https://github.com/dimaslanjaka/nodejs-package-types/raw/main/packer.js > packer.js",
|
|
18
|
-
"build": "node build.tsup.js && npm run postbuild",
|
|
89
|
+
"build": "node build.tsup.js && tsc -b tsconfig.build.json && npm run postbuild",
|
|
19
90
|
"postbuild": "node -r ts-node/register -r dotenv/config build.js && yarn run pack",
|
|
20
|
-
"
|
|
91
|
+
"build:packages": "yarn workspaces foreach --worktree --no-private run build",
|
|
92
|
+
"test": "npx jest --runInBand --forceExit",
|
|
93
|
+
"test:watch": "npm test --watch",
|
|
94
|
+
"test:coverage": "npm test --coverage",
|
|
95
|
+
"test:debug": "npm test -- --detectOpenHandles",
|
|
21
96
|
"test:nrs": "npm test -- nrs build:**",
|
|
22
97
|
"pack": "node packer.js --yarn --filename=bin",
|
|
23
98
|
"update:ncu": "npx npm-check-updates -u -x jsdom,chalk,hexo,deepmerge-ts --enginesNode --root",
|
|
24
|
-
"clean": "rimraf lib"
|
|
25
|
-
|
|
26
|
-
"keywords": [
|
|
27
|
-
"cache",
|
|
28
|
-
"cleaner",
|
|
29
|
-
"utility"
|
|
30
|
-
],
|
|
31
|
-
"author": {
|
|
32
|
-
"email": "dimaslanjaka@gmail.com",
|
|
33
|
-
"name": "dimaslanjaka",
|
|
34
|
-
"url": "https://webmanajemen.com"
|
|
99
|
+
"clean": "rimraf lib",
|
|
100
|
+
"prepare": "husky"
|
|
35
101
|
},
|
|
36
102
|
"repository": {
|
|
37
103
|
"type": "git",
|
|
38
104
|
"url": "git+https://github.com/dimaslanjaka/bin"
|
|
39
105
|
},
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/dimaslanjaka/bin/issues"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://www.webmanajemen.com/",
|
|
44
|
-
"license": "MIT",
|
|
45
106
|
"dependencies": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
107
|
+
"axios": "^1.10.0",
|
|
108
|
+
"dotenv": "^17.2.0",
|
|
109
|
+
"execa": "^9.6.0",
|
|
110
|
+
"fs-extra": "^11.3.0",
|
|
111
|
+
"git-command-helper": "^2.0.2",
|
|
112
|
+
"glob": "^11.0.3",
|
|
113
|
+
"minimatch": "^10.0.3",
|
|
51
114
|
"minimist": "^1.2.8",
|
|
52
115
|
"ps-node": "^0.1.6",
|
|
53
116
|
"remove": "^0.1.5",
|
|
54
|
-
"sbg-utility": "^
|
|
117
|
+
"sbg-utility": "^2.0.8",
|
|
55
118
|
"upath": "^2.0.1",
|
|
56
|
-
"yaml": "^2.
|
|
119
|
+
"yaml": "^2.8.0",
|
|
57
120
|
"yarn": "^1.22.22"
|
|
58
121
|
},
|
|
59
|
-
"packageManager": "yarn@4.5.0",
|
|
60
122
|
"devDependencies": {
|
|
123
|
+
"@babel/core": "^7.28.0",
|
|
124
|
+
"@babel/preset-env": "^7.28.0",
|
|
125
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
126
|
+
"@eslint/js": "^9.30.1",
|
|
127
|
+
"@types/babel__core": "^7",
|
|
128
|
+
"@types/babel__preset-env": "^7",
|
|
61
129
|
"@types/eslint": "^9",
|
|
62
130
|
"@types/fs-extra": "^11.0.4",
|
|
131
|
+
"@types/jest": "^30.0.0",
|
|
63
132
|
"@types/minimist": "^1",
|
|
64
|
-
"@types/node": "^
|
|
133
|
+
"@types/node": "^24.0.10",
|
|
65
134
|
"@types/prettier": "^3",
|
|
66
135
|
"@types/ps-node": "^0",
|
|
67
136
|
"@types/yargs": "^17",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
69
|
-
"@typescript-eslint/parser": "^8.
|
|
137
|
+
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
|
138
|
+
"@typescript-eslint/parser": "^8.36.0",
|
|
139
|
+
"babel-jest": "^30.0.4",
|
|
140
|
+
"cross-env": "^7.0.3",
|
|
70
141
|
"cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
|
|
71
|
-
"eslint": "^9.
|
|
72
|
-
"eslint-config-prettier": "^
|
|
73
|
-
"eslint-plugin-prettier": "^5.
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
142
|
+
"eslint": "^9.30.1",
|
|
143
|
+
"eslint-config-prettier": "^10.1.5",
|
|
144
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
145
|
+
"globals": "^16.3.0",
|
|
146
|
+
"husky": "^9.1.7",
|
|
147
|
+
"jest": "^30.0.4",
|
|
148
|
+
"lint-staged": "^16.1.2",
|
|
149
|
+
"prettier": "^3.6.2",
|
|
77
150
|
"rimraf": "^6.0.1",
|
|
151
|
+
"ts-jest": "^29.4.0",
|
|
78
152
|
"ts-node": "^10.9.2",
|
|
79
|
-
"tsup": "^8.
|
|
80
|
-
"typescript": "^5.
|
|
153
|
+
"tsup": "^8.5.0",
|
|
154
|
+
"typescript": "^5.8.3"
|
|
81
155
|
},
|
|
82
156
|
"optionalDependencies": {
|
|
83
157
|
"ansi-colors": "^4.1.3"
|
|
84
158
|
},
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"del-ps": "lib/del-ps.cjs",
|
|
97
|
-
"del-ps-cjs": "lib/del-ps.cjs",
|
|
98
|
-
"del-ps-mjs": "lib/del-ps.mjs",
|
|
99
|
-
"del-yarn-caches-cjs": "lib/del-yarn-caches.cjs",
|
|
100
|
-
"del-yarn-caches-mjs": "lib/del-yarn-caches.mjs",
|
|
101
|
-
"del-yarncaches": "lib/del-yarn-caches.cjs",
|
|
102
|
-
"dev": "bin/dev",
|
|
103
|
-
"empty": "bin/empty",
|
|
104
|
-
"eslint-config-cjs": "eslint.config.cjs",
|
|
105
|
-
"find-node-modules-cjs": "lib/find-node-modules.cjs",
|
|
106
|
-
"find-node-modules-mjs": "lib/find-node-modules.mjs",
|
|
107
|
-
"find-nodemodules": "lib/find-node-modules.cjs",
|
|
108
|
-
"git-fix-encoding": "bin/git-fix-encoding",
|
|
109
|
-
"git-fix-encoding-cmd": "bin/git-fix-encoding.cmd",
|
|
110
|
-
"git-purge": "lib/git-purge.cjs",
|
|
111
|
-
"git-purge-cjs": "lib/git-purge.cjs",
|
|
112
|
-
"git-purge-mjs": "lib/git-purge.mjs",
|
|
113
|
-
"git-reduce-size": "bin/git-reduce-size",
|
|
114
|
-
"index-cjs": "lib/ps/index.cjs",
|
|
115
|
-
"index-mjs": "lib/ps/index.mjs",
|
|
116
|
-
"isWin-cjs": "lib/ps/isWin.cjs",
|
|
117
|
-
"isWin-mjs": "lib/ps/isWin.mjs",
|
|
118
|
-
"javakill-cmd": "bin/javakill.cmd",
|
|
119
|
-
"kill-process": "bin/kill-process",
|
|
120
|
-
"nodekill": "bin/nodekill",
|
|
121
|
-
"nodekill-cmd": "bin/nodekill.cmd",
|
|
122
|
-
"nodekill-ps1": "bin/nodekill.ps1",
|
|
123
|
-
"npm-run-series": "lib/npm-run-series.cjs",
|
|
124
|
-
"npm-run-series-cjs": "lib/npm-run-series.cjs",
|
|
125
|
-
"npm-run-series-mjs": "lib/npm-run-series.mjs",
|
|
126
|
-
"nrs": "lib/npm-run-series.cjs",
|
|
127
|
-
"package-resolutions-cjs": "lib/package-resolutions.cjs",
|
|
128
|
-
"package-resolutions-mjs": "lib/package-resolutions.mjs",
|
|
129
|
-
"prod": "bin/prod",
|
|
130
|
-
"rmfind": "bin/rmfind",
|
|
131
|
-
"rmpath": "bin/rmpath",
|
|
132
|
-
"rmx": "bin/rmx",
|
|
133
|
-
"run-s": "lib/npm-run-series.cjs",
|
|
134
|
-
"run-series": "lib/npm-run-series.cjs",
|
|
135
|
-
"submodule": "bin/submodule",
|
|
136
|
-
"submodule-install": "bin/submodule-install",
|
|
137
|
-
"submodule-remove": "bin/submodule-remove",
|
|
138
|
-
"submodule-token": "bin/submodule-token",
|
|
139
|
-
"table-parser-cjs": "lib/ps/table-parser.cjs",
|
|
140
|
-
"table-parser-mjs": "lib/ps/table-parser.mjs",
|
|
141
|
-
"utils-cjs": "lib/utils.cjs",
|
|
142
|
-
"utils-mjs": "lib/utils.mjs"
|
|
159
|
+
"workspaces": [
|
|
160
|
+
"packages/*"
|
|
161
|
+
],
|
|
162
|
+
"directories": {
|
|
163
|
+
"lib": "lib",
|
|
164
|
+
"bin": "bin"
|
|
165
|
+
},
|
|
166
|
+
"packageManager": "yarn@4.9.2",
|
|
167
|
+
"resolutions": {
|
|
168
|
+
"sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/7696e66ab84f319909c5dab9054303e91f898454/packages/sbg-utility/release/sbg-utility.tgz",
|
|
169
|
+
"cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/80999ac7a7031a81e11ddb5fab0f8ba433041c98/release/cross-spawn.tgz"
|
|
143
170
|
}
|
|
144
171
|
}
|
package/readme.md
CHANGED
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
#
|
|
2
|
-
binary helper collections by L3n4r0x
|
|
1
|
+
# Binary Collections
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
A comprehensive collection of Node.js CLI tools designed to streamline common development workflows. This toolkit provides utilities for git operations, dependency management, build processes, and various development automation tasks.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🧹 **Cleanup Tools**: Remove node_modules, yarn caches, gradle builds
|
|
8
|
+
- 🔄 **Git Utilities**: Submodule management, repository purging, diff tools
|
|
9
|
+
- 📦 **Build Tools**: NPM script runners, package management utilities
|
|
10
|
+
- ⚡ **Development Helpers**: Process management, environment setup tools
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### Clone Repository
|
|
7
15
|
```bash
|
|
8
16
|
git clone -b master https://github.com/dimaslanjaka/bin bin
|
|
9
17
|
```
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
### NPM Installation
|
|
12
20
|
```bash
|
|
21
|
+
# Install locally
|
|
13
22
|
npm install binary-collections
|
|
14
|
-
|
|
23
|
+
|
|
24
|
+
# Install globally
|
|
15
25
|
npm install binary-collections -g
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# or
|
|
26
|
+
|
|
27
|
+
# Install from release archive
|
|
19
28
|
npm install binary-collections@https://github.com/dimaslanjaka/bin/raw/master/releases/bin.tgz
|
|
20
29
|
```
|
|
21
30
|
|
|
22
|
-
## Setup
|
|
23
|
-
|
|
31
|
+
## VS Code Setup
|
|
32
|
+
|
|
33
|
+
Create `.vscode/settings.json` to add binary tools to your PATH:
|
|
34
|
+
|
|
24
35
|
```jsonc
|
|
25
36
|
{
|
|
26
37
|
"terminal.integrated.env.linux": {
|
|
@@ -47,41 +58,140 @@ create `.vscode/settings.json`
|
|
|
47
58
|
},
|
|
48
59
|
"Cygwin": {
|
|
49
60
|
"path": "C:\\cygwin64\\bin\\bash.exe",
|
|
50
|
-
"args": [
|
|
51
|
-
"--login",
|
|
52
|
-
"-i"
|
|
53
|
-
],
|
|
61
|
+
"args": ["--login", "-i"],
|
|
54
62
|
"env": {
|
|
55
63
|
"CHERE_INVOKING": "1"
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
|
-
"terminal.integrated.defaultProfile.windows": "Command Prompt"
|
|
67
|
+
"terminal.integrated.defaultProfile.windows": "Command Prompt"
|
|
60
68
|
}
|
|
61
69
|
```
|
|
62
70
|
|
|
63
|
-
##
|
|
71
|
+
## Available Tools
|
|
72
|
+
|
|
73
|
+
### Quick Reference
|
|
74
|
+
|
|
75
|
+
| Category | Tools | Description |
|
|
76
|
+
|----------|-------|-------------|
|
|
77
|
+
| **Git** | `git-purge`, `git-diff`, `git-fix`, `git-reduce-size` | Git repository management and optimization |
|
|
78
|
+
| **Submodules** | `submodule`, `submodule-install`, `submodule-remove`, `submodule-token` | Git submodule operations |
|
|
79
|
+
| **NPM Scripts** | `nrs`, `run-s`, `run-series`, `npm-run-series` | Run npm scripts in series with pattern matching |
|
|
80
|
+
| **Package Mgmt** | `yarn-reinstall`, `pkg-resolutions-updater`, `pkg-res-updater` | Yarn/package resolutions management utilities |
|
|
81
|
+
| **Node.js Dev** | `find-node-modules`, `find-nodemodules`, `dev`, `prod`, `empty` | Node.js development helpers |
|
|
82
|
+
| **Process Mgmt** | `kill-process`, `nodekill`, `javakill`, `del-ps` | Process management and termination |
|
|
83
|
+
| **File System** | `rmfind`, `rmpath`, `rmx`, `print-tree`, `dir-tree` | File system operations |
|
|
84
|
+
| **Cleanup** | `del-nodemodules`, `del-yarncaches`, `del-gradle` | Cache and build directory cleanup |
|
|
85
|
+
| **GitHub Actions** | `clean-github-actions-caches`, `clean-github-actions-cache`, `clear-github-actions-cache`, `clear-github-actions-caches`, `clear-gh-caches` | Remove old GitHub Actions caches, keep only the latest |
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
#### Binary List Generation & Source Code
|
|
90
|
+
|
|
91
|
+
The list of available binaries and utilities is automatically generated by the build script (`build.js`).
|
|
92
|
+
All CLI tools and binaries are collected from the `bin/`, `lib/`, and other relevant folders. The build process updates the `bin` field in `package.json` to reflect all available executables.
|
|
93
|
+
|
|
94
|
+
Source code for utilities is located in the [`src/`](./src/) folder. To update the binary list, run:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
yarn run build
|
|
98
|
+
# or
|
|
99
|
+
node build.js
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
This will scan the project and update `package.json` with all available binaries. The list may change as files are added or removed from the project.
|
|
103
|
+
|
|
104
|
+
For a complete list of available binaries and utilities, see:
|
|
105
|
+
- [Binary executables](https://github.com/dimaslanjaka/bin/tree/master/bin)
|
|
106
|
+
- [Library modules](https://github.com/dimaslanjaka/bin/tree/master/lib)
|
|
107
|
+
- [Package configuration](https://github.com/dimaslanjaka/bin/blob/master/package.json)
|
|
108
|
+
|
|
109
|
+
### Git Tools
|
|
110
|
+
|
|
111
|
+
#### Git Repository Purge
|
|
112
|
+
Clean and optimize git repositories by pruning reflogs:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
git-purge
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
#### Git Diff Utility
|
|
121
|
+
Enhanced git diff functionality:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
git-diff
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Git Fix Utility
|
|
128
|
+
Comprehensive Git configuration fixer for cross-platform development (replaces the old `git-fix-encoding`):
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
git-fix # Apply all fixes
|
|
132
|
+
git-fix --lf-only # Force LF line endings only
|
|
133
|
+
git-fix --permissions # Ignore file permissions only
|
|
134
|
+
git-fix --normalize # Normalize existing files only
|
|
135
|
+
git-fix --user # Configure Git user from environment
|
|
136
|
+
git-fix --user NAME EMAIL # Configure Git user with specific values
|
|
137
|
+
git-fix --user --update-remote # Also update remote URL to match user
|
|
138
|
+
git-fix --user NAME EMAIL --update-remote # Configure user and update remote URL
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Features:
|
|
142
|
+
- Forces LF line endings (`core.autocrlf = false`)
|
|
143
|
+
- Ignores file permission changes (`core.filemode = false`)
|
|
144
|
+
- Sets pull strategy to false (prevents auto-rebase)
|
|
145
|
+
- Normalizes existing line endings
|
|
146
|
+
- Creates/updates `.gitattributes` with proper line ending rules
|
|
147
|
+
- Configures Git user from environment variables or CLI arguments
|
|
148
|
+
- **Non-interactive:** All configuration is now argument-driven; no interactive prompts
|
|
149
|
+
- `--update-remote` flag: Update remote URL to match the configured user (for HTTPS remotes)
|
|
150
|
+
|
|
151
|
+
User Configuration:
|
|
152
|
+
- Environment variables: `GITHUB_USER`, `GITHUB_EMAIL`
|
|
153
|
+
- CLI arguments take precedence over environment variables
|
|
154
|
+
- Use `--update-remote` to update the remote URL with the configured user
|
|
155
|
+
- Examples:
|
|
156
|
+
```bash
|
|
157
|
+
git-fix --user "John Doe" "john@example.com" # Use CLI args
|
|
158
|
+
git-fix --user --update-remote # Use env vars and update remote
|
|
159
|
+
git-fix --user "Jane" "jane@example.com" --update-remote # CLI args and update remote
|
|
160
|
+
GITHUB_USER="Jane" GITHUB_EMAIL="jane@example.com" git-fix --user # Use env vars
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Git Repository Size Reducer
|
|
164
|
+
Reduce git repository size by cleaning up history:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
git-reduce-size
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### Submodule Management
|
|
171
|
+
- **`submodule`** - General submodule operations
|
|
172
|
+
- **`submodule-install`** - Install and setup submodules
|
|
173
|
+
- **`submodule-remove`** - Remove git submodules with interactive selection
|
|
174
|
+
- **`submodule-token`** - Manage submodule tokens
|
|
175
|
+
|
|
176
|
+

|
|
64
177
|
|
|
65
|
-
see all binary at
|
|
66
|
-
- https://github.com/dimaslanjaka/bin/tree/master/bin
|
|
67
|
-
- https://github.com/dimaslanjaka/bin/tree/master/lib
|
|
68
|
-
- https://github.com/dimaslanjaka/bin/blob/master/package.json
|
|
69
178
|
|
|
70
|
-
|
|
179
|
+
### NPM Script Runner
|
|
71
180
|
|
|
72
|
-
|
|
181
|
+
**Binaries**: `nrs`, `run-s`, `run-series`, `npm-run-series`
|
|
73
182
|
|
|
183
|
+
Run multiple npm scripts in series with pattern matching support.
|
|
74
184
|
|
|
75
|
-
|
|
185
|
+
#### Options
|
|
76
186
|
|
|
77
|
-
|
|
187
|
+
| Flag | Description |
|
|
188
|
+
|------|-------------|
|
|
189
|
+
| `--yarn` | Use `yarn run <script-name>` instead of npm |
|
|
190
|
+
| `--verbose`, `-v` | Enable verbose output |
|
|
78
191
|
|
|
79
|
-
|
|
80
|
-
| :--- | :--- |
|
|
81
|
-
| `--yarn` | using `yarn run <script-name>` |
|
|
82
|
-
| `--verbose` `-v` | using `yarn run <script-name>` |
|
|
192
|
+
#### Example
|
|
83
193
|
|
|
84
|
-
|
|
194
|
+
Execute all scripts matching the pattern `namescript:**`:
|
|
85
195
|
|
|
86
196
|
```json
|
|
87
197
|
{
|
|
@@ -99,60 +209,138 @@ example: `npm run namescript`
|
|
|
99
209
|
}
|
|
100
210
|
```
|
|
101
211
|
|
|
102
|
-
|
|
212
|
+
### Package Management Tools
|
|
213
|
+
|
|
214
|
+
#### Yarn Package Reinstaller
|
|
215
|
+
Reinstall yarn packages with dependency type flags:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
yarn-reinstall <packageName> [--dev|-D|--peer|-P|--optional|-O]
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
#### Package Resolutions Manager
|
|
222
|
+
Manage package resolutions in package.json (aliases: `pkg-resolutions-updater`, `pkg-res-updater`):
|
|
103
223
|
|
|
104
224
|
```bash
|
|
105
|
-
|
|
225
|
+
pkg-resolutions-updater
|
|
226
|
+
pkg-res-updater
|
|
106
227
|
```
|
|
107
228
|
|
|
108
|
-
|
|
229
|
+
### Node.js Development Tools
|
|
109
230
|
|
|
110
|
-
|
|
231
|
+
#### Node Modules Finder
|
|
232
|
+
Find all node_modules directories in a project:
|
|
111
233
|
|
|
112
234
|
```bash
|
|
113
|
-
|
|
235
|
+
find-node-modules # Library function
|
|
236
|
+
find-node-modules-cli # CLI tool
|
|
237
|
+
find-nodemodules # Alias
|
|
114
238
|
```
|
|
115
239
|
|
|
116
|
-
|
|
240
|
+
#### Development Environment Helpers
|
|
241
|
+
- **`dev`** - Development environment setup
|
|
242
|
+
- **`prod`** - Production environment setup
|
|
243
|
+
- **`empty`** - Empty utility tool
|
|
117
244
|
|
|
118
|
-
|
|
245
|
+
### Process Management Tools
|
|
246
|
+
|
|
247
|
+
#### Process Killers
|
|
248
|
+
Kill processes by name or pattern:
|
|
119
249
|
|
|
120
250
|
```bash
|
|
121
|
-
|
|
251
|
+
kill-process # General process killer
|
|
252
|
+
nodekill # Kill Node.js processes
|
|
253
|
+
javakill # Kill Java processes (Windows)
|
|
254
|
+
del-ps # Kill processes by command name
|
|
122
255
|
```
|
|
123
256
|
|
|
124
|
-
|
|
257
|
+
#### File System Tools
|
|
258
|
+
- **`rmfind`** - Find and remove files
|
|
259
|
+
- **`rmpath`** - Remove from PATH
|
|
260
|
+
- **`rmx`** - Remove executable files
|
|
261
|
+
|
|
262
|
+
### Cleanup Tools
|
|
125
263
|
|
|
126
|
-
|
|
264
|
+
### GitHub Actions Cache Cleaner
|
|
265
|
+
|
|
266
|
+
Remove old GitHub Actions caches, keeping only the most recent cache for each prefix:
|
|
127
267
|
|
|
128
268
|
```bash
|
|
129
|
-
|
|
269
|
+
clean-github-actions-caches
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Features:
|
|
273
|
+
- Authenticates using `ACCESS_TOKEN` or `GITHUB_TOKEN` from your `.env` file
|
|
274
|
+
- Automatically groups and deletes caches by prefix, keeping only the latest
|
|
275
|
+
- Works for the current repository (origin remote)
|
|
276
|
+
|
|
277
|
+
Environment setup:
|
|
278
|
+
- Ensure your `.env` file contains `ACCESS_TOKEN` or `GITHUB_TOKEN`
|
|
279
|
+
|
|
280
|
+
Source: [`src/clean-github-actions-caches.cjs`](./src/clean-github-actions-caches.cjs)
|
|
281
|
+
|
|
282
|
+
#### Node Modules Cleaner
|
|
283
|
+
Remove node_modules directories recursively:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
del-nodemodules # Primary command
|
|
287
|
+
del-node-modules # Alternative
|
|
288
|
+
clean-nodemodule # Legacy
|
|
289
|
+
clean-nodemodules # Legacy
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+

|
|
293
|
+
|
|
294
|
+
#### Yarn Cache Cleaner
|
|
295
|
+
Clear yarn cache directories:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
del-yarncaches # Primary command
|
|
299
|
+
del-yarn-caches # Alternative
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
#### Gradle Build Cleaner
|
|
303
|
+
Delete gradle build folders:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
del-gradle
|
|
130
307
|
```
|
|
131
308
|
|
|
132
|
-
|
|
309
|
+
## Troubleshooting
|
|
310
|
+
|
|
311
|
+
### Submodule Installation Issues
|
|
133
312
|
|
|
134
|
-
|
|
135
|
-
### submodule-install
|
|
313
|
+
If you encounter the following error:
|
|
136
314
|
|
|
137
|
-
when you're facing error like
|
|
138
315
|
```log
|
|
139
316
|
fatal: 'origin/<branch>' is not a commit and a branch '<branch>' cannot be created from it
|
|
140
317
|
fatal: unable to checkout submodule '<folder>/<submodule>'
|
|
141
318
|
```
|
|
142
319
|
|
|
143
|
-
|
|
320
|
+
**Solution**: Delete `.git/modules` directory before running `submodule-install`.
|
|
321
|
+
|
|
322
|
+
#### Complete Submodule Setup Example
|
|
144
323
|
|
|
145
|
-
example single execution:
|
|
146
324
|
```bash
|
|
147
|
-
echo "
|
|
325
|
+
echo "Initializing submodules..."
|
|
148
326
|
git submodule init
|
|
149
327
|
git submodule foreach "git submodule init"
|
|
150
|
-
|
|
328
|
+
|
|
329
|
+
echo "Syncing submodules..."
|
|
151
330
|
git submodule sync
|
|
152
331
|
git submodule foreach "git submodule sync"
|
|
153
|
-
|
|
332
|
+
|
|
333
|
+
echo "Updating submodules..."
|
|
154
334
|
mkdir -p bin >/dev/null 2>&1
|
|
155
335
|
curl -L https://github.com/dimaslanjaka/bin/raw/master/bin/submodule-install > bin/submodule-install
|
|
156
336
|
rm -rf .git/modules
|
|
157
337
|
bash ./bin/submodule-install
|
|
158
338
|
```
|
|
339
|
+
|
|
340
|
+
## Contributing
|
|
341
|
+
|
|
342
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
343
|
+
|
|
344
|
+
## License
|
|
345
|
+
|
|
346
|
+
This project is licensed under the terms specified in the LICENSE file.
|