@thefittingroom/shop-ui 5.0.17 → 5.0.18

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 (3) hide show
  1. package/README.md +44 -38
  2. package/dist/index.js +3 -3
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -24,55 +24,61 @@ npm ci
24
24
  | `npm run watch-serve` | Both `watch` and `serve` together; Ctrl+C stops both |
25
25
  | `npm run gen-types` | Regenerate `src/api/gen/*.ts` from `tfr-backend` Go types |
26
26
  | `npm run promote-latest [version]` | Move npm dist-tag `latest` onto a published version (defaults to current `package.json` version) |
27
- | `npm run manual-release [patch\|minor\|major]` | Emergency local release path (rarely needed; CI handles normal releases) |
28
27
 
29
28
  ## Release process
30
29
 
31
- Releases are CI-driven. The day-to-day flow:
32
-
33
- **1. Auto-publish to `next` on every PR merge.** Open a PR, label it
34
- `patch` / `minor` / `major` / `chore` (exactly one). On merge:
35
-
36
- - `chore` workflow skips entirely (use this for docs, CI fixes,
37
- internal refactors that don't ship to consumers)
38
- - `patch` / `minor` / `major` → two-stage CI:
39
- 1. `.github/workflows/dev.yaml` bumps `package.json` and pushes the
40
- `vX.Y.Z` tag back to `main`
41
- 2. The tag push triggers `.github/workflows/publish.yaml`, which
42
- builds the SDK and publishes to npm under dist-tag `next` via
43
- [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
44
- (OIDC, no long-lived secret)
45
-
46
- The split exists because npm's OIDC trusted publishing doesn't work
47
- with `pull_request_target`-triggered workflows
48
- ([npm/cli#8739](https://github.com/npm/cli/issues/8739)). The publish
49
- has to happen in a `push`-triggered workflow, hence the two-stage
50
- chain. The npm trusted-publisher entry for `@thefittingroom/shop-ui`
51
- must point at `publish.yaml` (not `dev.yaml`).
52
-
53
- **2. Promote `next` `latest` when ready to ship.** When a `next` build
54
- has been validated and you want it to become the default install for
55
- end users, run from your local checkout (logged in to npm with publish
56
- rights to `@thefittingroom/shop-ui`):
30
+ Releases are explicit, human-initiated steps via a single GitHub Actions
31
+ workflow. No magic on PR merges.
32
+
33
+ **1. Cut a `next` release.**
34
+
35
+ - Go to https://github.com/TheFittingRoom/shop-sdk-ui/actions/workflows/release.yaml
36
+ - Click **Run workflow**
37
+ - Pick the bump type (`patch` / `minor` / `major`)
38
+ - Click **Run workflow**
39
+
40
+ The `release.yaml` workflow does everything in one run:
41
+
42
+ 1. Checks out `main`, installs deps, builds (verifies it compiles)
43
+ 2. Runs `npm version <bump>` — bumps `package.json` and creates the
44
+ `vX.Y.Z` tag
45
+ 3. Rebuilds with the new version embedded
46
+ 4. Pushes the bump commit + tag back to `main`
47
+ 5. Publishes to npm under dist-tag `next` via
48
+ [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
49
+ (OIDC, no long-lived secret) with `--provenance` for supply-chain
50
+ attestation
51
+
52
+ The npm trusted-publisher entry for `@thefittingroom/shop-ui` must
53
+ point at `release.yaml`.
54
+
55
+ > **Branch protection note:** the workflow pushes commits + tags
56
+ > directly to `main`. If you enable required-PR branch protection on
57
+ > `main` later, this push will fail until either (a) the workflow uses
58
+ > a credential listed in the branch-protection bypass list, or (b)
59
+ > branch protection allows the workflow to bypass via some other means.
60
+ > The current setup deliberately defers that complication.
61
+
62
+ **2. Promote `next` → `latest` when ready for end users.**
63
+
64
+ `release.yaml` only publishes under dist-tag `next`. To make a version
65
+ the default that consumers get from `npm install @thefittingroom/shop-ui`,
66
+ you have to explicitly promote it:
57
67
 
58
68
  ```sh
59
- git pull origin main # ensure package.json reflects the latest publish
69
+ git pull origin main # ensure package.json reflects the latest release
60
70
  npm run promote-latest # moves dist-tag latest onto current package.json version
61
71
  ```
62
72
 
63
- This runs `npm dist-tag add @thefittingroom/shop-ui@<ver> latest` — no
64
- new artifact is published; we just point the `latest` tag at the
65
- already-published `next` build, so consumers running `npm install
66
- @thefittingroom/shop-ui` get the new version.
73
+ That runs `npm dist-tag add @thefittingroom/shop-ui@<ver> latest` — no
74
+ new artifact is published; we just re-point `latest` at the already-
75
+ published `next` build. The runner needs to be logged in to npm with
76
+ publish rights to `@thefittingroom/shop-ui` (`npm whoami` to check;
77
+ `npm login` if not).
67
78
 
68
79
  To promote a specific older version: `npm run promote-latest -- 5.0.13`.
69
80
 
70
- **3. Verify the promotion** with `npm dist-tag ls @thefittingroom/shop-ui`.
71
-
72
- The `manual-release` script is kept as an emergency local fallback for
73
- when CI is unavailable; it does the version bump + git push but expects
74
- you to run `npm publish` yourself afterward (which requires you to be
75
- logged in to npm with publish rights).
81
+ **3. Verify** with `npm dist-tag ls @thefittingroom/shop-ui`.
76
82
 
77
83
  ## Local development
78
84
 
package/dist/index.js CHANGED
@@ -44077,9 +44077,9 @@ const SHARED_CONFIG = {
44077
44077
  appGooglePlayUrl: "https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace"
44078
44078
  },
44079
44079
  build: {
44080
- version: `${"5.0.17"}`,
44081
- commitHash: `${"edbce9b"}`,
44082
- date: `${"2026-05-10T18:19:05.275Z"}`
44080
+ version: `${"5.0.18"}`,
44081
+ commitHash: `${"4cc3c8d"}`,
44082
+ date: `${"2026-05-10T18:45:37.502Z"}`
44083
44083
  }
44084
44084
  };
44085
44085
  const CONFIGS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thefittingroom/shop-ui",
3
- "version": "5.0.17",
3
+ "version": "5.0.18",
4
4
  "description": "the fitting room UI library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,8 +19,7 @@
19
19
  "watch-serve": "trap 'kill 0' EXIT; npm run watch & npm run serve & wait",
20
20
  "check": "tsc --noEmit",
21
21
  "gen-types": "sh scripts/gen-types.sh",
22
- "promote-latest": "sh scripts/promote-latest.sh",
23
- "manual-release": "run() { npm run check && npm run build && npm version $1 && git push && git push --tags && npm run build && echo 'Now run npm publish' ; }; run ${1:-patch}"
22
+ "promote-latest": "sh scripts/promote-latest.sh"
24
23
  },
25
24
  "engines": {
26
25
  "node": ">=22"