@farm.js/plugin 0.1.0-beta.98 → 0.1.0-beta.99

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/dist/index.d.ts CHANGED
@@ -39,5 +39,5 @@
39
39
  * })
40
40
  * ```
41
41
  */
42
- export declare const version = "0.1.0-beta.98";
42
+ export declare const version = "0.1.0-beta.99";
43
43
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@
39
39
  * })
40
40
  * ```
41
41
  */
42
- export const version = "0.1.0-beta.98";
42
+ export const version = "0.1.0-beta.99";
43
43
  // Note: Import plugins from their respective subpaths:
44
44
  // - @farm.js/plugin/rsc
45
45
  // - @farm.js/plugin/middleware
@@ -0,0 +1,2 @@
1
+ export declare function linkRscFixtureDependencies(root: string): void;
2
+ //# sourceMappingURL=test-fixture-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-fixture-dependencies.d.ts","sourceRoot":"","sources":["../../src/rsc/test-fixture-dependencies.ts"],"names":[],"mappings":"AAaA,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAY7D"}
@@ -0,0 +1,23 @@
1
+ import { existsSync, mkdirSync, realpathSync, symlinkSync } from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const RSC_FIXTURE_PACKAGES = [
5
+ "react",
6
+ "react-dom",
7
+ "react-server-dom-webpack",
8
+ "@vitejs/plugin-rsc",
9
+ ];
10
+ const repositoryRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../../..");
11
+ export function linkRscFixtureDependencies(root) {
12
+ for (const packageName of RSC_FIXTURE_PACKAGES) {
13
+ const source = [
14
+ path.join(repositoryRoot, "node_modules", packageName),
15
+ path.join(repositoryRoot, "examples/rsc-demo/node_modules", packageName),
16
+ ].find((candidate) => existsSync(candidate));
17
+ if (!source)
18
+ throw new Error(`Missing RSC fixture dependency: ${packageName}`);
19
+ const target = path.join(root, "node_modules", packageName);
20
+ mkdirSync(path.dirname(target), { recursive: true });
21
+ symlinkSync(realpathSync(source), target, process.platform === "win32" ? "junction" : "dir");
22
+ }
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/plugin",
3
- "version": "0.1.0-beta.98",
3
+ "version": "0.1.0-beta.99",
4
4
  "description": "Official plugins for Farm.js framework",
5
5
  "license": "MIT",
6
6
  "author": "Farm.js Team",
@@ -61,7 +61,7 @@
61
61
  "nitro": "3.0.1-alpha.0",
62
62
  "picocolors": "^1.0.0",
63
63
  "rsc-html-stream": "^0.0.4",
64
- "@farm.js/core": "0.1.0-beta.98"
64
+ "@farm.js/core": "0.1.0-beta.99"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/node": "^20.19.21",
@@ -82,7 +82,7 @@
82
82
  "react-dom": "19.2.8",
83
83
  "react-server-dom-webpack": "19.2.8",
84
84
  "vite": ">=6.0.0",
85
- "@farm.js/core": "0.1.0-beta.98"
85
+ "@farm.js/core": "0.1.0-beta.99"
86
86
  },
87
87
  "peerDependenciesMeta": {
88
88
  "@vitejs/plugin-rsc": {