@capacitor/cli 8.4.3-nightly-20260730T154011.0 → 8.4.3
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/assets/android-template.tar.gz +0 -0
- package/assets/capacitor-cordova-android-plugins.tar.gz +0 -0
- package/assets/capacitor-cordova-ios-plugins.tar.gz +0 -0
- package/assets/ios-pods-template.tar.gz +0 -0
- package/assets/ios-spm-template.tar.gz +0 -0
- package/dist/config.js +1 -1
- package/dist/util/node.js +1 -35
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/config.js
CHANGED
|
@@ -87,7 +87,7 @@ async function loadExtConfigTS(rootDir, extConfigName, extConfigFilePath) {
|
|
|
87
87
|
`To use ${colors_1.default.strong(extConfigName)} files, you must install TypeScript in your project, e.g. w/ ${colors_1.default.input('npm install -D typescript')}`);
|
|
88
88
|
}
|
|
89
89
|
const ts = require(tsPath); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
90
|
-
const extConfigObject = (
|
|
90
|
+
const extConfigObject = (0, node_1.requireTS)(ts, extConfigFilePath);
|
|
91
91
|
const extConfig = extConfigObject.default ? await extConfigObject.default : extConfigObject;
|
|
92
92
|
return {
|
|
93
93
|
extConfigType: 'ts',
|
package/dist/util/node.js
CHANGED
|
@@ -4,45 +4,11 @@ exports.resolveNode = exports.requireTS = void 0;
|
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
5
|
const fs_extra_1 = require("fs-extra");
|
|
6
6
|
const path_1 = require("path");
|
|
7
|
-
const url_1 = require("url");
|
|
8
|
-
/**
|
|
9
|
-
* TypeScript 7 dropped the classic compiler API (transpileModule, ModuleKind, etc.) from its
|
|
10
|
-
* default export -- `require('typescript')` now only exposes `version`/`versionMajorMinor`.
|
|
11
|
-
* Detect that case so we can fall back to a loading strategy that doesn't depend on it.
|
|
12
|
-
*
|
|
13
|
-
* @see https://github.com/ionic-team/capacitor/issues/8531
|
|
14
|
-
*/
|
|
15
|
-
function hasClassicCompilerAPI(ts) {
|
|
16
|
-
return typeof ts.transpileModule === 'function';
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* A plain `import()` here gets downleveled to a `require()` call by tsc when compiling to
|
|
20
|
-
* CommonJS (our build target), which defeats the purpose -- we specifically need the real ESM
|
|
21
|
-
* loader so Node's native TypeScript stripping kicks in. Constructing the import from a string
|
|
22
|
-
* keeps tsc from touching it.
|
|
23
|
-
*/
|
|
24
|
-
const dynamicImport = new Function('specifier', 'return import(specifier)');
|
|
25
7
|
/**
|
|
26
8
|
* @see https://github.com/ionic-team/stencil/blob/HEAD/src/compiler/sys/node-require.ts
|
|
27
9
|
*/
|
|
28
|
-
const requireTS =
|
|
10
|
+
const requireTS = (ts, p) => {
|
|
29
11
|
const id = (0, path_1.resolve)(p);
|
|
30
|
-
if (!hasClassicCompilerAPI(ts)) {
|
|
31
|
-
// Node has its own built-in TypeScript syntax stripping (stable since Node 23.6, and
|
|
32
|
-
// available behind --experimental-strip-types since Node 22.6), so we can load the file
|
|
33
|
-
// directly via the native ESM loader instead of transpiling it ourselves.
|
|
34
|
-
try {
|
|
35
|
-
return await dynamicImport((0, url_1.pathToFileURL)(id).href);
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
if ((e === null || e === void 0 ? void 0 : e.code) === 'ERR_UNKNOWN_FILE_EXTENSION') {
|
|
39
|
-
throw new Error(`Your installed version of TypeScript (${ts.version}) no longer provides the compiler API Capacitor previously used to load .ts config files, ` +
|
|
40
|
-
`and your Node.js runtime (${process.version}) doesn't support loading them natively either.\n` +
|
|
41
|
-
'Upgrade to Node.js 22.6+ (running with --experimental-strip-types), or Node.js 23.6+, to continue using capacitor.config.ts.');
|
|
42
|
-
}
|
|
43
|
-
throw e;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
12
|
delete require.cache[id];
|
|
47
13
|
require.extensions['.ts'] = (module, fileName) => {
|
|
48
14
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/cli",
|
|
3
|
-
"version": "8.4.3
|
|
3
|
+
"version": "8.4.3",
|
|
4
4
|
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
|
|
5
5
|
"homepage": "https://capacitorjs.com",
|
|
6
6
|
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|