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

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

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

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

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

Change 520403 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/RevisionSlider@master] build: add package-lock file

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

Change 520403 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@master] build: add package-lock file

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

Change 522651 had a related patch set uploaded (by Libraryupgrader; owner: Libraryupgrader):
[mediawiki/extensions/ActiveAbstract@master] build: Updating mediawiki/mediawiki-codesniffer to 26.0.0 Additional changes: * Committed package-lock.json (T179229) too.

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

Change 526647 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[wikidata/query/gui@master] Commit package-lock.json

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

Change 526647 merged by jenkins-bot:
[wikidata/query/gui@master] Commit package-lock.json

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

Change 526710 had a related patch set uploaded (by WDQSGuiBuilder; owner: WDQSGuiBuilder):
[wikidata/query/gui-deploy@production] Merging from 8e360ba4f276823b5327927ee7b5b737b0e1cf84:

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

Change 526710 merged by Smalyshev:
[wikidata/query/gui-deploy@production] Merging from 8e360ba4f276823b5327927ee7b5b737b0e1cf84:

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

Change 527077 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Add package-lock.json

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

Change 527077 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add package-lock.json

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