Page MenuHomePhabricator

Decide whether we want the package-lock.json to commit or ignore
Closed, ResolvedPublic

Description

npm version 5 adds a package-lock.json [1] to each repository. Do we want to have this committed or ignored?

I would suggest not to commit the file, because composer.lock is also not committed. This file has the same effect and should handled the same.

There are two extensions at the moment having this file committed:

AdvancedSearch - I0f591d75d0a7b8755b446398e753507b36db15b1
WikibaseLexeme - Icc91a224e264c9b33df70254958b0af95a463d03

A decision before many developer using npm5 and committing this would be nice to have a specification how to handle this.
In case of ignore, mediawiki core, all extensions and all skins with node_module in .gitignore should get a line added to its .gitignore. Committed files should be removed.

[1] https://docs.npmjs.com/files/package-lock.json

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 516297 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[mediawiki/skins/MinervaNeue@master] Build: add package-lock file

https://gerrit.wikimedia.org/r/516297

OK, yes, this is now decided

@Jdforrester-WMF could you please add some more context – is this documented anywhere else?

Not yet. Will add it to https://www.mediawiki.org/wiki/Continuous_integration/Entry_points later today.

cool, thank you!

is there a script that will go through all existing extensions/skins to commit package-lock.json or should we do it ourselves?

Now that LibUp is back, it'll be automatic.

\o/ thanks!

Change 518157 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Build: add package-lock file

https://gerrit.wikimedia.org/r/518157

Change 518158 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/Popups@master] Build: add package-lock file

https://gerrit.wikimedia.org/r/518158

Change 516297 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Build: add package-lock file

https://gerrit.wikimedia.org/r/516297

Change 518157 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Build: add package-lock file

https://gerrit.wikimedia.org/r/518157

Change 518158 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Build: add package-lock file

https://gerrit.wikimedia.org/r/518158