@soltech/fluid-common 1.10.0-sc23736.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 +19 -3
- package/lib/index.d.ts +7 -7
- package/lib/index.js +7 -7
- package/package.json +1 -1
- package/src/index.ts +7 -7
- package/tsconfig.json +2 -1
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
|
|
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
|
|
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/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './wallet';
|
|
2
|
-
export * from './wallet-config-keys';
|
|
3
|
-
export * from './payment-methods';
|
|
4
|
-
export * from './transactions';
|
|
5
|
-
export * from './user';
|
|
6
|
-
export * from './bonus';
|
|
7
|
-
export * from './tracking';
|
|
1
|
+
export * from './wallet.js';
|
|
2
|
+
export * from './wallet-config-keys.js';
|
|
3
|
+
export * from './payment-methods.js';
|
|
4
|
+
export * from './transactions.js';
|
|
5
|
+
export * from './user.js';
|
|
6
|
+
export * from './bonus.js';
|
|
7
|
+
export * from './tracking.js';
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './wallet';
|
|
2
|
-
export * from './wallet-config-keys';
|
|
3
|
-
export * from './payment-methods';
|
|
4
|
-
export * from './transactions';
|
|
5
|
-
export * from './user';
|
|
6
|
-
export * from './bonus';
|
|
7
|
-
export * from './tracking';
|
|
1
|
+
export * from './wallet.js';
|
|
2
|
+
export * from './wallet-config-keys.js';
|
|
3
|
+
export * from './payment-methods.js';
|
|
4
|
+
export * from './transactions.js';
|
|
5
|
+
export * from './user.js';
|
|
6
|
+
export * from './bonus.js';
|
|
7
|
+
export * from './tracking.js';
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './wallet';
|
|
2
|
-
export * from './wallet-config-keys';
|
|
3
|
-
export * from './payment-methods';
|
|
4
|
-
export * from './transactions';
|
|
5
|
-
export * from './user';
|
|
6
|
-
export * from './bonus';
|
|
7
|
-
export * from './tracking';
|
|
1
|
+
export * from './wallet.js';
|
|
2
|
+
export * from './wallet-config-keys.js';
|
|
3
|
+
export * from './payment-methods.js';
|
|
4
|
+
export * from './transactions.js';
|
|
5
|
+
export * from './user.js';
|
|
6
|
+
export * from './bonus.js';
|
|
7
|
+
export * from './tracking.js';
|