@microsoft/package-deps-hash
Advanced tools
Comparing version 2.4.4 to 3.0.0
{ | ||
"name": "@microsoft/package-deps-hash", | ||
"version": "2.4.4", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"typings": "dist/package-deps-hash.d.ts", | ||
"version": "3.0.0", | ||
"description": "(Please use \"@rushstack/package-deps-hash\" instead.)", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/microsoft/rushstack/tree/master/libraries/package-deps-hash" | ||
}, | ||
"scripts": { | ||
"build": "gulp test --clean" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/rush-stack-compiler-3.5": "0.4.3", | ||
"@microsoft/node-library-build": "6.4.4", | ||
"@microsoft/node-core-library": "3.19.3", | ||
"@rushstack/eslint-config": "0.5.4", | ||
"@types/chai": "3.4.34", | ||
"@types/mocha": "5.2.5", | ||
"@types/node": "10.17.13", | ||
"chai": "~3.5.0", | ||
"gulp": "~4.0.2" | ||
}, | ||
"dependencies": { | ||
"@microsoft/node-core-library": "3.19.3" | ||
"postinstall": "node postinstall.js" | ||
} | ||
} |
# @microsoft/package-deps-hash | ||
The `package-deps-hash` library generates a JSON object containing the git hashes of all files used to produce | ||
a given package. This is useful for scenarios where you want to define a "change receipt" file to be published | ||
with a package. The [Rush](https://rushjs.io/) tool uses this library to implement incremental build detection. | ||
> Please use [@rushstack/package-deps-hash](https://www.npmjs.com/package/@rushstack/package-deps-hash) instead of this package. | ||
Only files in a git repo that are not in .gitignore will be considered in building the hash. The file content and | ||
the current state of the package can be compared then to determine whether the package needs to be rebuilt. | ||
IMPORTANT: This package has moved under the `@rushstack` NPM scope. | ||
Internally it uses the GIT hashes to derive the hashes for package content. This allows the process to leverage Git's | ||
hash optimizations, as opposed to creating a more elaborate diffing scheme. | ||
``` | ||
OLD NAME: @microsoft/package-deps-hash (2.4.4) | ||
NEW NAME: @rushstack/package-deps-hash (2.4.5) | ||
``` | ||
NOTE: Git is required to be accessible in the command line path. | ||
The new package's CHANGELOG.md preserves version history from before the rename. | ||
## Usage | ||
The new package starts with a SemVer PATCH increment, since no code has changed. | ||
```ts | ||
let _ = require('lodash'); | ||
let { getPackageDeps } = require('@microsoft/package-deps-hash'); | ||
// Gets the current deps object for the current working directory | ||
let deps = getPackageDeps(); | ||
let existingDeps = JSON.parse(fs.readFileSync('package-deps.json')); | ||
if (_.isEqual(deps, existingDeps)) { | ||
// Skip re-building package. | ||
} else { | ||
// Rebuild package. | ||
} | ||
``` | ||
API documentation for this package: https://rushstack.io/pages/api/package-deps-hash/ | ||
To learn about the Rush Stack project, please visit https://rushstack.io/` |
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
0
1610
3
17
17
1
1
1
- Removed@microsoft/node-core-library@3.19.3
- Removed@microsoft/node-core-library@3.19.3(transitive)
- Removed@types/node@10.17.13(transitive)
- Removedcolors@1.2.5(transitive)
- Removedcommander@2.20.3(transitive)
- Removedfs-extra@7.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjju@1.4.0(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedlodash.get@4.4.2(transitive)
- Removedlodash.isequal@4.5.0(transitive)
- Removedsemver@5.3.0(transitive)
- Removedtimsort@0.3.0(transitive)
- Removeduniversalify@0.1.2(transitive)
- Removedvalidator@8.2.0(transitive)
- Removedz-schema@3.18.4(transitive)