Remove the deprecated property form of PortableSchema.schema, keeping
only the method form. The schema member is now a plain method that must
be called as schema() rather than accessed as a property.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
* feat(techdocs): make sidebar positioning configurable via CSS custom properties
Replace hardcoded Backstage app sidebar widths (224px/72px) in the
TechDocs layout CSS with CSS custom properties that inherit through
the shadow DOM boundary, allowing apps with custom sidebar widths
to override the defaults.
- `--techdocs-sidebar-closed-offset-pinned` (default: 224px)
- `--techdocs-sidebar-closed-offset-collapsed` (default: 72px)
- `--techdocs-sidebar-open-translate` (default: 16rem)
Also extract all magic values into named constants.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
* Add PR #33908 to patch release
Signed-off-by: Johan Persson <johanopersson@gmail.com>
---------
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Add dependencies that were only available transitively through other
packages but were being imported directly:
- csstype and copy-to-clipboard in @backstage/core-components
- @storybook/react-vite in @backstage/ui
- react-aria-components in @backstage/plugin-notifications
- @octokit/core in @backstage/plugin-scaffolder-backend-module-github
- @rjsf/utils in example-app-legacy
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Remove 30 dependencies across 18 packages that have no imports in
source code and are not peer dependencies of any other dependency.
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
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
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>
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
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>
- Remove unused deps @backstage/filter-predicates and zod-validation-error
from catalog-model
- Deduplicate defaultCatalogEntityModel by re-exporting from the single
source in model/defaultCatalogEntityModel.ts
- Fix typos: "Retuns"/"epxressed", "Obviopusly", "recorsively"
- Use domain-prefixed layer ID for scaffolder template model
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
fixup! Add summary types and listing methods to CatalogModel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Introduce CatalogModelKindSummary, CatalogModelRelationSummary,
CatalogModelAnnotationSummary, CatalogModelLabelSummary, and
CatalogModelTagSummary as reduced views of the full model data.
Add listKinds(), listRelations(), and getMetadata() methods to
CatalogModel for retrieving these summaries. Add a new action for
fetching a markdown-formatted catalog model description, useful for
informing LLMs about the catalog structure.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
The function was a thin wrapper around validateCimdUrl that caught errors
and returned a boolean. It was never imported by any production code —
only by test files. Tests now use validateCimdUrl directly.
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
The entity card override example used `name: 'entity-relations'` but
the actual extension uses `name: 'relations'`.
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
Remove the `export` keyword from functions that are only used within
their own file and are not part of any package's public API:
- `parseStringsParam` and `isOrder` in notifications-backend
- `toWeb` in backend-defaults urlReader
- `resolvePublicPath` in app-backend
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
The constant was exported but never referenced in production code.
The only usage was in the test file, where it's now inlined.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor