Repository navigation
Patch: Build before publish and restrict package files - #15
Open
Andrew-Paystack wants to merge 3 commits into
Open
Andrew-Paystack wants to merge 3 commits into
Andrew-Paystack wants to merge 3 commits into
Conversation
jules-paystack
approved these changes
Oct 1, 2026
jules-paystack
left a comment
There was a problem hiding this comment.
Looks good. I built the branch and ran npm pack --dry-run; the tarball now includes dist/index.js, index.mjs, index.d.ts and index.d.mts, which covers main/module/types, so this fixes the missing-dist issue from 1.2.1. Dropping npm run clean from build is fine since tsup's "clean": true still clears dist, and syncing package-lock to 1.2.2 fixes the beta.1/beta.2 mismatch.
One small thing and fine as a follow-up: the version is also hard-coded in the user-agent header at src/runtime.ts:58, which still says @paystack/paystack-sdk - 1.2.1-beta.2. Could you bump that to 1.2.2 as well so requests from this release report the right SDK version?
jules-paystack
approved these changes
Oct 7, 2026
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.
Type of change
What issue does this change solve?
Version
1.2.1installs without errors, but importing it fails withCannot find module '.../dist/index.js'. The published package is missing the compileddist/folder.This PR makes sure the SDK is always built before it's published:
preparescript that buildsdist/before every publish, and when the SDK is installed directly from GitHubfileslist so the package only includes the build output, README and licence, and removes.npmignore, which this replaces1.2.2Additional context
We installed the packed SDK into a clean project.
require, ESM imports and TypeScript types all work the same way they do in1.2.1-beta.2.