Gathering detailed insights and metrics for grunt-nice-package
Gathering detailed insights and metrics for grunt-nice-package
Gathering detailed insights and metrics for grunt-nice-package
Gathering detailed insights and metrics for grunt-nice-package
npm install grunt-nice-package
Typescript
Module System
Min. Node Version
Node Version
NPM Version
46.7
Supply Chain
91.6
Quality
69.6
Maintenance
25
Vulnerability
96.4
License
JavaScript (100%)
Total Downloads
49,829
Last Day
2
Last Week
56
Last Month
232
Last Year
3,225
MIT License
12 Stars
114 Commits
5 Forks
3 Watchers
7 Branches
5 Contributors
Updated on Sep 08, 2023
Minified
Minified + Gzipped
Latest Version
0.10.4
Package Id
grunt-nice-package@0.10.4
Size
6.26 kB
NPM Version
2.15.12
Node Version
4.2.2
Cumulative downloads
Total Downloads
4
1
Opinionated package.json validator
You can read the description of each package.json property here. Example package.json that passes all checks (because it is using this module!) is kensho/ng-describe/package.json.
1npm install grunt-nice-package --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
1grunt.loadNpmTasks('grunt-nice-package');
2grunt.initConfig({
3 'nice-package': {
4 all: {
5 options: {
6 // make sure package.json ends with \n\n, default false
7 blankLine: true|false,
8 version: function (value) {
9 // strict version number validation
10 return (/\d{1,2}\.\d{1,2}\.\d{1,2}/).test(value);
11 }
12 }
13 }
14 }
15});
You can load the task with default options without specifying the configuration object
1grunt.loadNpmTasks('grunt-nice-package'); 2grunt.registerTask('default', ['nice-package']);
Note: you can use nicePackage as alias to nice-package task name
1 grunt.initConfig({ 2 nicePackage: { 3 all: { ... } 4 } 5 });
If you don't want to use grunt, but still need this project, run it via grunty
npm install -D grunt-nice-package grunty
Then add the following to the scripts section
1{ 2 "scripts": { 3 "nice": "grunty grunt-nice-package nice-package" 4 } 5}
Please return true
if the check passes from custom validation functions.
After the property validators pass, package.json is further checked using package-json-validator by Nick Sullivan. It will check the required properties, and provide suggestions for the recommended ones.
The fix step in this task removes all fuzzy symbols from declared versions (~, ^), leaving just the numbers.
"dependencies": { "dependencies": {
"foo": "^0.1.0", ==> "foo": "0.1.0",
"bar": "~1.0.0" "bar": "1.0.0"
} }
You can define a validation function for any property of the package.json, by default the validation will check:
For complete list see nice_package.js for details.
You can easily run this grunt task from gulp, see Using grunt tasks from gulp
Author: Gleb Bahmutov © 2013
License: MIT - do anything with the code, but don't blame me if it does not work.
Spread the word: tweet, star on github, etc.
Support: if you find any problems with this module, email / tweet / open issue on Github
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/23 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
93 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-60%
2
Compared to previous day
Last Week
100%
56
Compared to previous week
Last Month
-0.9%
232
Compared to previous month
Last Year
-25.1%
3,225
Compared to previous year