expo 58.0.0 → 58.0.2
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/android/build.gradle +2 -2
- package/android/proguard-rules.pro +4 -0
- package/android/src/main/java/expo/modules/fetch/NativeResponse.kt +5 -1
- package/android/src/main/java/expo/modules/fetch/OkHttpFileUrlInterceptor.kt +5 -1
- package/build/winter/runtime.native.js +0 -2
- package/build/winter/runtime.native.js.map +1 -1
- package/bundledNativeModules.json +76 -76
- package/ios/Expo/ExpoReactNativeFactory.swift +2 -2
- package/ios/ExpoObjC/AppDelegates/EXReactRootViewFactory.mm +16 -2
- package/ios/ExpoObjC/include/Expo/EXReactRootViewFactory.h +2 -1
- package/package.json +13 -13
- package/scripts/spm/README.md +0 -3
- package/scripts/spm/__tests__/app-target.test.js +105 -1
- package/scripts/spm/__tests__/autolink-gate.test.js +188 -0
- package/scripts/spm/__tests__/classify.test.js +17 -19
- package/scripts/spm/__tests__/cli.test.js +57 -1
- package/scripts/spm/__tests__/diagnostics.test.js +806 -183
- package/scripts/spm/__tests__/flavored-frameworks.test.js +9 -0
- package/scripts/spm/__tests__/helpers.js +88 -0
- package/scripts/spm/__tests__/manifests.test.js +1330 -104
- package/scripts/spm/__tests__/metadata.test.js +120 -0
- package/scripts/spm/__tests__/plugin.test.js +3304 -111
- package/scripts/spm/__tests__/podspec.test.js +27 -138
- package/scripts/spm/__tests__/spm-dependencies.test.js +344 -0
- package/scripts/spm/app-target.js +42 -1
- package/scripts/spm/autolink-gate.js +40 -0
- package/scripts/spm/classify.js +78 -79
- package/scripts/spm/cli.js +23 -9
- package/scripts/spm/diagnostics.js +605 -192
- package/scripts/spm/flavored-frameworks.js +231 -64
- package/scripts/spm/manifests.js +565 -196
- package/scripts/spm/metadata.js +152 -0
- package/scripts/spm/plugin.js +679 -205
- package/scripts/spm/podspec.js +57 -170
- package/src/winter/runtime.native.ts +0 -2
- package/template.tgz +0 -0
- package/build/winter/AbortSignal.d.ts +0 -3
- package/build/winter/AbortSignal.js +0 -96
- package/build/winter/AbortSignal.js.map +0 -1
- package/src/winter/AbortSignal.ts +0 -132
- package/src/winter/__tests__/AbortSignal.test.native.ts +0 -163
|
@@ -7,6 +7,7 @@ const path = require('path');
|
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
FLAVORS,
|
|
10
|
+
byteOrder,
|
|
10
11
|
prepareCompileInterfaces,
|
|
11
12
|
resolveFlavoredFramework,
|
|
12
13
|
stableFrameworkId,
|
|
@@ -54,6 +55,14 @@ function declaration(frameworkName, debug, release, overrides = {}) {
|
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
describe('byteOrder', () => {
|
|
59
|
+
// The compile-interface merge and the declaration order both run through it,
|
|
60
|
+
// and a locale-aware comparison would order these the other way around.
|
|
61
|
+
it('orders every uppercase letter before every lowercase one, as CocoaPods does', () => {
|
|
62
|
+
expect(['expo-a', 'expo-B'].sort(byteOrder)).toEqual(['expo-B', 'expo-a']);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
57
66
|
describe('validateFlavoredFramework', () => {
|
|
58
67
|
let root;
|
|
59
68
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const os = require('os');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
/** A podspec with the given body lines. */
|
|
8
|
+
const spec = (...body) => ['Pod::Spec.new do |s|', ...body, 'end', ''].join('\n');
|
|
9
|
+
|
|
10
|
+
/** A prebuilt-metadata entry: the package root and product name, plus any optional fields. */
|
|
11
|
+
const metadataEntry = (packageRoot, productName, fields = {}) => ({
|
|
12
|
+
packageRoot,
|
|
13
|
+
productName,
|
|
14
|
+
...fields,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const tempDirs = [];
|
|
18
|
+
|
|
19
|
+
/** A new directory under the OS temp dir, removed by `removeTempDirs`. */
|
|
20
|
+
function makeTempDir(prefix) {
|
|
21
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
|
22
|
+
tempDirs.push(dir);
|
|
23
|
+
return dir;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Removes every directory `makeTempDir` created. */
|
|
27
|
+
function removeTempDirs() {
|
|
28
|
+
for (const dir of tempDirs.splice(0)) {
|
|
29
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Silences console.error, console.warn and console.log for the enclosing describe
|
|
35
|
+
* and records the calls, on spies the returned object holds by method name. With
|
|
36
|
+
* `each`, the spies are replaced for every test instead of once.
|
|
37
|
+
*/
|
|
38
|
+
function captureConsole({ each = false } = {}) {
|
|
39
|
+
const logs = {};
|
|
40
|
+
(each ? beforeEach : beforeAll)(() => {
|
|
41
|
+
for (const method of ['error', 'warn', 'log']) {
|
|
42
|
+
logs[method] = jest.spyOn(console, method).mockImplementation(() => {});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
(each ? afterEach : afterAll)(() => Object.values(logs).forEach((spy) => spy.mockRestore()));
|
|
46
|
+
return logs;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Everything a console spy printed, one call per line. */
|
|
50
|
+
const printed = (spy) => spy.mock.calls.map(([text]) => text).join('\n');
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Runs the plugin the way React Native does, for an app at `<tmp>/app` that
|
|
54
|
+
* generates into `<tmp>/out`. `context` adds to or overrides those fields.
|
|
55
|
+
*/
|
|
56
|
+
function runPlugin(tmp, context = {}) {
|
|
57
|
+
// Required on first use: this Jest config has no transform to hoist a test
|
|
58
|
+
// file's jest.mock calls, so the plugin must load after they have run.
|
|
59
|
+
const expoSpmPlugin = require('../plugin');
|
|
60
|
+
return expoSpmPlugin({
|
|
61
|
+
react: null,
|
|
62
|
+
outputDir: path.join(tmp, 'out'),
|
|
63
|
+
appRoot: path.join(tmp, 'app', 'ios'),
|
|
64
|
+
projectRoot: path.join(tmp, 'app'),
|
|
65
|
+
...context,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The error `fn` throws, or null when it returns. */
|
|
70
|
+
function thrownBy(fn) {
|
|
71
|
+
try {
|
|
72
|
+
fn();
|
|
73
|
+
return null;
|
|
74
|
+
} catch (error) {
|
|
75
|
+
return error;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
module.exports = {
|
|
80
|
+
captureConsole,
|
|
81
|
+
makeTempDir,
|
|
82
|
+
metadataEntry,
|
|
83
|
+
printed,
|
|
84
|
+
removeTempDirs,
|
|
85
|
+
runPlugin,
|
|
86
|
+
spec,
|
|
87
|
+
thrownBy,
|
|
88
|
+
};
|