From 09e9dabfe2b97291c3dccf0e24d939b241f37968 Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Wed, 18 Mar 2026 18:17:12 -0400 Subject: [PATCH 1/5] chore(ENG-10153): add CLAUDE.md and clean up legacy agentic artifacts Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/CLAUDE.md | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 4 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .claude/CLAUDE.md diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..baa529f --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,35 @@ +# React Native Elements + +React Native SDK for Basis Theory Elements — provides React Native components for secure data collection on mobile. + +## Development Workflow + +```bash +yarn install +yarn build # Build the package (uses bob + prepare script) +``` + +## Testing + +```bash +yarn lint # ESLint +yarn lint:fix # Auto-fix +yarn test # Unit tests (Jest) +npx jest --testPathPattern="" # Targeted test +``` + +## Feedback Loops + +Run `npx jest --testPathPattern=""` for targeted test feedback. + +When a failing test is discovered, always verify it passes using the appropriate feedback loop before considering the fix complete. + +## Standards & Conventions + +- TypeScript, React Native, Jest for testing +- `yarn` for package management +- Uses `react-native-builder-bob` for building + +## Links + +- [React Native Elements docs](https://developers.basistheory.com/docs/sdks/mobile/react-native/) diff --git a/.gitignore b/.gitignore index 4c8192f..bedb2aa 100644 --- a/.gitignore +++ b/.gitignore @@ -75,4 +75,6 @@ yarn-error.log !.yarn/sdks !.yarn/versions -/dist \ No newline at end of file +/dist +# IDE +.cursor From 4a8a96fb85a227421ef4edacb99ce824948b768a Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Wed, 18 Mar 2026 23:42:57 -0400 Subject: [PATCH 2/5] fix(ENG-10153): move CLAUDE.md to repo root for discoverability Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/CLAUDE.md => CLAUDE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .claude/CLAUDE.md => CLAUDE.md (100%) diff --git a/.claude/CLAUDE.md b/CLAUDE.md similarity index 100% rename from .claude/CLAUDE.md rename to CLAUDE.md From 8071ef102690db0c825bcb97e9c48383adef1960 Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Wed, 18 Mar 2026 23:56:21 -0400 Subject: [PATCH 3/5] =?UTF-8?q?fix(ENG-10153):=20revert=20.gitignore=20cha?= =?UTF-8?q?nges=20=E2=80=94=20.cursor=20belongs=20in=20global=20gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bedb2aa..4c8192f 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,4 @@ yarn-error.log !.yarn/sdks !.yarn/versions -/dist -# IDE -.cursor +/dist \ No newline at end of file From 6f404e3e8fa5be11c941f5b0f201a378370ff447 Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Thu, 19 Mar 2026 09:44:17 -0400 Subject: [PATCH 4/5] refactor(ENG-10153): rewrite CLAUDE.md with repo-specific gotchas and architecture Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index baa529f..4e5ad24 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,35 +1,42 @@ # React Native Elements -React Native SDK for Basis Theory Elements — provides React Native components for secure data collection on mobile. +React Native SDK for secure data collection on mobile (iOS + Android). -## Development Workflow +## Build & Test ```bash yarn install -yarn build # Build the package (uses bob + prepare script) +yarn build # bob build + prepare.js (creates dist/) +yarn test # Jest unit tests +yarn lint # ESLint +npx jest --testPathPattern="" # Targeted test ``` -## Testing +Always verify fixes with targeted tests before considering done. -```bash -yarn lint # ESLint -yarn lint:fix # Auto-fix -yarn test # Unit tests (Jest) -npx jest --testPathPattern="" # Targeted test -``` +## Project Structure -## Feedback Loops +- `src/` — Library source (TypeScript) +- `tests/` — Unit tests (Jest + @testing-library/react-native) +- `demo/` — Demo app +- `dist/` — Build output (published to npm) +- `prepare.js` — Post-build script that creates `dist/package.json` (strips devDeps, rewrites paths) -Run `npx jest --testPathPattern=""` for targeted test feedback. +## Gotchas -When a failing test is discovered, always verify it passes using the appropriate feedback loop before considering the fix complete. +- **`yarn` not `npm`**: Package manager is yarn. Uses `yarn.lock`. +- **react-native-builder-bob**: Build tool (`bob build`), outputs to `dist/{commonjs,module,typescript}`. Configured in `package.json` under `"react-native-builder-bob"`. +- **`prepare.js` is critical**: Runs after `bob build` to create the publishable `dist/package.json`. It strips devDependencies and rewrites `main`/`module`/`types` paths. Breaking this breaks npm publish. +- **Publishing from `dist/`**: `cd dist && npm publish` — the dist directory is a self-contained package. +- **Version `0.0.0` in source**: `package.json` version is always `0.0.0`. CI bumps it via `make update-version` before publish. +- **Release triggered by GitHub Release**: Not on push to master — release workflow fires on `release: [released]` event. +- **Peer deps**: `react` and `react-native` are peer dependencies. Tests use specific pinned versions in devDeps. +- **Resolution overrides**: Several `resolutions` in package.json for transitive dependency issues — check before upgrading deps. -## Standards & Conventions +## Release -- TypeScript, React Native, Jest for testing -- `yarn` for package management -- Uses `react-native-builder-bob` for building +Triggered by creating a GitHub Release. CI runs `make update-version`, `make build`, then `cd dist && npm publish`. Published as `@basis-theory/react-native-elements`. -## Links +## Docs -- [React Native Elements docs](https://developers.basistheory.com/docs/sdks/mobile/react-native/) +- [React Native Elements SDK](https://developers.basistheory.com/docs/sdks/mobile/react-native/) From c4bfee7325a385fba8b2360a20563d540e714358 Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Thu, 19 Mar 2026 12:18:56 -0400 Subject: [PATCH 5/5] refactor(ENG-10153): rename to AGENTS.md for model-agnostic tooling, source from CLAUDE.md Co-Authored-By: Claude Opus 4.6 (1M context) --- AGENTS.md | 42 ++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 43 +------------------------------------------ 2 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..4e5ad24 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,42 @@ +# React Native Elements + +React Native SDK for secure data collection on mobile (iOS + Android). + +## Build & Test + +```bash +yarn install +yarn build # bob build + prepare.js (creates dist/) +yarn test # Jest unit tests +yarn lint # ESLint +npx jest --testPathPattern="" # Targeted test +``` + +Always verify fixes with targeted tests before considering done. + +## Project Structure + +- `src/` — Library source (TypeScript) +- `tests/` — Unit tests (Jest + @testing-library/react-native) +- `demo/` — Demo app +- `dist/` — Build output (published to npm) +- `prepare.js` — Post-build script that creates `dist/package.json` (strips devDeps, rewrites paths) + +## Gotchas + +- **`yarn` not `npm`**: Package manager is yarn. Uses `yarn.lock`. +- **react-native-builder-bob**: Build tool (`bob build`), outputs to `dist/{commonjs,module,typescript}`. Configured in `package.json` under `"react-native-builder-bob"`. +- **`prepare.js` is critical**: Runs after `bob build` to create the publishable `dist/package.json`. It strips devDependencies and rewrites `main`/`module`/`types` paths. Breaking this breaks npm publish. +- **Publishing from `dist/`**: `cd dist && npm publish` — the dist directory is a self-contained package. +- **Version `0.0.0` in source**: `package.json` version is always `0.0.0`. CI bumps it via `make update-version` before publish. +- **Release triggered by GitHub Release**: Not on push to master — release workflow fires on `release: [released]` event. +- **Peer deps**: `react` and `react-native` are peer dependencies. Tests use specific pinned versions in devDeps. +- **Resolution overrides**: Several `resolutions` in package.json for transitive dependency issues — check before upgrading deps. + +## Release + +Triggered by creating a GitHub Release. CI runs `make update-version`, `make build`, then `cd dist && npm publish`. Published as `@basis-theory/react-native-elements`. + +## Docs + +- [React Native Elements SDK](https://developers.basistheory.com/docs/sdks/mobile/react-native/) diff --git a/CLAUDE.md b/CLAUDE.md index 4e5ad24..43c994c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,42 +1 @@ -# React Native Elements - -React Native SDK for secure data collection on mobile (iOS + Android). - -## Build & Test - -```bash -yarn install -yarn build # bob build + prepare.js (creates dist/) -yarn test # Jest unit tests -yarn lint # ESLint -npx jest --testPathPattern="" # Targeted test -``` - -Always verify fixes with targeted tests before considering done. - -## Project Structure - -- `src/` — Library source (TypeScript) -- `tests/` — Unit tests (Jest + @testing-library/react-native) -- `demo/` — Demo app -- `dist/` — Build output (published to npm) -- `prepare.js` — Post-build script that creates `dist/package.json` (strips devDeps, rewrites paths) - -## Gotchas - -- **`yarn` not `npm`**: Package manager is yarn. Uses `yarn.lock`. -- **react-native-builder-bob**: Build tool (`bob build`), outputs to `dist/{commonjs,module,typescript}`. Configured in `package.json` under `"react-native-builder-bob"`. -- **`prepare.js` is critical**: Runs after `bob build` to create the publishable `dist/package.json`. It strips devDependencies and rewrites `main`/`module`/`types` paths. Breaking this breaks npm publish. -- **Publishing from `dist/`**: `cd dist && npm publish` — the dist directory is a self-contained package. -- **Version `0.0.0` in source**: `package.json` version is always `0.0.0`. CI bumps it via `make update-version` before publish. -- **Release triggered by GitHub Release**: Not on push to master — release workflow fires on `release: [released]` event. -- **Peer deps**: `react` and `react-native` are peer dependencies. Tests use specific pinned versions in devDeps. -- **Resolution overrides**: Several `resolutions` in package.json for transitive dependency issues — check before upgrading deps. - -## Release - -Triggered by creating a GitHub Release. CI runs `make update-version`, `make build`, then `cd dist && npm publish`. Published as `@basis-theory/react-native-elements`. - -## Docs - -- [React Native Elements SDK](https://developers.basistheory.com/docs/sdks/mobile/react-native/) +@AGENTS.md