A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/394436b098dcca2d252061f95c4eeb92c4a7027c below:

make refresh-package-json re-verify the package platform (#1… · npm/npm@394436b · GitHub

This repository was archived by the owner on Aug 11, 2022. It is now read-only.

File tree Expand file treeCollapse file tree 1 file changed

+8

-3

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+8

-3

lines changed Original file line number Diff line number Diff line change

@@ -1,9 +1,13 @@

1 1

'use strict'

2 -

const path = require('path')

2 + 3 3

const Bluebird = require('bluebird')

4 + 5 +

const checkPlatform = Bluebird.promisify(require('npm-install-checks').checkPlatform)

6 +

const getRequested = require('../get-requested.js')

7 +

const npm = require('../../npm.js')

8 +

const path = require('path')

4 9

const readJson = Bluebird.promisify(require('read-package-json'))

5 10

const updatePackageJson = Bluebird.promisify(require('../update-package-json'))

6 -

const getRequested = require('../get-requested.js')

7 11 8 12

module.exports = function (staging, pkg, log) {

9 13

log.silly('refresh-package-json', pkg.realpath)

@@ -24,6 +28,8 @@ module.exports = function (staging, pkg, log) {

24 28

pkg.package = metadata

25 29

pkg.fakeChild = false

26 30

}).catch(() => 'ignore').then(() => {

31 +

return checkPlatform(pkg.package, npm.config.get('force'))

32 +

}).then(() => {

27 33

const requested = pkg.package._requested || getRequested(pkg)

28 34

if (requested.type !== 'directory') {

29 35

return updatePackageJson(pkg, pkg.path)

@@ -37,4 +43,3 @@ function isEmpty (value) {

37 43

if (typeof value === 'object') return !Object.keys(value).length

38 44

return false

39 45

}

40 -

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