@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
package/dist/index.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
85
|
+
"@farm.js/core": "0.1.0-beta.99"
|
|
86
86
|
},
|
|
87
87
|
"peerDependenciesMeta": {
|
|
88
88
|
"@vitejs/plugin-rsc": {
|