diff --git a/lib/utils/config.js b/lib/utils/config.js index e505810da56f7..440806f7964f8 100644 --- a/lib/utils/config.js +++ b/lib/utils/config.js @@ -102,6 +102,12 @@ const defaults = { 'init-license': 'ISC', 'init-module': '~/.npm-init.js', 'init-version': '1.0.0', + 'init.author.email': '', + 'init.author.name': '', + 'init.author.url': '', + 'init.license': 'ISC', + 'init.module': '~/.npm-init.js', + 'init.version': '1.0.0', json: false, key: null, 'legacy-bundling': false, @@ -238,6 +244,12 @@ const types = { 'init-license': String, 'init-module': path, 'init-version': semver, + '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, diff --git a/tap-snapshots/test-lib-utils-config.js-TAP.test.js b/tap-snapshots/test-lib-utils-config.js-TAP.test.js index c1a1ddd48c348..5190a5604a240 100644 --- a/tap-snapshots/test-lib-utils-config.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-config.js-TAP.test.js @@ -64,6 +64,12 @@ Object { "init-license": "ISC", "init-module": "~/.npm-init.js", "init-version": "1.0.0", + "init.author.email": "", + "init.author.name": "", + "init.author.url": "", + "init.license": "ISC", + "init.module": "~/.npm-init.js", + "init.version": "1.0.0", "json": false, "key": null, "legacy-bundling": false, @@ -377,6 +383,15 @@ Object { "init-license": "{String TYPE}", "init-module": "{PATH MODULE}", "init-version": "{SEMVER MODULE}", + "init.author.email": "{String TYPE}", + "init.author.name": "{String TYPE}", + "init.author.url": Array [ + "", + "{URL MODULE}", + ], + "init.license": "{String TYPE}", + "init.module": "{PATH MODULE}", + "init.version": "{SEMVER MODULE}", "json": "{Boolean TYPE}", "key": Array [ null, @@ -578,6 +593,12 @@ Object { "init-license": "ISC", "init-module": "~/.npm-init.js", "init-version": "1.0.0", + "init.author.email": "", + "init.author.name": "", + "init.author.url": "", + "init.license": "ISC", + "init.module": "~/.npm-init.js", + "init.version": "1.0.0", "json": false, "key": null, "legacy-bundling": false, @@ -891,6 +912,15 @@ Object { "init-license": "{String TYPE}", "init-module": "{PATH MODULE}", "init-version": "{SEMVER MODULE}", + "init.author.email": "{String TYPE}", + "init.author.name": "{String TYPE}", + "init.author.url": Array [ + "", + "{URL MODULE}", + ], + "init.license": "{String TYPE}", + "init.module": "{PATH MODULE}", + "init.version": "{SEMVER MODULE}", "json": "{Boolean TYPE}", "key": Array [ null, @@ -1092,6 +1122,12 @@ Object { "init-license": "ISC", "init-module": "~/.npm-init.js", "init-version": "1.0.0", + "init.author.email": "", + "init.author.name": "", + "init.author.url": "", + "init.license": "ISC", + "init.module": "~/.npm-init.js", + "init.version": "1.0.0", "json": false, "key": null, "legacy-bundling": false, @@ -1405,6 +1441,15 @@ Object { "init-license": "{String TYPE}", "init-module": "{PATH MODULE}", "init-version": "{SEMVER MODULE}", + "init.author.email": "{String TYPE}", + "init.author.name": "{String TYPE}", + "init.author.url": Array [ + "", + "{URL MODULE}", + ], + "init.license": "{String TYPE}", + "init.module": "{PATH MODULE}", + "init.version": "{SEMVER MODULE}", "json": "{Boolean TYPE}", "key": Array [ null,