Conversation
BREAKING CHANGE: upgrade oclif core and test to v4
# [7.0.0-oclif4.2](v7.0.0-oclif4.1...v7.0.0-oclif4.2) (2026-03-24) ### Bug Fixes * fix alias check and dependencie ([77503cb](77503cb))
# [7.0.0-oclif4.3](v7.0.0-oclif4.2...v7.0.0-oclif4.3) (2026-03-24) ### Features * add biome ([e899e39](e899e39))
BREAKING CHANGE: require node to v22
# [7.0.0-oclif4.5](v7.0.0-oclif4.4...v7.0.0-oclif4.5) (2026-03-26) ### Bug Fixes * update dependencies ([0633985](0633985)) ### Features * require node to v22 ([3a38321](3a38321)) ### BREAKING CHANGES * require node to v22
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the CLI to the oclif v4 toolchain (core + test), bumps the prerelease version line, and updates related docs/release configuration to support an oclif4 prerelease channel.
Changes:
- Upgrade dependencies (notably
@oclif/coreto v4,@oclif/testto v4, and Commerce Layer CLI packages to theoclif4dist-tag) and require Node>=22. - Update code to use oclif v4 public exports (
Interfaces,Errors) instead of deep@oclif/core/lib/*imports. - Migrate tests from the older
@oclif/testfluent API torunCommand/runHook, and regenerate command docs/README output.
Reviewed changes
Copilot reviewed 49 out of 51 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/hooks/save.test.ts | Removes old hook test using legacy @oclif/test API. |
| test/hooks/prerun/plugin.test.ts | Adds prerun hook test using runHook. |
| test/hooks/prerun/login.test.ts | Migrates prerun login hook test to runHook. |
| test/hooks/prerun/application.test.ts | Adds prerun hook test using runHook. |
| test/hooks/postrun/save.test.ts | Adds postrun hook test using runHook. |
| test/hooks/postrun/plugins_update.test.ts | Adds postrun hook test using runHook. |
| test/hooks/postrun/plugin.test.ts | Removes old postrun hook test using legacy @oclif/test API. |
| test/hooks/postrun/autcomplete.test.ts | Migrates postrun autocomplete hook test to runHook. |
| test/hooks/init/update.test.ts | Migrates init hook test to runHook. |
| test/commands/plugins/latest.test.ts | Migrates command test to runCommand. |
| test/commands/plugins/available.test.ts | Migrates command test to runCommand. |
| test/commands/config/show.test.ts | Migrates command test to runCommand (but currently no longer exercises config:show). |
| test/commands/config/set.test.ts | Migrates command test to runCommand with manual error handling. |
| test/commands/config/get.test.ts | Migrates command test to runCommand (but currently no longer exercises config:get). |
| test/commands/config/del.test.ts | Migrates command test to runCommand (but currently no longer exercises config:del). |
| test/commands/config/default.test.ts | Migrates command test to runCommand. |
| test/commands/cli/version.test.ts | Migrates command test to runCommand. |
| test/commands/cli/update.test.ts | Migrates command test to runCommand. |
| test/commands/cli/fig.test.ts | Migrates command test to runCommand. |
| test/commands/cli/dir.test.ts | Migrates command test to runCommand. |
| test/commands/applications/token.test.ts | Migrates command test to runCommand. |
| test/commands/applications/switch.test.ts | Migrates command test to runCommand. |
| test/commands/applications/scope.test.ts | Migrates command test to runCommand. |
| test/commands/applications/provisioning.test.ts | Migrates command test to runCommand. |
| test/commands/applications/logout.test.ts | Migrates command test to runCommand. |
| test/commands/applications/login.test.ts | Migrates command test to runCommand and updates error handling. |
| test/commands/applications/list.test.ts | Migrates command test to runCommand. |
| test/commands/applications/info.test.ts | Migrates command test to runCommand. |
| test/commands/applications/current.test.ts | Migrates command test to runCommand. |
| test/commands/applications/applications.test.ts | Adds applications index test using runCommand. |
| test/commands/applications/add.test.ts | Migrates command test to runCommand. |
| test/commands/applications.test.ts | Removes old applications test using legacy @oclif/test API. |
| src/patches/oclif/execute.ts | Updates oclif imports to v4 public exports (Interfaces.LoadOptions). |
| src/hooks/prerun/plugin.ts | Updates oclif imports to v4 (Errors, Interfaces) and improves tag typing. |
| src/config.ts | Updates oclif Config type import to Interfaces.Config. |
| src/commands/plugins/available.ts | Updates oclif Config type import to Interfaces.Config. |
| src/commands/cli/update.ts | Removes eslint-disable header (file still uses async callbacks). |
| src/commands/applications/token.ts | Updates oclif Config type import to Interfaces.Config; adjusts return typing. |
| src/commands/applications/login.ts | Updates oclif imports to v4 (Errors) and adjusts parsing + alias check logic. |
| src/commands/applications/add.ts | Updates parsing typing and aligns alias check logic with login. |
| pnpm-lock.yaml | Locks updated dependency graph for oclif v4 + related bumps. |
| package.json | Bumps version/engines, switches CL packages to oclif4 tag, updates scripts and deps. |
| docs/plugins.md | Regenerates docs to reflect optional args formatting. |
| docs/help.md | Regenerates docs to reflect optional args formatting. |
| docs/autocomplete.md | Regenerates docs to reflect optional args formatting. |
| README.md | Regenerates README commands section (now inline full command docs). |
| CHANGELOG.md | Adds prerelease changelog entries for the oclif4 track. |
| .releaserc | Adds oclif4 prerelease branch/channel. |
| .mocharc.json | Adds a global mocha timeout. |
| .gitignore | Ignores tsconfig.tsbuildinfo. |
| .github/workflows/semantic-release.yml | Runs semantic-release on the new oclif4 branch. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
src/hooks/prerun/plugin.ts:28
--tagis parsed asopts.argv[tgIndex + 1], but if the user passes--tagwithout a value,tagbecomesundefinedand later gets interpolated into the plugin spec (e.g.plugin@undefined). Validate that a non-empty tag value is present (and error out) before splicing args / using it.
const tgIndex = opts.argv.indexOf('--tag')
let tag: string | undefined
if (tgIndex > -1) {
tag = opts.argv[tgIndex + 1]
opts.argv.splice(tgIndex, 2)
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/commercelayer/commercelayer-cli/sessions/e4323b0d-fdde-401f-b446-b469a24a0f08 Co-authored-by: pviti <57948342+pviti@users.noreply.github.com>
# [7.0.0-oclif4.6](v7.0.0-oclif4.5...v7.0.0-oclif4.6) (2026-03-31) ### Bug Fixes * fix config command tests to exercise their respective commands ([4b10056](4b10056))
Member
Author
|
🎉 This PR is included in version 7.0.0-oclif4.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.