From ded993f6e24f5dd26fede18c579072d425a53c19 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 28 Mar 2019 00:05:40 +0700 Subject: [PATCH] Require Node.js 8 --- .travis.yml | 1 - package.json | 2 +- readme.md | 6 ++++-- test.js | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ae9d62..f3fa8cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,3 @@ language: node_js node_js: - '10' - '8' - - '6' diff --git a/package.json b/package.json index 2e7a1e2..6fde6d8 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "sindresorhus.com" }, "engines": { - "node": ">=6" + "node": ">=8" }, "scripts": { "test": "xo && ava", diff --git a/readme.md b/readme.md index c5876e6..33aa1ab 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ > List of [SPDX licenses](https://spdx.org/licenses/) -The lists of licenses are just JSON files and can be used wherever. +The lists of licenses are just JSON files and can be used anywhere. - [spdx.json](spdx.json) contains just license metadata - [spdx-full.json](spdx-full.json) includes the license text too @@ -21,7 +21,6 @@ $ npm install spdx-license-list ## Usage ```js -const fs = require('fs'); const spdxLicenseList = require('spdx-license-list'); console.log(spdxLicenseList.MIT); @@ -32,8 +31,11 @@ console.log(spdxLicenseList.MIT); osiApproved: true } */ +``` +```js const mitLicense = require('spdx-license-list/licenses/MIT'); + console.log(mitLicense.licenseText); //=> 'MIT License\r\n\r\nCopyright (c) …' ``` diff --git a/test.js b/test.js index 76ae6ff..919cb47 100644 --- a/test.js +++ b/test.js @@ -1,9 +1,9 @@ import test from 'ava'; -import m from '.'; +import spdxLicenseList from '.'; test('main', t => { - t.is(m.MIT.name, 'MIT License'); - t.is(m.MIT.url, 'http://www.opensource.org/licenses/MIT'); + t.is(spdxLicenseList.MIT.name, 'MIT License'); + t.is(spdxLicenseList.MIT.url, 'http://www.opensource.org/licenses/MIT'); t.true(require('./full').MIT.licenseText.length > 0); t.true(require('./simple').has('MIT')); t.is(require('./licenses/MIT').name, 'MIT License');