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
5 changes: 0 additions & 5 deletions .changeset/bright-variants-cascade.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/calm-react-native-compatibility.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fuzzy-layouts-match.md

This file was deleted.

10 changes: 10 additions & 0 deletions .changeset/ledger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
dir: packages/lynx
intents:
- lynx-tailwind-v4-compat
"@weapp-tailwindcss/react-native@0.2.5":
dir: packages/react-native
intents:
- calm-react-native-compatibility
weapp-tailwindcss@5.3.1:
dir: packages/weapp-tailwindcss
intents:
Expand All @@ -10,3 +14,9 @@ weapp-tailwindcss@5.3.2:
dir: packages/weapp-tailwindcss
intents:
- bright-harmony-vdom
weapp-tailwindcss@5.3.3:
dir: packages/weapp-tailwindcss
intents:
- bright-variants-cascade
- fuzzy-layouts-match
- slick-bears-sleep
5 changes: 0 additions & 5 deletions .changeset/slick-bears-sleep.md

This file was deleted.

23 changes: 12 additions & 11 deletions e2e/web-vite-demo-hmr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import process from 'node:process'
import path from 'pathe'
import { chromium } from 'playwright'
import { afterEach, describe, it } from 'vitest'
import { writeFilePreserveEol } from '../tools/weapp-tailwindcss-scripts/src/watch-hmr-regression/text'
import { resolveChromeExecutable } from './hbuilderx-local/process'
import { webViteHmrCases } from './web-vite-demo-hmr-cases'

Expand Down Expand Up @@ -206,7 +207,7 @@ async function mutateSource(item: WebViteHmrCase, sourceFile: string, kind: Sour
if (next === current) {
throw new Error(`${item.name} Web HMR 源码替换没有产生变化`)
}
await fs.writeFile(sourceFile, next, 'utf8')
await writeFilePreserveEol(sourceFile, next, current)
return {
previous: current,
next,
Expand Down Expand Up @@ -281,9 +282,9 @@ async function runWebIconifyHmr(page: Page, item: WebViteHmrCase, sourceFile: st
throw new Error(`${item.name} Web Iconify HMR probe 缺少 before content class`)
}
const sourceWithUpdatedContent = sourceWithProbe.replace(iconifyBeforeContentClass, iconifyAfterContentClass)
await fs.writeFile(sourceFile, sourceWithProbe, 'utf8')
await writeFilePreserveEol(sourceFile, sourceWithProbe, original)
await waitForIconifyCss(page, item, iconifyBeforeContentClass)
await fs.writeFile(sourceFile, sourceWithUpdatedContent, 'utf8')
await writeFilePreserveEol(sourceFile, sourceWithUpdatedContent, original)
await waitForIconifyCss(page, item, iconifyAfterContentClass)
}

Expand Down Expand Up @@ -464,9 +465,9 @@ async function waitForTitleHmrAfterMutation(page: Page, item: WebViteHmrCase, so
firstError = error
}

await fs.writeFile(sourceFile, mutation.previous, 'utf8')
await writeFilePreserveEol(sourceFile, mutation.previous, mutation.previous)
await wait(500)
await fs.writeFile(sourceFile, mutation.next, 'utf8')
await writeFilePreserveEol(sourceFile, mutation.next, mutation.previous)

const elapsedMs = Date.now() - startedAt
try {
Expand Down Expand Up @@ -702,7 +703,7 @@ describe('demo/web source HMR', () => {
const hmrMessages = collectViteHmrMessages(page)
const original = await fs.readFile(sourceFile, 'utf8')
restoreSource = async () => {
await fs.writeFile(sourceFile, original, 'utf8')
await writeFilePreserveEol(sourceFile, original, original)
}
await page.goto(baseUrl, {
waitUntil: 'domcontentloaded',
Expand Down Expand Up @@ -765,7 +766,7 @@ describe('demo/web source HMR', () => {
const original = await fs.readFile(sourceFile, 'utf8')
const flow = createTailwindClassFlowMutation(item, original)
restoreSource = async () => {
await fs.writeFile(sourceFile, original, 'utf8')
await writeFilePreserveEol(sourceFile, original, original)
}
await page.goto(baseUrl, {
waitUntil: 'domcontentloaded',
Expand Down Expand Up @@ -793,7 +794,7 @@ describe('demo/web source HMR', () => {

const addMessageStart = hmrMessages.length
await measureHmrLatency(`${item.name} class add`, async () => {
await fs.writeFile(sourceFile, flow.addedSource, 'utf8')
await writeFilePreserveEol(sourceFile, flow.addedSource, original)
await waitForFlowElementStyle(page, item, flow.selector, {
backgroundColor: 'rgb(255, 255, 255)',
borderTopColor: 'rgb(0, 255, 0)',
Expand All @@ -808,7 +809,7 @@ describe('demo/web source HMR', () => {

const modifyMessageStart = hmrMessages.length
await measureHmrLatency(`${item.name} class modify`, async () => {
await fs.writeFile(sourceFile, flow.modifiedSource, 'utf8')
await writeFilePreserveEol(sourceFile, flow.modifiedSource, original)
await waitForFlowElementStyle(page, item, flow.selector, {
backgroundColor: 'rgb(255, 255, 255)',
borderTopColor: 'rgb(255, 0, 170)',
Expand All @@ -823,7 +824,7 @@ describe('demo/web source HMR', () => {

const removeClassMessageStart = hmrMessages.length
await measureHmrLatency(`${item.name} class remove`, async () => {
await fs.writeFile(sourceFile, flow.removedClassSource, 'utf8')
await writeFilePreserveEol(sourceFile, flow.removedClassSource, original)
await waitForFlowElementStyle(page, item, flow.selector, {
backgroundColor: 'rgb(255, 255, 255)',
borderTopColor: originalState.borderTopColor,
Expand All @@ -838,7 +839,7 @@ describe('demo/web source HMR', () => {

const rollbackMessageStart = hmrMessages.length
await measureHmrLatency(`${item.name} class rollback`, async () => {
await fs.writeFile(sourceFile, original, 'utf8')
await writeFilePreserveEol(sourceFile, original, original)
await waitForFlowElementStyle(page, item, flow.selector, {
backgroundColor: 'rgb(255, 255, 255)',
borderTopColor: originalState.borderTopColor,
Expand Down
7 changes: 7 additions & 0 deletions examples/react-lynx/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

### Patch Changes

- Updated dependencies:
- @weapp-tailwindcss/lynx@0.3.2

## 0.1.2

### Patch Changes

- Updated dependencies:
- @weapp-tailwindcss/lynx@0.3.1

Expand Down
7 changes: 7 additions & 0 deletions examples/react-native-expo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

### Patch Changes

- Updated dependencies:
- @weapp-tailwindcss/react-native@0.2.5

## 0.1.3

### Patch Changes

- Updated dependencies:
- @weapp-tailwindcss/react-native@0.2.4

Expand Down
7 changes: 7 additions & 0 deletions packages/build-all/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

### Patch Changes

- Updated dependencies:
- weapp-tailwindcss@5.3.3

## 0.0.72

### Patch Changes

- Updated dependencies:
- weapp-tailwindcss@5.3.2

Expand Down
7 changes: 7 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @weapp-tailwindcss/cli

## 5.3.3

### Patch Changes

- Updated dependencies:
- weapp-tailwindcss@5.3.3

## 5.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@weapp-tailwindcss/cli",
"type": "module",
"version": "5.3.2",
"version": "5.3.3",
"description": "Cross-platform Tailwind CSS CLI for Web and mini-program builds. 面向 Web 与小程序构建的跨端 Tailwind CSS CLI。",
"author": "ice breaker <1324318532@qq.com>",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/lynx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @weapp-tailwindcss/lynx

## 0.3.2

### Patch Changes

- Updated dependencies:
- weapp-tailwindcss@5.3.3

## 0.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/lynx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@weapp-tailwindcss/lynx",
"type": "module",
"version": "0.3.1",
"version": "0.3.2",
"description": "Tailwind CSS integration for ReactLynx and Rspeedy cross-platform builds. 面向 ReactLynx 与 Rspeedy 跨端构建的 Tailwind CSS 集成。",
"license": "MIT",
"repository": {
Expand Down
17 changes: 17 additions & 0 deletions packages/react-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @weapp-tailwindcss/react-native

## 0.2.5

### Patch Changes

- 收紧 React Native 样式编译边界,只生成平台明确支持的属性和条件变体,并补充比例值、百分比透明度、项目根目录及 CSS 入口类型支持,避免未知 CSS 属性或浏览器 selector 变体被误报为可用原生样式。

稳定 Babel 静态 lookup 使用的 StyleSheet ID,避免 TSX 或 CSS HMR 改变规则顺序后串用其他 class 的样式;同时加入 Expo Web、Android、iOS 共用的 118 项兼容性报告、截图和独立 TSX/CSS HMR 门禁。

Metro transformer 在未透传自定义 id 或 manifest 路径时也会按项目根目录等待异步样式生成完成,并通过跨进程 ready 标记同步 manifest 与 virtual module,避免构建速度较慢或 HMR 刷新时使用空 manifest 导致静态 className 未被转换。

React Native 类型增强入口改为纯类型依赖,不再从 workspace 包目录额外加载另一份 React Native 运行时,避免 Metro bundle 与 Expo 原生二进制使用不同 patch 版本后出现原生模块注册表为空的问题。

Android 与 iOS 的 Metro resolver 进一步把 `react`、`react-native` 及其子路径锚定到应用项目根目录,确保 linked workspace 包与原生二进制共用同一份 React Native runtime;Web 保留 Expo 原有的平台解析与 `react-native-web` 映射。

- Updated dependencies:
- weapp-tailwindcss@5.3.3

## 0.2.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@weapp-tailwindcss/react-native",
"type": "module",
"version": "0.2.4",
"version": "0.2.5",
"description": "Tailwind CSS compiler and Expo Metro integration for cross-platform React Native apps. 面向跨端 React Native 应用的 Tailwind CSS 编译器与 Expo Metro 集成。",
"license": "MIT",
"repository": {
Expand Down
10 changes: 10 additions & 0 deletions packages/weapp-tailwindcss/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# weapp-tailwindcss

## 5.3.3

### Patch Changes

- 修复 uni-app x H5 局部 Tailwind 工具类的级联优先级,确保 `dark` 等条件变体能够覆盖同一元素上的基础工具类。

- 支持通过 `uniAppX.componentLocalStyles.componentMatcher` 和 `pageMatcher` 为 `layouts` 等自定义目录启用局部 Tailwind 样式,并保持 Web、原生 App 与鸿蒙构建的路径匹配行为一致。

- 修复 uni-app x H5 中已进入构建图但未命中显式 Tailwind 正向源码范围的页面,暗色等 variant 任意值类无法生成和同步转译的问题。

## 5.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/weapp-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "weapp-tailwindcss",
"type": "module",
"version": "5.3.2",
"version": "5.3.3",
"description": "Bring Tailwind CSS to every platform! 把 Tailwind CSS 的原子化开发体验带到全端!",
"author": "ice breaker <1324318532@qq.com>",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions website/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

### Patch Changes

- Updated dependencies:
- weapp-tailwindcss@5.3.3

## 1.0.65

### Patch Changes

- Updated dependencies:
- weapp-tailwindcss@5.3.2

Expand Down
Loading