Skip to content

Commit

Permalink
mjeanroy#127 - Custom npm scoped packages
Browse files Browse the repository at this point in the history
add npm pacote config for npm package at least 5.0.0
  • Loading branch information
Jurij Cherepanov committed Apr 20, 2018
1 parent 3add695 commit 5d89e9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"fs-write-stream-atomic": "1.0.10",
"lodash": "4.17.5",
"mkdirp": "0.5.1",
"npm": "^5.0.0",
"pacote": "8.0.0",
"q": "1.5.1",
"requireg": "0.1.7",
Expand Down
10 changes: 8 additions & 2 deletions src/npm-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,14 @@ function oldNpmCache(pkg, deferred) {
* @return {Promise<Object>} The manifest object.
*/
function getManifest(pkg) {
const pakoteOpts = require('npm/lib/config/pacote');
return require('pacote').manifest(pkg, pakoteOpts({})).then(function(pkgJson) {
let opts = {};

try {
const pakoteOpts = requireg('npm/lib/config/pacote');
opts = pakoteOpts();
} catch (ex) {};

return require('pacote').manifest(pkg, opts).then(function(pkgJson) {
return {
integrity: pkgJson._integrity,
manifest: {
Expand Down

0 comments on commit 5d89e9a

Please sign in to comment.