Skip to content

Generate TypeScript declaration mappings for public entries - #111

Merged
vrtmrz merged 2 commits into
mainfrom
fix/node10-types-versions
Aug 13, 2026
Merged

Generate TypeScript declaration mappings for public entries#111
vrtmrz merged 2 commits into
mainfrom
fix/node10-types-versions

Conversation

@vrtmrz

@vrtmrz vrtmrz commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Generate root and subpath declaration fallbacks from Commonlib's existing public export inventory so Node10-style TypeScript resolution can resolve supported declarations without relying on exports conditions.

Summary

  • declare the root ./dist/index.d.ts entry through the generated manifest's top-level types field;
  • derive typesVersions from the same createExports() result used for focused and compatibility entries;
  • extend packed-consumer verification to resolve the root and every public subpath with TypeScript's Node10 module resolution; and
  • require octagonal-wheels 0.1.53, whose generated manifest provides the corresponding root and subpath declaration mappings.

Rationale

TypeScript's Node10 resolution does not use the declaration conditions in the package exports map. The package root therefore requires a top-level types entry, while public subpaths require typesVersions.

The generated exports map remains authoritative. The compatibility mappings mirror it and cannot introduce an additional public entry independently.

Verification

  • confirmed that the packed-package check failed first for the missing typesVersions field;
  • confirmed separately that root resolution failed without the top-level types field;
  • ran the complete Commonlib package gate and managed integration suite with octagonal-wheels 0.1.53;
  • resolved the generated root and all 115 public subpaths from the installed Commonlib tarball with TypeScript's Node10 module resolution;
  • confirmed that repeated package generation produces an identical manifest;
  • installed the exact Commonlib tarball in Self-hosted LiveSync at 39732904858ed1889a5a8bde6a6c6f27b2fdcb02, then passed its type check, 638 unit tests, plug-in, CLI, WebApp, and WebPeer builds, and CLI end-to-end test; and
  • ran the official Obsidian Community ESLint configuration against that exact consumer installation; the targeted error-typed union and intersection findings were absent.

Release order

octagonal-wheels 0.1.53 was published through trusted staged publishing, validated from the exact registry artefact in Commonlib and Self-hosted LiveSync, and promoted to latest. Commonlib now records 0.1.53 as its minimum compatible octagonal-wheels version.

@vrtmrz
vrtmrz marked this pull request as ready for review August 13, 2026 10:02
@vrtmrz
vrtmrz merged commit 17c426a into main Aug 13, 2026
3 checks passed
@vrtmrz vrtmrz mentioned this pull request Aug 13, 2026
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