dinou 2.0.2 → 2.0.3

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/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [2.0.3]
9
+
10
+ ### Fixed
11
+
12
+ - Fixed cross-platform path handling using Node.js `path` module for macOS/Linux compatibility in `get-jsx.js`, `get-error-jsx.js`, and `build-static-pages.js`.
13
+ - Added `awaitWriteFinish` to `chokidar` in `server.js` to avoid parsing incomplete manifest files on macOS.
14
+
15
+ ## [2.0.2]
16
+
17
+ ### Fixed
18
+
19
+ - Watch server components in react manifest plugin.
20
+
21
+ ## [2.0.1]
22
+
23
+ ### Fixed
24
+
25
+ - Use createFromFetch from react-server-dom-esm in client-error.jsx.
26
+
8
27
  ## [2.0.0]
9
28
 
10
29
  ### Changed
@@ -357,7 +357,7 @@ async function buildStaticPages() {
357
357
  const updatedSlots = {};
358
358
  for (const [slotName, slotElement] of Object.entries(slots)) {
359
359
  const slotFolder = path.join(
360
- layoutPath.split("\\").slice(0, -1).join("\\"),
360
+ path.dirname(layoutPath),
361
361
  `@${slotName}`
362
362
  );
363
363
  const [slotPath] = getFilePathAndDynamicParams(
@@ -58,10 +58,10 @@ function getErrorJSX(reqPath, query, error) {
58
58
  });
59
59
 
60
60
  const noLayoutErrorPath = path.join(
61
- pagePath.split("\\").slice(0, -1).join("\\"),
61
+ path.dirname(pagePath),
62
62
  `no_layout_error`
63
63
  );
64
- if (existsSync(path.resolve(process.cwd(), `${noLayoutErrorPath}`))) {
64
+ if (existsSync(noLayoutErrorPath)) {
65
65
  return jsx;
66
66
  }
67
67
 
package/dinou/get-jsx.js CHANGED
@@ -55,11 +55,13 @@ async function getJSX(reqPath, query) {
55
55
  params: dParams ?? {},
56
56
  query,
57
57
  });
58
+
59
+ const notFoundDir = path.dirname(notFoundPath);
58
60
  const noLayoutNotFoundPath = path.join(
59
- notFoundPath.split("\\").slice(0, -1).join("\\"),
61
+ notFoundDir,
60
62
  `no_layout_not_found`
61
63
  );
62
- if (existsSync(path.resolve(process.cwd(), `${noLayoutNotFoundPath}`))) {
64
+ if (existsSync(noLayoutNotFoundPath)) {
63
65
  return jsx;
64
66
  }
65
67
  }
@@ -71,7 +73,8 @@ async function getJSX(reqPath, query) {
71
73
  params: dynamicParams,
72
74
  query,
73
75
  };
74
- const pageFolder = pagePath.split("\\").slice(0, -1).join("\\");
76
+
77
+ const pageFolder = path.dirname(pagePath);
75
78
  const [pageFunctionsPath] = getFilePathAndDynamicParams(
76
79
  reqSegments,
77
80
  query,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dinou",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Minimal React 19 Framework",
5
5
  "main": "index.js",
6
6
  "bin": {