You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restructure as installable npm package js-tls-fetcher
Move package.json from node/ to the repo root and rename the package to
js-tls-fetcher, matching the repo. npm cannot install from a git subdirectory,
so a root manifest is what makes this work:
npm install github:Elalitareq/js-tls-fetcher
The helper binary still resolves to node/bin/, relative to node/index.js. The
files array ships the Go source (cmd/, fetcher/, go.mod, go.sum) so postinstall
can build from source on a machine that has Go, and falls back to downloading
the platform binary from Releases when it does not.
postinstall now reads the manifest from the repo root rather than node/, which
is what repoSlug() needs to derive the Releases URL.
Also add node/index.d.ts so TypeScript consumers get typed request/response
shapes and the named-profile union.
CI:
- run the end-to-end test via `npm install` + `npm test` from the root, which
exercises the same postinstall path a consumer hits
- test on macOS as well as Linux
- cross-compile every release target, so a v-tag cannot fail halfway and
publish a Release with missing platform assets
- pack-check asserts the tarball still carries the Go source; without it,
postinstall on a Go-less machine has nothing to build from
Release:
- verify-version fails on a tag/package.json version mismatch, before anything
is published
- publish-npm runs with `needs: build`, so Release assets are always uploaded
before the package whose postinstall downloads them
- publish is skipped with a warning when no NPM_TOKEN secret is set, keeping
the GitHub install path independent of registry auth
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>