@mikro-orm/cli 7.0.4-dev.10 → 7.0.4-dev.11
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/CLIHelper.d.ts +3 -3
- package/CLIHelper.js +3 -2
- package/package.json +3 -3
package/CLIHelper.d.ts
CHANGED
|
@@ -35,18 +35,18 @@ export declare class CLIHelper {
|
|
|
35
35
|
empty: string;
|
|
36
36
|
}): void;
|
|
37
37
|
/**
|
|
38
|
-
* Tries to register TS support in the following order: swc, tsx, jiti, tsimp
|
|
38
|
+
* Tries to register TS support in the following order: oxc, swc, tsx, jiti, tsimp
|
|
39
39
|
* Use `MIKRO_ORM_CLI_TS_LOADER` env var to set the loader explicitly.
|
|
40
40
|
* This method is used only in CLI context.
|
|
41
41
|
*/
|
|
42
|
-
static registerTypeScriptSupport(configPath?: string, tsLoader?: 'swc' | 'tsx' | 'jiti' | 'tsimp' | 'auto'): Promise<boolean>;
|
|
42
|
+
static registerTypeScriptSupport(configPath?: string, tsLoader?: 'oxc' | 'swc' | 'tsx' | 'jiti' | 'tsimp' | 'auto'): Promise<boolean>;
|
|
43
43
|
static isESM(): boolean;
|
|
44
44
|
static showHelp(): void;
|
|
45
45
|
}
|
|
46
46
|
export interface Settings {
|
|
47
47
|
verbose?: boolean;
|
|
48
48
|
preferTs?: boolean;
|
|
49
|
-
tsLoader?: 'swc' | 'tsx' | 'jiti' | 'tsimp' | 'auto';
|
|
49
|
+
tsLoader?: 'oxc' | 'swc' | 'tsx' | 'jiti' | 'tsimp' | 'auto';
|
|
50
50
|
tsConfigPath?: string;
|
|
51
51
|
configPaths?: string[];
|
|
52
52
|
}
|
package/CLIHelper.js
CHANGED
|
@@ -295,7 +295,7 @@ export class CLIHelper {
|
|
|
295
295
|
CLIHelper.dump(ret);
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
|
-
* Tries to register TS support in the following order: swc, tsx, jiti, tsimp
|
|
298
|
+
* Tries to register TS support in the following order: oxc, swc, tsx, jiti, tsimp
|
|
299
299
|
* Use `MIKRO_ORM_CLI_TS_LOADER` env var to set the loader explicitly.
|
|
300
300
|
* This method is used only in CLI context.
|
|
301
301
|
*/
|
|
@@ -312,6 +312,7 @@ export class CLIHelper {
|
|
|
312
312
|
return (globalThis.dynamicImportProvider = (id) => import(id).then(mod => mod?.default ?? mod));
|
|
313
313
|
};
|
|
314
314
|
const loaders = {
|
|
315
|
+
oxc: { esm: '@oxc-node/core/register', cjs: '@oxc-node/core/register' },
|
|
315
316
|
swc: { esm: '@swc-node/register/esm-register', cjs: '@swc-node/register' },
|
|
316
317
|
tsx: { esm: 'tsx/esm/api', cjs: 'tsx/cjs/api', cb: (tsx) => tsx.register({ tsconfig: configPath }) },
|
|
317
318
|
jiti: { cjs: 'jiti/register', cb: setEsmImportProvider },
|
|
@@ -332,7 +333,7 @@ export class CLIHelper {
|
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
// eslint-disable-next-line no-console
|
|
335
|
-
console.warn('Neither `swc`, `tsx`, `jiti` nor `tsimp` found in the project dependencies, support for working with TypeScript files might not work. To use `
|
|
336
|
+
console.warn('Neither `oxc`, `swc`, `tsx`, `jiti` nor `tsimp` found in the project dependencies, support for working with TypeScript files might not work. To use `oxc`, install `@oxc-node/core`. To use `swc`, install both `@swc-node/register` and `@swc/core`.');
|
|
336
337
|
return false;
|
|
337
338
|
}
|
|
338
339
|
static isESM() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/cli",
|
|
3
|
-
"version": "7.0.4-dev.
|
|
3
|
+
"version": "7.0.4-dev.11",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"copy": "node ../../scripts/copy.mjs"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/core": "7.0.4-dev.
|
|
54
|
-
"mikro-orm": "7.0.4-dev.
|
|
53
|
+
"@mikro-orm/core": "7.0.4-dev.11",
|
|
54
|
+
"mikro-orm": "7.0.4-dev.11",
|
|
55
55
|
"yargs": "17.7.2"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|