From 7ba10a724bf57b7ea5db12c59e0841788235c56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 13 Nov 2018 10:02:14 -0800 Subject: [PATCH] feat(libnpm): add support for partial requires --- access.js | 3 +++ adduser.js | 3 +++ config.js | 3 +++ extract.js | 3 +++ fetch.js | 3 +++ get-prefix.js | 3 +++ hook.js | 3 +++ index.js | 52 +++++++++++++++++++++----------------------- link-bin.js | 3 +++ log.js | 3 +++ logical-tree.js | 3 +++ login.js | 3 +++ manifest.js | 3 +++ org.js | 3 +++ package.json | 1 - packument.js | 3 +++ parse-arg.js | 3 +++ profile.js | 3 +++ publish.js | 3 +++ read-json.js | 3 +++ run-script.js | 3 +++ search.js | 3 +++ stringify-package.js | 3 +++ tarball.js | 3 +++ team.js | 3 +++ unpublish.js | 3 +++ verify-lock.js | 3 +++ 27 files changed, 100 insertions(+), 28 deletions(-) create mode 100644 access.js create mode 100644 adduser.js create mode 100644 config.js create mode 100644 extract.js create mode 100644 fetch.js create mode 100644 get-prefix.js create mode 100644 hook.js create mode 100644 link-bin.js create mode 100644 log.js create mode 100644 logical-tree.js create mode 100644 login.js create mode 100644 manifest.js create mode 100644 org.js create mode 100644 packument.js create mode 100644 parse-arg.js create mode 100644 profile.js create mode 100644 publish.js create mode 100644 read-json.js create mode 100644 run-script.js create mode 100644 search.js create mode 100644 stringify-package.js create mode 100644 tarball.js create mode 100644 team.js create mode 100644 unpublish.js create mode 100644 verify-lock.js diff --git a/access.js b/access.js new file mode 100644 index 0000000..4b16422 --- /dev/null +++ b/access.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmaccess') diff --git a/adduser.js b/adduser.js new file mode 100644 index 0000000..e57dbea --- /dev/null +++ b/adduser.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-profile').adduser diff --git a/config.js b/config.js new file mode 100644 index 0000000..51ff1ed --- /dev/null +++ b/config.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmconfig') diff --git a/extract.js b/extract.js new file mode 100644 index 0000000..ac907fe --- /dev/null +++ b/extract.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('pacote').extract diff --git a/fetch.js b/fetch.js new file mode 100644 index 0000000..0e5ccd8 --- /dev/null +++ b/fetch.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-registry-fetch') diff --git a/get-prefix.js b/get-prefix.js new file mode 100644 index 0000000..86bf858 --- /dev/null +++ b/get-prefix.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('find-npm-prefix') diff --git a/hook.js b/hook.js new file mode 100644 index 0000000..a45644b --- /dev/null +++ b/hook.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmhook') diff --git a/index.js b/index.js index 48e2760..19c0419 100644 --- a/index.js +++ b/index.js @@ -1,31 +1,29 @@ 'use strict' -const BB = require('bluebird') - module.exports = { - config: require('libnpmconfig'), - parseArg: require('npm-package-arg'), - readJSON: BB.promisify(require('read-package-json')), - logicalTree: require('npm-logical-tree'), - getPrefix: require('find-npm-prefix'), - verifyLock: require('lock-verify'), - stringifyPackage: require('stringify-package'), - manifest: require('pacote').manifest, - tarball: require('pacote').tarball, - extract: require('pacote').extract, - packument: require('pacote').packument, - hook: require('libnpmhook'), - access: require('libnpmaccess'), - search: require('libnpmsearch'), - team: require('libnpmteam'), - org: require('libnpmorg'), - fetch: require('npm-registry-fetch'), - login: require('npm-profile').login, - adduser: require('npm-profile').adduser, - profile: require('npm-profile'), - publish: require('libnpmpublish').publish, - unpublish: require('libnpmpublish').unpublish, - runScript: require('npm-lifecycle'), - log: require('npmlog'), - linkBin: require('bin-links') + config: require('./config.js'), + parseArg: require('./parse-arg.js'), + readJSON: require('./read-json.js'), + logicalTree: require('./logical-tree.js'), + getPrefix: require('./get-prefix.js'), + verifyLock: require('./verify-lock.js'), + stringifyPackage: require('./stringify-package.js'), + manifest: require('./manifest.js'), + tarball: require('./tarball.js'), + extract: require('./extract.js'), + packument: require('./packument.js'), + hook: require('./hook.js'), + access: require('./access.js'), + search: require('./search.js'), + team: require('./team.js'), + org: require('./org.js'), + fetch: require('./fetch.js'), + login: require('./login.js'), + adduser: require('./adduser.js'), + profile: require('./profile.js'), + publish: require('./publish.js'), + unpublish: require('./unpublish.js'), + runScript: require('./run-script.js'), + log: require('./log.js'), + linkBin: require('./link-bin.js') } diff --git a/link-bin.js b/link-bin.js new file mode 100644 index 0000000..4d7d35c --- /dev/null +++ b/link-bin.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('bin-links') diff --git a/log.js b/log.js new file mode 100644 index 0000000..f935c62 --- /dev/null +++ b/log.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npmlog') diff --git a/logical-tree.js b/logical-tree.js new file mode 100644 index 0000000..a08e773 --- /dev/null +++ b/logical-tree.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-logical-tree') diff --git a/login.js b/login.js new file mode 100644 index 0000000..fbd61e9 --- /dev/null +++ b/login.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-profile').login diff --git a/manifest.js b/manifest.js new file mode 100644 index 0000000..6248d05 --- /dev/null +++ b/manifest.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('pacote').manifest diff --git a/org.js b/org.js new file mode 100644 index 0000000..96b15aa --- /dev/null +++ b/org.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmorg') diff --git a/package.json b/package.json index 608845a..21bea85 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "license": "ISC", "dependencies": { "bin-links": "^1.1.2", - "bluebird": "^3.5.3", "find-npm-prefix": "^1.0.2", "libnpmaccess": "^2.0.0", "libnpmconfig": "^1.1.1", diff --git a/packument.js b/packument.js new file mode 100644 index 0000000..4b8d26f --- /dev/null +++ b/packument.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('pacote').packument diff --git a/parse-arg.js b/parse-arg.js new file mode 100644 index 0000000..6db5201 --- /dev/null +++ b/parse-arg.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-package-arg') diff --git a/profile.js b/profile.js new file mode 100644 index 0000000..6df6b5e --- /dev/null +++ b/profile.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-profile') diff --git a/publish.js b/publish.js new file mode 100644 index 0000000..bcdbdeb --- /dev/null +++ b/publish.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmpublish').publish diff --git a/read-json.js b/read-json.js new file mode 100644 index 0000000..fd178d5 --- /dev/null +++ b/read-json.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('util').promisify(require('read-package-json')) diff --git a/run-script.js b/run-script.js new file mode 100644 index 0000000..11765d4 --- /dev/null +++ b/run-script.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('npm-lifecycle') diff --git a/search.js b/search.js new file mode 100644 index 0000000..172b10b --- /dev/null +++ b/search.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmsearch') diff --git a/stringify-package.js b/stringify-package.js new file mode 100644 index 0000000..e7f3bfc --- /dev/null +++ b/stringify-package.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('stringify-package') diff --git a/tarball.js b/tarball.js new file mode 100644 index 0000000..8e5258f --- /dev/null +++ b/tarball.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('pacote').tarball diff --git a/team.js b/team.js new file mode 100644 index 0000000..d407f79 --- /dev/null +++ b/team.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmteam') diff --git a/unpublish.js b/unpublish.js new file mode 100644 index 0000000..bc0d34c --- /dev/null +++ b/unpublish.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('libnpmpublish').unpublish diff --git a/verify-lock.js b/verify-lock.js new file mode 100644 index 0000000..e396756 --- /dev/null +++ b/verify-lock.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('lock-verify')