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
* 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>
Delete the unused `ActionsService.ts` and `ActionsRegistryService.ts`
files under `services/definitions/`. These were never exported from the
definitions index and had zero imports across the repo. The canonical
copies live in the `alpha/` directory and have already diverged. Removing
these eliminates a confusing dual source of truth.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
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>
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
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
* 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>
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>
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>
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
* 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>
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
Removed the test-only `registerMswTestHooks` function from `helpers.ts`
and replaced it with the shared version from `@backstage/backend-test-utils`.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
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>
- 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>
- 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>