Skip to content

chore: upgrade @oclif/core from v2 to v4 and migrate to ESLint 9#120

Merged
shazron merged 4 commits into
masterfrom
fix/issue-119-oclif-core-v4-upgrade
Apr 7, 2026
Merged

chore: upgrade @oclif/core from v2 to v4 and migrate to ESLint 9#120
shazron merged 4 commits into
masterfrom
fix/issue-119-oclif-core-v4-upgrade

Conversation

@shazron

@shazron shazron commented Mar 25, 2026

Copy link
Copy Markdown
Member

(Copilot wiped the original PR description, and I can't copy from edit history without losing formatting).

Description

  • Upgrade @oclif/core from v2 to v4
  • Migrate to ESLint 9 flat config with @adobe/eslint-config-aio-lib-config@5
  • Update copyright year from 2020 to 2026 in eslint.config.js

Related Issue

Fixes #119

Motivation and Context

@oclif/core v2 is no longer maintained. This upgrades to v4 and migrates the ESLint config to the new flat config format required by ESLint 9.

How Has This Been Tested?

Existing unit tests were updated and pass.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

- Update @oclif/core dependency to ^4.10.2
- Move this.parse() inside try/catch in info.js (v4 parse() calls config.runHook internally)
- Spread config.plugins.values() since config.plugins is now a Map in v4
- Add runHook mock to test configs to satisfy v4's parse() lifecycle
- Allow @oclif/core in node/no-missing-require rule (eslint-plugin-node@11 doesn't resolve package.json exports field)

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!

…-lib-config@5

- Replace .eslintrc.json, test/.eslintrc.json, e2e/.eslintrc.json with eslint.config.js
- Update devDependencies: eslint@^9, @adobe/eslint-config-aio-lib-config@^5,
  eslint-plugin-jest@^29, eslint-plugin-jsdoc@^48, neostandard@^0
- Drop node/no-missing-require allowlist for @oclif/core (eslint-plugin-n v17
  supports package.json exports field natively)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shazron shazron changed the title chore: upgrade @oclif/core from v2 to v4 (fixes #119) chore: upgrade @oclif/core from v2 to v4 and migrate to ESLint 9 Mar 25, 2026

@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.

one little nit

Comment thread eslint.config.js Outdated
@shazron

shazron commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@copilot the PR description was replaced, when you should just have appended your comment. Can you restore it to the previous description, and append your comment instead?

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown

@copilot the PR description was replaced, when you should just have appended your comment. Can you restore it to the previous description, and append your comment instead?

Apologies for that — the PR description was unintentionally replaced by the progress-reporting tool I use to push commits. Unfortunately I can't directly edit the PR description without making a code change commit. Could you manually restore the original description? The appended line should be:

- [x] Update copyright year from 2020 to 2026 in eslint.config.js

@shazron

shazron commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@copilot how to manually restore the previous PR description? There is no copy functionality to copy the markdown. If I just manually select and copy and paste, it loses all Markdown formatting.

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown

@copilot how to manually restore the previous PR description? There is no copy functionality to copy the markdown. If I just manually select and copy and paste, it loses all Markdown formatting.

To edit the PR description, click the "..." (three-dot menu) in the top-right corner of the description box and select "Edit" — this opens the raw Markdown editor where you can paste directly.

Here is the reconstructed Markdown (based on the PR template and what the PR does). You can select all text below and paste it in:

## Description

- Upgrade `@oclif/core` from v2 to v4
- Migrate to ESLint 9 flat config with `@adobe/eslint-config-aio-lib-config@5`
- Update copyright year from 2020 to 2026 in `eslint.config.js`

## Related Issue

Fixes #119

## Motivation and Context

`@oclif/core` v2 is no longer maintained. This upgrades to v4 and migrates the ESLint config to the new flat config format required by ESLint 9.

## How Has This Been Tested?

Existing unit tests were updated and pass.

## Types of changes

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

- [ ] I have signed the [Adobe Open Source CLA](http://opensource.adobe.com/cla.html).
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.

Note: I've reconstructed this from the PR template + commit details since the original was overwritten. Please adjust any sections that don't match what you originally wrote.

@shazron shazron merged commit e7b430a into master Apr 7, 2026
11 checks passed
@shazron shazron deleted the fix/issue-119-oclif-core-v4-upgrade branch April 7, 2026 11:57
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

3 participants