Comments (8)
Hey Andri,
I was not aware of npm shrinkwrap
. I just read about it and like the idea. This would ensure consistent builds, without us needing to maintain the modules code.
I would prefer to treat dev dependencies in the same way, so running shrinkwrap with --dev
flag. What do you suggest?
from nodegoat.
I have a feeling running it with --dev
means development dependencies might get installed on the production machine as well. But if that's not a problem, go ahead.
from nodegoat.
Good point. One of the reasons I committed modules initially was to have consistent dev environment, especially grunt's version. So I think the little overhead of deploying dev dependencies to prod should be fine.
Would you like to work on this change?
from nodegoat.
Worth noting, npm install
will install the exact copies of modules as specified in the package.json file so there is no need for checking in modules into version control. The benefit of npm install
is that it will build the package for the OS architecture. For example, bcrypt will break between Windows, Linux etc.
from nodegoat.
@jksdua Thanks for the comment. While package.json can control exact versions of packages explicitly specified in package.json, it can't control recursive dependencies of external packages. Shrinkwrap allows us to do that w/o needing to check-in these dependencies. Please feel free to assign this issue to yourself if you want to assist on incorporating shrinkwrap.
from nodegoat.
@ckarande Sounds good.
I am thinking the following:
- Add a pre-commit hook which will run
npm shrinkwrap
when new dependencies are installed. The newnpm-shrinkwrap.json
will then automatically be added to the commit. - Add
node_modules
to.gitignore
from nodegoat.
@jksdua Perfect! Thanks. Feel free to send a pull request once ready.
from nodegoat.
We will not use shrinkwrap, as having npm dependencies added in code makes it easier it deploy on BWA VM instances w/o network connectivity
from nodegoat.
Related Issues (20)
- Tutorial and hands on labs guide for securing REST endpoints
- Lerna Implementation
- React and Express API app
- Restore A9 Insecure Components vulnerability HOT 6
- There is no 404 page. HOT 3
- livereload.js making tests run slower HOT 2
- Webinterface: Wording HOT 1
- Heroku - mLab MongoDB Add-on Discontinued HOT 5
- docker_compose.yml doesn't set MONGODB_URI HOT 1
- Travis config warnings HOT 2
- NodeGoat Research page SSRF also enables DoS HOT 1
- purpleteam now at alpha HOT 2
- Unexpected path traversal vulnerability HOT 3
- A9 - Wrong url, to be removed HOT 1
- Broken XSS example
- Missing anchors in validation regular expression HOT 1
- Node Goat Herokuapp Application Error HOT 1
- Not working with MongoDB 5 HOT 4
- Setup Issue HOT 8
- Tutorial Guide page is not working HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodegoat.