Skip to content

Oclif4#116

Open
pviti wants to merge 19 commits into
mainfrom
oclif4
Open

Oclif4#116
pviti wants to merge 19 commits into
mainfrom
oclif4

Conversation

@pviti

@pviti pviti commented Mar 27, 2026

Copy link
Copy Markdown
Member

No description provided.

pviti and others added 15 commits March 24, 2026 10:47
BREAKING CHANGE: upgrade to oclif core v4 and add biome
# [5.0.0-oclif4.1](v4.3.1...v5.0.0-oclif4.1) (2026-03-26)

### Features

* upgrade to oclif core v4 and add biome ([c430b37](c430b37))

### BREAKING CHANGES

* upgrade to oclif core v4 and add biome
BREAKING CHANGE: require node to v22
# [5.0.0-oclif4.2](v5.0.0-oclif4.1...v5.0.0-oclif4.2) (2026-03-26)

### Features

* require node to v22 ([cc1599d](cc1599d))

### BREAKING CHANGES

* require node to v22
# [5.0.0-oclif4.3](v5.0.0-oclif4.2...v5.0.0-oclif4.3) (2026-03-26)

### Bug Fixes

* fix tests ([0b06774](0b06774))
# [5.0.0-oclif4.4](v5.0.0-oclif4.3...v5.0.0-oclif4.4) (2026-03-26)

### Features

* add import size flag ([4fa5433](4fa5433))

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the plugin to support the oclif v4 toolchain and associated ecosystem updates (dependencies, tests, and release automation).

Changes:

  • Upgraded oclif core to v4 and updated Commerce Layer CLI dependencies to the oclif4 dist-tag variants.
  • Migrated tests from the legacy @oclif/test “fancy-test” API to runCommand.
  • Updated release config and GitHub Actions workflows (semantic-release branches, action major versions, CodeQL).

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
test/commands/imports/create.test.ts Migrates to runCommand-based test harness
test/commands/imports/delete.test.ts Migrates to runCommand-based test harness
test/commands/imports/details.test.ts Migrates to runCommand-based test harness
test/commands/imports/group.test.ts Migrates to runCommand-based test harness
test/commands/imports/index.test.ts Migrates to runCommand-based test harness
test/commands/imports/list.test.ts Migrates to runCommand-based test harness
test/commands/imports/types.test.ts Migrates to runCommand-based test harness
src/commands/imports/noc.ts Adds an oclif parse call in the NoC command
src/base.ts Updates CommandError typing for oclif v4 (Interfaces.CommandError)
package.json Bumps Node engine requirement and updates deps/devDeps for oclif v4; adjusts release script
pnpm-lock.yaml Locks upgraded dependency graph for oclif v4 and related packages
README.md Updates generated usage/docs formatting (e.g., optional [ID] for imports)
CHANGELOG.md Adds prerelease entries for the new oclif4 track
.releaserc Adds oclif4 prerelease branch config
.github/workflows/semantic-release.yml Adds oclif4 branch + bumps action versions
.github/workflows/publish.yml Updates Slack GitHub Action major version + incoming webhook input
.github/workflows/codeql-analysis.yml Bumps checkout + CodeQL action major versions
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/commands/imports/index.test.ts

describe('imports:create', () => {
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['imports:noc'])

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runCommand<T>()’s generic parameter types the command’s return value (result), not stdout. Since this test doesn’t use result, consider removing the generic (or changing it to string for imports:noc) to avoid misleading typing.

Suggested change
const { stdout } = await runCommand<{ name: string }>(['imports:noc'])
const { stdout } = await runCommand(['imports:noc'])

Copilot uses AI. Check for mistakes.
expect(ctx.stdout).to.contain('-= NoC =-')
})

describe('imports:create', () => {

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are named as if they validate imports:create, but they actually execute the hidden imports:noc command. This doesn’t exercise the imports:create command at all and can give a false sense of coverage. Consider running imports:create (with API calls stubbed/mocked) or renaming/consolidating these specs to reflect that they are only a smoke test for imports:noc.

Suggested change
describe('imports:create', () => {
describe('imports:noc', () => {

Copilot uses AI. Check for mistakes.
expect(ctx.stdout).to.contain('-= NoC =-')
})

describe('imports:details', () => {

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are named as if they validate imports:details, but they actually execute the hidden imports:noc command. This doesn’t exercise the imports:details command at all and can give a false sense of coverage. Consider running imports:details (with API calls stubbed/mocked) or renaming/consolidating these specs to reflect that they are only a smoke test for imports:noc.

Suggested change
describe('imports:details', () => {
describe('imports:noc', () => {

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +6
describe('imports:types', () => {
it('runs NoC', async () => {

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test suite is labeled imports:types, but it executes imports:noc. If the intent is to validate the imports:types output, it should run imports:types; otherwise, rename/consolidate this spec so it doesn’t imply coverage of that command.

Suggested change
describe('imports:types', () => {
it('runs NoC', async () => {
describe('imports:noc', () => {
it('runs imports:noc', async () => {

Copilot uses AI. Check for mistakes.

describe('imports:list', () => {
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['imports:noc'])

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runCommand<T>()’s generic parameter types the command’s return value (result), not stdout. Since this test doesn’t use result, consider removing the generic (or changing it to string for imports:noc) to avoid misleading typing.

Suggested change
const { stdout } = await runCommand<{ name: string }>(['imports:noc'])
const { stdout } = await runCommand(['imports:noc'])

Copilot uses AI. Check for mistakes.

describe('imports:types', () => {
it('runs NoC', async () => {
const { stdout } = await runCommand<{ name: string }>(['imports:noc'])

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runCommand<T>()’s generic parameter types the command’s return value (result), not stdout. Since this test doesn’t use result, consider removing the generic (or changing it to string for imports:noc) to avoid misleading typing.

Suggested change
const { stdout } = await runCommand<{ name: string }>(['imports:noc'])
const { stdout } = await runCommand(['imports:noc'])

Copilot uses AI. Check for mistakes.
expect(ctx.stdout).to.contain('-= NoC =-')
})

describe('imports:group', () => {

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are named as if they validate imports:group, but they actually execute the hidden imports:noc command. This doesn’t exercise the imports:group command at all and can give a false sense of coverage. Consider running imports:group (with API calls stubbed/mocked) or renaming/consolidating these specs to reflect that they are only a smoke test for imports:noc.

Suggested change
describe('imports:group', () => {
describe('imports:noc', () => {

Copilot uses AI. Check for mistakes.
Comment thread test/commands/imports/index.test.ts
Comment on lines +5 to +6
describe('imports:list', () => {
it('runs NoC', async () => {

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test suite is labeled imports:list, but it executes imports:noc. If the intent is to validate listing behavior, it should run imports:list and assert on its output (with API calls stubbed/mocked); otherwise, rename/consolidate the spec so it doesn’t imply coverage of imports:list.

Suggested change
describe('imports:list', () => {
it('runs NoC', async () => {
describe('imports:noc', () => {
it('runs imports:noc', async () => {

Copilot uses AI. Check for mistakes.
pviti and others added 2 commits March 27, 2026 10:38
@pviti

pviti commented Mar 27, 2026

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 5.0.0-oclif4.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

pviti and others added 2 commits April 27, 2026 16:09
# [5.0.0-oclif4.6](v5.0.0-oclif4.5...v5.0.0-oclif4.6) (2026-04-27)

### Bug Fixes

* fix biome config ([556738a](556738a))
* run tests in updates workflow ([547ce89](547ce89))
* update dependencies and add updates workflow ([59e61f1](59e61f1))
@pviti

pviti commented Apr 27, 2026

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 5.0.0-oclif4.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants