jest-expo 55.0.0-canary-20251120-e46b3cc → 55.0.0-canary-20251205-756eb7a
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-expo",
|
|
3
|
-
"version": "55.0.0-canary-
|
|
3
|
+
"version": "55.0.0-canary-20251205-756eb7a",
|
|
4
4
|
"description": "A Jest preset to painlessly test your Expo / React Native apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"preset": "jest-expo/universal"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@expo/config": "12.0.
|
|
41
|
-
"@expo/json-file": "10.0.
|
|
40
|
+
"@expo/config": "12.0.12-canary-20251205-756eb7a",
|
|
41
|
+
"@expo/json-file": "10.0.9-canary-20251205-756eb7a",
|
|
42
42
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
43
43
|
"@jest/globals": "^29.2.1",
|
|
44
44
|
"babel-jest": "^29.2.1",
|
|
@@ -48,13 +48,21 @@
|
|
|
48
48
|
"jest-watch-typeahead": "2.2.1",
|
|
49
49
|
"json5": "^2.2.3",
|
|
50
50
|
"lodash": "^4.17.19",
|
|
51
|
-
"react-server-dom-webpack": "~19.0.0",
|
|
52
51
|
"react-test-renderer": "19.2.0",
|
|
53
52
|
"server-only": "^0.0.1",
|
|
54
53
|
"stacktrace-js": "^2.0.2"
|
|
55
54
|
},
|
|
56
55
|
"peerDependencies": {
|
|
57
|
-
"expo": "55.0.0-canary-
|
|
58
|
-
"react-native": "*"
|
|
56
|
+
"expo": "55.0.0-canary-20251205-756eb7a",
|
|
57
|
+
"react-native": "*",
|
|
58
|
+
"react-server-dom-webpack": "~19.0.1 || ~19.1.2 || ~19.2.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"react-server-dom-webpack": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"react-server-dom-webpack": "~19.0.1"
|
|
59
67
|
}
|
|
60
68
|
}
|
package/src/filePath.js
ADDED
|
@@ -435,7 +435,7 @@ module.exports = {
|
|
|
435
435
|
{ name: 'uploadTaskStartAsync', argumentsCount: 4, key: 'uploadTaskStartAsync' },
|
|
436
436
|
{ name: 'writeAsStringAsync', argumentsCount: 3, key: 'writeAsStringAsync' },
|
|
437
437
|
],
|
|
438
|
-
|
|
438
|
+
ExpoGL: [],
|
|
439
439
|
ExponentGyroscope: [
|
|
440
440
|
{ name: 'isAvailableAsync', argumentsCount: 0, key: 'isAvailableAsync' },
|
|
441
441
|
{ name: 'setUpdateInterval', argumentsCount: 1, key: 'setUpdateInterval' },
|
|
@@ -1112,7 +1112,7 @@ module.exports = {
|
|
|
1112
1112
|
uploadTaskStartAsync: { type: 'function' },
|
|
1113
1113
|
writeAsStringAsync: { type: 'function' },
|
|
1114
1114
|
},
|
|
1115
|
-
|
|
1115
|
+
ExpoGL: {
|
|
1116
1116
|
addListener: { type: 'function' },
|
|
1117
1117
|
removeListeners: { type: 'function' },
|
|
1118
1118
|
},
|
|
@@ -1454,7 +1454,7 @@ module.exports = {
|
|
|
1454
1454
|
ExpoLivePhoto: {
|
|
1455
1455
|
propNames: ['contentFit', 'isMuted', 'source', 'useDefaultGestureRecognizer'],
|
|
1456
1456
|
},
|
|
1457
|
-
|
|
1457
|
+
ExpoGL: { propNames: ['enableExperimentalWorkletSupport', 'msaaSamples'] },
|
|
1458
1458
|
ExpoRouterNativeLinkPreview: {
|
|
1459
1459
|
propNames: [
|
|
1460
1460
|
'destructive',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const JsonFile = require('@expo/json-file');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
+
const { toPosixPath } = require('../filePath');
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Convert typescript paths to jest module mapping.
|
|
6
8
|
*
|
|
@@ -46,7 +48,7 @@ function convertTypescriptMatchToJestRegex(match) {
|
|
|
46
48
|
/** Convert a typescript match rule value to jest regex target */
|
|
47
49
|
function convertTypescriptTargetToJestTarget(target, prefix = '<rootDir>') {
|
|
48
50
|
const segments = target.split('/').map((segment) => (segment.trim() === '*' ? '$1' : segment));
|
|
49
|
-
return [prefix, ...segments].join(
|
|
51
|
+
return toPosixPath([prefix, ...segments].join(path.sep));
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
function mutateJestMappingFromConfig(jestConfig, configFile) {
|
package/src/rsc-utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { toPosixPath } from './filePath';
|
|
3
4
|
|
|
4
5
|
export const streamToString = async (stream) => {
|
|
5
6
|
const decoder = new TextDecoder();
|
|
@@ -38,6 +39,7 @@ export async function renderJsxToFlightStringAsync(jsx, throwOnError = true) {
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export function renderJsxToReadableStream(jsx, { onError } = {}) {
|
|
42
|
+
const { renderToReadableStream } = require('react-server-dom-webpack/server');
|
|
41
43
|
const clientBoundaries = [];
|
|
42
44
|
const bundlerConfig = new Proxy(
|
|
43
45
|
{},
|
|
@@ -48,9 +50,11 @@ export function renderJsxToReadableStream(jsx, { onError } = {}) {
|
|
|
48
50
|
return {
|
|
49
51
|
// HACK: To keep tests somewhat agnostic to the runtime environment, we'll make them relative to
|
|
50
52
|
// the current working directory. It'd be better to have a stable value to test against though.
|
|
51
|
-
id:
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
id: toPosixPath(
|
|
54
|
+
path.relative(
|
|
55
|
+
process.cwd(),
|
|
56
|
+
file.startsWith('file://') ? decodeURI(file.slice(7)) : file
|
|
57
|
+
)
|
|
54
58
|
),
|
|
55
59
|
chunks: [],
|
|
56
60
|
name,
|