nestjs / nest-cli

CLI tool for Nest applications 🍹
https://nestjs.com
Other
1.97k stars 394 forks source link

nest update: not updating the package.json file #411

Closed sheikalthaf closed 3 years ago

sheikalthaf commented 5 years ago

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

nest upate command not updating the version package.json file but it is only updating in yarn.lock file.

Expected behavior

It should update the package.json file with respective versions

Minimal reproduction of the problem with instructions

image

What is the motivation / use case for changing the behavior?

Environment

[System Information]
OS Version     : Linux 5.0
NodeJS Version : v10.16.3
YARN Version    : 1.17.3
[Nest Information]
platform-express version : 6.7.2
common version           : 6.7.2
core version             : 6.7.2
SpiraMira commented 4 years ago

Any updates on this one? yarn outdated and nest update seem broken in newly scaffolded nest apps. I have an old one where (for some reason) 'yarn outdated' still works but 'nest u' just updates the lock file.

SpiraMira commented 4 years ago

NOTE: my nest version is 6.12.9

dpyzo0o commented 4 years ago

same here, nest update only updates the package-lock file but the package.json remains unchanged

Siedlerchr commented 4 years ago

I am still encountering this issue with nest 6.14, upgrading to nest 7.0.2 is not possible

dpyzo0o commented 4 years ago

Is someone working on this issue? This still exists in the latest version of next-cli.

santoshyadavdev commented 4 years ago

Hey everyone, I will look into this on weekend.

sheikalthaf commented 4 years ago

@santoshyadav198613 any update on this?

bangbang93 commented 3 years ago

same to me with

[System Information]
OS Version     : macOS Catalina
NodeJS Version : v15.3.0
NPM Version    : 7.0.14 

[Nest CLI]
Nest CLI Version : 7.5.4 

[Nest Platform Information]
microservices version : 7.4.4
mongoose version      : 7.0.2
common version        : 7.4.4
config version        : 0.6.1
core version          : 7.4.4
kuzalekon commented 3 years ago

This issue corresponds to the package managers (npm, yarn).
yarn upgrade and npm upgrade commands doesn't change a dependencies versions in package.json. They changed only in yarn.lock or package-lock.json

We can use something like npm-check-updates to update all dependencies to the latest version.

By the way, in Nest CLI documentation sayed, that nest update command must change all corresponding dependencies to the latest version. But we can use -t flag for set an other than latest tag.

kamilmysliwiec commented 3 years ago

https://github.com/nestjs/nest-cli/issues/1204#issuecomment-887326762