tailwindcss-patch 8.7.1 → 8.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -119,19 +119,19 @@ The CLI loads `tailwindcss-patch.config.ts` via `@tailwindcss-mangle/config`. Le
119
119
 
120
120
  ### Migrate options
121
121
 
122
- | Flag | Description |
123
- | ---------------- | ---------------------------------------------------------------------------- |
124
- | `--cwd <dir>` | Working directory used to locate config files. |
125
- | `--config <file>`| Migrate only one specific config file path. |
126
- | `--workspace` | Recursively scan the workspace for supported config filenames. |
127
- | `--max-depth <n>`| Maximum recursion depth for `--workspace` mode (default: `6`). |
128
- | `--include <glob>` | Only migrate files matching this glob pattern (repeatable). |
129
- | `--exclude <glob>` | Skip files matching this glob pattern (repeatable). |
122
+ | Flag | Description |
123
+ | ---------------------- | --------------------------------------------------------------------- |
124
+ | `--cwd <dir>` | Working directory used to locate config files. |
125
+ | `--config <file>` | Migrate only one specific config file path. |
126
+ | `--workspace` | Recursively scan the workspace for supported config filenames. |
127
+ | `--max-depth <n>` | Maximum recursion depth for `--workspace` mode (default: `6`). |
128
+ | `--include <glob>` | Only migrate files matching this glob pattern (repeatable). |
129
+ | `--exclude <glob>` | Skip files matching this glob pattern (repeatable). |
130
130
  | `--report-file <file>` | Write the migration report JSON to this file. |
131
- | `--backup-dir <dir>` | Store pre-migration file backups in this directory. |
132
- | `--check` | Check mode for CI. Exits with an error if files still need migration. |
133
- | `--json` | Print the migration report as JSON. |
134
- | `--dry-run` | Preview planned changes without writing files. |
131
+ | `--backup-dir <dir>` | Store pre-migration file backups in this directory. |
132
+ | `--check` | Check mode for CI. Exits with an error if files still need migration. |
133
+ | `--json` | Print the migration report as JSON. |
134
+ | `--dry-run` | Preview planned changes without writing files. |
135
135
 
136
136
  `tw-patch migrate` scans `tailwindcss-patch.config.*` and `tailwindcss-mangle.config.*` in the target directory. With `--workspace`, it recursively scans sub-projects (excluding folders like `node_modules`, `.git`, and `dist`). Use `--include` / `--exclude` to control monorepo scanning ranges. It rewrites deprecated keys (for example `registry.output` -> `registry.extract`, `registry.tailwind` -> `registry.tailwindcss`) and prints a per-file change summary.
137
137
 
@@ -141,25 +141,25 @@ Migration reports now include envelope metadata: `reportKind`, `schemaVersion`,
141
141
 
142
142
  ### Restore options
143
143
 
144
- | Flag | Description |
145
- | --------------------- | ----------------------------------------------------------------- |
146
- | `--cwd <dir>` | Working directory used to resolve report and target paths. |
147
- | `--report-file <file>`| Migration report file path (defaults to `.tw-patch/migrate-report.json`). |
148
- | `--dry-run` | Preview restore targets without writing files. |
149
- | `--strict` | Fail when any backup file in the report is missing. |
150
- | `--json` | Print restore summary as JSON. |
144
+ | Flag | Description |
145
+ | ---------------------- | ------------------------------------------------------------------------- |
146
+ | `--cwd <dir>` | Working directory used to resolve report and target paths. |
147
+ | `--report-file <file>` | Migration report file path (defaults to `.tw-patch/migrate-report.json`). |
148
+ | `--dry-run` | Preview restore targets without writing files. |
149
+ | `--strict` | Fail when any backup file in the report is missing. |
150
+ | `--json` | Print restore summary as JSON. |
151
151
 
152
152
  `tw-patch restore` validates report schema metadata when available. Reports with unsupported `reportKind` or newer `schemaVersion` are rejected to avoid unsafe restores. Legacy reports without metadata are still supported.
153
153
  With `--json`, restore output includes `reportKind` / `reportSchemaVersion` when report metadata is present.
154
154
 
155
155
  ### Validate options
156
156
 
157
- | Flag | Description |
158
- | --------------------- | ----------------------------------------------------------------- |
159
- | `--cwd <dir>` | Working directory used to resolve report paths. |
160
- | `--report-file <file>`| Migration report file path (defaults to `.tw-patch/migrate-report.json`). |
161
- | `--strict` | Fail when any backup file in the report is missing. |
162
- | `--json` | Print validation result as JSON. |
157
+ | Flag | Description |
158
+ | ---------------------- | ------------------------------------------------------------------------- |
159
+ | `--cwd <dir>` | Working directory used to resolve report paths. |
160
+ | `--report-file <file>` | Migration report file path (defaults to `.tw-patch/migrate-report.json`). |
161
+ | `--strict` | Fail when any backup file in the report is missing. |
162
+ | `--json` | Print validation result as JSON. |
163
163
 
164
164
  `tw-patch validate` performs migration report compatibility checks without writing restored files. It runs report schema validation and scans backup references in dry-run mode.
165
165
  On failure, validate uses dedicated exit codes for CI:
@@ -196,6 +196,7 @@ esac
196
196
  ```
197
197
 
198
198
  GitHub Actions templates:
199
+
199
200
  - single job: `packages/tailwindcss-patch/examples/github-actions/validate-migration-report.yml`
200
201
  - monorepo matrix shards (`root/apps/packages`): `packages/tailwindcss-patch/examples/github-actions/validate-migration-report-matrix.yml`
201
202
  - monorepo affected shards (PR diff-aware): `packages/tailwindcss-patch/examples/github-actions/validate-migration-report-affected.yml`
@@ -214,30 +215,30 @@ This lets you choose between action-managed setup or workflow-managed setup depe
214
215
  ### CI copy checklist
215
216
 
216
217
  1. Pick one workflow template based on your repository shape:
217
- `validate-migration-report.yml` (single job), `validate-migration-report-matrix.yml` (fixed shards), or `validate-migration-report-affected.yml` (PR diff-aware shards).
218
+ `validate-migration-report.yml` (single job), `validate-migration-report-matrix.yml` (fixed shards), or `validate-migration-report-affected.yml` (PR diff-aware shards).
218
219
  2. Always copy the shared composite action:
219
- `packages/tailwindcss-patch/examples/github-actions/actions/validate-migration-report/action.yml`.
220
+ `packages/tailwindcss-patch/examples/github-actions/actions/validate-migration-report/action.yml`.
220
221
  3. If you use the affected-shards template, also copy:
221
- `packages/tailwindcss-patch/examples/github-actions/scripts/resolve-shards.mjs`,
222
- `packages/tailwindcss-patch/examples/github-actions/resolve-shards-result.schema.json`,
223
- `packages/tailwindcss-patch/examples/github-actions/resolve-shards-result.dispatch.snapshot.json`.
222
+ `packages/tailwindcss-patch/examples/github-actions/scripts/resolve-shards.mjs`,
223
+ `packages/tailwindcss-patch/examples/github-actions/resolve-shards-result.schema.json`,
224
+ `packages/tailwindcss-patch/examples/github-actions/resolve-shards-result.dispatch.snapshot.json`.
224
225
  4. If your workspace paths differ from defaults, add `.tw-patch/ci-shards.json` (based on `ci-shards.example.json`) and adjust shard patterns/report files.
225
226
  5. Confirm the composite action inputs match your runner setup:
226
- action-managed setup (`setup-pnpm/setup-node/install-deps`) or pre-provisioned setup (`false` + custom install command).
227
+ action-managed setup (`setup-pnpm/setup-node/install-deps`) or pre-provisioned setup (`false` + custom install command).
227
228
  6. Keep `permissions.contents: read` and ensure `pnpm-lock.yaml` path matches `cache-dependency-path`.
228
229
 
229
230
  ### CI troubleshooting
230
231
 
231
232
  - `uses: ./.../validate-migration-report` not found:
232
- the workflow references a local action path; copy the action directory with the workflow file.
233
+ the workflow references a local action path; copy the action directory with the workflow file.
233
234
  - `No affected shards for migration report validation.` in PR:
234
- either files are outside configured shard patterns or base diff resolution returned empty; verify `.tw-patch/ci-shards.json` and PR base branch.
235
+ either files are outside configured shard patterns or base diff resolution returned empty; verify `.tw-patch/ci-shards.json` and PR base branch.
235
236
  - `Unknown scope` in composite action:
236
- `scope` currently accepts only `all`, `root`, `apps`, `packages` unless you customize action logic.
237
+ `scope` currently accepts only `all`, `root`, `apps`, `packages` unless you customize action logic.
237
238
  - `validate` exits `21/22/23`:
238
- `21` incompatible report schema/kind, `22` missing backups under `--strict`, `23` report/backup I/O failure.
239
+ `21` incompatible report schema/kind, `22` missing backups under `--strict`, `23` report/backup I/O failure.
239
240
  - Resolver snapshot diff failure in `workflow-lint`:
240
- you changed resolver contract behavior; update both schema/snapshot fixtures and corresponding tests in one commit.
241
+ you changed resolver contract behavior; update both schema/snapshot fixtures and corresponding tests in one commit.
241
242
 
242
243
  ### Token report options
243
244
 
@@ -300,6 +301,7 @@ The constructor accepts either the new object shown above or historical shapes.
300
301
  Deprecated fields kept temporarily (to be removed in the next major): `cwd`, `overwrite`, `tailwind`, `features`, `output`.
301
302
 
302
303
  Migration mapping:
304
+
303
305
  - `cwd` -> `projectRoot`
304
306
  - `overwrite` -> `apply.overwrite`
305
307
  - `tailwind` -> `tailwindcss`