Skip to content

Fix TypeScript declaration publishing#1

Open
andrei-hasna wants to merge 1 commit into
mainfrom
fix/types-declaration-publishing
Open

Fix TypeScript declaration publishing#1
andrei-hasna wants to merge 1 commit into
mainfrom
fix/types-declaration-publishing

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

  • generate root package declarations during build, reusing SDK declarations for the root export and emitting storage declarations
  • add explicit ./storage types metadata and a prepack build hook so plain npm pack includes declarations from a clean checkout
  • add package validation that checks packed metadata targets and relative declaration imports

Validation

  • rm -rf dist && npm pack --dry-run --json
  • bun run validate:pack
  • npm publish --dry-run --json
  • bun test
  • ./node_modules/.bin/biome check package.json tsconfig.types.json scripts/build-types.ts scripts/validate-package.ts
  • packed tarball consumer TypeScript checks for @hasna/logs and @hasna/logs/storage under NodeNext and Bundler
  • Bun runtime package-name import smoke test

Review

  • adversarial reviewer found direct clean npm pack bypassed validation; reconciled with prepack: bun run build and revalidated clean pack output
  • remaining low risk: validator skips bare external declaration specifiers; current public exported declarations typecheck from packed consumers

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