@nipe-solutions/flex-layout-codemod 2.0.0-beta.1 → 2.0.0-beta.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/CHANGELOG.md +21 -0
- package/README.md +27 -71
- package/dist/cli.js +8737 -4139
- package/dist/cli.js.map +1 -1
- package/package.json +31 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ca82744: Expand the documentation site into a comprehensive migration reference with production-verified CLI, diagnostic, compatibility, report, and transformation contracts. Add review-first workflow guidance, target-specific explorers and examples, responsive documentation navigation, and keyboard-accessible code regions.
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.2
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 89c6f92: Make migration planning the default, require `--write` to apply project changes, and publish schema-2 reports with explicit execution and application state.
|
|
14
|
+
- 77391e3: Launch the public documentation site and browser-only single-template migration playground, and point package metadata to the production documentation homepage.
|
|
15
|
+
- f058c0b: Add opt-in Tailwind conversion for the archived orientation breakpoints and project-configured print fallback behavior.
|
|
16
|
+
- 40e3719: Add an explicit native CSS target that updates templates and one owned companion stylesheet as a recoverable transaction.
|
|
17
|
+
- 029562c: Add opt-in migration of safe literal responsive image sources to native picture markup with atomic template validation and report-based review locations.
|
|
18
|
+
- 6f8ef7a: Convert literal Angular Flex-Layout Grid directives, including standard responsive aliases, when Tailwind compiler output and element ownership prove an exact migration.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 4715a71: Add an executable compatibility inventory and rewrite beta onboarding around safe previews, pinned team installation, exact support boundaries, and copyable CLI workflows.
|
|
23
|
+
|
|
3
24
|
## 2.0.0-beta.1
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,100 +1,56 @@
|
|
|
1
1
|
# Angular Flex-Layout Codemod
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular Flex-Layout Codemod is a review-first CLI for migrating supported Angular Flex-Layout template directives to Tailwind CSS v4 or native CSS. Version 2 remains a prerelease.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Plan first. Review unresolved cases. Write only when you are ready.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The codemod changes only cases for which it can produce a supported equivalent. When it cannot prove that boundary, it leaves the source in place and reports a diagnostic instead of guessing.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Read the [detailed documentation](https://angular-flex-layout-codemod.nipesolutions.com/docs), or try a single template in the separate [browser playground](https://angular-flex-layout-codemod.nipesolutions.com/#playground).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Requirements and installation
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The CLI requires Node.js 24 or newer. Install the current beta as an exact development dependency so your package manifest and lockfile retain the reviewed version:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```html
|
|
18
|
-
<!-- input -->
|
|
19
|
-
<div ngClass.sm="flex items-center"></div>
|
|
20
|
-
<div ngStyle.lt-md="font-size.px: 14; color: #334155"></div>
|
|
21
|
-
|
|
22
|
-
<!-- output -->
|
|
23
|
-
<div
|
|
24
|
-
class="[@media_screen_and_(min-width:_600px)_and_(max-width:_959.98px)]:flex [@media_screen_and_(min-width:_600px)_and_(max-width:_959.98px)]:items-center"
|
|
25
|
-
></div>
|
|
26
|
-
<div
|
|
27
|
-
class="[@media_screen_and_(max-width:_959.98px)]:[font-size:14px] [@media_screen_and_(max-width:_959.98px)]:[color:#334155]"
|
|
28
|
-
></div>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Application classes, project plugin utilities, custom-theme-dependent candidates such as `bg-brand-500`, unsafe style values, bindings, interpolation, and deprecated `class.<alias>` or `style.<alias>` selectors remain in place with review diagnostics. The current mode does not inspect project styles or Tailwind configuration and does not generate a companion stylesheet.
|
|
32
|
-
|
|
33
|
-
Existing literal classes use a broader conservative ownership check than generated-candidate admission. Compiler-modeled Tailwind utilities contribute every stable declaration they emit, including inferred arbitrary text sizes, directional border style/width pairs, and shadow color custom properties. A recognized pinned Tailwind utility whose complete property set is not modeled is treated as an unknown CSS authority and blocks an intersecting conversion instead of being silently ignored; ordinary application classes such as `card` remain additive.
|
|
34
|
-
|
|
35
|
-
Literal `fxShow` and `fxHide` inputs are converted when the element's complete display behavior is provable. The conversion follows Angular Flex-Layout coercion: `fxShow="false"` hides, `fxHide="false"` shows, and other literal strings, including `"0"`, are truthy before `fxHide` inversion. Literal values use Angular-decoded text, so an entity-spelled value such as `false` has the same semantics as `false`. Hiding uses `hidden`; a responsive shown state after base hiding restores only a display value proven by a converted `fxLayout` or one unambiguous base Tailwind display utility.
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<!-- input -->
|
|
39
|
-
<div fxLayout="column" fxShow="false" fxShow.sm></div>
|
|
40
|
-
|
|
41
|
-
<!-- output -->
|
|
42
|
-
<div
|
|
43
|
-
class="flex flex-col box-border hidden [@media_screen_and_(min-width:_600px)_and_(max-width:_959.98px)]:flex"
|
|
44
|
-
></div>
|
|
15
|
+
```bash
|
|
16
|
+
npm install --save-dev --save-exact @nipe-solutions/flex-layout-codemod@beta
|
|
45
17
|
```
|
|
46
18
|
|
|
47
|
-
|
|
19
|
+
See [Installation and requirements](https://angular-flex-layout-codemod.nipesolutions.com/docs/installation) for the project-baseline checklist.
|
|
48
20
|
|
|
49
|
-
##
|
|
21
|
+
## Plan, review, write
|
|
50
22
|
|
|
51
|
-
|
|
23
|
+
Create a plan and an optional JSON report without changing project templates or stylesheets:
|
|
52
24
|
|
|
53
25
|
```bash
|
|
54
|
-
flex-layout-codemod ./src --
|
|
26
|
+
npx flex-layout-codemod ./src --report ./reports/flex-layout.json
|
|
55
27
|
```
|
|
56
28
|
|
|
57
|
-
|
|
29
|
+
Review the proposed output and every unresolved diagnostic. The report is the command's intentional filesystem output in plan mode.
|
|
58
30
|
|
|
59
|
-
|
|
60
|
-
flex-layout-codemod ./src --target tailwind --output ./migrated-src --dry-run --report ./reports/flex-layout.json
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Only changed `.html` files are written during a real migration. For a single-file input, the planned output path must end in `.html` (case-insensitive); omitting `--output` keeps the default in-place behavior. For a folder input, `--output` remains a directory and each derived template output retains its `.html` path. `--dry-run` applies and validates edits in memory but does not write template output or create its missing parent directories. A requested `--report <path>` is an explicit reporting side effect and is still written atomically during a dry-run. The report path must be nonblank and end in `.json` (case-insensitive). Migratable inputs and planned template outputs exclusively use `.html`, so this structural rule prevents report collisions while allowing reports anywhere, including inside input or output trees. Invalid output and report paths are rejected before migration without creating output or report directories.
|
|
64
|
-
|
|
65
|
-
Unresolved `review`, `unsupported`, or `invalid` results are strict by default. To preserve the same diagnostics and migration output while accepting unresolved work in automation, use:
|
|
31
|
+
Apply the reviewed Tailwind CSS plan explicitly:
|
|
66
32
|
|
|
67
33
|
```bash
|
|
68
|
-
flex-layout-codemod ./src --
|
|
34
|
+
npx flex-layout-codemod ./src --target tailwind --write
|
|
69
35
|
```
|
|
70
36
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| Code | Meaning |
|
|
74
|
-
| ---: | -------------------------------------------------------------------------------------- |
|
|
75
|
-
| `0` | Migration completed with no unresolved results, or `--allow-unresolved` accepted them. |
|
|
76
|
-
| `1` | Configuration, parsing, template I/O, report writing, or an internal invariant failed. |
|
|
77
|
-
| `2` | Migration completed safely, but unresolved results remain in strict mode. |
|
|
78
|
-
|
|
79
|
-
JSON reports use schema version `1`. Report paths use forward slashes and are relative to the input root; a single-file input is represented by its basename, never an absolute checkout path. Files are path-sorted, results retain source order, and the summary is derived from those file results.
|
|
37
|
+
For native CSS output, target limits, output paths, and recovery behavior, follow the [migration workflow](https://angular-flex-layout-codemod.nipesolutions.com/docs/workflow). Keep the migration on a clean branch and review the resulting diff and application tests.
|
|
80
38
|
|
|
81
|
-
|
|
39
|
+
## Documentation
|
|
82
40
|
|
|
83
|
-
|
|
41
|
+
- [Migration guide](https://angular-flex-layout-codemod.nipesolutions.com/docs)
|
|
42
|
+
- [Compatibility by target and directive](https://angular-flex-layout-codemod.nipesolutions.com/docs/compatibility)
|
|
43
|
+
- [Diagnostics and remediation](https://angular-flex-layout-codemod.nipesolutions.com/docs/diagnostics)
|
|
44
|
+
- [Complete CLI reference](https://angular-flex-layout-codemod.nipesolutions.com/docs/cli)
|
|
45
|
+
- [JSON reports and CI](https://angular-flex-layout-codemod.nipesolutions.com/docs/reports)
|
|
46
|
+
- [Safety, transactions, and recovery](https://angular-flex-layout-codemod.nipesolutions.com/docs/safety)
|
|
84
47
|
|
|
85
|
-
|
|
48
|
+
## Contributing and support
|
|
86
49
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
The repository requires Node.js 24 and npm 11.
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
npm ci
|
|
93
|
-
npm run verify
|
|
94
|
-
```
|
|
50
|
+
Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. Use [GitHub Issues](https://github.com/NIPE-Solutions/flex-layout-migrator/issues) for reproducible, redacted migration cases. Report vulnerabilities only through [GitHub private vulnerability reporting](https://github.com/NIPE-Solutions/flex-layout-migrator/security/advisories/new); see [SECURITY.md](SECURITY.md) and [support guidance](docs/SUPPORT.md).
|
|
95
51
|
|
|
96
|
-
|
|
52
|
+
Maintainers should follow the reviewed [release process](docs/architecture/release-process.md).
|
|
97
53
|
|
|
98
54
|
## License
|
|
99
55
|
|
|
100
|
-
MIT
|
|
56
|
+
[MIT](LICENSE)
|