Skip to content

Move the Node.js, browser, and React SDKs into this repository - #1

Merged
jaredwray merged 859 commits into
mainfrom
claude/busy-pascal-3zhhv7
Nov 13, 2026
Merged

jaredwray merged 859 commits into
mainfrom
claude/busy-pascal-3zhhv7

Conversation

@jaredwray

@jaredwray jaredwray commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements

  • Followed the Contributing guidelines and Code of Conduct
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage. This pull request adds no feature and no bug fix. It moves the tests of each SDK with no changes.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Repository structure. This pull request makes Hyphen/javascript-sdks a pnpm workspace that contains the three SDKs.

Package Source repository Directory Version
@hyphen/sdk Hyphen/nodejs-sdk packages/nodejs-sdk 4.0.1
@hyphen/browser-sdk Hyphen/browser-sdk packages/browser-sdk 1.1.6
@hyphen/react-sdk Hyphen/react-sdk packages/react-sdk 2.0.3

The package names and the versions do not change. The source code and the tests do not change.

History

The first three commits are merge commits. Each merge commit brings the full history of one SDK repository into its packages directory. The other commits make the workspace.

  • Use a merge commit for this pull request to keep the history of the three SDKs.
  • Use a squash merge if you do not want that history in this repository.

Changes

Workspace

  • The root has one package.json file, one pnpm-workspace.yaml file, and one pnpm-lock.yaml file.
  • The root package.json file pins pnpm@12.17.0. The packages have no packageManager field.
  • @hyphen/react-sdk uses @hyphen/browser-sdk with workspace:^. pnpm pack writes ^1.1.6 into the tarball.
  • The tests of @hyphen/browser-sdk use @hyphen/sdk with workspace:^.
  • Each package.json file gives Hyphen/javascript-sdks as the repository, with the package directory. npm provenance needs this value.
  • The root scripts build, lint, test, test:ci, and clean run in all packages.

Lockfile

  • Each direct dependency of each package keeps the version from its old lockfile.
  • Some transitive development dependencies changed, because one lockfile now resolves the peer dependencies of three packages. An example is vite for vitest.
  • The overrides keep the undici-types entry from the React SDK and one semver entry (7.8.5).

Workflows

  • The root has one set of workflows: tests, code-coverage, codeql, check-workflows, and release.
  • Each action uses the newest pin from the three repositories.
  • The release workflow packs each package that has a version that is not on npm. It then stages each tarball with pnpm stage publish. One GitHub release can stage one package or many packages.
  • Each package writes lcov paths that start at the repository root, so that Codecov finds each file.
  • HYPHEN_LINK_DOMAIN is not a secret. The workflows set it to test.h4n.link.

Documents

  • The root README.md file lists the packages, the commands, and the release steps.
  • The root AGENTS.md file has the rules for all packages. The package AGENTS.md files keep only the text for their package.
  • DEFENSE_IN_DEPTH.md shows the status of this repository. It does not copy the status of the old repositories.
  • The badges and the links in each package README.md file go to this repository.
  • The .env example in the Node.js SDK README now gives an application ID for HYPHEN_APPLICATION_ID.

Verification

  • bash ./scripts/setup-cloud-environment.sh from the root: Safe Chain verified the shims, and pnpm install --frozen-lockfile was successful.
  • pnpm build: all three packages built.
  • pnpm lint: Biome found no errors in the three packages.
  • pnpm test:ci for each package with no Hyphen API keys: the results are the same as the results in the source repositories in the same environment.
    • @hyphen/react-sdk: 15 passed.
    • @hyphen/browser-sdk: 151 passed, 5 failed. The 5 tests call the Hyphen API and need HYPHEN_PUBLIC_API_KEY.
    • @hyphen/sdk: 241 passed, 52 failed, 2 skipped. The 52 tests call the Hyphen API and need the HYPHEN_* variables.
  • packages/nodejs-sdk/test/link.test.ts with a temporary API key and HYPHEN_LINK_DOMAIN=test.h4n.link: 35 passed.
  • pnpm pack for each package: each tarball has dist, LICENSE, README.md, and the correct repository value.
  • pnpm stage publish <tarball> --dry-run accepted the React SDK tarball. I staged nothing.
  • Test audit gate: this pull request adds, changes, and deletes no test. The three vitest.config.ts files changed only the lcov reporter option.
  • zizmor: the check-workflows workflow passed on this pull request.

Manual steps for a repository admin

These settings belong to a repository, so the move does not bring them.

  1. Add the Actions secrets: HYPHEN_PUBLIC_API_KEY, HYPHEN_API_KEY, HYPHEN_APPLICATION_ID, HYPHEN_ORGANIZATION_ID, CODECOV_TOKEN, and AIKIDO_CLIENT_API_KEY. The HYPHEN_API_KEY secret must have access to the Link data of the organization.
  2. On npmjs.com, change the trusted publisher of each of the three packages to Hyphen/javascript-sdks and release.yaml.
  3. Connect this repository in Aikido, Codecov, and Drydock.
  4. Apply lockdown-repo.sh and set the required status checks. DEFENSE_IN_DEPTH.md lists each open item.
  5. Archive the three source repositories, or add a note that points to this repository. This pull request does not change the source repositories.

🤖 Generated with Claude Code

https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC

jaredwray and others added 30 commits April 9, 2026 15:12
…rowser

fix: handling buffer with node or browser
…s,-vitest,-and-faker

chore: upgradking biome, swc, types, vitest, and faker
…cheable/net

chore: upgrading cacheable and @cacheable/net
…st,-dotenv,-and-happy-dom

chore: upgrading biome, types, vitest, dotenv, and happy-dom
…k-to-1.1.2

chore: upgrading @hyphen/browser-sdk to 1.1.2
chore: migrating to tsdown and upgrading typescript
- @biomejs/biome 2.4.12 → 2.4.14
- @vitest/coverage-v8 4.1.4 → 4.1.5
- vitest 4.1.4 → 4.1.5

https://claude.ai/code/session_01UpDT9f536oc7bqEinP37BG
- tsdown 0.21.8 → 0.22.0 (rolldown v1.0.0 stable)

Breaking: tsdown 0.22.0 requires Node ^22.18.0 || >=24.0.0.
Skip the build step on Node 20 in CI since tsdown is a build tool
and Node 20 runtime compatibility is still tested via test:ci.

https://claude.ai/code/session_01UpDT9f536oc7bqEinP37BG
pnpm v11 requires Node >=22.13 but CI tests on Node 20 (and older
Node 22). Pin to pnpm@10 to maintain compatibility with the full
test matrix.

https://claude.ai/code/session_01UpDT9f536oc7bqEinP37BG
pnpm v11 requires Node >=22.13 but CI tests on Node 20 (and older
Node 22). Pin to pnpm@10 to maintain compatibility with the full
test matrix.

https://claude.ai/code/session_01UpDT9f536oc7bqEinP37BG
pnpm v11 requires Node >=22.13 but CI tests on Node 20 (and older
Node 22). Pin to pnpm@10 to maintain compatibility with the full
test matrix.

https://claude.ai/code/session_01UpDT9f536oc7bqEinP37BG
@hyphen/react-sdk - fix: upgrade build tooling (breaking)
@hyphen/react-sdk - fix: upgrade code quality dependencies
jaredwray and others added 20 commits October 15, 2026 16:52
The digest is at least 7 days old. The Node 24 lineage stays.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The caret range stays. The package is a devDependency.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The caret ranges stay. The peer dependency range stays.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The caret range stays.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The parent still requests undici-types 6.21.0. That release has no provenance.
8.12.3 is the newest release that is at least 7 days old.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
vitest and @vitest/coverage-v8 move from 5.0.3 to 5.0.5.
@biomejs/biome moves from 2.5.15 to 2.6.4.
happy-dom moves from 20.14.6 to 21.0.4.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@types/node stays at 22.20.5. The Node floor is 22, and 22.20.5 is the newest 22 release that is at least 7 days old.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
12.17.0 is the newest release that is at least 7 days old.
12.18.0 is younger than 7 days.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
zizmor-action moves from v0.7.1 to v0.8.0.
Socket Firewall moves from 1.15.4 to 1.15.6.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The image stays on Node 24 and Debian trixie.
5.2.5 is the newest image in that line that is at least 7 days old.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The peer range stays ^18.0.0 or ^19.0.0.
@types/react stays at 19.3.0.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
18.0.9 is the newest release that is at least 7 days old.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* Add .tsx patterns to the Biome file includes.

The old globs match only .ts files. Biome did not check the .tsx source files.

Co-authored-by: Jared Wray <me@jaredwray.com>

* Remove the lockfile from the clean script.

pnpm-lock.yaml is a tracked file. CI installs with --frozen-lockfile. The clean script must keep the lockfile.

Co-authored-by: Jared Wray <me@jaredwray.com>

* Correct the security documents to match the repository.

The pnpm pin matches package.json. The documents name the release workflow as the Aikido scan. The zizmor job grants security-events: write.

Co-authored-by: Jared Wray <me@jaredwray.com>

* Remove unused Hyphen variables from the workflows.

The workflows set HYPHEN_PUBLIC_API_KEY and HYPHEN_APPLICATION_ID. Source files do not read those variables. Tests use literal values.

Co-authored-by: Jared Wray <me@jaredwray.com>

* Make the new Biome includes pass the lint check.

Sort the imports in the .tsx files. Put the Biome includes list on one line. Remove the unused effect dependency. Use an arrow function for the generic wrapper. Move test components to module scope.

Co-authored-by: Jared Wray <me@jaredwray.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Bump the package version to 2.0.3 for the release cut.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This merge brings the full commit history of Hyphen/nodejs-sdk into the monorepo.
The files are in packages/nodejs-sdk and they have no changes.

git-subtree-dir: packages/nodejs-sdk
git-subtree-split: f3aca86
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
This merge brings the full commit history of Hyphen/browser-sdk into the monorepo.
The files are in packages/browser-sdk and they have no changes.

git-subtree-dir: packages/browser-sdk
git-subtree-split: 6033cb6
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
This merge brings the full commit history of Hyphen/react-sdk into the monorepo.
The files are in packages/react-sdk and they have no changes.

git-subtree-dir: packages/react-sdk
git-subtree-split: a4e8377
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
Each SDK repository had its own copy of the workflows, the bootstrap script,
the editor settings, and the policy documents. The root now has one copy.
The packages do not have their own copies, and they have no lockfile.

The workflows of the three SDK repositories are now one set of workflows.
Each workflow installs, builds, and tests all packages of the workspace.

- The tests workflow runs on Node.js 22, 24, and 26.
- The code-coverage workflow sends one lcov file for each package to Codecov.
- The release workflow packs each package that has a version that is not on npm.
  It then stages each tarball with pnpm stage publish.
- Each action uses the newest pin from the three repositories.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
The root has one package.json file, one pnpm-workspace.yaml file, and one
pnpm-lock.yaml file.

- @hyphen/react-sdk uses @hyphen/browser-sdk with the workspace protocol.
- The tests of @hyphen/browser-sdk use @hyphen/sdk with the workspace protocol.
- Each package.json file gives Hyphen/javascript-sdks as the repository.
- The lockfile keeps the locked version of each direct dependency.
- The lcov paths start at the repository root, so that Codecov finds each file.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
- The root README.md file lists the packages, the commands, and the release steps.
- The root AGENTS.md file has the rules for all packages.
- The package AGENTS.md files keep only the text for their package.
- DEFENSE_IN_DEPTH.md shows the status of this repository.
- The badges and links in each package README.md file go to this repository.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T03:32:14.286594Z c38bfa6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

HYPHEN_LINK_DOMAIN is not a secret. The tests, code-coverage, and release
workflows now set it to tilde.biz. The repository does not need a secret
with this name.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copy link
Copy Markdown
Contributor Author

The tests and code-coverage jobs fail on ce81a78 because the repository does not have the Hyphen secrets.

  • The install step and the build step pass in each job.
  • The tests of @hyphen/sdk that call the Hyphen API fail. The errors are API key is required, Public API key must start with 'public_', and You must set the publicApiKey.
  • GitHub gives an empty value for a secret that is not in the repository. These errors are the result of empty values.

The cause is not in the code of this pull request. I cannot add secrets. A repository admin must add these four Actions secrets and then run the failed jobs again:

  • HYPHEN_PUBLIC_API_KEY
  • HYPHEN_API_KEY
  • HYPHEN_APPLICATION_ID
  • HYPHEN_ORGANIZATION_ID

The code-coverage job also needs CODECOV_TOKEN for the upload.


Generated by Claude Code

The .env example gave a project ID for HYPHEN_APPLICATION_ID. The value
must be the ID of an application in the project. The table in the same
section and the SDK code use the application ID.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC

jaredwray commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Resolved on c3253b6 (2026-11-13): all checks pass. The workflows now set HYPHEN_LINK_DOMAIN to test.h4n.link, and the Link tests pass in CI.

The record of the failure on 5852cbe follows.

  • All 14 failed tests were in packages/nodejs-sdk/test/link.test.ts. Each call to the Link API returned 404 Not Found.
  • The Link service worked. The code of this pull request was not the cause.
  • Link domain. tilde.biz is not a link domain of the test organization. The create call returned 404 with the message The Domain was not found or you do not have permission to read it. The same call with test.h4n.link returned 201.
  • API key. The getShortCodes and getTags calls also returned 404 in CI. These calls do not send the domain. The API gives that status when a key cannot read the Link data of the organization.

Hyphen/nodejs-sdk failed the same tests after 2026-10-11. Its secrets can have the same problem.


Generated by Claude Code

tilde.biz is not a link domain of the test organization. The Link API
returned 404 for each short code that the tests made with that domain.
The Link tests pass with test.h4n.link.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rB6hFhJDcZFCXVrfJ92wC
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@jaredwray
jaredwray merged commit 90f4625 into main Nov 13, 2026
10 checks passed
@jaredwray
jaredwray deleted the claude/busy-pascal-3zhhv7 branch November 13, 2026 06:29
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.

5 participants