Skip to content

Commit 0dec0c8

Browse files
authored
Fix ESM and CJS exports on renderers (#21)
1 parent 5a6e769 commit 0dec0c8

File tree

27 files changed

+86
-9
lines changed

27 files changed

+86
-9
lines changed

.changeset/poor-pigs-design.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@kinobi-so/renderers-js-umi": patch
3+
"@kinobi-so/renderers-core": patch
4+
"@kinobi-so/renderers-rust": patch
5+
"@kinobi-so/renderers-js": patch
6+
"kinobi": patch
7+
"@kinobi-so/errors": patch
8+
"@kinobi-so/nodes": patch
9+
---
10+
11+
Fix ESM and CJS exports on renderers

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
extends: ['turbo', '@solana/eslint-config-solana'],
33
root: true,
4-
ignorePatterns: ['.eslintrc.js', '.eslintrc.cjs', 'dist/', '*.json', '*.njk', '*.cjs'],
4+
ignorePatterns: ['.eslintrc.js', '.eslintrc.cjs', 'dist/', '*.json', '*.njk'],
55
};

packages/errors/src/types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare const __BROWSER__: boolean;
22
declare const __DEV__: boolean;
3+
declare const __ESM__: boolean;
34
declare const __NODEJS__: boolean;
45
declare const __REACTNATIVE__: boolean;
56
declare const __TEST__: boolean;

packages/errors/test/types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare const __BROWSER__: boolean;
22
declare const __DEV__: boolean;
3+
declare const __ESM__: boolean;
34
declare const __NODEJS__: boolean;
45
declare const __REACTNATIVE__: boolean;
56
declare const __TEST__: boolean;

packages/internals/scripts/lint.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { $, argv } from 'zx';
44
// Lint and format the code.
55
$.stdio = 'inherit';
66
if (argv.fix) {
7-
await $`pnpm eslint --fix src/* test/* && pnpm prettier --log-level warn --ignore-unknown --write ./*`;
7+
await $`pnpm eslint --fix "src/*" "test/*" && pnpm prettier --log-level warn --ignore-unknown --write ./*`;
88
} else {
9-
await $`pnpm eslint src/* test/* && pnpm prettier --check .`;
9+
await $`pnpm eslint "src/*" "test/*" && pnpm prettier --check .`;
1010
}

packages/internals/tsup.config.base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export function getBuildConfig(options: BuildOptions): TsupConfig {
1818
return {
1919
define: {
2020
__BROWSER__: `${platform === 'browser'}`,
21+
__ESM__: `${format === 'esm'}`,
2122
__NODEJS__: `${platform === 'node'}`,
2223
__REACTNATIVE__: `${platform === 'react-native'}`,
2324
__TEST__: 'false',

packages/internals/vitest.config.base.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export function getVitestConfig(platform: Platform) {
99
define: {
1010
__BROWSER__: `${platform === 'browser'}`,
1111
__DEV__: 'true',
12+
__ESM__: 'true',
1213
__NODEJS__: `${platform === 'node'}`,
1314
__REACTNATIVE__: `${platform === 'react-native'}`,
1415
__TEST__: 'true',

packages/library/src/types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare const __BROWSER__: boolean;
22
declare const __DEV__: boolean;
3+
declare const __ESM__: boolean;
34
declare const __NODEJS__: boolean;
45
declare const __REACTNATIVE__: boolean;
56
declare const __TEST__: boolean;

packages/nodes/src/types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare const __BROWSER__: boolean;
22
declare const __DEV__: boolean;
3+
declare const __ESM__: boolean;
34
declare const __NODEJS__: boolean;
45
declare const __REACTNATIVE__: boolean;
56
declare const __TEST__: boolean;

packages/nodes/test/types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare const __BROWSER__: boolean;
22
declare const __DEV__: boolean;
3+
declare const __ESM__: boolean;
34
declare const __NODEJS__: boolean;
45
declare const __REACTNATIVE__: boolean;
56
declare const __TEST__: boolean;

0 commit comments

Comments
 (0)