Skip to content

Add js lock file commands#412

Merged
tmorrell merged 2 commits into
inveniosoftware:masterfrom
caltechlibrary:js_lock_file
Apr 21, 2026
Merged

Add js lock file commands#412
tmorrell merged 2 commits into
inveniosoftware:masterfrom
caltechlibrary:js_lock_file

Conversation

@tmorrell
Copy link
Copy Markdown
Contributor

@tmorrell tmorrell commented Apr 12, 2026

❤️ Thank you for your contribution!

Description

This PR builds off of some commits in #390

At the moment, invenio-cli will wipe and recreate all js assets when runming the invenio-cli install command. This isn't the most safe thing to do in a world of package compromises. This PR attempts to recommend a new workflow, where a command invenio-cli assets lock will create a packages.json and package-lock.json`, which can be committed into a repository. Then the assets build commands use those locked dependencies when reinstalling. This makes the js behavior more similar to how the python behavior works (respecting a lock file), without changing the default if a lock file isn't present.

I haven't tested on pnpm, though support should be included.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@tmorrell
Copy link
Copy Markdown
Contributor Author

Closing and re-opening for CI

Comment thread invenio_cli/helpers/cli_config.py Outdated
Comment thread invenio_cli/helpers/versions.py Outdated
Comment thread invenio_cli/commands/local.py Outdated
@mirekys mirekys self-requested a review April 14, 2026 12:01
Comment thread invenio_cli/helpers/package_managers.py Outdated
Comment thread invenio_cli/commands/local.py Outdated
Comment thread invenio_cli/commands/local.py
@tmorrell tmorrell force-pushed the js_lock_file branch 9 times, most recently from 52fae19 to 71b26f7 Compare April 14, 2026 22:35
Comment thread invenio_cli/commands/assets.py Outdated
@tmorrell
Copy link
Copy Markdown
Contributor Author

I think this is now fully ready and I've addressed all comments. If someone wants to approve I can get this out.

@tmorrell tmorrell merged commit 8183b74 into inveniosoftware:master Apr 21, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to To release 🤖 in v14 Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To release 🤖

Development

Successfully merging this pull request may close these issues.

4 participants