Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWangJustToDo committed Dec 14, 2023
1 parent 29a2fb0 commit 81b92f7
Show file tree
Hide file tree
Showing 20 changed files with 138 additions and 106 deletions.
6 changes: 3 additions & 3 deletions packages/myreact-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@
"react-dom client"
],
"devDependencies": {
"@my-react/react-shared": "^0.2.5",
"@my-react/react-reconciler": "^0.2.5"
"@my-react/react-shared": "^0.2.8",
"@my-react/react-reconciler": "^0.2.8"
},
"peerDependencies": {
"@my-react/react": ">=0.2.5"
"@my-react/react": ">=0.2.8"
}
}
4 changes: 3 additions & 1 deletion packages/myreact-dom/src/client/api/create/hydrateCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export const hydrateCreate = (fiber: MyReactFiberNode, parentFiberWithDom: MyRea
if (include(fiber.type, NODE_TYPE.__text__ | NODE_TYPE.__plain__ | NODE_TYPE.__comment__)) {
const maybeContainer = parentFiberWithDom as MyReactFiberContainer;

const parentDom = (parentFiberWithDom.nativeNode || maybeContainer.containerNode) as DomElement;
const parentDom = (parentFiberWithDom?.nativeNode || maybeContainer?.containerNode) as DomElement;

if (!parentDom) throw new Error('[@my-react/react-dom] hydrate error, parent dom not found');

const result = getHydrateDom(fiber, parentDom, previousDom);

Expand Down
1 change: 1 addition & 0 deletions packages/myreact-dom/src/shared/elementMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { ServerDomDispatch, LegacyServerStreamDispatch } from "@my-react-do

/**
* @internal
* TODO
*/
export const initialElementMap = (_fiber: MyReactFiberNode, _dispatch: ClientDomDispatch | ServerDomDispatch | LegacyServerStreamDispatch) => {
let isSVG = _fiber.elementType === "svg";
Expand Down
4 changes: 2 additions & 2 deletions packages/myreact-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
]
},
"devDependencies": {
"@my-react/react-shared": "^0.2.5"
"@my-react/react-shared": "^0.2.8"
},
"peerDependencies": {
"@my-react/react": ">=0.2.5"
"@my-react/react": ">=0.2.8"
}
}
4 changes: 2 additions & 2 deletions packages/myreact-reactivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
]
},
"devDependencies": {
"@my-react/react-shared": "^0.2.5"
"@my-react/react-shared": "^0.2.8"
},
"peerDependencies": {
"@my-react/react": ">=0.2.5"
"@my-react/react": ">=0.2.8"
}
}
4 changes: 2 additions & 2 deletions packages/myreact-reconciler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
]
},
"devDependencies": {
"@my-react/react-shared": "^0.2.5"
"@my-react/react-shared": "^0.2.8"
},
"peerDependencies": {
"@my-react/react": ">=0.2.5"
"@my-react/react": ">=0.2.8"
}
}
4 changes: 2 additions & 2 deletions packages/myreact-refresh-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
}
],
"devDependencies": {
"@my-react/react-shared": "^0.2.5"
"@my-react/react-shared": "^0.2.8"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
}
},
"peerDependencies": {
"@my-react/react-refresh": ">=0.2.5",
"@my-react/react-refresh": ">=0.2.8",
"webpack": "^4 || ^5"
}
}
2 changes: 1 addition & 1 deletion packages/myreact-refresh-tools/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { compareVersion } from "@my-react/react-shared";

import RefreshHelpers from "./internal/helpers";

if (!RefreshRuntime.version || !compareVersion(RefreshRuntime.version, "0.2.5")) {
if (!RefreshRuntime.version || !compareVersion(RefreshRuntime.version, "0.2.8")) {
console.error(
`[@my-react/react-refresh-tools] current RefreshRuntime version not match for the package required, please reinstall "@my-react/react-refresh" to fix this issue`
);
Expand Down
8 changes: 4 additions & 4 deletions packages/myreact-refresh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
}
],
"devDependencies": {
"@my-react/react-shared": "^0.2.5",
"@my-react/react-reconciler": "^0.2.5"
"@my-react/react-shared": "^0.2.8",
"@my-react/react-reconciler": "^0.2.8"
},
"peerDependencies": {
"@my-react/react": ">=0.2.5",
"@my-react/react-dom": ">=0.2.5"
"@my-react/react": ">=0.2.8",
"@my-react/react-dom": ">=0.2.8"
}
}
2 changes: 1 addition & 1 deletion packages/myreact-shared/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const compareVersion = (version1: string, version2: string) => {
}
if (arr1.length) return true;
if (arr2.length) return false;
return null;
return true;
};

return compare(version1.split(".").map(Number), version2.split(".").map(Number));
Expand Down
6 changes: 3 additions & 3 deletions packages/myreact-terminal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
"yoga-wasm-web": "^0.3.3"
},
"devDependencies": {
"@my-react/react-shared": "^0.2.5",
"@my-react/react-reconciler": "^0.2.5",
"@my-react/react-shared": "^0.2.8",
"@my-react/react-reconciler": "^0.2.8",
"@types/lodash": "^4.14.195",
"@types/signal-exit": "^3.0.1",
"@types/slice-ansi": "^5.0.0",
"@types/stack-utils": "^2.0.1",
"@types/wrap-ansi": "^8.0.1"
},
"peerDependencies": {
"@my-react/react": ">=0.2.5"
"@my-react/react": ">=0.2.8"
}
}
2 changes: 1 addition & 1 deletion packages/myreact-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
],
"peerDependencies": {
"@my-react/react-refresh": ">=0.2.5",
"@my-react/react-refresh": ">=0.2.8",
"vite": "^4.2.0 || ^5.0.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/myreact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"react like"
],
"dependencies": {
"@my-react/react-jsx": "^0.2.5"
"@my-react/react-jsx": "^0.2.8"
},
"devDependencies": {
"@my-react/react-shared": "^0.2.5"
"@my-react/react-shared": "^0.2.8"
}
}
Loading

0 comments on commit 81b92f7

Please sign in to comment.