You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
5.2 KiB

{
"_args": [
[
"validate-npm-package-license@^3.0.1",
"/Users/ogd/Documents/projects/npm/npm/node_modules/init-package-json"
]
],
"_from": "validate-npm-package-license@>=3.0.1 <4.0.0",
"_id": "validate-npm-package-license@3.0.1",
"_inCache": true,
"_location": "/validate-npm-package-license",
"_nodeVersion": "0.12.7",
"_npmUser": {
"email": "kyle@kemitchell.com",
"name": "kemitchell"
},
"_npmVersion": "2.13.5",
"_phantomChildren": {},
"_requested": {
"name": "validate-npm-package-license",
"raw": "validate-npm-package-license@^3.0.1",
"rawSpec": "^3.0.1",
"scope": null,
"spec": ">=3.0.1 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/init-package-json",
"/normalize-package-data"
],
"_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
"_shasum": "2804babe712ad3379459acfbe24746ab2c303fbc",
"_shrinkwrap": null,
"_spec": "validate-npm-package-license@^3.0.1",
"_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/init-package-json",
"author": {
"email": "kyle@kemitchell.com",
"name": "Kyle E. Mitchell",
"url": "https://kemitchell.com"
},
"bugs": {
"url": "https://github.com/kemitchell/validate-npm-package-license.js/issues"
},
"dependencies": {
"spdx-correct": "~1.0.0",
"spdx-expression-parse": "~1.0.0"
},
"description": "Give me a string and I'll tell you if it's a valid npm package license string",
"devDependencies": {
"defence-cli": "^1.0.1",
"replace-require-self": "^1.0.0"
},
"directories": {},
"dist": {
"shasum": "2804babe712ad3379459acfbe24746ab2c303fbc",
"tarball": "http://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz"
},
"gitHead": "00200d28f9960985f221bc1a8a71e4760daf39bf",
"homepage": "https://github.com/kemitchell/validate-npm-package-license.js#readme",
"installable": true,
"keywords": [
"license",
"npm",
"package",
"validation"
],
"license": "Apache-2.0",
"maintainers": [
{
"name": "kemitchell",
"email": "kyle@kemitchell.com"
},
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
}
],
"name": "validate-npm-package-license",
"optionalDependencies": {},
"readme": "validate-npm-package-license\n============================\n\nGive me a string and I'll tell you if it's a valid npm package license string.\n\n```javascript\nvar valid = require('validate-npm-package-license');\n```\n\nSPDX license identifiers are valid license strings:\n\n```javascript\n\nvar assert = require('assert');\nvar validSPDXExpression = {\n validForNewPackages: true,\n validForOldPackages: true,\n spdx: true\n};\n\nassert.deepEqual(valid('MIT'), validSPDXExpression);\nassert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression);\nassert.deepEqual(valid('Apache-2.0'), validSPDXExpression);\nassert.deepEqual(valid('ISC'), validSPDXExpression);\n```\nThe function will return a warning and suggestion for nearly-correct license identifiers:\n\n```javascript\nassert.deepEqual(\n valid('Apache 2.0'),\n {\n validForOldPackages: false,\n validForNewPackages: false,\n warnings: [\n 'license should be ' +\n 'a valid SPDX license expression (without \"LicenseRef\"), ' +\n '\"UNLICENSED\", or ' +\n '\"SEE LICENSE IN <filename>\"',\n 'license is similar to the valid expression \"Apache-2.0\"'\n ]\n }\n);\n```\n\nSPDX expressions are valid, too ...\n\n```javascript\n// Simple SPDX license expression for dual licensing\nassert.deepEqual(\n valid('(GPL-3.0 OR BSD-2-Clause)'),\n validSPDXExpression\n);\n```\n\n... except if they contain `LicenseRef`:\n\n```javascript\nvar warningAboutLicenseRef = {\n validForOldPackages: false,\n validForNewPackages: false,\n spdx: true,\n warnings: [\n 'license should be ' +\n 'a valid SPDX license expression (without \"LicenseRef\"), ' +\n '\"UNLICENSED\", or ' +\n '\"SEE LICENSE IN <filename>\"',\n ]\n};\n\nassert.deepEqual(\n valid('LicenseRef-Made-Up'),\n warningAboutLicenseRef\n);\n\nassert.deepEqual(\n valid('(MIT OR LicenseRef-Made-Up)'),\n warningAboutLicenseRef\n);\n```\n\nIf you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there:\n\n```javascript\nassert.deepEqual(\n valid('SEE LICENSE IN LICENSE.txt'),\n {\n validForNewPackages: true,\n validForOldPackages: true,\n inFile: 'LICENSE.txt'\n }\n);\n\nassert.deepEqual(\n valid('SEE LICENSE IN license.md'),\n {\n validForNewPackages: true,\n validForOldPackages: true,\n inFile: 'license.md'\n }\n);\n```\n\nIf there aren't any licensing terms, use `UNLICENSED`:\n\n```javascript\nvar unlicensed = {\n validForNewPackages: true,\n validForOldPackages: true,\n unlicensed: true\n};\nassert.deepEqual(valid('UNLICENSED'), unlicensed);\nassert.deepEqual(valid('UNLICENCED'), unlicensed);\n```\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/kemitchell/validate-npm-package-license.js.git"
},
"scripts": {
"test": "defence README.md | replace-require-self | node"
},
"version": "3.0.1"
}