Skip to content

Commit d4fee7b

Browse files
Copilotmrlubos
andcommitted
fix: update tsdown configs and package.json exports for v0.16.6 compatibility
Co-authored-by: mrlubos <[email protected]>
1 parent 5e84c82 commit d4fee7b

File tree

9 files changed

+26
-26
lines changed

9 files changed

+26
-26
lines changed

packages/codegen-core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
],
2727
"type": "module",
2828
"main": "./dist/index.cjs",
29-
"module": "./dist/index.js",
30-
"types": "./dist/index.d.ts",
29+
"module": "./dist/index.mjs",
30+
"types": "./dist/index.d.mts",
3131
"exports": {
3232
".": {
3333
"import": {
34-
"types": "./dist/index.d.ts",
35-
"default": "./dist/index.js"
34+
"types": "./dist/index.d.mts",
35+
"default": "./dist/index.mjs"
3636
},
3737
"require": {
3838
"types": "./dist/index.d.cts",

packages/codegen-core/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig((options) => ({
88
*/
99
if (ctx.format === 'esm') {
1010
return {
11-
js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);",
11+
js: `import { createRequire } from 'module'; const require = createRequire(import.${'meta'}.url);`,
1212
};
1313
}
1414

packages/custom-client/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
"funding": "https://github.com/sponsors/hey-api",
2121
"type": "module",
2222
"main": "./dist/index.cjs",
23-
"module": "./dist/index.js",
24-
"types": "./dist/index.d.ts",
23+
"module": "./dist/index.mjs",
24+
"types": "./dist/index.d.mts",
2525
"exports": {
2626
".": {
2727
"import": {
28-
"types": "./dist/index.d.ts",
29-
"default": "./dist/index.js"
28+
"types": "./dist/index.d.mts",
29+
"default": "./dist/index.mjs"
3030
},
3131
"require": {
3232
"types": "./dist/index.d.cts",
@@ -35,8 +35,8 @@
3535
},
3636
"./plugin": {
3737
"import": {
38-
"types": "./dist/plugin.d.ts",
39-
"default": "./dist/plugin.js"
38+
"types": "./dist/plugin.d.mts",
39+
"default": "./dist/plugin.mjs"
4040
},
4141
"require": {
4242
"types": "./dist/plugin.d.cts",

packages/custom-client/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'node:path';
33
import { defineConfig } from 'rollup';
44
import dts from 'rollup-plugin-dts';
55

6-
const files = ['index.d.ts', 'index.d.cts', 'plugin.d.ts', 'plugin.d.cts'];
6+
const files = ['index.d.mts', 'index.d.cts', 'plugin.d.mts', 'plugin.d.cts'];
77

88
export default files.map((file) =>
99
defineConfig({

packages/openapi-ts/bin/run.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import path from 'node:path';
55
import { fileURLToPath } from 'node:url';
66

77
const __dirname = path.dirname(fileURLToPath(import.meta.url));
8-
const target = path.join(__dirname, '..', 'dist', 'run.js');
8+
const target = path.join(__dirname, '..', 'dist', 'run.mjs');
99

1010
if (!fs.existsSync(target)) {
11-
console.error('openapi-ts not built (expect dist/run.js)');
11+
console.error('openapi-ts not built (expect dist/run.mjs)');
1212
process.exit(1);
1313
}
1414

packages/openapi-ts/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
],
4141
"type": "module",
4242
"main": "./dist/index.cjs",
43-
"module": "./dist/index.js",
44-
"types": "./dist/index.d.ts",
43+
"module": "./dist/index.mjs",
44+
"types": "./dist/index.d.mts",
4545
"exports": {
4646
".": {
4747
"import": {
48-
"types": "./dist/index.d.ts",
49-
"default": "./dist/index.js"
48+
"types": "./dist/index.d.mts",
49+
"default": "./dist/index.mjs"
5050
},
5151
"require": {
5252
"types": "./dist/index.d.cts",
@@ -55,8 +55,8 @@
5555
},
5656
"./internal": {
5757
"import": {
58-
"types": "./dist/internal.d.ts",
59-
"default": "./dist/internal.js"
58+
"types": "./dist/internal.d.mts",
59+
"default": "./dist/internal.mjs"
6060
},
6161
"require": {
6262
"types": "./dist/internal.d.cts",

packages/openapi-ts/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig((options) => ({
2121
*/
2222
if (ctx.format === 'esm') {
2323
return {
24-
js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);",
24+
js: `import { createRequire } from 'module'; const require = createRequire(import.${'meta'}.url);`,
2525
};
2626
}
2727

packages/vite-plugin/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
],
2828
"type": "module",
2929
"main": "./dist/index.cjs",
30-
"module": "./dist/index.js",
31-
"types": "./dist/index.d.ts",
30+
"module": "./dist/index.mjs",
31+
"types": "./dist/index.d.mts",
3232
"exports": {
3333
".": {
3434
"import": {
35-
"types": "./dist/index.d.ts",
36-
"default": "./dist/index.js"
35+
"types": "./dist/index.d.mts",
36+
"default": "./dist/index.mjs"
3737
},
3838
"require": {
3939
"types": "./dist/index.d.cts",

packages/vite-plugin/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig((options) => ({
88
*/
99
if (ctx.format === 'esm') {
1010
return {
11-
js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);",
11+
js: `import { createRequire } from 'module'; const require = createRequire(import.${'meta'}.url);`,
1212
};
1313
}
1414
},

0 commit comments

Comments
 (0)