Skip to content

v1.0.0-beta.1 — packaging fix

Pre-release
Pre-release

Choose a tag to compare

@tamimbinhakim tamimbinhakim released this 28 Apr 15:46

Fix

Subpath type resolution under legacy moduleResolution: 'node10'.

Reported user error:

Cannot find module '@autotranslate/core/config' or its corresponding type declarations.ts(2307)

What was wrong

Subpath exports (@autotranslate/core/config, @autotranslate/react/server, etc.) declared their types only via the modern exports field, which legacy node10 resolvers don't read. Modern resolvers (bundler / node16 / nodenext) worked fine; older tsconfigs hit the resolution failure.

What's fixed

Two changes applied to every public package's package.json:

  1. Nested types per conditionimport.types.d.ts, require.types.d.cts. Each module system resolves the correct declaration shape.
  2. Added typesVersions mapping each subpath to its .d.ts for legacy node10 compat.

Verified across all 9 dual-format packages with @arethetypeswrong/cli. All subpaths resolve cleanly under node10, node16, nodenext, and bundler.

No runtime change.

Packages bumped

Package Version
@autotranslate/core 1.0.0-beta.1
@autotranslate/cli 1.0.0-beta.1
@autotranslate/react 1.0.0-beta.1
@autotranslate/next 1.0.0-beta.1
@autotranslate/vite 1.0.0-beta.1
@autotranslate/providers 1.0.0-beta.1
@autotranslate/eslint-plugin 1.0.0-beta.1
@autotranslate/experiments 1.0.0-beta.1
@autotranslate/zod 1.0.0-beta.1
@autotranslate/typescript-plugin 1.0.0-beta.0 (unchanged)
pnpm add @autotranslate/core@beta @autotranslate/react@beta