bwh-auth 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -16
  2. package/package.json +18 -7
package/README.md CHANGED
@@ -5,6 +5,9 @@ Shared headless React auth components for BWH applications.
5
5
  This package owns auth-specific React behavior and browser helpers. It does not import
6
6
  or bundle a UI kit, Blade page wrappers, or application Vite entrypoints. Consumers must inject their own UI components and mount these components from app-owned pages/entrypoints.
7
7
 
8
+ The companion Laravel API package is
9
+ [`bherila/auth-laravel`](https://github.com/bherila/auth-laravel).
10
+
8
11
  ## Ownership boundary
9
12
 
10
13
  `bwh-auth` exports React components only. Laravel apps should keep their own Blade files such as `resources/views/auth/login.blade.php` and Vite entrypoints such as `resources/js/auth/login.tsx`; those app files import and mount these shared components.
@@ -22,26 +25,24 @@ or bundle a UI kit, Blade page wrappers, or application Vite entrypoints. Consum
22
25
 
23
26
  ## Install
24
27
 
25
- For app CI before npm publication, use the GitHub Release tarball. This is the recommended path because the tarball includes built `dist` files and does not require CI to build this package during dependency installation.
28
+ Install the published package from npm:
26
29
 
27
30
  ```sh
28
- pnpm add https://github.com/bherila/auth/releases/download/bwh-auth-v0.2.0/bwh-auth-0.2.0.tgz
31
+ pnpm add bwh-auth
29
32
  ```
30
33
 
31
- Or pin it manually in `package.json`:
34
+ For a deliberately pinned version:
32
35
 
33
- ```json
34
- {
35
- "dependencies": {
36
- "bwh-auth": "https://github.com/bherila/auth/releases/download/bwh-auth-v0.2.0/bwh-auth-0.2.0.tgz"
37
- }
38
- }
36
+ ```sh
37
+ pnpm add bwh-auth@0.2.0
39
38
  ```
40
39
 
40
+ Commit `pnpm-lock.yaml`; consumers do not need a GitHub tarball URL.
41
+
41
42
  When installing locally during package development, a path dependency is still useful:
42
43
 
43
44
  ```sh
44
- pnpm add bwh-auth@file:../auth/ui
45
+ pnpm add bwh-auth@file:../auth-react
45
46
  ```
46
47
 
47
48
  Install peer dependencies in the consuming app:
@@ -187,7 +188,7 @@ Passkey components default to the Laravel package routes:
187
188
 
188
189
  ## Releasing
189
190
 
190
- Create and upload a GitHub release from this package directory:
191
+ Prepare a release from this package directory:
191
192
 
192
193
  ```sh
193
194
  pnpm release
@@ -196,14 +197,16 @@ pnpm release
196
197
  The release script:
197
198
 
198
199
  - requires a clean git working tree
199
- - bumps `ui/package.json` version, defaulting to `patch`
200
+ - bumps `package.json` version, defaulting to `patch`
200
201
  - runs `pnpm install --lockfile-only`
201
202
  - runs typecheck and build
202
- - creates `ui/release/bwh-auth-VERSION.tgz`
203
+ - creates `release/bwh-auth-VERSION.tgz`
203
204
  - commits the version bump
204
- - creates and pushes a tag like `bwh-auth-v0.1.1`
205
- - creates a GitHub release with the tarball asset
206
- - prints the install URL
205
+ - creates and pushes a signed tag like `bwh-auth-v0.1.1`
206
+
207
+ The release workflow verifies the tag signature, publishes to npm through its
208
+ trusted publisher, and creates a GitHub Release with the tarball as a secondary
209
+ artifact.
207
210
 
208
211
  Version bump options:
209
212
 
package/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "bwh-auth",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Shared React auth UI and browser WebAuthn helpers for BWH applications.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
+ "packageManager": "pnpm@11.12.0",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/bherila/auth-react.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/bherila/auth-react/issues"
14
+ },
15
+ "homepage": "https://github.com/bherila/auth-react#readme",
7
16
  "main": "./dist/index.cjs",
8
17
  "module": "./dist/index.js",
9
18
  "types": "./dist/index.d.ts",
@@ -18,6 +27,12 @@
18
27
  "require": "./dist/index.cjs"
19
28
  }
20
29
  },
30
+ "scripts": {
31
+ "build": "tsup src/index.ts --format esm,cjs --dts --dts-resolve",
32
+ "release": "node scripts/release.mjs",
33
+ "typecheck": "tsc --noEmit",
34
+ "prepare": "pnpm run build"
35
+ },
21
36
  "peerDependencies": {
22
37
  "lucide-react": ">=0.468.0 <2.0.0",
23
38
  "react": "^18.3.0 || ^19.0.0",
@@ -26,15 +41,11 @@
26
41
  "devDependencies": {
27
42
  "@types/react": "^19.2.14",
28
43
  "@types/react-dom": "^19.2.3",
44
+ "esbuild": "0.28.2",
29
45
  "lucide-react": "^0.577.0",
30
46
  "react": "^19.2.6",
31
47
  "react-dom": "^19.2.6",
32
48
  "tsup": "^8.5.1",
33
49
  "typescript": "^5.9.3"
34
- },
35
- "scripts": {
36
- "build": "tsup src/index.ts --format esm,cjs --dts --dts-resolve",
37
- "release": "node scripts/release.mjs",
38
- "typecheck": "tsc --noEmit"
39
50
  }
40
- }
51
+ }