Skip to content

feat: Node-API engine support #10710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/ui/gestures/index.android.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Definitions.
import { GestureEventData, TapGestureEventData, SwipeGestureEventData, PanGestureEventData, RotationGestureEventData, GestureEventDataWithState } from '.';
import { View } from '../core/view';
import type { View } from '../core/view';
import { EventData } from '../../data/observable';

// Types.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/ui/gestures/index.ios.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Definitions.

import { GestureEventData, TapGestureEventData, GestureEventDataWithState, SwipeGestureEventData, PanGestureEventData, RotationGestureEventData, PinchGestureEventData } from '.';
import { View } from '../core/view';
import type { View } from '../core/view';
import { EventData } from '../../data/observable';

// Types.
Expand Down
4 changes: 2 additions & 2 deletions packages/core/ui/gestures/touch-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { GestureEventData, GestureEventDataWithState, TouchGestureEventData } from '.';
import { Animation } from '../animation';
import { AnimationDefinition } from '../animation/animation-interfaces';
import { View } from '../core/view';
import type { View } from '../core/view';
import { isObject, isFunction } from '../../utils/types';
import { GestureEvents, GestureStateTypes, GestureTypes } from './gestures-common';

Expand Down Expand Up @@ -169,7 +169,7 @@ export class TouchManager {
}
}

view.on(View.disposeNativeViewEvent, (args) => {
view.on('disposeNativeView', (args) => {
const index = TouchManager.touchHandlers?.findIndex((handler) => handler.view === args.object);
if (index > -1) {
TouchManager.touchHandlers.splice(index, 1);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/ui/styling/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class Style extends Observable implements StyleDefinition {
super();

// HACK: Could not find better way for cross platform WeakRef type checking.
if (ownerView.constructor.toString().indexOf('[native code]') !== -1) {
if (ownerView.constructor.toString().indexOf('[native code]') !== -1 || ownerView.toString() == '[object WeakRef]') {
this.viewRef = <WeakRef<ViewBase>>ownerView;
} else {
this.viewRef = new WeakRef(<ViewBase>ownerView);
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack5/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ if (module.hot) {
},
};

const checkAndApply = async () => {
// Important: Keep as function and not fat arrow; at the moment hermes does not support them
const checkAndApply = async function () {
hash = __webpack_require__.h();
const modules = await module.hot.check().catch((error) => {
return setStatus(
hash,
'failure',
'Failed to check.',
error.message || error.stack
error.message || error.stack,
);
});

Expand All @@ -82,7 +83,7 @@ if (module.hot) {
hash,
'failure',
'Failed to apply.',
error.message || error.stack
error.message || error.stack,
);
});

Expand Down
Loading