Skip to content

fix: publish client type declarations - #44

Open
jaasieldelgado131 wants to merge 1 commit into
freshcodes:mainfrom
jaasieldelgado131:fix/publish-client-types
Open

fix: publish client type declarations#44
jaasieldelgado131 wants to merge 1 commit into
freshcodes:mainfrom
jaasieldelgado131:fix/publish-client-types

Conversation

@jaasieldelgado131

Copy link
Copy Markdown

Summary

  • include the documented client type entrypoint in the published package
  • include its local ResolvedConfig dependency so the virtual module keeps its real type

Problem

The README tells users to add:

/// <reference types=@fresh.codes/astro-pirsch-proxy/client />

The package exports ./client to ./src/env.d.ts, but files only includes dist and src/components. The npm tarball therefore omits both src/env.d.ts and the src/types.ts file it imports.

A clean TypeScript project using the documented entrypoint fails with:

TS2688: Cannot find type definition file for '@fresh.codes/astro-pirsch-proxy/client'.

Validation

  • published 1.0.4 tarball reproduces TS2688
  • npm run build passes
  • npm test passes: 6 files, 33 tests
  • npm run typecheck passes
  • npm run lint passes
  • Prettier and git diff --check pass
  • corrected npm pack contains src/env.d.ts and src/types.ts
  • clean TypeScript 5.9 consumer resolves the documented client type library
  • the consumer imports virtual:pirsch-config and verifies config.clients[0].secret as string

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