Skip to content

Commit a7a4885

Browse files
authored
fix: Fix builds and enable isolated declarations
1 parent f95eea1 commit a7a4885

File tree

108 files changed

+894
-650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+894
-650
lines changed

.changeset/solid-snakes-poke.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@plextv/vite-plugin-react-reanimated-lightning": patch
3+
"@plextv/vite-plugin-react-native-lightning": patch
4+
"@plextv/react-native-lightning-components": patch
5+
"@plextv/react-lightning-components": patch
6+
"@plextv/vite-plugin-msdf-fontgen": patch
7+
"@plextv/react-native-lightning": patch
8+
"@plextv/react-lightning-plugin-css-transform": patch
9+
"@plextv/react-lightning-plugin-flexbox-lite": patch
10+
"@plextv/react-lightning-plugin-reanimated": patch
11+
"@plextv/react-lightning": patch
12+
"@plextv/react-lightning-plugin-flexbox": patch
13+
"@repo/configs": patch
14+
---
15+
16+
fix: Fix builds and enable isolated declarations

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
auto-install-peers=true
2+
3+
# Prefer exact dependency versions.
4+
save-prefix=""

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
"glob": "11.0.3",
4242
"husky": "9.1.7",
4343
"listr2": "9.0.4",
44-
"tsdown": "^0.15.7",
44+
"tsdown": "0.16.6",
4545
"tsx": "4.20.6",
4646
"turbo": "2.5.8",
4747
"type-fest": "5.1.0",
4848
"typescript": "5.9.3",
4949
"vite": "7.1.10",
50-
"vite-plugin-externalize-deps": "^0.10.0",
50+
"vite-plugin-externalize-deps": "0.10.0",
5151
"vitest": "3.2.4",
5252
"yaml": "2.8.1"
5353
},

packages/configs/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"esModuleInterop": true,
88
"incremental": false,
99
"isolatedModules": true,
10+
"isolatedDeclarations": true,
1011
"lib": ["es2022", "DOM", "DOM.Iterable"],
1112
"module": "ESNext",
1213
"moduleDetection": "force",

packages/configs/tsdown.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
import { defineConfig } from 'tsdown';
1+
import { defineConfig, type UserConfig } from 'tsdown';
22

3-
export default defineConfig({
3+
const config: UserConfig = defineConfig({
44
entry: ['src/index.ts'],
55
format: ['cjs', 'esm'],
66
target: 'chrome56',
77
platform: 'browser',
88
sourcemap: true,
9-
dts: true,
9+
dts: {
10+
oxc: true,
11+
},
1012
loader: {
1113
'.png': 'asset',
1214
},
13-
// minify: false,
1415
exports: {
1516
devExports: true,
1617
},
@@ -20,3 +21,5 @@ export default defineConfig({
2021
},
2122
},
2223
});
24+
25+
export default config;

packages/plugin-css-transform/src/utils/convertCSSTransformToLightning.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function convertCSSTransformToLightning(
4747
| number
4848
| number[]
4949
| Record<string, number | string | number[]>,
50-
) {
50+
): Transform {
5151
const transformResult: Transform = {};
5252

5353
if (typeof transformValue === 'object') {

packages/plugin-css-transform/src/utils/convertRotationValue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function convertRotationValue(value: string) {
1+
export function convertRotationValue(value: string): number {
22
if (value.endsWith('deg')) {
33
return (Number.parseFloat(value) * Math.PI) / 180;
44
}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"extends": "@repo/configs/tsconfig.react-library.json",
3-
"compilerOptions": {
4-
"rootDir": "src",
5-
"declaration": false,
6-
"declarationMap": false
7-
},
83
"include": ["src"],
94
"exclude": ["node_modules", "dist"]
105
}

packages/plugin-css-transform/tsdown.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import baseConfig from '@repo/configs/tsdown.config';
2-
import { defineConfig } from 'tsdown';
1+
import { defineConfig, type UserConfig } from 'tsdown';
2+
import baseConfig from '../configs/tsdown.config';
33

4-
export default defineConfig({
4+
const config: UserConfig = defineConfig({
55
...baseConfig,
66
entry: ['src/index.ts', 'src/types/jsx.d.ts'],
77
exports: {
@@ -17,3 +17,5 @@ export default defineConfig({
1717
},
1818
},
1919
});
20+
21+
export default config;
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"extends": "@repo/configs/tsconfig.react-library.json",
3-
"compilerOptions": {
4-
"rootDir": "src",
5-
"declaration": false,
6-
"declarationMap": false
7-
},
83
"include": ["src", "../../types/*.d.ts"],
94
"exclude": ["node_modules", "dist"]
105
}

0 commit comments

Comments
 (0)