Add TypeScript build pipeline and fix package distribution - #1
Open
magicspon wants to merge 1 commit into
Open
Conversation
Previously this package shipped only TypeScript source with no compiled
output, making it unusable in projects that do not transpile node_modules.
It also lacked type declarations for consumers and was missing required
runtime/type dependencies.
Changes:
- Add tsconfig.json targeting ES2022 (required for private class fields
used in generated proto files), emitting CommonJS JS + .d.ts to dist/
with skipLibCheck and strict disabled to handle existing generated-code
type issues
- Add `build` (tsc) and `typecheck` (tsc --noEmit) scripts to package.json
- Add `google-protobuf` as a runtime dependency (was imported but missing)
- Add `@types/google-protobuf` as a dependency so consumers receive type
declarations for the protobuf base classes used throughout the SDK
- Add `files: ["dist"]` so only compiled output is published to npm
- Add `exports: { "./*": "./dist/*" }` wildcard mapping so consumers can
import subpaths (e.g. passkit-typescript-sdk/io/member/member) and get
both JS execution and TypeScript types without any build-step workaround
- Add .gitignore excluding node_modules/, dist/, and package-lock.json
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously this package shipped only TypeScript source with no compiled output, making it unusable in projects that do not transpile node_modules. It also lacked type declarations for consumers and was missing required runtime/type dependencies.
Changes:
build(tsc) andtypecheck(tsc --noEmit) scripts to package.jsongoogle-protobufas a runtime dependency (was imported but missing)@types/google-protobufas a dependency so consumers receive type declarations for the protobuf base classes used throughout the SDKfiles: ["dist"]so only compiled output is published to npmexports: { "./*": "./dist/*" }wildcard mapping so consumers can import subpaths (e.g. passkit-typescript-sdk/io/member/member) and get both JS execution and TypeScript types without any build-step workaround