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
@@ -39,8 +42,16 @@ Use these files as the release source of truth:
39
42
40
43
The SDK npm package `@smbcloud/sdk-auth` must have its version in `sdk/npm/smbcloud-auth/package.json` match the version in `crates/smbcloud-auth-sdk-wasm/Cargo.toml` exactly. The `prepare-package.mjs` script enforces this at build time and will fail CI if they diverge.
41
44
45
+
When bumping workspace crate versions for a release, also update the version constraints in the root `Cargo.toml` under `[workspace.dependencies]` so every `smbcloud-*` path dependency points at the same release version.
46
+
42
47
When bumping workspace crate versions for a release, always update `sdk/npm/smbcloud-auth/package.json` in the same commit.
43
48
49
+
The npm wrapper package is generated, but its checked-in files still need to match the release version before tagging:
50
+
51
+
- rerender `npm/smbcloud-cli/package.json` with `node ../scripts/render-main-package.cjs ./package.json <version>`
52
+
- refresh `npm/smbcloud-cli/package-lock.json` with `npm install`
53
+
- commit both files so CI and local packaging agree on the wrapper version and optional dependency versions
54
+
44
55
The same applies to the Ruby gems in `sdk/gems/`. For each gem (`auth`, `model`):
45
56
46
57
-`lib/<gem>/version.rb` — the gem version constant
@@ -66,9 +77,16 @@ Workflow:
66
77
If a tag was placed on the wrong commit (e.g. before a last-minute fix), move it:
67
78
68
79
1. Merge the fix into `development`.
69
-
2.Force-move the tag: `git tag -f v<version>`.
80
+
2.Recreate the annotated tag on the correct commit: `git tag -fa v<version> -m "v<version>"`.
70
81
3. Force-push the tag: `git push origin v<version> --force`.
71
82
83
+
When verifying the remote tag, remember that annotated tags have two refs. `git ls-remote --tags origin refs/tags/v<version>*` should show:
84
+
85
+
-`refs/tags/v<version>` — the tag object
86
+
-`refs/tags/v<version>^{}` — the peeled commit
87
+
88
+
The peeled `^{}` ref is the one that must match the intended release commit.
89
+
72
90
The `release-crate.yml` orchestrator triggers on `push.tags: "v*.*.*"`, so the force-push will re-trigger the full release chain.
73
91
74
92
## Release model
@@ -109,6 +127,7 @@ It is built from `pypi/pyproject.toml` with `maturin` and `bindings = "bin"`, so
109
127
1. Confirm npm auth with `npm whoami`.
110
128
2. Confirm the crate version in `crates/cli/Cargo.toml`.
111
129
3. Use the same version string for every npm package in that release.
130
+
4. Rerender `npm/smbcloud-cli/package.json` and refresh `npm/smbcloud-cli/package-lock.json` before tagging if the wrapper version changed.
That usually means the standalone upload succeeded, but the top-level hoisted symlink for a scoped package was not recreated on the server.
319
+
313
320
Cause:
314
321
315
322
- pnpm stores peer dependencies inside `node_modules/.pnpm/<pkg>@<version>/node_modules/<pkg>` with internal symlinks that Node's standard `require.resolve()` cannot follow
@@ -318,10 +325,15 @@ Cause:
318
325
319
326
Fix:
320
327
321
-
- the CLI deploy script now auto-hoists: after uploading standalone output, it scans `node_modules/.pnpm/*/node_modules/*` and creates symlinks at `node_modules/<pkg>` for any packages not already present
322
-
- this restores the resolution structure that pnpm normally provides via its `.pnpm/node_modules/` virtual directory
323
-
- no manual intervention needed for new deploys
324
-
- to fix a server manually: `find node_modules/.pnpm -mindepth 2 -maxdepth 2 -type d -name node_modules` and symlink each child into the root `node_modules/`
328
+
- the CLI deploy script now auto-hoists in two passes:
329
+
- first mirror pnpm's virtual directory at `node_modules/.pnpm/node_modules/*`
330
+
- then fall back to scanning `node_modules/.pnpm/*/node_modules/*` for anything still missing
331
+
- this preserves pnpm's exact resolved package choice and fixes scoped packages like `@swc/helpers` as well as unscoped ones like `styled-jsx`
332
+
- no manual intervention needed for new deploys once the updated CLI is used
333
+
- to fix a server manually, prefer pnpm's virtual directory as the source of truth:
334
+
- create `node_modules/@scope/` directories as needed
335
+
- symlink `node_modules/<pkg>` or `node_modules/@scope/<pkg>` to the corresponding entry under `node_modules/.pnpm/node_modules/`
336
+
- only if that directory is missing, scan individual `.pnpm/<store-entry>/node_modules/*` folders as a fallback
0 commit comments