Skip to content

chore: update @oclif/core to v4 and migrate to ESLint 9#183

Merged
shazron merged 10 commits into
masterfrom
fix/issue-182-oclif-core-v4
Apr 7, 2026
Merged

chore: update @oclif/core to v4 and migrate to ESLint 9#183
shazron merged 10 commits into
masterfrom
fix/issue-182-oclif-core-v4

Conversation

@shazron

@shazron shazron commented Mar 25, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #182 — updates @oclif/core from ^2.0.0 to ^4.0.0 (v4.10.2).

  • Bump @oclif/core^4.0.0 and oclif devDep → ^4.0.0

  • Replace removed ux.prompt() with an @inquirer/prompts-based utility (src/prompt.js), since ux.prompt was removed in @oclif/core v3+

  • Add @inquirer/prompts as a direct dependency

  • Fix tests: pass mock config with runHook to Command constructor (required by v4's parse())

  • Convert set.js tests from instance-based (new Command([])) to static Command.run() approach

  • Bump @adobe/eslint-config-aio-lib-config^5.0.0 and eslint^9.0.0

  • Migrate ESLint config from .eslintrc.json to eslint.config.js (ESLint v9 flat config)

  • Migrate .eslintignore to ignores in eslint.config.js

  • Remove eslint plugins now provided transitively by neostandard (via the shared config): eslint-config-oclif, eslint-config-standard, eslint-plugin-import, eslint-plugin-node, eslint-plugin-n, eslint-plugin-promise, eslint-plugin-standard

  • Add @oclif/core to allowModules in ESLint n plugin settings — v4 uses package exports only (no main field), which requires explicit whitelisting

  • Note: do node-18 manual testing if it is still required - see the comment below about engines warnings.

Test plan

  • All 64 unit tests pass
  • 100% code coverage maintained
  • Lint passes

🤖 Generated with Claude Code

- Bump @oclif/core from ^2.0.0 to ^4.0.0 and oclif devDep to ^4.0.0
- Replace removed ux.prompt() with a readline-based prompt utility (src/prompt.js)
- Fix tests: pass mock config with runHook to Command constructor (required by v4)
- Convert set.js tests from instance-based to static Command.run() approach
- Add allowModules for @oclif/core in eslint settings (v4 uses exports-only, no main field)

Closes #182

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 and others added 4 commits March 25, 2026 22:57
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump @adobe/eslint-config-aio-lib-config from ^4.0.0 to ^5.0.0
- Update eslint from ^8 to ^9
- Migrate from .eslintrc.json to eslint.config.js (ESLint v9 flat config)
- Migrate .eslintignore to ignores in eslint.config.js
- Remove eslint plugins now provided by neostandard (via the shared config):
  eslint-config-oclif, eslint-config-standard, eslint-plugin-import,
  eslint-plugin-node, eslint-plugin-promise, eslint-plugin-standard, eslint-plugin-n

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
eslint-plugin-jest@27 only supports eslint@^7||^8; v29 adds ^9 support.
Also add neostandard as an explicit devDependency (peer dep of
@adobe/eslint-config-aio-lib-config that npm does not auto-install).

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

neostandard uses ESM-only packages (find-up) that cannot be require()'d
in Node 18. Using .mjs forces ESLint to load the config as an ES module,
avoiding the ERR_REQUIRE_ESM error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shazron shazron changed the title chore: update @oclif/core to v4 chore: update @oclif/core to v4 and migrate to ESLint 9 Mar 25, 2026
neostandard bundles find-up@8 (ESM-only), which cannot be require()'d
in Node 18. The npm overrides field forces neostandard to use find-up@5
(CJS) which exports the same findUpSync API that neostandard uses.

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

shazron commented Mar 25, 2026

Copy link
Copy Markdown
Member Author

A lot of deps require node-20, and puts out warnings when deps are installed in node-18:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'neostandard@0.13.0',
npm warn EBADENGINE   required: { node: '^20.19.0 || ^22.13.0 || >=24' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'eslint-plugin-jest@29.15.1',
npm warn EBADENGINE   required: { node: '^20.12.0 || ^22.0.0 || >=24.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'eslint-visitor-keys@5.0.1',
npm warn EBADENGINE   required: { node: '^20.19.0 || ^22.13.0 || >=24' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/client-cloudfront@3.1009.0',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/client-s3@3.1014.0',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/core@3.973.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-node@3.972.25',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-host-header@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-logger@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-recursion-detection@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-user-agent@3.972.25',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/region-config-resolver@3.972.9',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/types@3.973.6',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/util-endpoints@3.996.5',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/util-user-agent-node@3.973.11',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-bucket-endpoint@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-expect-continue@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-flexible-checksums@3.974.4',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-location-constraint@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-sdk-s3@3.972.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/middleware-ssec@3.972.8',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/signature-v4-multi-region@3.996.12',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/xml-builder@3.972.15',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-env@3.972.22',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-http@3.972.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-ini@3.972.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-process@3.972.22',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-sso@3.972.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-web-identity@3.972.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/credential-provider-login@3.972.24',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/nested-clients@3.996.14',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/token-providers@3.1015.0',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/util-arn-parser@3.972.3',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@aws-sdk/crc64-nvme@3.972.5',
npm warn EBADENGINE   required: { node: '>=20.0.0' },
npm warn EBADENGINE   current: { node: 'v18.20.8', npm: '10.8.2' }
npm warn EBADENGINE }

@shazron

shazron commented Mar 25, 2026

Copy link
Copy Markdown
Member Author

wait for adobe/aio-reusable-workflows#14 and revert any node-18 changes

@shazron

shazron commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

reverted the node-18 changes, re-ran reusable workflows 👍

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

nit: copyright years for new files should be current

@shazron

shazron commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@copilot copyright years for new files should be current year: 2026

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown

@copilot copyright years for new files should be current year: 2026

Updated copyright year to 2026 in all three new files (src/prompt.js, test/commands/prompt.js, eslint.config.js) in commit 6b96040.

@shazron shazron merged commit c2fcd7d into master Apr 7, 2026
9 checks passed
@shazron shazron deleted the fix/issue-182-oclif-core-v4 branch April 7, 2026 12:05
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