Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,973 changes: 646 additions & 1,327 deletions apps/bare/ios/Podfile.lock

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions apps/bare/ios/bare.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,23 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CFLAGS = (
"$(inherited)",
"-DRCT_REMOVE_LEGACY_ARCH=1",
);
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
"-DRCT_REMOVE_LEGACY_ARCH=1",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
USE_HERMES = true;
};
name = Debug;
Expand Down Expand Up @@ -437,17 +442,22 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CFLAGS = (
"$(inherited)",
"-DRCT_REMOVE_LEGACY_ARCH=1",
);
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
"-DRCT_REMOVE_LEGACY_ARCH=1",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
};
Expand Down
18 changes: 9 additions & 9 deletions apps/bare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"uniwind": "workspace:*"
},
"devDependencies": {
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.3",
"@babel/runtime": "7.25.0",
"@react-native-community/cli": "20.0.2",
"@react-native-community/cli-platform-android": "20.0.2",
"@react-native-community/cli-platform-ios": "20.0.2",
"@react-native/babel-preset": "0.82.1",
"@react-native/metro-config": "0.82.1",
"@react-native/typescript-config": "0.82.1",
"@babel/core": "7.29.0",
"@babel/preset-env": "7.29.5",
"@babel/runtime": "7.29.2",
"@react-native-community/cli": "20.1.3",
"@react-native-community/cli-platform-android": "20.1.3",
"@react-native-community/cli-platform-ios": "20.1.3",
"@react-native/babel-preset": "0.85.3",
"@react-native/metro-config": "0.85.3",
"@react-native/typescript-config": "0.85.3",
"@types/react": "catalog:",
"typescript": "catalog:"
},
Expand Down
7 changes: 0 additions & 7 deletions apps/bare/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@
@theme {
--color-primary: oklch(0.72 0.11 178);
}

/* Auto genereated by uniwind - do not modify */

@custom-variant light (&:where(.light, .light *));
@custom-variant dark (&:where(.dark, .dark *));

/* Auto genereated by uniwind - do not modify */
1 change: 1 addition & 0 deletions apps/bare/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*.css'
1 change: 0 additions & 1 deletion apps/expo-example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import './global.css'
import React from 'react'
import { ScrollView, Text, TextInput, TouchableOpacity, View } from 'react-native'

const TailwindTestPage = () => {
Expand Down
1 change: 1 addition & 0 deletions apps/expo-example/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*.css'
8 changes: 4 additions & 4 deletions apps/expo-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
"web": "expo start --web"
},
"dependencies": {
"@expo/metro-runtime": "55.0.6",
"@expo/metro-runtime": "56.0.12",
"uniwind": "workspace:*",
"expo": "catalog:",
"expo-status-bar": "55.0.4",
"expo-status-bar": "56.0.4",
"react": "catalog:",
"react-dom": "catalog:",
"react-native": "catalog:",
"react-native-web": "catalog:",
"tailwindcss": "catalog:"
},
"devDependencies": {
"@babel/core": "7.28.5",
"@babel/core": "7.29.0",
"@types/react": "catalog:",
"babel-plugin-module-resolver": "5.0.2",
"babel-plugin-module-resolver": "5.0.3",
"tailwindcss": "catalog:",
"typescript": "catalog:"
},
Expand Down
2,829 changes: 1,654 additions & 1,175 deletions bun.lock

Large diffs are not rendered by default.

31 changes: 14 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,29 @@
"apps/*"
],
"catalog": {
"typescript": "5.9.3",
"@types/bun": "1.3.10",
"@types/react": "19.2.4",
"@types/react-dom": "19.2.4",
"react": "19.2.4",
"react-dom": "19.2.4",
"expo": "55.0.4",
"react-native": "0.83.2",
"typescript": "6.0.3",
"@types/bun": "1.3.14",
"@types/react": "19.2.15",
"@types/react-dom": "19.2.3",
"react": "19.2.3",
"react-dom": "19.2.3",
"expo": "56.0.4",
"react-native": "0.85.3",
Comment thread
Brentlok marked this conversation as resolved.
"react-native-web": "0.21.2",
"tailwindcss": "4.2.1",
"tailwindcss": "4.3.0",
"vite": "7.2.6"
}
},
"devDependencies": {
"typescript": "catalog:",
"dprint": "0.54.0",
"oxlint": "1.61.0",
"oxlint-tsgolint": "0.21.1",
"oxlint": "1.66.0",
"oxlint-tsgolint": "0.23.0",
"husky": "9.1.7",
"turbo": "2.9.6"
"turbo": "2.9.14"
},
"packageManager": "bun@1.3.10",
"packageManager": "bun@1.3.14",
"trustedDependencies": [
"@tailwindcss/oxide"
],
"patchedDependencies": {
"react-native@0.83.2": "patches/react-native@0.83.2.patch"
}
]
}
2 changes: 1 addition & 1 deletion packages/uniwind/jest.config.native.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
preset: 'react-native',
preset: '@react-native/jest-preset',
displayName: 'native',
testMatch: ['<rootDir>/tests/native/**/*.test.{ts,tsx}'],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect', '<rootDir>/tests/setup.native.ts'],
Expand Down
18 changes: 15 additions & 3 deletions packages/uniwind/jest.config.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default {
'@testing-library/jest-dom',
'<rootDir>/tests/setup.web.ts',
],
preset: 'ts-jest',
moduleNameMapper: {
'^react-native$': 'react-native-web',
'^@/(.*)$': '<rootDir>/src/$1',
Expand All @@ -15,8 +14,21 @@ export default {
'node_modules/(?!(react-native-web)/)',
],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: './tsconfig.test.json',
'^.+\\.tsx?$': ['@swc/jest', {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
},
module: {
type: 'commonjs',
},
}],
},
}
28 changes: 15 additions & 13 deletions packages/uniwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,31 @@
"tailwindcss": ">=4"
},
"devDependencies": {
"@playwright/test": "1.58.2",
"@react-native/babel-preset": "0.84.1",
"@playwright/test": "1.60.0",
"@react-native/babel-preset": "0.85.3",
"@react-native/jest-preset": "0.85.3",
"@swc/core": "1.15.33",
"@swc/jest": "0.2.39",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/jest-native": "5.4.3",
"@testing-library/react": "16.3.2",
"@testing-library/react-native": "13.3.3",
"@types/bun": "catalog:",
"@types/culori": "4.0.1",
"@types/jest": "30.0.0",
"@types/jest": "29.5.14",
"@types/react": "catalog:",
"dpdm": "4.0.1",
"git-cliff": "2.12.0",
"jest": "30.2.0",
"jest-environment-jsdom": "30.2.0",
"metro": "0.84.2",
"prettier": "3.8.1",
"dpdm": "4.2.0",
"git-cliff": "2.13.1",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"metro": "0.84.4",
"prettier": "3.8.3",
"react-native-web": "catalog:",
"react-test-renderer": "19.2.4",
"release-it": "19.2.4",
"ts-jest": "29.4.6",
"react-test-renderer": "19.2.3",
"release-it": "20.0.1",
"typescript": "catalog:",
"unbuild": "3.6.1",
"vite": "catalog:",
"esbuild": "0.27.3"
"esbuild": "0.28.0"
}
}
2 changes: 1 addition & 1 deletion packages/uniwind/src/bundler/adapters/metro/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const patchMetroGraphToSupportUncachedModules = () => {
function traverseDependencies(this: Graph, paths: Array<string>, options: GraphOptions<any>) {
this.dependencies.forEach(dependency => {
if (
dependency.output.find(file => file.data.css?.skipCache === true)
dependency.output.find(file => (file.data as any)?.css?.skipCache === true)
&& !paths.includes(dependency.path)
) {
// @ts-expect-error Hidden property
Expand Down
7 changes: 6 additions & 1 deletion packages/uniwind/src/bundler/artifacts/css/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Logger } from '@/bundler/logger'
import { compile } from '@tailwindcss/node'
import fs from 'fs'
import { transform } from 'lightningcss'
import type { ImportDependency } from 'lightningcss'
import path from 'path'

const readFileSafe = (filePath: string) => {
Expand Down Expand Up @@ -65,7 +66,11 @@ export const generateCSSForThemes = async (themes: Array<string>, input: string)

const importUrls = new Set<string>()
const importsCSS = dependencies
.filter(dependency => {
.filter((dependency): dependency is ImportDependency => {
if (dependency.type !== 'import') {
return false
}

if (dependency.url.startsWith('.')) {
importUrls.add(path.resolve(path.dirname(cssPath), dependency.url))

Expand Down
1 change: 0 additions & 1 deletion packages/uniwind/tests/type-test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"noEmit": true,
"rootDir": ".",
"baseUrl": ".",
"paths": {
"uniwind": ["../../dist/module/index.d.ts"]
}
Expand Down
12 changes: 0 additions & 12 deletions patches/react-native@0.83.2.patch

This file was deleted.