Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #11 from nodejs/archive
Browse files Browse the repository at this point in the history
superseeded by @pkgjs/support
  • Loading branch information
mhdawson authored May 27, 2021
2 parents 70e808a + eaed036 commit b3f8522
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 586 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
Validate the `support` property in the `package.json` following the [package-maintenance guidelines][validation]!


⚠ This project has been deprecated. Use [`@pkgjs/support`](https://github.com/pkgjs/support) instead.

## Install

You can use this package as a CLI or as a Module if you need to use the core function of this module.
Expand Down Expand Up @@ -70,17 +72,10 @@ packageCompliant.validateSupportField(aPackageJson.support, (err, valid) => {

Read the [CONTRIBUTING](./CONTRIBUTING.md) guidelines to start help us!

### Add new commands

+ Add to `commands` array in `lib\index.js` the command name (Ex: `awesome`)
+ Create a `lib/commands/<command name>.js` file that expose this API `module.exports = function (args) { /* YOUR CODE */ }`
+ Create a `man/<command name>` file with all the information to run the command
+ Create a `test/<command name>.test.js` where you test your command


## License

Copyright [Manuel Spigolon](https://github.com/Eomm), Licensed under [MIT](./LICENSE).
Licensed under [MIT](./LICENSE).


[validation]: https://raw.githubusercontent.com/nodejs/package-maintenance/781a6bb752f4928e9e5e916b10ba38eb5289f316/docs/drafts/Baseline%20practive%20-%20Document%20support%20levels.md
25 changes: 0 additions & 25 deletions lib/args.js

This file was deleted.

10 changes: 1 addition & 9 deletions lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
#!/usr/bin/env node
'use strict'

const commist = require('commist')()

const commands = ['validate', 'help']
commands.forEach(command => { commist.register(command, require(`./commands/${command}`)) })

const res = commist.parse(process.argv.splice(2))
if (res) {
require('./commands/help')()
}
require('@pkgjs/support/lib/cli')()(process.argv.slice(2))
7 changes: 0 additions & 7 deletions lib/commands/help.js

This file was deleted.

75 changes: 0 additions & 75 deletions lib/commands/validate.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

// this file is the main interface to use this package as a module

module.exports.validateSupportField = require('./support-validation')
module.exports.validateSupportField = require('@pkgjs/support').validate
11 changes: 0 additions & 11 deletions lib/man.js

This file was deleted.

58 changes: 0 additions & 58 deletions lib/support-schema.json

This file was deleted.

29 changes: 0 additions & 29 deletions lib/support-validation.js

This file was deleted.

13 changes: 0 additions & 13 deletions man/help

This file was deleted.

8 changes: 0 additions & 8 deletions man/validate

This file was deleted.

16 changes: 16 additions & 0 deletions package-support.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"versions": [
{
"version": "*",
"target": {
"node": "abandoned"
},
"response": {
"type": "best-effort"
},
"backing": {
"hobby": "https://github.com/nodejs/package-compliant"
}
}
]
}
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"bin": {
"package-compliant": "lib/cli.js"
},
"support": {
"target": "NONE",
"response": "BEST-EFFORT",
"backing": "HOBBY"
},
"support": true,
"scripts": {
"test": "standard && tap -J --coverage test/**/*.test.js"
},
Expand All @@ -34,13 +30,10 @@
"node": ">=6"
},
"dependencies": {
"ajv": "^6.9.2",
"chalk": "^2.4.2",
"commist": "^1.1.0",
"yargs-parser": "^13.0.0"
"@pkgjs/support": "0.0.3"
},
"devDependencies": {
"standard": "^12.0.1",
"tap": "^12.6.3"
}
}
}
64 changes: 0 additions & 64 deletions test/args.test.js

This file was deleted.

Loading

0 comments on commit b3f8522

Please sign in to comment.