Fix repo fix to not add typesVersions for non-script exports

Only CSS and other non-script, non-JSON exports should be excluded from
typesVersions. The package.json export still needs to be included.

Also preserves field order when updating existing typesVersions.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Patrik Oldsberg
2026-02-10 01:15:02 +01:00
parent 30053d9676
commit ae08712748
3 changed files with 42 additions and 13 deletions
+2
View File
@@ -3,3 +3,5 @@
---
Added support for CSS exports in package builds. When a package declares a CSS file in its `exports` field (e.g., `"./styles.css": "./src/styles.css"`), the CLI will automatically bundle it during `backstage-cli package build`, resolving any `@import` statements. The export path is rewritten from `src/` to `dist/` at publish time.
Fixed `backstage-cli repo fix` to not add `typesVersions` entries for non-script exports like CSS files.