expo-modules-autolinking 55.0.3 → 55.0.5
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/CHANGELOG.md +10 -0
- package/android/expo-gradle-plugin/expo-autolinking-plugin/src/main/kotlin/expo/modules/plugin/KSPLookup.kt +4 -1
- package/build/reactNativeConfig/config.js +12 -46
- package/build/reactNativeConfig/config.js.map +1 -1
- package/package.json +4 -5
- package/scripts/generateKSPLookup.js +7 -12
- package/src/reactNativeConfig/config.ts +21 -55
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 55.0.5 — 2026-02-16
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 55.0.4 — 2026-02-16
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Replace `require-from-string` with `@expo/require-utils` ([#42884](https://github.com/expo/expo/pull/42884) by [@kitten](https://github.com/kitten))
|
|
22
|
+
|
|
13
23
|
## 55.0.3 — 2026-02-03
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
package expo.modules.plugin
|
|
4
4
|
|
|
5
5
|
val KSPLookup = mapOf(
|
|
6
|
-
"2.2.
|
|
6
|
+
"2.2.21" to "2.2.21-2.0.5",
|
|
7
|
+
"2.3.1" to "2.3.1",
|
|
8
|
+
"2.3.0" to "2.3.0",
|
|
9
|
+
"2.2.20" to "2.2.20-2.0.4",
|
|
7
10
|
"2.2.10" to "2.2.10-2.0.2",
|
|
8
11
|
"2.2.0" to "2.2.0-2.0.2",
|
|
9
12
|
"2.1.21" to "2.1.21-2.0.2",
|
|
@@ -4,63 +4,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.loadConfigAsync = void 0;
|
|
7
|
+
const require_utils_1 = require("@expo/require-utils");
|
|
7
8
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const require_from_string_1 = __importDefault(require("require-from-string"));
|
|
10
|
-
const resolve_from_1 = __importDefault(require("resolve-from"));
|
|
11
10
|
const utils_1 = require("../utils");
|
|
12
|
-
let tsMain = undefined;
|
|
13
11
|
const mockedNativeModules = path_1.default.join(__dirname, '..', '..', 'node_modules_mock');
|
|
14
12
|
/**
|
|
15
13
|
* Load the `react-native.config.js` or `react-native.config.ts` from the package.
|
|
16
14
|
*/
|
|
17
15
|
exports.loadConfigAsync = (0, utils_1.memoize)(async function loadConfigAsync(packageRoot) {
|
|
18
|
-
const
|
|
16
|
+
const configPath = (await Promise.all(['react-native.config.js', 'react-native.config.ts'].map(async (fileName) => {
|
|
19
17
|
const file = path_1.default.join(packageRoot, fileName);
|
|
20
18
|
return (await (0, utils_1.fileExistsAsync)(file)) ? file : null;
|
|
21
|
-
}));
|
|
22
|
-
if (
|
|
23
|
-
|
|
19
|
+
}))).find((path) => path != null);
|
|
20
|
+
if (configPath) {
|
|
21
|
+
const mod = (0, require_utils_1.evalModule)(await promises_1.default.readFile(configPath, 'utf8'), configPath,
|
|
22
|
+
// NOTE: We need to mock the Community CLI temporarily, because
|
|
23
|
+
// some packages are checking the version of the CLI in the `react-native.config.js` file.
|
|
24
|
+
// We can remove this once we remove this check from packages.
|
|
25
|
+
{ paths: [mockedNativeModules] });
|
|
26
|
+
return mod.default ?? mod ?? null;
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
if (tsMain === undefined) {
|
|
27
|
-
const tsPath = resolve_from_1.default.silent(packageRoot, 'typescript');
|
|
28
|
-
if (tsPath) {
|
|
29
|
-
tsMain = require(tsPath);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else if (tsMain == null) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
const configContents = await promises_1.default.readFile(configTsPath, 'utf8');
|
|
36
|
-
const transpiledContents = tsMain?.transpileModule(configContents, {
|
|
37
|
-
compilerOptions: {
|
|
38
|
-
module: tsMain.ModuleKind.NodeNext,
|
|
39
|
-
moduleResolution: tsMain.ModuleResolutionKind.NodeNext,
|
|
40
|
-
target: tsMain.ScriptTarget.ESNext,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
const outputText = transpiledContents?.outputText;
|
|
44
|
-
if (outputText) {
|
|
45
|
-
return requireConfig(configTsPath, outputText);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
});
|
|
50
|
-
/**
|
|
51
|
-
* Temporarily, we need to mock the community CLI, because
|
|
52
|
-
* some packages are checking the version of the CLI in the `react-native.config.js` file.
|
|
53
|
-
* We can remove this once we remove this check from packages.
|
|
54
|
-
*/
|
|
55
|
-
function requireConfig(filepath, configContents) {
|
|
56
|
-
try {
|
|
57
|
-
const config = (0, require_from_string_1.default)(configContents, filepath, {
|
|
58
|
-
prependPaths: [mockedNativeModules],
|
|
59
|
-
});
|
|
60
|
-
return config.default ?? config ?? null;
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
28
|
+
else {
|
|
63
29
|
return null;
|
|
64
30
|
}
|
|
65
|
-
}
|
|
31
|
+
});
|
|
66
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/reactNativeConfig/config.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA6B;AAC7B,gDAAwB;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/reactNativeConfig/config.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAiD;AACjD,2DAA6B;AAC7B,gDAAwB;AAExB,oCAAoD;AAGpD,MAAM,mBAAmB,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC;AAElF;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,eAAO,EAAC,KAAK,UAAU,eAAe,CAEnE,WAAmB;IACnB,MAAM,UAAU,GAAG,CACjB,MAAM,OAAO,CAAC,GAAG,CACf,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;QAC1E,MAAM,IAAI,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,CAAC,MAAM,IAAA,uBAAe,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC,CAAC,CACH,CACF,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;IAC/B,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,IAAA,0BAAU,EACpB,MAAM,kBAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,EACrC,UAAU;QACV,+DAA+D;QAC/D,0FAA0F;QAC1F,8DAA8D;QAC9D,EAAE,KAAK,EAAE,CAAC,mBAAmB,CAAC,EAAE,CACjC,CAAC;QACF,OAAO,GAAG,CAAC,OAAO,IAAI,GAAG,IAAI,IAAI,CAAC;IACpC,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { evalModule } from '@expo/require-utils';\nimport fs from 'fs/promises';\nimport path from 'path';\n\nimport { memoize, fileExistsAsync } from '../utils';\nimport type { RNConfigReactNativeConfig } from './reactNativeConfig.types';\n\nconst mockedNativeModules = path.join(__dirname, '..', '..', 'node_modules_mock');\n\n/**\n * Load the `react-native.config.js` or `react-native.config.ts` from the package.\n */\nexport const loadConfigAsync = memoize(async function loadConfigAsync<\n T extends RNConfigReactNativeConfig,\n>(packageRoot: string): Promise<T | null> {\n const configPath = (\n await Promise.all(\n ['react-native.config.js', 'react-native.config.ts'].map(async (fileName) => {\n const file = path.join(packageRoot, fileName);\n return (await fileExistsAsync(file)) ? file : null;\n })\n )\n ).find((path) => path != null);\n if (configPath) {\n const mod = evalModule(\n await fs.readFile(configPath, 'utf8'),\n configPath,\n // NOTE: We need to mock the Community CLI temporarily, because\n // some packages are checking the version of the CLI in the `react-native.config.js` file.\n // We can remove this once we remove this check from packages.\n { paths: [mockedNativeModules] }\n );\n return mod.default ?? mod ?? null;\n } else {\n return null;\n }\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-autolinking",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.5",
|
|
4
4
|
"description": "Scripts that autolink Expo modules.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -38,11 +38,10 @@
|
|
|
38
38
|
"memfs": "^3.2.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@expo/require-utils": "^55.0.0",
|
|
41
42
|
"@expo/spawn-async": "^1.7.2",
|
|
42
43
|
"chalk": "^4.1.0",
|
|
43
|
-
"commander": "^7.2.0"
|
|
44
|
-
"require-from-string": "^2.0.2",
|
|
45
|
-
"resolve-from": "^5.0.0"
|
|
44
|
+
"commander": "^7.2.0"
|
|
46
45
|
},
|
|
47
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "aeb65063e482533ed1119f736555bcca5af2af94"
|
|
48
47
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
const { execSync } = require('child_process');
|
|
2
3
|
const fs = require('fs');
|
|
3
4
|
|
|
4
5
|
const minKotlinVersion = '2.0.0';
|
|
5
|
-
const maxKotlinVersion = '2.
|
|
6
|
+
const maxKotlinVersion = '2.3.10';
|
|
6
7
|
|
|
7
8
|
const groupId = 'com.google.devtools.ksp';
|
|
8
9
|
const artifactId = 'symbol-processing-gradle-plugin';
|
|
@@ -12,22 +13,16 @@ const path = require('path').resolve(
|
|
|
12
13
|
);
|
|
13
14
|
|
|
14
15
|
const numberPerPage = 30;
|
|
15
|
-
const
|
|
16
|
+
const githubApiPath = '/repos/google/ksp/releases';
|
|
16
17
|
|
|
17
18
|
async function* fetchKSPReleases() {
|
|
18
|
-
const url = `${githubReleaseUrl}?per_page=${numberPerPage}`;
|
|
19
|
-
|
|
20
19
|
let currentPage = 1;
|
|
21
20
|
while (true) {
|
|
22
|
-
const
|
|
23
|
-
console.log(`Fetching versions from: ${
|
|
24
|
-
const response = await fetch(urlWithIndex);
|
|
25
|
-
|
|
26
|
-
if (!response.ok) {
|
|
27
|
-
throw new Error(`HTTP error, status: ${response.status}`);
|
|
28
|
-
}
|
|
21
|
+
const apiPath = `${githubApiPath}?per_page=${numberPerPage}&page=${currentPage}`;
|
|
22
|
+
console.log(`Fetching versions from: ${apiPath}...`);
|
|
29
23
|
|
|
30
|
-
const
|
|
24
|
+
const output = execSync(`gh api "${apiPath}"`, { encoding: 'utf-8' });
|
|
25
|
+
const data = JSON.parse(output);
|
|
31
26
|
const versions = data
|
|
32
27
|
.map((release) => release.tag_name)
|
|
33
28
|
// Filter out release candidates, beta and milestone versions
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import { evalModule } from '@expo/require-utils';
|
|
1
2
|
import fs from 'fs/promises';
|
|
2
3
|
import path from 'path';
|
|
3
|
-
import requireFromString from 'require-from-string';
|
|
4
|
-
import resolveFrom from 'resolve-from';
|
|
5
4
|
|
|
6
5
|
import { memoize, fileExistsAsync } from '../utils';
|
|
7
6
|
import type { RNConfigReactNativeConfig } from './reactNativeConfig.types';
|
|
8
7
|
|
|
9
|
-
let tsMain: typeof import('typescript') | null | undefined = undefined;
|
|
10
|
-
|
|
11
8
|
const mockedNativeModules = path.join(__dirname, '..', '..', 'node_modules_mock');
|
|
12
9
|
|
|
13
10
|
/**
|
|
@@ -16,56 +13,25 @@ const mockedNativeModules = path.join(__dirname, '..', '..', 'node_modules_mock'
|
|
|
16
13
|
export const loadConfigAsync = memoize(async function loadConfigAsync<
|
|
17
14
|
T extends RNConfigReactNativeConfig,
|
|
18
15
|
>(packageRoot: string): Promise<T | null> {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const configContents = await fs.readFile(configTsPath, 'utf8');
|
|
40
|
-
const transpiledContents = tsMain?.transpileModule(configContents, {
|
|
41
|
-
compilerOptions: {
|
|
42
|
-
module: tsMain.ModuleKind.NodeNext,
|
|
43
|
-
moduleResolution: tsMain.ModuleResolutionKind.NodeNext,
|
|
44
|
-
target: tsMain.ScriptTarget.ESNext,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
const outputText = transpiledContents?.outputText;
|
|
48
|
-
|
|
49
|
-
if (outputText) {
|
|
50
|
-
return requireConfig(configTsPath, outputText);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return null;
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Temporarily, we need to mock the community CLI, because
|
|
59
|
-
* some packages are checking the version of the CLI in the `react-native.config.js` file.
|
|
60
|
-
* We can remove this once we remove this check from packages.
|
|
61
|
-
*/
|
|
62
|
-
function requireConfig(filepath: string, configContents: string) {
|
|
63
|
-
try {
|
|
64
|
-
const config = requireFromString(configContents, filepath, {
|
|
65
|
-
prependPaths: [mockedNativeModules],
|
|
66
|
-
});
|
|
67
|
-
return config.default ?? config ?? null;
|
|
68
|
-
} catch {
|
|
16
|
+
const configPath = (
|
|
17
|
+
await Promise.all(
|
|
18
|
+
['react-native.config.js', 'react-native.config.ts'].map(async (fileName) => {
|
|
19
|
+
const file = path.join(packageRoot, fileName);
|
|
20
|
+
return (await fileExistsAsync(file)) ? file : null;
|
|
21
|
+
})
|
|
22
|
+
)
|
|
23
|
+
).find((path) => path != null);
|
|
24
|
+
if (configPath) {
|
|
25
|
+
const mod = evalModule(
|
|
26
|
+
await fs.readFile(configPath, 'utf8'),
|
|
27
|
+
configPath,
|
|
28
|
+
// NOTE: We need to mock the Community CLI temporarily, because
|
|
29
|
+
// some packages are checking the version of the CLI in the `react-native.config.js` file.
|
|
30
|
+
// We can remove this once we remove this check from packages.
|
|
31
|
+
{ paths: [mockedNativeModules] }
|
|
32
|
+
);
|
|
33
|
+
return mod.default ?? mod ?? null;
|
|
34
|
+
} else {
|
|
69
35
|
return null;
|
|
70
36
|
}
|
|
71
|
-
}
|
|
37
|
+
});
|