@soltech/fluid-common 1.10.0-beta.1 → 1.10.0-sc23736.2

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.
package/CLAUDE.md CHANGED
@@ -14,7 +14,7 @@ Read this entire file before every task.
14
14
 
15
15
  ## Project Overview & Architecture
16
16
  - TypeScript-only package containing shared interfaces and enums used by both `fluid-widget` (frontend) and `fluid-api` (API/middleware).
17
- - Source of truth is `src/index.ts`.
17
+ - Source of truth is the domain modules in `src/` (`wallet`, `wallet-config-keys`, `payment-methods`, `transactions`, `user`, `bonus`, `tracking`). `src/index.ts` only re-exports them — add a new type to the module it belongs to, never to `index.ts`.
18
18
  - Build output is generated in `lib/` and must not be edited by hand.
19
19
 
20
20
  ## Build, Dev & Validation
@@ -22,17 +22,33 @@ Read this entire file before every task.
22
22
  - Lint: `npm run lint`
23
23
  - Publish: see Publishing Flow below
24
24
 
25
+ ### Developing against a consumer
26
+
27
+ `fluid-api` and `fluid-widget` import the built `lib/`, never `src/`. To test a change without publishing:
28
+
29
+ ```bash
30
+ npm run build && npm link # here
31
+ cd ../fluid-api && npm link @soltech/fluid-common # and in each consumer
32
+ ```
33
+
34
+ Two things fail silently, with no error in either repo:
35
+
36
+ - **`lib/` goes stale.** Consumers read `lib/`, so an edit to `src/` is invisible until it is rebuilt. Keep `npm run dev` (`tsc --watch`) running while you work, or rebuild by hand after every change.
37
+ - **`npm install` in a consumer drops the link.** It replaces the symlink with the registry copy, so the consumer quietly falls back to the published version. Re-link after any install. `ls -l <consumer>/node_modules/@soltech/fluid-common` tells you which you have: a symlink, or a real directory.
38
+
25
39
  ### Publishing Flow
26
40
  The correct sequence before publishing a new version:
27
- 1. Make all code changes to `src/index.ts`.
41
+ 1. Make all code changes in `src/`.
28
42
  2. Bump `version` in `package.json`.
29
43
  3. Run `npm i` (updates `package-lock.json`).
30
- 4. Commit all changes (`src/index.ts`, `package.json`, `package-lock.json`).
44
+ 4. Commit all changes (`src/`, `package.json`, `package-lock.json`).
31
45
  5. Push the commit: `git push`.
32
46
  6. Publish to npm: `npm publish` (this runs `npm run build` first via the `pub` script, or run `npm run build && npm publish` directly).
33
47
 
34
48
  Do **not** use `npm run pub` as a single command — it pushes *after* publishing, which means npm gets the package before git has a clean commit.
35
49
 
50
+ Consumers must pin an **exact** version (`"1.10.0"`), never a caret range (`"^1.10.0"`). Branch-specific prereleases are common here, so a range can pull in a version the consumer was never tested against.
51
+
36
52
  Before final proposal on code changes:
37
53
  1. Run `npm run lint`.
38
54
  2. Run `npm run build`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "1.10.0-beta.1",
3
+ "version": "1.10.0-sc23736.2",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend, API and AI common interfaces & enums",
6
6
  "main": "lib/index.js",
package/tsconfig.json CHANGED
@@ -4,7 +4,8 @@
4
4
  "declaration": true,
5
5
  "strict": true,
6
6
  "target": "ESNext",
7
- "module": "ESNext",
7
+ "module": "NodeNext",
8
+ "moduleResolution": "NodeNext",
8
9
  "useDefineForClassFields": true,
9
10
  "lib": [
10
11
  "DOM",