PATH: //opt/alt/alt-nodejs12/root/lib/node_modules/npm/lib/install
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 access-error.js
↓
X
📁 action/
X
📄 actions.js
↓
X
📄 and-add-parent-to-errors.js
↓
X
📄 and-finish-tracker.js
↓
X
📄 and-ignore-errors.js
↓
X
📄 audit.js
↓
X
📄 check-permissions.js
↓
X
📄 copy-tree.js
↓
X
📄 decompose-actions.js
↓
X
📄 deps.js
↓
X
📄 diff-trees.js
↓
X
📄 exists.js
↓
X
📄 flatten-tree.js
↓
X
📄 fund.js
↓
X
📄 get-requested.js
↓
X
📄 has-modern-meta.js
↓
X
📄 inflate-bundled.js
↓
X
📄 inflate-shrinkwrap.js
↓
X
📄 is-dev-dep.js
↓
X
📄 is-extraneous.js
↓
X
📄 is-fs-access-available.js
↓
X
📄 is-only-dev.js
↓
X
📄 is-only-optional.js
↓
X
📄 is-opt-dep.js
↓
X
📄 is-prod-dep.js
↓
X
📄 module-staging-path.js
↓
X
📄 mutate-into-logical-tree.js
↓
X
📄 node.js
↓
X
📄 read-shrinkwrap.js
↓
X
📄 realize-shrinkwrap-specifier.js
↓
X
📄 report-optional-failure.js
↓
X
📄 save.js
↓
X
📄 update-package-json.js
↓
X
📄 validate-args.js
↓
X
📄 validate-tree.js
↓
X
📄 writable.js
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: update-package-json.js
'use strict' var path = require('path') var writeFileAtomic = require('write-file-atomic') var moduleName = require('../utils/module-name.js') var deepSortObject = require('../utils/deep-sort-object.js') var sortedObject = require('sorted-object') var isWindows = require('../utils/is-windows.js') var sortKeys = [ 'dependencies', 'devDependencies', 'bundleDependencies', 'optionalDependencies', 'keywords', 'engines', 'scripts', 'files' ] module.exports = function (mod, buildpath, next) { var pkg = sortedObject(mod.package) var name = moduleName(mod) // Add our diagnostic keys to the package.json. // Note that there are folks relying on these, for ex, the Visual Studio // Node.js addon. pkg._requiredBy = mod.requiredBy .map(function (req) { if ( req.package.devDependencies && req.package.devDependencies[name] && !req.package.dependencies[name] ) { return '#DEV:' + req.location } else { return req.location } }) .concat(mod.userRequired ? ['#USER'] : []) .sort() pkg._location = mod.location pkg._phantomChildren = {} Object.keys(mod.phantomChildren).sort().forEach(function (name) { pkg._phantomChildren[name] = mod.phantomChildren[name].package.version }) pkg._inBundle = !!mod.fromBundle // sort keys that are known safe to sort to produce more consistent output sortKeys.forEach(function (key) { if (pkg[key] != null) pkg[key] = deepSortObject(pkg[key]) }) var data = JSON.stringify(sortedObject(pkg), null, 2) + '\n' writeFileAtomic(path.resolve(buildpath, 'package.json'), data, { // We really don't need this guarantee, and fsyncing here is super slow. Except on // Windows where there isn't a big performance difference and it prevents errors when // rolling back optional packages (#17671) fsync: isWindows }, next) }
SIMPAN PERUBAHAN