Skip to content

Update dependency awilix to v13#1597

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/awilix-13.x
Open

Update dependency awilix to v13#1597
renovate[bot] wants to merge 1 commit intomainfrom
renovate/awilix-13.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 18, 2026

This PR contains the following updates:

Package Change Age Confidence
awilix 12.1.113.0.2 age confidence

Release Notes

jeffijoe/awilix (awilix)

v13.0.2

Compare Source

  • Fix ESM interop by renaming load-module-native.js to load-module-native.mjs so Node.js treats it as ESM regardless of the package type field (#​416, #​417)

v13.0.1

Compare Source

  • Fix importModule export by migrating from module.exports to export (reported & fix suggested in #​413 by Vinícius Oliveira, fixed in #​414)
  • Update packages
  • Bump supported Node version to 20 (this should have been done in the latest major)

v13.0.0

Compare Source

No runtime changes — all breaking changes are TypeScript-only.

  • BREAKING (types): Default cradle type changed from any to {}
  • BREAKING (types): register() returns a new container type that includes the registered resolvers
  • BREAKING (types): asValue() now preserves literal types and deep readonly for objects
BREAKING CHANGES
Default cradle type changed from any to {}

createContainer() without an explicit generic now returns AwilixContainer<{}> instead of AwilixContainer<any>. This enables type accumulation via register() chaining (any & T collapses to any, while {} & T produces T).

If you have existing code that relies on the any default (e.g. accessing container.cradle.something without type annotations), pass any explicitly:

// Before (v12) — implicit any
const container = createContainer()
container.cradle.anything // OK

// After (v13) — explicit any to preserve old behavior
const container = createContainer<any>()
container.cradle.anything // OK

// After (v13) — recommended: use register() for type inference
const container = createContainer().register({
  anything: asValue('hello'),
})
container.cradle.anything // OK, typed as 'hello'
register() returns a new container type

register() now returns AwilixContainer<Cradle & InferCradleFromResolvers<R>> instead of this. Types accumulate across chained calls:

const container = createContainer()
  .register({ port: asValue(3000) })       // AwilixContainer<{ port: 3000 }>
  .register({ host: asValue('localhost') }) // AwilixContainer<{ port: 3000; host: 'localhost' }>

container.resolve('port') // 3000
container.resolve('host') // 'localhost'
asValue() preserves literal types and deep readonly

asValue() now uses a const type parameter, which means it preserves literal types for primitives and infers deep readonly for objects:

// Before (v12)
asValue(3000)              // Resolver<number>
asValue('localhost')       // Resolver<string>
asValue({ debug: true })   // Resolver<{ debug: boolean }>

// After (v13)
asValue(3000)              // Resolver<3000>
asValue('localhost')       // Resolver<'localhost'>
asValue({ debug: true })   // Resolver<{ readonly debug: true }>

Resolved object values are now correctly typed as readonly, reflecting the fact that mutating container-owned values was never a safe practice:

const container = createContainer().register({
  config: asValue({ debug: true }),
})

const config = container.resolve('config')
config.debug = false // Error: Cannot assign to 'debug' because it is a read-only property

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - Between 07:00 AM and 04:59 PM, only on Monday, Tuesday, Wednesday, and Thursday ( * 7-16 * * 1,2,3,4 ) (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/awilix-13.x branch 2 times, most recently from eb2d121 to 6650f00 Compare March 5, 2026 14:08
@ErisDS
Copy link
Member

ErisDS commented Mar 5, 2026

🤖 Velo CI Failure Analysis

Classification: 🟠 SOFT FAIL

  • Workflow: CICD
  • Failed Step: Run Tests
  • Run: View failed run
    What failed: TypeScript type errors in application code
    Why: The logs show multiple TypeScript errors where variables are of type 'unknown'. This indicates issues in the application code, likely due to incorrect type annotations or missing type definitions.
    Action:
    The developer should review the reported TypeScript errors in the application code and fix the type-related issues to resolve the CI failure.

@renovate renovate bot force-pushed the renovate/awilix-13.x branch from 6650f00 to 310dc75 Compare March 5, 2026 21:01
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.

1 participant