diff --git a/packages/compiler/.depcheckrc b/packages/compiler/.depcheckrc new file mode 100644 index 000000000..2e18ab04e --- /dev/null +++ b/packages/compiler/.depcheckrc @@ -0,0 +1,7 @@ +ignores: + - "babel-plugin-react-compiler" + - "@babel/plugin-transform-destructuring" + - "@babel/plugin-transform-private-methods" + - "@babel/plugin-transform-react-jsx" + - "@babel/plugin-transform-regenerator" + - "@vxrn/vite-native-client" diff --git a/packages/compiler/package.json b/packages/compiler/package.json index d1f8cbb96..cd22982e7 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -20,6 +20,7 @@ ], "scripts": { "build": "tamagui-build", + "check": "depcheck", "clean": "tamagui-build clean", "clean:build": "tamagui-build clean:build", "lint": "../../node_modules/.bin/biome check src", @@ -27,6 +28,7 @@ "watch": "tamagui-build --watch" }, "dependencies": { + "vite": "^6.0.6", "@babel/core": "^7.26.0", "@babel/plugin-transform-destructuring": "^7.25.9", "@babel/plugin-transform-private-methods": "^7.25.9", @@ -35,11 +37,11 @@ "@swc/core": "^1.10.4", "@vxrn/utils": "workspace:*", "@vxrn/vite-native-client": "workspace:*", - "metro-react-native-babel-preset": "^0.77.0" + "babel-plugin-react-compiler": "^19.0.0-beta-201e55d-20241215" }, "devDependencies": { - "@biomejs/biome": "^1.8.3", "@tamagui/build": "^1.121.8", + "depcheck": "^1.4.7", "react-native": "^0.76.5" }, "peerDependencies": { diff --git a/packages/compiler/src/constants.ts b/packages/compiler/src/constants.ts index 7ee1cb5ad..1837efe38 100644 --- a/packages/compiler/src/constants.ts +++ b/packages/compiler/src/constants.ts @@ -1,6 +1,6 @@ import type { ParserConfig } from '@swc/core' -import { createDebugger } from '@vxrn/debug' +import { createDebugger } from '@vxrn/utils' export const { debug } = createDebugger('vxrn:compiler-plugin') diff --git a/packages/one/.depcheckrc b/packages/one/.depcheckrc index 93745ba61..bad8c6403 100644 --- a/packages/one/.depcheckrc +++ b/packages/one/.depcheckrc @@ -6,9 +6,6 @@ ignores: - "one/package.json" - "@vxrn/tslib-lite" - "@react-native-masked-view/masked-view" - # These Babel deps are actually being used (src/vite/plugins/reactCompilerPlugin.ts), but will be reported as unused by depcheck so we need to ignore them - - "@babel/preset-typescript" - - "babel-plugin-react-compiler" # this is used dependend on by react-native-screens and errors vite during scan if not here - "react-native-reanimated" - "react-native-gesture-handler" diff --git a/packages/one/package.json b/packages/one/package.json index 9f875cb10..71d3efc13 100644 --- a/packages/one/package.json +++ b/packages/one/package.json @@ -93,10 +93,8 @@ }, "dependencies": { "@azure/core-asynciterator-polyfill": "^1.0.2", - "@babel/core": "^7.26.0", "@babel/generator": "^7.26.3", "@babel/parser": "^7.26.3", - "@babel/preset-typescript": "^7.26.0", "@babel/traverse": "^7.26.4", "@radix-ui/react-slot": "^1.0.2", "@react-native-masked-view/masked-view": "^0.3.1", @@ -115,7 +113,6 @@ "@vxrn/universal-color-scheme": "workspace:*", "@vxrn/use-isomorphic-layout-effect": "workspace:*", "babel-dead-code-elimination": "^1.0.6", - "babel-plugin-react-compiler": "^19.0.0-beta-201e55d-20241215", "citty": "^0.1.6", "core-js": "^3.38.1", "create-vxrn": "workspace:*", diff --git a/packages/one/types/vite/plugins/reactCompilerPlugin.d.ts b/packages/one/types/vite/plugins/reactCompilerPlugin.d.ts deleted file mode 100644 index 9414d1b5d..000000000 --- a/packages/one/types/vite/plugins/reactCompilerPlugin.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Plugin } from 'vite'; -export declare const createReactCompilerPlugin: (root: string) => Plugin; -//# sourceMappingURL=reactCompilerPlugin.d.ts.map \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0369c365b..e13ba9450 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11540,6 +11540,8 @@ __metadata: "@tamagui/build": "npm:^1.121.8" "@vxrn/utils": "workspace:*" "@vxrn/vite-native-client": "workspace:*" + babel-plugin-react-compiler: "npm:^19.0.0-beta-201e55d-20241215" + depcheck: "npm:^1.4.7" metro-react-native-babel-preset: "npm:^0.77.0" react-native: "npm:^0.76.5" peerDependencies: @@ -21771,10 +21773,8 @@ __metadata: resolution: "one@workspace:packages/one" dependencies: "@azure/core-asynciterator-polyfill": "npm:^1.0.2" - "@babel/core": "npm:^7.26.0" "@babel/generator": "npm:^7.26.3" "@babel/parser": "npm:^7.26.3" - "@babel/preset-typescript": "npm:^7.26.0" "@babel/traverse": "npm:^7.26.4" "@radix-ui/react-slot": "npm:^1.0.2" "@react-native-masked-view/masked-view": "npm:^0.3.1" @@ -21797,7 +21797,6 @@ __metadata: "@vxrn/universal-color-scheme": "workspace:*" "@vxrn/use-isomorphic-layout-effect": "workspace:*" babel-dead-code-elimination: "npm:^1.0.6" - babel-plugin-react-compiler: "npm:^19.0.0-beta-201e55d-20241215" citty: "npm:^0.1.6" core-js: "npm:^3.38.1" create-vxrn: "workspace:*"