glpkg migrate-lock
Move group information from older project files into distkit.manifest.json.
glpkg migrate-lock [options] [path]
Most projects do not need this command. Use it if your project has either of:
- a
"glpkg": { "groups": … }block inpackage.json(deprecated), or - an older group-pin
glpkg.lock.json.
What it does
It writes the group of each package into the packageOrigins list of
distkit.manifest.json:
- fills in each group's numeric ID (
gitlabGroupId) through the GitLab API, - cleans entries where a group ID was stored as the group name,
- adds packages that are only listed in the deprecated
package.jsonblock.
It is a dry run by default: it prints the planned changes and writes nothing.
It does not convert glpkg.lock.json between formats.
Options
| Option | Description |
|---|---|
[path] | Project directory (default: current directory) |
--write | Apply the changes to distkit.manifest.json |
--drop-manifest-groups | After a successful --write, remove the deprecated package.json glpkg.groups block |
--no-network | Offline: only use group name/ID pairs already in the lock or manifest; skip the GitLab API |
--strict | Exit non-zero if any group ID cannot be resolved |
--token <token> | Token for the ID lookup (default: the configured token) |
Typical run
glpkg migrate-lock # review the plan
glpkg migrate-lock --write --strict # apply
glpkg migrate-lock --write --drop-manifest-groups
git add distkit.manifest.json package.json && git commit -m "Migrate group origins"