Create a simple NPM module that will confirm that the value of the support property in the package.json file matches one of the established values from the "support level" documentation created in this PR -> #139
I'm building the tool here.
I will add the string-output in next days, but it could be a starting point if you have some ideas further the strict validation of the support property.
Done https://github.com/Eomm/package-compliant
Refer #139
@Emuentes added a couple of typo corrections to lines +29 (irgnored) and +86 typo (will will) to this most excellent body of work.
Nobody in today's meeting to discuss this specific issue/tool. Will hold off on discussion next meeting that someone is present to discuss.
I listen to the meeting: this issue is still open because @ghinks asked to review a little bit the tool I made.
I'm not against to move the tool from my github to Node.js one if you find it worthy 馃槂
I thought that I could add a tools.md page where track this tool and the future ones.
apologies @Eomm I do not remember asking to review the tool.
Hoping to try it out soon so that we can talk about next steps in terms of evangelizing the support section data.
I was thinking to add a command also to add the section support further validation so with a simple npx .. users can add this info
Is this the expect output when you run npm test?
-sh-4.2$ npm test
> [email protected] test /home/mhdawson/node_modules/package-compliant
> standard && tap -J --coverage test/**/*.test.js
total ................................................. 0/0
0 passing (9.787ms)
ok
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
I think it says no tests were run?
Once we get the text landed in non-draft for the support levels we probably also want the tool to provide a link to that doc as a reference when flagging that sections are not up to date.
We had also discussed that people could define their own values. I wonder if we want a "strict" option which returns an error if the values don't make our known list and flags an error, and a default where it simply warns about ones that are not on the lists.
Request to move to node.js org: https://github.com/nodejs/admin/issues/343
I will add soon the missing CODE_OF_CONDUCT and CONTRIBUTING
Sorry @mhdawson, I miss your comments.
Is this the expect output when you run npm test?
absolutely not, I have reinstalled all the node_modules but all is OK.
This is expected:
~/workspace/package-compliance (master)
$ npm test
> [email protected] test C:\Users\behem\workspace\package-compliance
> standard && tap -J --coverage test/**/*.test.js
test/args.test.js ..................................... 4/4 5s
test/help.test.js ..................................... 4/4 7s
test/index.test.js .................................... 2/2 6s
test/support-validation.test.js ..................... 19/19 5s
test/validate.test.js ............................... 15/15 7s
total ............................................... 44/44
44 passing (13s)
ok
------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
------------------------|----------|----------|----------|----------|-------------------|
All files | 98.7 | 87.5 | 100 | 98.68 | |
lib | 100 | 100 | 100 | 100 | |
args.js | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
man.js | 100 | 100 | 100 | 100 | |
support-validation.js | 100 | 100 | 100 | 100 | |
lib/commands | 97.87 | 78.57 | 100 | 97.87 | |
help.js | 100 | 100 | 100 | 100 | |
validate.js | 97.73 | 78.57 | 100 | 97.73 | 31 |
------------------------|----------|----------|----------|----------|-------------------|
Since I'm writing down the checklist in order to be compliant to our guidelines (and I'm not for CI), I let you know when all is OK, in a couple of days I will complete this and I hope you will not have other problems.
Once we get the text landed in non-draft for the support levels we probably also want the tool to provide a link to that doc as a reference when flagging that sections are not up to date.
We had also discussed that people could define their own values. I wonder if we want a "strict" option which returns an error if the values don't make our known list and flags an error, and a default where it simply warns about ones that are not on the lists
Regarding these comments, we could track these ideas in the issues as a reminder
@Eomm @mhdawson
It's excellent to see this issue closed and the issue opened for migrating the module to the NodeJS EcoSystem!
Great job team! Much appreciated :-)