diff options
author | nlf <quitlahok@gmail.com> | 2020-10-06 19:58:28 +0300 |
---|---|---|
committer | nlf <quitlahok@gmail.com> | 2020-10-07 17:58:34 +0300 |
commit | 418076658cce601d899fe502a78e2a95a05e9b3f (patch) | |
tree | 9ec8a4af2566005ce31e4b4318bc9e09581d94cc /lib/utils | |
parent | 885890256deedd8b187e0c2e820c4275b41b58e1 (diff) |
chore: alphabetize config properties
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/config.js | 151 |
1 files changed, 69 insertions, 82 deletions
diff --git a/lib/utils/config.js b/lib/utils/config.js index 5fe14a722..bb504cc69 100644 --- a/lib/utils/config.js +++ b/lib/utils/config.js @@ -45,74 +45,62 @@ const defaults = { access: null, all: false, 'allow-same-version': false, - 'always-auth': false, also: null, + 'always-auth': false, audit: true, 'audit-level': null, 'auth-type': 'legacy', - before: null, 'bin-links': true, browser: null, - ca: null, - cafile: null, - cache, - - 'cache-lock-stale': 60000, 'cache-lock-retries': 10, + 'cache-lock-stale': 60000, 'cache-lock-wait': 10000, - 'cache-max': Infinity, 'cache-min': 10, - + cafile: null, + call: '', cert: null, - cidr: null, - color: process.env.NO_COLOR == null, - call: '', + 'commit-hooks': true, depth: null, description: true, dev: false, 'dry-run': false, editor, 'engine-strict': false, - force: false, - 'format-package-lock': true, - - fund: true, - 'fetch-retries': 2, 'fetch-retry-factor': 10, - 'fetch-retry-mintimeout': 10000, 'fetch-retry-maxtimeout': 60000, + 'fetch-retry-mintimeout': 10000, 'fetch-timeout': 5 * 60 * 1000, - + force: false, + 'format-package-lock': true, + fund: true, git: 'git', 'git-tag-version': true, - 'commit-hooks': true, - global: false, 'global-style': false, heading: 'npm', + 'https-proxy': null, 'if-present': false, - include: [], - 'include-staged': false, 'ignore-prepublish': false, 'ignore-scripts': false, - 'init-module': '~/.npm-init.js', - 'init-author-name': '', + include: [], + 'include-staged': false, 'init-author-email': '', + 'init-author-name': '', 'init-author-url': '', - 'init-version': '1.0.0', 'init-license': 'ISC', + 'init-module': '~/.npm-init.js', + 'init-version': '1.0.0', json: false, key: null, 'legacy-bundling': false, 'legacy-peer-deps': false, - 'strict-peer-deps': false, link: false, 'local-address': undefined, loglevel: 'notice', @@ -123,6 +111,7 @@ const defaults = { 'metrics-registry': null, 'node-options': null, 'node-version': process.version, + noproxy: null, offline: false, omit: [], only: null, @@ -138,13 +127,6 @@ const defaults = { production: process.env.NODE_ENV === 'production', progress: !ciDetect(), proxy: null, - 'https-proxy': null, - noproxy: null, - 'user-agent': 'npm/{npm-version} ' + - 'node/{node-version} ' + - '{platform} ' + - '{arch} ' + - '{ci}', 'read-only': false, 'rebuild-bundle': true, registry: 'https://registry.npmjs.org/', @@ -159,9 +141,9 @@ const defaults = { scope: '', 'script-shell': null, 'scripts-prepend-node-path': 'warn-only', - searchopts: '', searchexclude: null, searchlimit: 20, + searchopts: '', searchstaleness: 15 * 60, 'send-metrics': false, shell, @@ -170,16 +152,22 @@ const defaults = { 'sign-git-tag': false, 'sso-poll-frequency': 500, 'sso-type': 'oauth', + 'strict-peer-deps': false, 'strict-ssl': true, tag: 'latest', 'tag-version-prefix': 'v', timing: false, tmp: tmpdir(), + umask: process.umask ? process.umask() : 0o22, unicode, 'update-notifier': true, usage: false, + 'user-agent': 'npm/{npm-version} ' + + 'node/{node-version} ' + + '{platform} ' + + '{arch} ' + + '{ci}', userconfig: '~/.npmrc', - umask: process.umask ? process.umask() : 0o22, version: false, versions: false, viewer: isWindows ? 'browser' : 'man' @@ -189,8 +177,8 @@ const types = { access: [null, 'restricted', 'public'], all: Boolean, 'allow-same-version': Boolean, - 'always-auth': Boolean, also: [null, 'dev', 'development'], + 'always-auth': Boolean, audit: Boolean, 'audit-level': ['low', 'moderate', 'high', 'critical', 'none', null], 'auth-type': ['legacy', 'sso', 'saml', 'oauth'], @@ -198,57 +186,55 @@ const types = { 'bin-links': Boolean, browser: [null, Boolean, String], ca: [null, String, Array], - cafile: path, cache: path, - 'cache-lock-stale': Number, 'cache-lock-retries': Number, + 'cache-lock-stale': Number, 'cache-lock-wait': Number, 'cache-max': Number, 'cache-min': Number, + cafile: path, + call: String, cert: [null, String], cidr: [null, String, Array], color: ['always', Boolean], - call: String, + 'commit-hooks': Boolean, depth: [null, Number], description: Boolean, dev: Boolean, 'dry-run': Boolean, editor: String, 'engine-strict': Boolean, - force: Boolean, - fund: Boolean, - 'format-package-lock': Boolean, 'fetch-retries': Number, 'fetch-retry-factor': Number, - 'fetch-retry-mintimeout': Number, 'fetch-retry-maxtimeout': Number, + 'fetch-retry-mintimeout': Number, 'fetch-timeout': Number, + force: Boolean, + 'format-package-lock': Boolean, + fund: Boolean, git: String, 'git-tag-version': Boolean, - 'commit-hooks': Boolean, global: Boolean, - globalconfig: path, 'global-style': Boolean, + globalconfig: path, group: [Number, String], - 'https-proxy': [null, url], - 'user-agent': String, heading: String, + 'https-proxy': [null, url], 'if-present': Boolean, - include: [Array, 'prod', 'dev', 'optional', 'peer'], - 'include-staged': Boolean, 'ignore-prepublish': Boolean, 'ignore-scripts': Boolean, - 'init-module': path, - 'init-author-name': String, + include: [Array, 'prod', 'dev', 'optional', 'peer'], + 'include-staged': Boolean, 'init-author-email': String, + 'init-author-name': String, 'init-author-url': ['', url], 'init-license': String, + 'init-module': path, 'init-version': semver, json: Boolean, key: [null, String], 'legacy-bundling': Boolean, 'legacy-peer-deps': Boolean, - 'strict-peer-deps': Boolean, link: Boolean, 'local-address': getLocalAddresses(), loglevel: [ @@ -300,9 +286,9 @@ const types = { scope: String, 'script-shell': [null, String], 'scripts-prepend-node-path': [Boolean, 'auto', 'warn-only'], - searchopts: String, searchexclude: [null, String], searchlimit: Number, + searchopts: String, searchstaleness: Number, 'send-metrics': Boolean, shell: String, @@ -311,61 +297,62 @@ const types = { 'sign-git-tag': Boolean, 'sso-poll-frequency': Number, 'sso-type': [null, 'oauth', 'saml'], + 'strict-peer-deps': Boolean, 'strict-ssl': Boolean, tag: String, + 'tag-version-prefix': String, timing: Boolean, tmp: path, + umask: Umask, unicode: Boolean, 'update-notifier': Boolean, usage: Boolean, + 'user-agent': String, userconfig: path, - umask: Umask, version: Boolean, - 'tag-version-prefix': String, versions: Boolean, viewer: String } const shorthands = { + '?': ['--usage'], a: ['--all'], - 'enjoy-by': ['--before'], + B: ['--save-bundle'], + C: ['--prefix'], c: ['--call'], - s: ['--loglevel', 'silent'], + D: ['--save-dev'], d: ['--loglevel', 'info'], dd: ['--loglevel', 'verbose'], ddd: ['--loglevel', 'silly'], - noreg: ['--no-registry'], - N: ['--no-registry'], - reg: ['--registry'], - 'no-reg': ['--no-registry'], - silent: ['--loglevel', 'silent'], - verbose: ['--loglevel', 'verbose'], - quiet: ['--loglevel', 'warn'], - q: ['--loglevel', 'warn'], - h: ['--usage'], + desc: ['--description'], + E: ['--save-exact'], + 'enjoy-by': ['--before'], + f: ['--force'], + g: ['--global'], H: ['--usage'], - '?': ['--usage'], + h: ['--usage'], help: ['--usage'], - v: ['--version'], - f: ['--force'], - desc: ['--description'], - 'no-desc': ['--no-description'], - local: ['--no-global'], l: ['--long'], + local: ['--no-global'], m: ['--message'], + n: ['--no-yes'], + 'no-desc': ['--no-description'], + 'no-reg': ['--no-registry'], + noreg: ['--no-registry'], + O: ['--save-optional'], + P: ['--save-prod'], p: ['--parseable'], porcelain: ['--parseable'], + q: ['--loglevel', 'warn'], + quiet: ['--loglevel', 'warn'], readonly: ['--read-only'], - g: ['--global'], + reg: ['--registry'], S: ['--save'], - D: ['--save-dev'], - E: ['--save-exact'], - O: ['--save-optional'], - P: ['--save-prod'], - y: ['--yes'], - n: ['--no-yes'], - B: ['--save-bundle'], - C: ['--prefix'] + s: ['--loglevel', 'silent'], + silent: ['--loglevel', 'silent'], + v: ['--version'], + verbose: ['--loglevel', 'verbose'], + y: ['--yes'] } module.exports = { defaults, types, shorthands } |