Skip to content

Commit 630794e

Browse files
committed
refactor: rename hooks package to plugins
1 parent 7b9d351 commit 630794e

22 files changed

Lines changed: 128 additions & 22 deletions

actions/shared/index.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4208,7 +4208,7 @@ var coerce = {
42084208
};
42094209
var NEVER = INVALID;
42104210

4211-
// ../hooks/dist/utils.js
4211+
// ../plugins/dist/utils.js
42124212
var isHookTree = (value) => {
42134213
if (value == null || typeof value !== "object" || Array.isArray(value)) {
42144214
return false;
@@ -4227,7 +4227,7 @@ var isHookTree = (value) => {
42274227
return true;
42284228
};
42294229

4230-
// ../hooks/dist/plugin.js
4230+
// ../plugins/dist/plugin.js
42314231
var isHarnessPlugin = (value) => {
42324232
if (value == null || typeof value !== "object" || Array.isArray(value)) {
42334233
return false;

packages/config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
},
1717
"dependencies": {
18-
"@react-native-harness/hooks": "workspace:*",
18+
"@react-native-harness/plugins": "workspace:*",
1919
"@react-native-harness/tools": "workspace:*",
2020
"tslib": "^2.3.0",
2121
"zod": "^3.25.67"

packages/config/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { z } from 'zod';
2-
import type { HarnessPlugin } from '@react-native-harness/hooks';
3-
import { isHarnessPlugin } from '@react-native-harness/hooks';
2+
import type { HarnessPlugin } from '@react-native-harness/plugins';
3+
import { isHarnessPlugin } from '@react-native-harness/plugins';
44

55
export const DEFAULT_METRO_PORT = 8081;
66

packages/config/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"path": "../tools"
88
},
99
{
10-
"path": "../hooks"
10+
"path": "../plugins"
1111
},
1212
{
1313
"path": "./tsconfig.lib.json"

packages/config/tsconfig.lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"path": "../tools/tsconfig.lib.json"
1616
},
1717
{
18-
"path": "../hooks/tsconfig.lib.json"
18+
"path": "../plugins/tsconfig.lib.json"
1919
}
2020
]
2121
}

packages/jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@react-native-harness/bridge": "workspace:*",
3838
"@react-native-harness/bundler-metro": "workspace:*",
3939
"@react-native-harness/config": "workspace:*",
40-
"@react-native-harness/hooks": "workspace:*",
40+
"@react-native-harness/plugins": "workspace:*",
4141
"@react-native-harness/platforms": "workspace:*",
4242
"@react-native-harness/tools": "workspace:*",
4343
"chalk": "^4.1.2",

packages/jest/src/__tests__/harness.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { EventEmitter } from 'node:events';
22
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
33
import type { Config as HarnessConfig } from '@react-native-harness/config';
4-
import { definePlugin } from '@react-native-harness/hooks';
4+
import { definePlugin } from '@react-native-harness/plugins';
55
import type {
66
AppMonitor,
77
AppMonitorEvent,
@@ -551,8 +551,8 @@ describe('restart(testFilePath)', () => {
551551
});
552552
});
553553

554-
describe('plugin hooks', () => {
555-
it('invokes lifecycle and runtime hooks for configured plugins', async () => {
554+
describe('plugins', () => {
555+
it('invokes lifecycle and runtime plugin handlers for configured plugins', async () => {
556556
const { serverBridge, emitReady, emitEvent, emitDisconnect } =
557557
createBridgeServer();
558558
const appMonitor = createAppMonitor();

packages/jest/src/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
type HarnessPluginManager,
3131
type HarnessRunStatus,
3232
type HarnessRunSummary,
33-
} from '@react-native-harness/hooks';
33+
} from '@react-native-harness/plugins';
3434
import {
3535
InitializationTimeoutError,
3636
StartupStallError,

packages/jest/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"path": "../platforms"
1111
},
1212
{
13-
"path": "../hooks"
13+
"path": "../plugins"
1414
},
1515
{
1616
"path": "../config"

packages/jest/tsconfig.lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"path": "../platforms/tsconfig.lib.json"
2020
},
2121
{
22-
"path": "../hooks/tsconfig.lib.json"
22+
"path": "../plugins/tsconfig.lib.json"
2323
},
2424
{
2525
"path": "../config/tsconfig.lib.json"

0 commit comments

Comments
 (0)