+28
-8
lines changedFilter options
+28
-8
lines changed Original file line number Diff line number Diff line change
@@ -8,7 +8,17 @@ const npa = require('npm-package-arg')
8
8
const semver = require('semver')
9
9
10
10
// more popular packages should go here, maybe?
11
-
const isTestPkg = (p) => !!p.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/)
11
+
const testPkgs = [
12
+
'coco',
13
+
'coffee-script',
14
+
'expresso',
15
+
'jasmine',
16
+
'jest',
17
+
'mocha',
18
+
'streamline',
19
+
'tap',
20
+
]
21
+
const isTestPkg = p => testPkgs.includes(p)
12
22
13
23
const invalid = (msg) => Object.assign(new Error(msg), { notValid: true })
14
24
@@ -266,3 +276,13 @@ const type = package.type || getConfig('type') || 'commonjs'
266
276
exports.type = yes ? type : prompt('type', type, (data) => {
267
277
return data
268
278
})
279
+
280
+
// Only include private field if it already exists or if explicitly set in config
281
+
const configPrivate = getConfig('private')
282
+
if (package.private !== undefined || configPrivate !== undefined) {
283
+
if (package.private !== undefined) {
284
+
exports.private = package.private
285
+
} else if (!config.isDefault || !config.isDefault('init-private')) {
286
+
exports.private = configPrivate
287
+
}
288
+
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "init-package-json",
3
-
"version": "8.0.0",
3
+
"version": "8.2.1",
4
4
"main": "lib/init-package-json.js",
5
5
"scripts": {
6
6
"test": "tap",
@@ -29,7 +29,7 @@
29
29
"validate-npm-package-name": "^6.0.0"
30
30
},
31
31
"devDependencies": {
32
-
"@npmcli/config": "^9.0.0",
32
+
"@npmcli/config": "^10.0.0",
33
33
"@npmcli/eslint-config": "^5.0.0",
34
34
"@npmcli/template-oss": "4.23.4",
35
35
"tap": "^16.0.1"
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@
106
106
"graceful-fs": "^4.2.11",
107
107
"hosted-git-info": "^8.1.0",
108
108
"ini": "^5.0.0",
109
-
"init-package-json": "^8.0.0",
109
+
"init-package-json": "^8.2.1",
110
110
"is-cidr": "^5.1.1",
111
111
"json-parse-even-better-errors": "^4.0.0",
112
112
"libnpmaccess": "^10.0.0",
@@ -9493,9 +9493,9 @@
9493
9493
}
9494
9494
},
9495
9495
"node_modules/init-package-json": {
9496
-
"version": "8.0.0",
9497
-
"resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-8.0.0.tgz",
9498
-
"integrity": "sha512-zKgxfaGt6Zzi8VBSInOK0CYDigA9gzDCWPnSzGIoUlTU/5w7qIyi+6MyJYX96mMlxDGrIR85FhQszVyodYfB9g==",
9496
+
"version": "8.2.1",
9497
+
"resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-8.2.1.tgz",
9498
+
"integrity": "sha512-8lhupwQjiwCJzwVILceTq0Kvyj+0cFun0jvmMz0TwCFFgCAqLV6tZl07VAexh8YFOWwIN9jxN+XHkW27fy1nZg==",
9499
9499
"inBundle": true,
9500
9500
"license": "ISC",
9501
9501
"dependencies": {
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
73
73
"graceful-fs": "^4.2.11",
74
74
"hosted-git-info": "^8.1.0",
75
75
"ini": "^5.0.0",
76
-
"init-package-json": "^8.0.0",
76
+
"init-package-json": "^8.2.1",
77
77
"is-cidr": "^5.1.1",
78
78
"json-parse-even-better-errors": "^4.0.0",
79
79
"libnpmaccess": "^10.0.0",
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4