Skip to main content
Version: 0.15 (glpkg CLI)

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 in package.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.json block.

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​

OptionDescription
[path]Project directory (default: current directory)
--writeApply the changes to distkit.manifest.json
--drop-manifest-groupsAfter a successful --write, remove the deprecated package.json glpkg.groups block
--no-networkOffline: only use group name/ID pairs already in the lock or manifest; skip the GitLab API
--strictExit 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"