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>
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>
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>
Updated doc comments on ExtensionPoint.T and ServiceRef.T to reflect
that reading the value returns null rather than throwing. Expanded the
changeset to cover all three behavioral changes in the PR.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Both `createExtensionPoint` and `createServiceRef` now consistently return
`null` from the phantom `.T` getter instead of throwing. Added `toJSON()` to
`ExtensionPoint` for parity with `ServiceRef`.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
The new `configSchema` option now strictly requires StandardSchemaV1
values (e.g. Zod v4 or `zod/v4` from the Zod v3 package). Direct Zod
v3 schemas are no longer silently converted and will throw an error.
The deprecated `config.schema` callback path continues to work with
Zod v3 through a separate `createDeprecatedConfigSchema` function.
Also adds `createZodV4FilterPredicateSchema` to `@backstage/filter-predicates`
as a v4 counterpart to the now-deprecated v3 variant.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Extract shared internal helpers to eliminate near-identical readiness
polling loops across database and cache test infrastructure:
- waitForReady: generic probe-until-ready loop used by both postgres
and mysql database helpers
- attemptKeyvConnection: generic Keyv set/get probe loop used by redis,
valkey, and memcached cache helpers
- startRedisLikeContainer: shared container-start for redis-protocol
stores (redis and valkey)
Also normalizes cache timeout error formatting to use stringifyError
instead of template string coercion.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
The original changeset implied the logout redirect only happens when
federatedLogout is true. In reality, sign-out always redirects to
Auth0's /v2/logout to clear the Auth0 session cookie. The
federatedLogout flag only controls whether the upstream IdP session
is also terminated.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* backend-plugin-api: tighten internal any usage
Replace internal `any` type annotations with proper types:
- Use `'root' | 'plugin'` union in DepsToInstances conditional type
and createServiceRef implementation signature
- Use Error type guard with object cast fallback in
isDatabaseConflictError instead of `as any`
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
* Use isError in isDatabaseConflictError
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
* Update changeset wording per review feedback
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
---------
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Extract the shared extension resolution and duplicate-check logic from
createFrontendPlugin and createFrontendModule into a new
resolveExtensionDefinitions helper. Also fixes the duplicate extension
error message in createFrontendModule to say "Module" instead of
"Plugin".
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Remove the unused exported constants GENERATOR_VERSION, GENERATOR_NAME,
GENERATOR_FILE, and TS_MODULE from the OpenAPI constants module. The
TS_MODULE intermediate variable is inlined into TS_SCHEMA_PATH.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Simplify the assertError implementation by delegating to isError
instead of duplicating the same validation checks.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
The `isDev` export in `packages/cli/src/wiring/version.ts` was never
imported anywhere. Remove it to reduce dead code.
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>