@modernpoacher/deps 2.2.18 → 2.2.20
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/common/index.mjs +162 -48
- package/bin/deps.mjs +10 -9
- package/bin/node/deps.mjs +5 -21
- package/bin/node/execute.mjs +152 -40
- package/bin/node/head.mjs +5 -21
- package/bin/node/install.mjs +9 -8
- package/bin/node/push.mjs +5 -21
- package/bin/node/wipe.mjs +5 -21
- package/eslint.config.mjs +103 -0
- package/index.d.mts +50 -0
- package/package.json +24 -18
- package/src/common/debug.mjs +2 -0
- package/src/common/env/index.mjs +5 -5
- package/src/common/git/index.mjs +230 -131
- package/src/common/index.mjs +79 -121
- package/src/common/options/index.mjs +14 -20
- package/src/index.mjs +178 -113
- package/src/install/index.mjs +49 -34
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
import jsdoc from 'eslint-plugin-jsdoc'
|
|
3
|
+
import merge from '@sequencemedia/eslint-merge'
|
|
4
|
+
import standard from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
|
|
5
|
+
import typescript from '@sequencemedia/eslint-config-typescript/configs/recommended/merge'
|
|
6
|
+
import typescriptParser from '@typescript-eslint/parser'
|
|
7
|
+
|
|
8
|
+
export default [
|
|
9
|
+
merge(
|
|
10
|
+
jsdoc.configs['flat/recommended'],
|
|
11
|
+
{
|
|
12
|
+
languageOptions: {
|
|
13
|
+
globals: {
|
|
14
|
+
DepsTypes: 'readonly'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
'jsdoc/require-param-description': 'off',
|
|
19
|
+
'jsdoc/require-returns-description': 'off' /* ,
|
|
20
|
+
'jsdoc/tag-lines': 'off' */
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/**
|
|
25
|
+
* Standard config
|
|
26
|
+
*/
|
|
27
|
+
standard({
|
|
28
|
+
files: [
|
|
29
|
+
'**/*.{mjs,cjs,mts,cts}'
|
|
30
|
+
],
|
|
31
|
+
ignores: [
|
|
32
|
+
'src',
|
|
33
|
+
'test'
|
|
34
|
+
],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
globals: {
|
|
37
|
+
...globals.node
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
standard({
|
|
42
|
+
files: [
|
|
43
|
+
'src/**/*.{mjs,cjs,mts,cts}'
|
|
44
|
+
],
|
|
45
|
+
languageOptions: {
|
|
46
|
+
globals: {
|
|
47
|
+
...globals.browser
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
standard({
|
|
52
|
+
files: [
|
|
53
|
+
'test/**/*.{mjs,cjs,mts,cts}'
|
|
54
|
+
],
|
|
55
|
+
languageOptions: {
|
|
56
|
+
globals: {
|
|
57
|
+
...globals.mocha
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}),
|
|
61
|
+
/**
|
|
62
|
+
* TypeScript config
|
|
63
|
+
*/
|
|
64
|
+
typescript({
|
|
65
|
+
files: [
|
|
66
|
+
'**/*.{mts,cts}'
|
|
67
|
+
],
|
|
68
|
+
ignores: [
|
|
69
|
+
'src',
|
|
70
|
+
'test'
|
|
71
|
+
],
|
|
72
|
+
languageOptions: {
|
|
73
|
+
parser: typescriptParser,
|
|
74
|
+
parserOptions: {
|
|
75
|
+
projectService: true,
|
|
76
|
+
project: 'tsconfig.json'
|
|
77
|
+
},
|
|
78
|
+
globals: {
|
|
79
|
+
...globals.node,
|
|
80
|
+
DepsTypes: 'readonly',
|
|
81
|
+
NodeJS: 'readonly'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}),
|
|
85
|
+
typescript({
|
|
86
|
+
files: [
|
|
87
|
+
'src/**/*.{mts,cts}',
|
|
88
|
+
'test/**/*.{mts,cts}'
|
|
89
|
+
],
|
|
90
|
+
languageOptions: {
|
|
91
|
+
parser: typescriptParser,
|
|
92
|
+
parserOptions: {
|
|
93
|
+
projectService: true,
|
|
94
|
+
project: 'tsconfig.json'
|
|
95
|
+
},
|
|
96
|
+
globals: {
|
|
97
|
+
...globals.browser,
|
|
98
|
+
DepsTypes: 'readonly',
|
|
99
|
+
NodeJS: 'readonly'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
]
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace DepsTypes {
|
|
3
|
+
export interface Options {
|
|
4
|
+
maxBuffer: number
|
|
5
|
+
stdio: string
|
|
6
|
+
env: NodeJS.ProcessEnv
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Package or configuration dependencies
|
|
11
|
+
*/
|
|
12
|
+
export type Dependencies = Record<string, string>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A dependency descriptor
|
|
16
|
+
*/
|
|
17
|
+
export interface DependencyDescriptor {
|
|
18
|
+
name: string
|
|
19
|
+
version: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A package
|
|
24
|
+
*/
|
|
25
|
+
export type Package = Record<string, string> & {
|
|
26
|
+
author?: string | { name: string; email: string }
|
|
27
|
+
dependencies?: Dependencies
|
|
28
|
+
devDependencies?: Dependencies
|
|
29
|
+
optionalDependencies?: Dependencies
|
|
30
|
+
bundleDependencies?: Dependencies
|
|
31
|
+
peerDependencies?: Dependencies
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A configuration
|
|
36
|
+
*/
|
|
37
|
+
export type Configuration = Record<string, string> & {
|
|
38
|
+
author?: string | { name: string; email: string }
|
|
39
|
+
ignore?: boolean
|
|
40
|
+
message?: string
|
|
41
|
+
dependencies?: Dependencies
|
|
42
|
+
devDependencies?: Dependencies
|
|
43
|
+
optionalDependencies?: Dependencies
|
|
44
|
+
bundleDependencies?: Dependencies
|
|
45
|
+
peerDependencies?: Dependencies
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/deps",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.20",
|
|
4
4
|
"description": "Update NPM package dependencies from the command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deps",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "./index.mjs",
|
|
14
14
|
"type": "module",
|
|
15
|
+
"types": "./index.d.mts",
|
|
15
16
|
"author": {
|
|
16
17
|
"name": "Jonathan Perry for Modern Poacher Limited",
|
|
17
18
|
"email": "modernpoacher@modernpoacher.com",
|
|
@@ -23,9 +24,9 @@
|
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
26
|
-
"url": "git://github.com/modernpoacher/deps.git"
|
|
27
|
+
"url": "git+https://github.com/modernpoacher/deps.git"
|
|
27
28
|
},
|
|
28
|
-
"homepage": "https://github.com/modernpoacher/deps",
|
|
29
|
+
"homepage": "https://github.com/modernpoacher/deps#readme",
|
|
29
30
|
"bugs": {
|
|
30
31
|
"url": "https://github.com/modernpoacher/deps/issues"
|
|
31
32
|
},
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"deps-install": "cross-env NODE_OPTIONS=--disable-warning=ExperimentalWarning DEBUG_COLORS=yes NODE_ENV=production node bin/deps/install.mjs",
|
|
38
39
|
"deps-push": "cross-env NODE_OPTIONS=--disable-warning=ExperimentalWarning DEBUG_COLORS=yes NODE_ENV=production node bin/deps/push.mjs",
|
|
39
40
|
"deps-wipe": "cross-env NODE_OPTIONS=--disable-warning=ExperimentalWarning DEBUG_COLORS=yes NODE_ENV=production node bin/deps/wipe.mjs",
|
|
40
|
-
"lint": "
|
|
41
|
+
"lint": "eslint .",
|
|
41
42
|
"lint:fix": "npm run lint -- --fix",
|
|
42
43
|
"prepare": "husky",
|
|
43
44
|
"start": "npm run deps",
|
|
@@ -53,24 +54,28 @@
|
|
|
53
54
|
"deps-wipe": "bin/deps/wipe.sh"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
|
-
"commander": "^
|
|
57
|
-
"debug": "^4.4.
|
|
58
|
-
"glob": "^11.0.
|
|
57
|
+
"commander": "^14.0.0",
|
|
58
|
+
"debug": "^4.4.1",
|
|
59
|
+
"glob": "^11.0.3",
|
|
59
60
|
"strip-ansi": "^7.1.0",
|
|
60
|
-
"supports-color": "^10.
|
|
61
|
+
"supports-color": "^10.2.0"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"eslint": "8.
|
|
71
|
-
"
|
|
64
|
+
"@sequencemedia/eslint-config-standard": "^0.2.79",
|
|
65
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.137",
|
|
66
|
+
"@sequencemedia/eslint-merge": "^0.0.47",
|
|
67
|
+
"@types/chai": "^5.2.2",
|
|
68
|
+
"@types/debug": "^4.1.12",
|
|
69
|
+
"@types/mocha": "^10.0.10",
|
|
70
|
+
"@types/node": "^24.3.1",
|
|
71
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
72
|
+
"chai": "^6.0.1",
|
|
73
|
+
"cross-env": "^10.0.0",
|
|
74
|
+
"eslint": "^9.34.0",
|
|
75
|
+
"eslint-plugin-jsdoc": "^54.3.1",
|
|
76
|
+
"globals": "^16.3.0",
|
|
72
77
|
"husky": "^9.1.7",
|
|
73
|
-
"mocha": "^11.
|
|
78
|
+
"mocha": "^11.7.2"
|
|
74
79
|
},
|
|
75
80
|
"imports": {
|
|
76
81
|
"#deps/bin": "./bin/index.mjs",
|
|
@@ -82,6 +87,7 @@
|
|
|
82
87
|
"#deps/src/common/*": "./src/common/*/index.mjs",
|
|
83
88
|
"#deps/src/common/debug": "./src/common/debug.mjs",
|
|
84
89
|
"#deps/src/install": "./src/install/index.mjs",
|
|
90
|
+
"#deps/test/*": "./test/*.mjs",
|
|
85
91
|
"#where-am-i": "./where-am-i.mjs"
|
|
86
92
|
}
|
|
87
93
|
}
|
package/src/common/debug.mjs
CHANGED
package/src/common/env/index.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import debug from 'debug'
|
|
2
|
-
|
|
3
|
-
import PATH from '#where-am-i'
|
|
4
|
-
|
|
5
1
|
import {
|
|
6
2
|
join
|
|
7
3
|
} from 'node:path'
|
|
@@ -14,10 +10,14 @@ import {
|
|
|
14
10
|
platform
|
|
15
11
|
} from 'node:os'
|
|
16
12
|
|
|
13
|
+
import PATH from '#where-am-i'
|
|
14
|
+
|
|
15
|
+
import debug from '#deps/src/common/debug'
|
|
16
|
+
|
|
17
17
|
const {
|
|
18
18
|
name: NAME,
|
|
19
19
|
version: VERSION
|
|
20
|
-
} = JSON.parse(readFileSync(join(PATH, 'package.json')))
|
|
20
|
+
} = JSON.parse(readFileSync(join(PATH, 'package.json')).toString('utf8'))
|
|
21
21
|
|
|
22
22
|
const PLATFORM = platform()
|
|
23
23
|
|