Skip to content

Commit 506f3ce

Browse files
authored
Revert "chore: upgrade preact (#1349)"
This reverts commit 9bb1dda.
1 parent 92445ad commit 506f3ce

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
"api-extractor": "api-extractor run --verbose"
175175
},
176176
"dependencies": {
177-
"preact": "npm:@hongzhiyuan/[email protected]3d3cc198"
177+
"preact": "npm:@hongzhiyuan/[email protected]319c684e"
178178
},
179179
"devDependencies": {
180180
"@lynx-js/types": "3.3.0",

packages/react/runtime/src/debug/component-stack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ export function setupComponentStack(): void {
147147
if (oldDiffed) oldDiffed(vnode);
148148
};
149149

150-
options[DIFF] = (vnode, oldVNode) => {
150+
options[DIFF] = vnode => {
151151
if (isPossibleOwner(vnode)) {
152152
renderStack.push(vnode);
153153
}
154-
if (oldDiff) oldDiff(vnode, oldVNode);
154+
if (oldDiff) oldDiff(vnode);
155155
};
156156

157157
options[ROOT] = (vnode, parent) => {

packages/react/runtime/src/debug/profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import { getDisplayName } from '../utils.js';
99

1010
export function initProfileHook(): void {
1111
const oldDiff = options[DIFF];
12-
options[DIFF] = function(vnode: VNode, oldVNode: VNode) {
12+
options[DIFF] = function(vnode: VNode) {
1313
// This __PROFILE__ is used for DCE testing
1414
if (__PROFILE__ && typeof vnode.type === 'function') {
1515
// We only add profiling trace for Component
1616
console.profile(`diff::${getDisplayName(vnode.type as ComponentClass)}`);
1717
}
18-
oldDiff?.(vnode, oldVNode);
18+
oldDiff?.(vnode);
1919
};
2020
const oldDiffed = options[DIFFED];
2121
options[DIFFED] = function(vnode) {

packages/react/runtime/src/lynx/performance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function markTiming(timestampKey: typeof PerformanceTimingKeys[number], force?:
117117

118118
function initTimingAPI(): void {
119119
const oldDiff = options[DIFF];
120-
options[DIFF] = (vnode: VNode, oldVNode: VNode) => {
120+
options[DIFF] = (vnode: VNode) => {
121121
// check `__globalSnapshotPatch` to make sure this only runs after hydrate
122122
if (__JS__ && __globalSnapshotPatch) {
123123
if (!globalPipelineOptions) {
@@ -128,7 +128,7 @@ function initTimingAPI(): void {
128128
markTimingLegacy('updateDiffVdomStart');
129129
}
130130
}
131-
oldDiff?.(vnode, oldVNode);
131+
oldDiff?.(vnode);
132132
};
133133
}
134134

packages/react/runtime/src/lynx/runWithForce.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export function runWithForce(cb: () => void): void {
1616

1717
const oldDiff = options[DIFF];
1818

19-
options[DIFF] = (vnode: PatchedVNode, oldVNode) => {
19+
options[DIFF] = (vnode: PatchedVNode) => {
2020
if (oldDiff) {
21-
oldDiff(vnode, oldVNode);
21+
oldDiff(vnode);
2222
}
2323

2424
// when `options[DIFF]` is called, a newVnode is passed in

packages/react/runtime/types/internal-preact.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'preact';
66
declare module 'preact' {
77
interface Options {
88
/** _diff */
9-
__b?(vnode: VNode, oldVNode: VNode): void;
9+
__b?(vnode: VNode): void;
1010
/** _render */
1111
__r?(vnode: VNode): void;
1212
/** _commit */

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)