Skip to content

Do not call npm install if everything is installed #1102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2015

Conversation

rosen-vladimirov
Copy link
Contributor

In case there's node_modules dir and there's directory for each dependency defined
in package.json of the project, we should not call npm install. In case node_modules dir
does not exist and the project has dependencies or any of the dependencies is not installed,
we'll call npm install. Another case when we'll call npm install is when --force option is used.

This change is in order to allow modifications of modules inside node_modules directory.

Second commit

Install latest available version if no matching version is found

In case CLI is version 1.4.x, on platform add we are trying to install latest available
1.4.x runtime. In case there's no 1.4.x version, the code fails.
Instead we should install latest available version in this case.

In case there's node_modules dir and there's directory for each dependency defined
in package.json of the project, we should not call `npm install`. In case `node_modules` dir
does not exist and the project has dependencies or any of the dependencies is not installed,
we'll call `npm install`. Another case when we'll call `npm install` is when `--force` option is used.

This change is in order to allow modifications of modules inside `node_modules` directory.
@rosen-vladimirov rosen-vladimirov self-assigned this Oct 26, 2015
@rosen-vladimirov rosen-vladimirov added this to the 1.5.0 milestone Oct 26, 2015
@ns-bot
Copy link

ns-bot commented Oct 26, 2015

Test PASSed.

1 similar comment
@ns-bot
Copy link

ns-bot commented Oct 26, 2015

Test PASSed.

@ligaz
Copy link

ligaz commented Oct 26, 2015

👍 adding a unit test will be a nice addition.

@dtopuzov
Copy link
Contributor

💯

In case CLI is version 1.4.x, on platform add we are trying to install latest available
1.4.x runtime. In case there's no 1.4.x version, the code fails.
Instead we should install latest availabe version in this case.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/do-not-install-every-time branch from dda90f6 to aa1ab49 Compare October 26, 2015 07:29
@ns-bot
Copy link

ns-bot commented Oct 26, 2015

Test PASSed.

rosen-vladimirov added a commit that referenced this pull request Oct 26, 2015
…every-time

Do not call npm install if everything is installed
@rosen-vladimirov rosen-vladimirov merged commit c394233 into master Oct 26, 2015
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/do-not-install-every-time branch October 26, 2015 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants