@rudra-js/react 0.8.0 → 0.8.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.
Files changed (2) hide show
  1. package/README.md +12 -1
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -22,13 +22,24 @@ still reads it.
22
22
  ## Install
23
23
 
24
24
  ```sh
25
- npm install @rudra-js/react @rudra-js/core @rudra-js/attested react
25
+ npm install @rudra-js/react@latest @rudra-js/core@latest @rudra-js/attested@latest react react-dom
26
26
  ```
27
27
 
28
+ Run the same command in a new app, in one that already uses rudra-js, and to upgrade. If your app
29
+ has `@rudra-js/anthropic`, add it to the command with `@latest` too. If it has `@rudra-js/a2ui`, use
30
+ the install line in that package's README instead, since it also names the two A2UI packages. The
31
+ `@rudra-js` packages are published together, and each one's peer ranges on the others start at its
32
+ own version. For a bare name npm stays inside the range your `package.json` already has, so without
33
+ `@latest` an app on an older core can get an `ERESOLVE`. `react` and `react-dom` carry no version,
34
+ so npm and pnpm keep a React 18 app on 18. Name both: npm moves each to the newest release in its
35
+ range, and React 19 won't load `react-dom` at a different version from `react`.
36
+
28
37
  Both `@rudra-js/core` and `react` are peer dependencies. The specification you pass in comes from
29
38
  your copy of core, and the elements this renders have to come from the same React your app renders.
30
39
  With two copies of either, you'd get a spec that fails its own type check, or a component tree React
31
40
  refuses to render. `@rudra-js/attested` is core's peer: npm and pnpm add it for you, Yarn doesn't.
41
+ Yarn does move a bare name to its latest version, so leave out `react` and `react-dom` if your app
42
+ already has React.
32
43
 
33
44
  ```tsx
34
45
  import { RudraComponent } from '@rudra-js/react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rudra-js/react",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "React renderer for rudra-js: renders an LLM-designed product-recommendation block from your own catalog, on the server or in the browser",
5
5
  "keywords": [
6
6
  "rudra-js",
@@ -54,11 +54,11 @@
54
54
  "access": "public"
55
55
  },
56
56
  "peerDependencies": {
57
- "@rudra-js/core": "^0.8.0",
57
+ "@rudra-js/core": "^0.8.2",
58
58
  "react": "^18.2.0 || ^19.0.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@rudra-js/core": "0.8.0",
61
+ "@rudra-js/core": "0.8.2",
62
62
  "@types/react": "^19.3.0",
63
63
  "@types/react-dom": "^19.3.0",
64
64
  "react": "^19.3.0",