Skip to content

chore(deps): upgrade major dependencies and ESLint 9#78

Open
itavy wants to merge 4 commits into
adobe:masterfrom
itavy:chore/upgrade-dependencies
Open

chore(deps): upgrade major dependencies and ESLint 9#78
itavy wants to merge 4 commits into
adobe:masterfrom
itavy:chore/upgrade-dependencies

Conversation

@itavy

@itavy itavy commented Apr 29, 2026

Copy link
Copy Markdown

🔗 Related PR: adobe/aio-lib-ims#174

The remaining uuid vulnerability will be resolved once the above PR is merged and a new version of @adobe/aio-lib-ims is published.


Summary

This PR upgrades all major dependencies to their latest compatible versions and migrates to ESLint 9 with flat config format.

Commit 1: Upgrade major dependencies

  • jest: 29 → 30
  • jest-junit: 16 → 17 (fixes uuid security vulnerability)
  • typescript: 5 → 6
  • globby: 14 → 16
  • @adobe/aio-lib-ims (peer): 7 → 8

Commit 2: Upgrade to ESLint 9 with flat config

  • eslint: 8.57.1 → 9.39.4 (latest v9)
  • @adobe/eslint-config-aio-lib-config: 4.0.0 → 5.0.0
  • Added: neostandard (replaces 6 eslint plugins)
  • Removed: eslint-config-standard, eslint-plugin-{import,jest,n,node,promise}
  • Migrated: .eslintrc.json → eslint.config.js (flat config format)

Test Plan

  • All unit tests pass with 100% coverage
  • Linting passes with new ESLint 9 flat config
  • No breaking changes detected

Security Impact

  • Before: 6 moderate vulnerabilities
  • After: 5 moderate vulnerabilities
  • Fixed: 1 vulnerability (uuid in jest-junit dev dependency)
  • Remaining: 5 vulnerabilities in @adobe/aio-lib-ims@8 dependency tree

Note on Remaining uuid Vulnerability

The remaining 5 vulnerabilities are all the same issue:

Deprecation Warnings

  • Before: 7+ warnings (eslint@8, humanwhocodes packages, rimraf, glob, inflight)
  • After: 3 warnings (all in jest@30 transitive dependencies)
  • Improvement: Eliminated 4+ deprecation warnings

What Cannot Be Upgraded (Blocked)

ESLint 10

  • Blocked by: @adobe/eslint-config-aio-lib-config@5 requires eslint ^9
  • Status: On latest v9 (9.39.4)

Remaining Deprecations

All 3 warnings are transitive dependencies in jest@30:

  • inflight@1.0.6, glob@7.2.3, glob@10.5.0
  • Dev dependencies only, low risk
  • Require upstream Jest/babel-plugin-istanbul updates

Files Changed

  • package.json - dependency updates
  • eslint.config.js - new flat config (added)
  • .eslintrc.json - old config (removed)

🤖 Generated with Claude Code

itavy and others added 2 commits April 29, 2026 19:32
- jest: 29 → 30
- jest-junit: 16 → 17 (fixes uuid security vulnerability)
- typescript: 5 → 6
- globby: 14 → 16
- @adobe/aio-lib-ims (peer): 7 → 8

Reduces security vulnerabilities from 6 to 5. All tests pass with 100% coverage.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- eslint: 8.57.1 → 9.0.0
- @adobe/eslint-config-aio-lib-config: 4.0.0 → 5.0.0
- neostandard: added (replaces eslint-config-standard + plugins)

Removed dependencies (now provided by neostandard):
- eslint-config-standard
- eslint-plugin-import
- eslint-plugin-jest
- eslint-plugin-n
- eslint-plugin-node
- eslint-plugin-promise

Migrated from .eslintrc.json to eslint.config.js (flat config format).
Added Jest globals configuration for test files.

All tests pass with 100% coverage. Linting passes.

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

codecov Bot commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Version 8.1.2 updates @adobe/aio-lib-state from v3 to v5, which removes the
@azure/cosmos dependency and its vulnerable uuid < 14.0.0.

Note: npm audit still reports 5 vulnerabilities due to a nested copy of
@adobe/aio-lib-ims-jwt with old peer dependencies, but this is a false
positive - the nested copy is not used at runtime (peer dependencies take
precedence).

Related: adobe/aio-lib-ims#174

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@itavy
itavy marked this pull request as ready for review April 29, 2026 18:35
Comment thread package.json
},
"peerDependencies": {
"@adobe/aio-lib-ims": "^7"
"@adobe/aio-lib-ims": "^8.1.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@itavy One thing I want to double check here is the peer dependency move from @adobe/aio-lib-ims@^7 to ^8.1.2. I understand we needed 8.1.2 for the audit cleanup , but it means consumers using aio-lib-ims-jwt with aio-lib-ims@7 will now get peer dependency issues, right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@dthampy Great catch! You're absolutely right - this is a breaking change. Let me break down the implications:

Analysis

The concern is valid - changing from ^7 to ^8.1.2 has compatibility implications.

Impact:

  1. Consumers on aio-lib-ims@7.x will get peer dependency warnings
  2. This should be a major version bump (5.0.2 → 6.0.0), not a patch
  3. We're enforcing a minimum version to ensure the uuid vulnerability is resolved

Options Considered:

Option A: Keep ^8 instead of ^8.1.2

  • Less restrictive (allows 8.0.0+)
  • Audit warnings persist for consumers on 8.0.x-8.1.1, but it's a false positive (nested copy not used at runtime)

Option B: Keep ^8.1.2 and release as v6.0.0RECOMMENDED

  • Forces consumers to use the fixed version
  • Released as major version (6.0.0) to properly signal breaking change
  • Cleaner from security perspective - no audit warnings
  • Once aio-lib-ims updates to depend on v6.0.0, the circular dependency resolves correctly

Option C: Revert to ^7

  • Most conservative
  • Keeps compatibility but maintains audit warnings

Key Insight:

We already introduced a breaking change in commit 1 by moving from ^7 to ^8. The question is just how restrictive to be within v8.

Since:

  1. We're already breaking compatibility with v7
  2. We should enforce the fixed version (8.1.2+) to eliminate audit warnings
  3. Major version bump properly signals this to consumers

I recommend Option B - keep ^8.1.2 and release this as v6.0.0.

Question:

Is aio-lib-ims@7 still actively maintained, or is everything moving to v8 now? This would help determine if we need to maintain backwards compatibility or if a clean break is acceptable.

What do you think?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Update: Long-term Option D

After analyzing the codebase, I found that the circular dependency can be broken by extracting shared code!

Option D: Extract @adobe/aio-lib-ims-coreBEST LONG-TERM

Why the circular dependency exists:

  • aio-lib-ims imports aio-lib-ims-jwt as a plugin
  • aio-lib-ims-jwt only needs 2 methods: ims.getApiUrl() and ims.exchangeJwtToken()

Solution: Create new core package with just those methods:

aio-lib-ims-core (NEW)
├── Core IMS functionality (API URLs, token exchange)
└── Plugin interface definitions

aio-lib-ims-jwt
├── depends on: aio-lib-ims-core (NOT aio-lib-ims)
└── implements: ImsPlugin interface

aio-lib-ims
├── depends on: aio-lib-ims-core
└── depends on: aio-lib-ims-jwt (as plugin)

Benefits:

  • ✅ No circular dependency (clean architecture)
  • ✅ No audit false positives
  • ✅ Easier to add more auth plugins
  • ✅ Proper separation of concerns

Effort: ~1-2 weeks for extraction, refactoring, and testing

Implementation: Can be done as pre-releases (beta) to validate before stable

I've created a detailed proposal: Issue #79


Recommendation

Short-term (this PR): Go with Option B - keep ^8.1.2, release as v6.0.0
Long-term: Consider Option D (core extraction) as outlined in #79

The short-term fix gets us moving now, while the long-term fix provides the cleanest architecture.

Thoughts?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

⚠️ Additional Context: JWT is Deprecated

Important discovery: JWT authentication is officially deprecated as of June 30, 2025.

From Adobe Developer docs:

As of June 30, 2025, Service Account (JWT) credentials have reached their end of life and are no longer supported. All server-to-server integrations must use the OAuth Server-to-Server credentials.

Impact on Our Discussion

This changes the context for both short-term and long-term decisions:

For this PR (Option B):

  • Still valid - existing JWT consumers need updates
  • But consider: How long should we maintain JWT support?

For Option D (core extraction):

  • Lower priority if JWT is sunset soon
  • Higher priority if OAuth uses similar plugin architecture
  • Questions: Does @adobe/aio-lib-ims-oauth use the same patterns? Would core extraction benefit OAuth implementation?

Key Questions for @dthampy:

  1. What's the support timeline for JWT (immediate sunset vs. gradual deprecation)?
  2. Is aio-lib-ims-oauth the recommended path forward?
  3. Does OAuth benefit from the same architectural improvements?

Migration Guide: https://developer.adobe.com/developer-console/docs/guides/authentication/ServerToServerAuthentication/migration

This context should inform our decision on whether to invest in architectural refactoring vs. minimal maintenance mode.

@dthampy

dthampy commented Apr 29, 2026

Copy link
Copy Markdown

@itavy thanks for the breaking down the options. But I don't want to make a call myself here since this affects the public package contract. So I'd pull in @shazron and @purplecabbage to help confirm the right direction.

@shaz @jesse could you take a look at the peer dependency change here? The PR currently moves @adobe/aio-lib-ims from ^7 to ^8.1.2. That seems ok from the audit perspective, but that means it would drop compatibility with consumers still on v7 and likely means aio-lib-ims-jwt should be released as a major version. What direction do we want to go here?

@shazron

shazron commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@dthampy @itavy Definitely would need a major version change. From my experience with https://github.com/adobe/eslint-config-aio-lib-config#publishing- not doing one will break users as already mentioned.

As for Long Term Option D - I wouldn't bother. We just had a discussion where we are probably going to merge all the "ims plugins" into aio-lib-ims to reduce the complexity and most likely dropping the jwt plugin.

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.

3 participants