Commit Graph

73231 Commits

Author SHA1 Message Date
Fredrik Adelöw 744fa1fb8b chore: remove duplicate dependencies/devDependencies entries
Remove duplicated entries that appeared in both dependencies and
devDependencies across 10 packages. Also remove zod entirely from
core-compat-api as it is unused.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 10:43:07 +02:00
Fredrik Adelöw ead0ca27e5 chore: add changesets for duplicate dependency cleanup
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 10:27:10 +02:00
Fredrik Adelöw f0c27227cf chore: remove duplicate dependencies/devDependencies entries
Several packages had the same dependency listed in both `dependencies`
and `devDependencies`. This removes the duplicate from whichever section
is incorrect based on actual usage in the source code.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 10:22:01 +02:00
Johan Persson d3dbbe57e1 docs-ui: add missing aria-labels to toolbar controls
Add aria-labels to the theme select, color scheme toggle group,
and the individual light/dark toggle buttons.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-16 09:26:39 +02:00
Johan Persson 88119c21c8 docs-ui: use matching casing for changelog component badges
Change changelog badge labels from spaced title case (e.g.
"Button Link") to PascalCase (e.g. "ButtonLink") so they match
the actual component names and are searchable. Hook slugs
starting with `use-` display as camelCase (e.g. "useTable").

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-16 09:26:39 +02:00
Johan Persson 00078b3179 docs-ui: sync changelog for v0.14.0
Generated changelog entries for @backstage/ui v0.14.0 release.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-16 09:26:39 +02:00
Johan Persson 552e4b2d43 docs-ui: add missing component slugs and fix changelog sync
Add `badge`, `slider`, and `use-table` to the Component type so
the changelog sync script recognizes them. Add `useTable` special
case mapping in the sync script, and include `use-table` in the
Table docs page changelog.

Also fix CHANGELOG.md to use `Slider` instead of `RangeSlider`
as the affected component name.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-16 09:26:39 +02:00
backstage-goalie[bot] 951ee25105 Merge pull request #33934 from backstage/renovate/npm-dompurify-vulnerability
Update dependency dompurify to v3.4.0 [SECURITY]
2026-04-16 05:04:42 +00:00
renovate[bot] dc868864df Update dependency dompurify to v3.4.0 [SECURITY]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-16 03:53:12 +00:00
Fredrik Adelöw b0f39adb37 Merge pull request #33927 from backstage/freben/ts6-migration-test
frontend-test-utils: fix implicit any types for TypeScript 6 compatibility
2026-04-15 22:38:38 +02:00
Patrik Oldsberg 0cdcf748eb Merge pull request #33926 from backstage/rugvip/remove-shipped-patches
patches: 🧹
2026-04-15 22:27:16 +02:00
Fredrik Adelöw 9279ea8366 frontend-test-utils: fix implicit any types for TypeScript 6 compatibility
Add explicit type annotations to `.map()` callback parameters in
`renderInTestApp` to prevent TS7006 errors with TypeScript 6, and
update `@mswjs/interceptors` to 0.39.8 within the existing version
range.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-15 22:02:18 +02:00
Patrik Oldsberg d57f36e2b8 chore: remove shipped .patches entries
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 20:12:12 +02:00
Fredrik Adelöw 04dea64eb7 Merge pull request #33897 from backstage/freben/fix-irreversible-migration
fix(catalog-backend): fix irreversible database migration down functions
2026-04-15 17:44:09 +02:00
Patrik Oldsberg 5f1d32b415 Merge pull request #33892 from backstage/rugvip/remove-cached-entity-loader-options-export
techdocs-backend: 🧹
2026-04-15 16:24:53 +02:00
Patrik Oldsberg 927c0039d7 repo-tools, create-app: replace duplicate error utilities with cli-common imports (#33893)
* Replace duplicate error utilities with @backstage/cli-common imports

Remove dead CustomError and ExitCodeError classes from repo-tools and
create-app, replacing them with the ExitCodeError import from
@backstage/cli-common. This fixes the instanceof check in exitWithError
so it actually catches errors thrown by cli-common's run().

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* Add changeset for repo-tools and create-app

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-15 12:39:42 +00:00
Patrik Oldsberg ba9717cf70 Merge pull request #33913 from drodil/config_schemas
fix: replace old config schemas for extensions and blueprints
2026-04-15 14:21:47 +02:00
Patrik Oldsberg d130fbc6ec Merge pull request #33918 from backstage/fix/ui-missing-react-types-table-dep
fix(ui,app): update React Aria to v1.17.0 and migrate to monopackage imports
2026-04-15 14:20:37 +02:00
Patrik Oldsberg 4c95993bb4 Merge pull request #33917 from backstage/rugvip/add-service-unavailable-error-name
errors: add explicit name property to ServiceUnavailableError
2026-04-15 14:17:48 +02:00
Johan Persson 9400de4999 add monopackage/monopackages to vale vocabulary
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-15 12:32:17 +02:00
Johan Persson 0a372619fc list PR #33918 for patch release
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-15 12:29:06 +02:00
Johan Persson d1be10cb89 fix(ui,app): update React Aria to v1.17.0 and migrate to monopackage imports
React Aria Components v1.17.0 consolidated individual packages
into monopackages, dropping `@react-types/table` as a transitive
dependency. This caused `TS2307` errors in new app installations
where `react-aria-components@1.17.0` was resolved.

Migrate all imports from individual `@react-aria/*` and
`@react-stately/*` packages to the `react-aria` and
`react-stately` monopackages in both `@backstage/ui` and
`@backstage/plugin-app`, and update minimum dependency versions
accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-15 12:21:23 +02:00
Patrik Oldsberg 8741e5a800 errors: add explicit name property to ServiceUnavailableError
Every CustomErrorBase subclass explicitly sets `name = 'ClassName' as const`
except ServiceUnavailableError, which relied on the constructor fallback that
reads `this.constructor.name`. This is fragile under minification. Added the
explicit name property for consistency and added a serialization round-trip test.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 12:20:33 +02:00
Patrik Oldsberg a54350bc5b docs: fix missing closing parenthesis in services guide (#33910)
* docs: fix missing closing parenthesis in services guide

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* Make `transform` optional in `DefaultFooService.create` and factory options

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-15 10:02:30 +00:00
Hellgren Heikki cad156e797 fix: replace old config schemas for extensions and blueprints
to overcome a lot of warnings given during for example testing where
these extensions are used.

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2026-04-15 12:55:27 +03:00
Patrik Oldsberg a321fc0c47 Merge pull request #33914 from backstage/cursor/fix-embedded-postgres-config-path-resolution
cli: fix config path resolution for embedded-postgres detection
2026-04-15 11:32:08 +02:00
Patrik Oldsberg ed4ee6fdfb cli: fix config path resolution for embedded-postgres detection
Resolve config paths relative to the target package directory instead
of the workspace root in readDatabaseClient, matching the behavior of
the rest of the config loading system.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 09:58:31 +02:00
David Josefson a42766e2f7 fix(ui): use correct dark theme selector in Dialog (#33898)
* fix(ui): use correct dark theme selector in Dialog

The Dialog component used [data-theme='dark'] while every other BUI
component and the global token system uses [data-theme-mode='dark'].
This mismatch meant the dark mode background rule never matched.

Signed-off-by: David Josefson <david.josefson@neo4j.com>

* Update .changeset/fix-dialog-dark-theme-selector.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: David Josefson <david.josefson@neo4j.com>

---------

Signed-off-by: David Josefson <david.josefson@neo4j.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 09:39:02 +02:00
Patrik Oldsberg 3210dbd638 Merge pull request #33782 from UsainBloot/feat/extension-point-middleware
feat(backend): add extensionPointFactoryMiddleware to createBackend
2026-04-15 01:00:53 +02:00
Patrik Oldsberg e4c62f263f Merge pull request #33907 from backstage/rugvip/v1.50-release-notes
docs: add v1.50.0 release notes
2026-04-14 22:08:05 +02:00
Patrik Oldsberg aa890585e9 docs: add v1.50.0 release notes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-14 18:22:02 +02:00
Patrik Oldsberg 168d7cc9eb Merge pull request #33798 from backstage/changeset-release/master
Version Packages
2026-04-14 18:04:18 +02:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
Fredrik Adelöw 9f24941b49 Merge pull request #33663 from backstage/freben/catalog-model-extensions
Add catalog model layer system with JSON Schema based kind declarations
2026-04-14 16:29:01 +02:00
Fredrik Adelöw 3e291ae523 Rename schema imports to jsonSchema and remove stale changeset
Rename the JSON schema imports in kind definitions from `schema` to
`jsonSchema` to enable shorthand property syntax. Also remove the
stale scaffolder-backend changeset since that package no longer has
changes in this PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 15:44:11 +02:00
Fredrik Adelöw ca54251763 tweaked action wording
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 15:43:01 +02:00
Fredrik Adelöw 49d12d31c1 Rename templateModelLayer to scaffolderCatalogModelLayer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 15:41:08 +02:00
Fredrik Adelöw 12998a965f Change model source generator to yield data array with layer entries
Change AsyncCatalogModelSourceGenerator from yielding
{ layers: CatalogModelLayer[] } to { data: Array<{ layer: CatalogModelLayer }> }
so that additional contextual data can be attached alongside each layer
in the future.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 15:31:46 +02:00
Fredrik Adelöw ef06040b05 fix(catalog-backend): add missing JSDoc type annotation on down function
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-14 15:03:23 +02:00
Fredrik Adelöw b33f8450b5 fix(catalog-backend): fix irreversible database migration down functions
Five migration down functions were broken, causing the SQL report to flag
them as not reversible. All issues were pre-existing bugs that were never
caught because the down migrations had never been exercised under the
reversibility checker.

- 20241003170511: add .notNullable() to both up and down when altering
  locations.target, preventing the NOT NULL constraint from being silently
  dropped by knex's .alter() when widening varchar(255) to text.
- 20220116144621: implement a real down function that recreates the three
  dropped legacy tables (entities, entities_search, entities_relations)
  with correct columns and indices.
- 20210302150147: drop dependent tables in the correct order to avoid a
  FK constraint violation, and fix a typo (references → refresh_state_references).
- 20201005122705: drop full_name from entities (not entities_search), and
  restore entities_unique_name with the correct column order (kind, name, namespace).
- 20200702153613: use table.integer('generation') instead of table.string()
  in the down function to restore the correct column type.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-14 14:54:42 +02:00
Fredrik Adelöw 4114d4b955 Clarify that ModelProcessor has no effect on default catalog usage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 14:39:44 +02:00
Dmitry Gusev 3ef6078b70 scaffolder: Support conditional if on output links and text (#33332)
* Add sample template for conditional output demo

Add a scaffolder template that exercises conditional `if` on output
links and text items, for testing issue #24805.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Support conditional `if` on scaffolder output links and text

Add `if` property to output link and text items in scaffolder templates,
allowing template authors to conditionally show/hide output items based
on parameters or step results. Items with a falsy `if` condition are
filtered out before being sent to the frontend.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Add changesets for conditional output feature

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Document conditional if on output links and text

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Guard against non-object items in output arrays

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Skip array items in output if-filtering destructuring

Add Array.isArray guard to prevent corrupting array items
into plain objects during the rest-destructuring step.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Extract filterConditionalItems helper to deduplicate logic

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Align output if schema descriptions with step if semantics

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Fix docs quality check: replace 'falsy' wording

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Refactor filterConditionalItems to use flatMap and generics

Replace .filter().map() with a single flatMap call and make the function
generic to eliminate JsonArray casts at call sites.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

---------

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
2026-04-14 14:29:04 +02:00
Stanislav Cherkasov aa08b7f135 fix(search): use sub-transaction rollback when truncating document text (#31494)
* fix: implement sub-transactions for partial rollbacks in PgSearchEngineIndexer

Signed-off-by: Stanislav Cherkasov <150145013+stanislav-c@users.noreply.github.com>

* fix: address Copilot review feedback

- Wrap sub-transaction creation in try/catch to handle failures
- Await subTx.commit() and subTx.rollback() to prevent race conditions
- Use inline eslint-disable comments instead of file-level disable
- Use mockResolvedValue for async tx.transaction mock

Signed-off-by: Stanislav Cherkasov <150145013+stanislav-c@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Signed-off-by: Stanislav Cherkasov <150145013+stanislav-c@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-14 08:28:45 -04:00
Patrik Oldsberg dd8d2ee3ba techdocs-backend: remove unnecessary export of CachedEntityLoaderOptions
The CachedEntityLoaderOptions type is only used internally by
CachedEntityLoader and is never imported by any other file.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-14 14:21:36 +02:00
vincent c6abc52e1f feat: change resource url to comply with RFC 9728 Section 7.3 (#33855)
* feat: change oauth protected resource url to comply with RFC 9728 Section 7.3

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

* feat: enable dynamic mcp resource paths

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

* refactor: move url discovery in route handler

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

* refactor: revert to upfront route registration

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

---------

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>
2026-04-14 14:13:24 +02:00
Fredrik Adelöw c51c6eb81c Use isError from @backstage/errors instead of instanceof Error
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 14:10:31 +02:00
Fredrik Adelöw b91223faf8 Remove unused express and supertest deps from catalog-node
These dependencies were added but never imported or used in the
package source or tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 14:08:33 +02:00
Fredrik Adelöw ee80f3f0f9 Improve schema validation errors and clean up review fixes
- Use superRefine in jsonSchemaSchema to preserve the detailed error
  message from validateMetaSchema instead of swallowing it
- Revert CatalogModelSources to silent dedup with uniqBy since user
  layers intentionally take precedence over the default model
- Clean up unnecessary `as void` cast in ModelHolder iterator cleanup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 14:07:23 +02:00
Fredrik Adelöw 173ef97b48 Address second round of PR review comments
- Close async iterators in ModelHolder after reading first value to
  prevent resource leaks
- Catch exceptions from validateMetaSchema in Zod refine predicate
  so validation errors flow through Zod's normal issue reporting
- Warn on duplicate catalog model layer IDs instead of silently
  dropping later entries
- Replace `as any` with `as JsonObject` for schema import in
  scaffolder template model layer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 13:59:39 +02:00
Adam Kunicki 297302ebce scaffolder: fix NFS custom field explorer wiring (#33599)
* scaffolder: fix NFS custom field explorer wiring

Signed-off-by: Adam Kunicki <kunickiaj@gmail.com>

* refactor: use useMountEffect instead of useEffect for async execute

Signed-off-by: benjdlambert <ben@blam.sh>

---------

Signed-off-by: Adam Kunicki <kunickiaj@gmail.com>
Signed-off-by: benjdlambert <ben@blam.sh>
Co-authored-by: benjdlambert <ben@blam.sh>
2026-04-14 13:57:58 +02:00