Skip to content
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

add 'npm' and 'npm-update' make targets and lockfile #7246

Merged
merged 6 commits into from
Jun 19, 2019

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 18, 2019

  • make npm installs and updates node_modules, triggered automatically on make css and make js as it completes reasonably fast and ensures consistent modules.
  • make npm-update updates all dependencies to their latest version, regenerates node_modules from scratch and updates package-lock.json. It uses npm modules updates written by yours truly to find the latest version of each dependency.

@adelowo
Copy link
Member

adelowo commented Jun 18, 2019

That’s a little too long to type though especially if my terminal doesn’t have auto completion for make..

  • make npm
  • UPDATE=1 make npm. If UPDATE =1, run make update_node_modules

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 18, 2019
@techknowlogick techknowlogick added this to the 1.9.0 milestone Jun 18, 2019
@silverwind
Copy link
Member Author

Indeed, I had a similar thought. Still think it should be two targets, thought.

@silverwind silverwind changed the title add 'node_modules' and 'update_node_modules' make targets add 'npm' and 'npm-update' make targets and lockfile Jun 18, 2019
@silverwind
Copy link
Member Author

Renamed to npm and npm-update and updated OP.

- `make npm` installs and updates node_modules, triggered automatically
   on `make css` and `make js` as it completes reasonably fast and
   ensures consistent modules.
- `make npm-update` updates all dependencies to their latest version,
   regenerates `node_modules` from scratch and updates
   `package-lock.json`. It uses npm modules `updates` written by yours
   truly to find the latest version of each dependency.
@codecov-io
Copy link

codecov-io commented Jun 18, 2019

Codecov Report

Merging #7246 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7246      +/-   ##
==========================================
- Coverage   40.99%   40.97%   -0.02%     
==========================================
  Files         462      462              
  Lines       62585    62585              
==========================================
- Hits        25654    25644      -10     
- Misses      33571    33580       +9     
- Partials     3360     3361       +1
Impacted Files Coverage Δ
models/unit.go 62.16% <0%> (-5.41%) ⬇️
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️
modules/log/file.go 75.52% <0%> (-2.1%) ⬇️
models/repo_list.go 72.08% <0%> (-1.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33ad554...de5c6ff. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 18, 2019
Makefile Outdated Show resolved Hide resolved
Copy link
Member

@sapk sapk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use the make dependance in place of sub calling make

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@silverwind
Copy link
Member Author

silverwind commented Jun 18, 2019

Ran npm-update again which mysteriously changed package-lock.json already. Probably fine, but maybe someone can confirm they get no major diff when they run make npm-update on this branch.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 18, 2019
@techknowlogick techknowlogick merged commit a71cabb into go-gitea:master Jun 19, 2019
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
* add 'npm' and 'npm-update' make targets and lockfile

- `make npm` installs and updates node_modules, triggered automatically
   on `make css` and `make js` as it completes reasonably fast and
   ensures consistent modules.
- `make npm-update` updates all dependencies to their latest version,
   regenerates `node_modules` from scratch and updates
   `package-lock.json`. It uses npm modules `updates` written by yours
   truly to find the latest version of each dependency.

* add suggested make dependencies

* remove package-lock.json during npm-update

* regenerate package-lock.json
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants