Skip to content

chore: update @oclif/core to v4 and @adobe/eslint-config-aio-lib-config to v5#130

Merged
shazron merged 6 commits into
masterfrom
fix/issue-129-update-oclif-core-v4
Apr 9, 2026
Merged

chore: update @oclif/core to v4 and @adobe/eslint-config-aio-lib-config to v5#130
shazron merged 6 commits into
masterfrom
fix/issue-129-update-oclif-core-v4

Conversation

@shazron

@shazron shazron commented Mar 25, 2026

Copy link
Copy Markdown
Member

Changes

@oclif/core v2 → v4 (closes #129)

  • Replace removed ux.table with a new src/utils/table.js utility
    • table(rows, columns, { printLine }) renders a fixed-width ASCII table
    • Pass printLine: this.log.bind(this) in all command callers so output flows through the command's stdout channel
  • Rename ux:cli import alias to ux across all command files
  • Update test/jest.setup.js: remove obsolete @oclif/core/lib/cli-ux mocks, add mockConfig stub for Command.parse() (now requires this.config), remove duplicated mockUx.table (nothing calls ux.table anymore)
  • Add test/utils/table.test.js for full branch coverage of the new utility

@adobe/eslint-config-aio-lib-config v4 → v5

  • Upgrade eslint to v9, add neostandard, upgrade eslint-plugin-jest
  • Replace .eslintrc.json + e2e/.eslintrc.json with eslint.config.js (ESLint 9 flat config)
    • Use ...pluginJest.configs['flat/recommended'] without redundant rules re-spread
  • Remove replaced packages: eslint-config-oclif, eslint-config-standard, eslint-plugin-import, eslint-plugin-n, eslint-plugin-node, eslint-plugin-promise, eslint-plugin-standard
  • Remove now-invalid eslint-disable comment from validator.js

Post-review fixes

  • src/utils/table.js: use map callback index instead of headerKeys.indexOf(key) (O(n²) → O(1))
  • test/utils/table.test.js: add assertions to validate maxWidth decrement behavior (not just line count)
  • eslint.config.js: remove redundant rules re-spread from Jest plugin config blocks
  • Copyright year updated to 2026 in newly created files (src/utils/table.js, test/utils/table.test.js, eslint.config.js)

Checklist

  • All 237 tests pass, 100% coverage
  • ESLint clean (eslint src test e2e)
  • Node engine requirement updated to >=20

…ig to v5

- Update @oclif/core from ^2.8.12 to ^4.9.0 (closes #129)
  - Replace removed ux.table with a new src/utils/table.js utility
  - Rename ux:cli import alias to ux across all command files
  - Update jest.setup.js: remove obsolete @oclif/core/lib/cli-ux mocks,
    add mockConfig stub for Command.parse() which now requires this.config
  - Add test/utils/table.test.js for full branch coverage
- Update @adobe/eslint-config-aio-lib-config from ^4.0.0 to 5.0.0
  - Upgrade eslint to v9, add neostandard, upgrade eslint-plugin-jest
  - Replace .eslintrc.json with eslint.config.js (ESLint 9 flat config)
  - Remove replaced packages: eslint-config-oclif, eslint-config-standard,
    eslint-plugin-import, eslint-plugin-n, eslint-plugin-node,
    eslint-plugin-promise, eslint-plugin-standard
  - Remove now-invalid eslint-disable comment from validator.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@shazron

shazron commented Mar 25, 2026

Copy link
Copy Markdown
Member Author

node-18 failures, wait for adobe/aio-reusable-workflows#14
done

@purplecabbage purplecabbage left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

copyright years, and I think we should be using ora for spinners.

Comment thread src/commands/event/eventmetadata/create.js

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

Updates this plugin to work with @oclif/core v4 and migrates linting to the ESLint 9 flat config format required by @adobe/eslint-config-aio-lib-config v5, while preserving existing CLI output behavior and test coverage.

Changes:

  • Upgrade @oclif/core to v4 and refactor commands to use ux plus a new internal table() utility (replacing removed ux.table).
  • Migrate from .eslintrc.json to eslint.config.js (ESLint 9 flat config) and adjust related dependencies/overrides.
  • Update Jest setup/mocks for new oclif behavior and add unit tests for the new table utility.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
package.json Upgrades @oclif/core and ESLint toolchain deps; adds neostandard.
src/utils/table.js Adds replacement table renderer for removed ux.table.
test/utils/table.test.js Adds unit tests to cover the new table renderer.
src/commands/event/registration/list.js Switches from ux: cli to ux and replaces cli.table with new table() utility.
src/commands/event/registration/get.js Renames ux: cli to ux for action spinner usage.
src/commands/event/registration/create.js Renames ux: cli to ux for action spinner usage.
src/commands/event/registration/delete.js Renames ux: cli to ux for action spinner usage.
src/commands/event/provider/list.js Renames ux: cli to ux and replaces cli.table with new table() utility.
src/commands/event/provider/get.js Renames ux: cli to ux for action spinner usage.
src/commands/event/provider/create.js Renames ux: cli to ux for action spinner usage.
src/commands/event/provider/update.js Renames ux: cli to ux for action spinner usage.
src/commands/event/provider/delete.js Renames ux: cli to ux for action spinner usage.
src/commands/event/eventmetadata/list.js Renames ux: cli to ux and replaces cli.table with new table() utility.
src/commands/event/eventmetadata/get.js Renames ux: cli to ux for action spinner usage.
src/commands/event/eventmetadata/create.js Renames ux: cli to ux for action spinner usage.
src/commands/event/eventmetadata/update.js Renames ux: cli to ux for action spinner usage.
src/commands/event/eventmetadata/delete.js Renames ux: cli to ux for action spinner usage.
test/jest.setup.js Removes obsolete mocks and patches oclif parsing requirements for tests; keeps ux mocked.
eslint.config.js Introduces ESLint 9 flat config with Jest overrides for test/ and e2e/.
.eslintrc.json Removes legacy ESLint config file.
e2e/.eslintrc.json Removes legacy per-folder ESLint override (replaced by flat config overrides).
src/utils/validator.js Removes no-longer-needed ESLint disable comment.
.gitignore Adds .claude to ignored files.

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

Comment thread src/commands/event/eventmetadata/list.js Outdated
Comment thread test/jest.setup.js Outdated
Comment thread src/utils/table.js Outdated
Comment thread test/utils/table.test.js
Comment thread eslint.config.js Outdated
Comment thread src/commands/event/provider/list.js Outdated
shazron and others added 2 commits April 7, 2026 19:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • scarf.sh
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./report.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@shazron

shazron commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@copilot apply changes based on the comments in this thread

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown

@copilot apply changes based on the comments in this thread

Fixed in commit 470cd68 — updated the copyright year from 2020 to 2026 in the three newly created files: src/utils/table.js, test/utils/table.test.js, and eslint.config.js.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • scarf.sh
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./report.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@shazron

shazron commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@copilot the PR description was replaced, it should not have been. Recreate it (from commit logs etc) since we can't restore a description.

@shazron

shazron commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@copilot apply changes based on the comments in this thread

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown

@copilot the PR description was replaced, it should not have been. Recreate it (from commit logs etc) since we can't restore a description.

Reconstructed the PR description from the commit logs — it now covers all changes across the main chore commit, the code review suggestions, and the post-review fixes.

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

Copilot reviewed 22 out of 23 changed files in this pull request and generated no new comments.


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

@shazron shazron merged commit 7baf444 into master Apr 9, 2026
14 checks passed
@shazron shazron deleted the fix/issue-129-update-oclif-core-v4 branch April 9, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: update @oclif/core to latest version

5 participants