Warnings are generated when running npm install indicating there are no repository and license fields.
Well, package.json is more meant for publishing to NPM which I don't see we are doing ever, because TEAMMATES is an end product. No harm in adding those, but don't let it be a maintenance burden.
Yea but I think getting rid of the warnings is better. The only easy way to manage packages seems to be to use npm and it seems a package.json will be needed to make things easier. There's no other way right?
Marking it as private would get rid of the warnings: http://stackoverflow.com/questions/16827858/npm-warn-package-json-no-repository-field/23355019#23355019
You need to be aware that currently package.json is not used beyond managing dependencies (add: and automating some tasks). If you're familiar with Node.js development and publishing to NPM, you'd know the true extent of what package.json is used for, but we have no use for them. For example, if we add a "version" field, we need to update it before every release and that's what I meant by "maintenance burden". Some fields may not change once added, which may justify them being added, but again not the biggest priority.
Even then, as a dependency manager, it is also not used the way one might expect it to be used (e.g. if you're familiar with browserify or webpack or requirejs).
Name and version are not needed for the private flag to work.
diff --git a/package.json b/package.json
index 806dda3..4b2991c 100644
--- a/package.json
+++ b/package.json
@@ -26,5 +26,6 @@
"lint:json": "eslint src/main/webapp/js/*.json src/main/resources/*.json src/test/resources/data/*.json -c static-analysis/teammates-eslint.yml",
"lint:css": "stylelint src/main/webapp/stylesheets/*.css --config static-analysis/teammates-stylelint.yml",
"lint": "npm run lint:src && npm run lint:test && npm run lint:json && npm run lint:css"
- }
+ },
+ "private": true
}
This patch completely removes the warnings (see it in action here).
Is this issue still open...as I am desperately searching for a first timer issue
@arjunsuri Yes it's still open.You can do it if you want :)
I was looking into package.json file...do I need to add name and version of the application as well or only "private":true will do the trick?As told by @whipermr5, I think I should only add private field and not name and version
Yes; just private will do :) I'm glad someone is finally taking this up!
I think I have completed the issue #7291. Please guide me towards a successful PR.