Skip to content

Update CLI and template packages

Konstantin Dinev edited this page Nov 9, 2026 · 19 revisions

update CLI packages with npm

The repository is an npm workspaces monorepo: one package-lock.json at the root, no yarn. Run every command from the repository root, then commit the changed package.json files together with package-lock.json.

  1. See what is outdated across the root and all workspaces: npm outdated --workspaces --include-workspace-root
  2. Update lerna (root dev dependency): npm install -D lerna@latest
  3. Update lerna-changelog (root dev dependency): npm install -D lerna-changelog@latest
  4. Update yargs (a dependency of igniteui-cli only): npm install yargs@latest -w igniteui-cli

To update a dependency that several workspaces declare, find them with npm ls <pkg> and repeat -w for each one, e.g. npm install <pkg>@latest -w igniteui-cli -w @igniteui/cli-core. -w takes the package name or its folder (-w packages/cli). This replaces the old lerna exec -- yarn up <pkg>.

npm update <pkg> stays within the ranges already in package.json and only moves the lockfile; npm install <pkg>@latest also rewrites the range.

Note: npm workspaces docs

Note: lerna docs. Lerna is still used for versioning (npm run release), not for installing packages. Other usage of lerna in the CLI.

Note: some CLI packages are also used in the templates and can be updated accordingly.

update templates

  • on a generated project with all the components run an automatic migration tool, like ng cli, and update template files
  • compare the latest project from a framework with existing templates in the CLI (with WinMerge) and update template files

update angular templates

  • compare ng new with ig new
  • ng update for project with all components and then move changes to templates

Notes: typescript update for CLI and all framework templates

Some frequently encountered problems while updating

In the tests:

  • Lambda functions are already allowed in javascript so there's no need write workarounds for them (- Unhandled promise rejection: TypeError: target is not a constructor). image
  • async functions with done are no longer support, either one has to be removed.
    • Error: require() of ES Module D:\repos\igniteui-cli\node_modules\inquirer\lib\inquirer.js from D:\repos\igniteui-cli\spec\unit\PromptSession-spec.js not supported. Instead change the require of inquirer.js in D:\repos\igniteui-cli\spec\unit\PromptSession-spec.js to a dynamic import() which is available in all CommonJS modules. - The import(some_module) syntax is being transplied to require(some_module) which is no longer permitted: image A possible solution might be to wrap the import() in eval(): const inquirer = await eval('import("inquirer")'); which is transplied to const inquirer = yield eval('import("inquirer")');

Clone this wiki locally