Add `position: relative` and `z-index: 2` to nav items so they
paint above the hover/active indicator, matching the Tabs pattern.
This fixes themes with opaque `--bui-bg-neutral-2` values obscuring
tab labels on hover.
Also fix `--bui-font-family` (non-existent) to `--bui-font-regular`.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Addresses the high severity rollup path traversal vulnerability
(GHSA-mw96-cpmx-2vgc) and the glob security advisory by upgrading
all instances across the monorepo. Updates code that used the legacy
callback-based glob API to use the modern promise/sync API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Addresses the high severity rollup path traversal vulnerability
(GHSA-mw96-cpmx-2vgc) and the glob security advisory by upgrading
all instances across the monorepo. Updates code that used the legacy
callback-based glob API to use the modern promise/sync API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Addresses the high severity rollup path traversal vulnerability
(GHSA-mw96-cpmx-2vgc) and the glob security advisory by upgrading
all instances across the monorepo. Updates code that used the legacy
callback-based glob API to use the modern promise/sync API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
When passing --always-yarn-pack, we previously
packed all packages in parallel. Since
package.json files are rewritten during packing,
this could cause intermittent "No local workspace
found for this range" failures.
To fix this, we now pack packages in batches,
starting with the ones that have no workspace
dependencies and expanding out to include packages
whose dependencies have already been packed.
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
Replace instanceof Request with a duck-type isRequestLike helper to
avoid cross-realm issues, and wrap the clarification logic in a
try/catch so it can never mask the original error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Converts createBinRunner from spawnSync to async spawn, and processes
all CLI packages concurrently with a shared p-limit limiter bounded
by CPU count. Reduces wall-clock time from ~50s to ~12s.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Extracts method/url directly from the input instead of constructing
a new Request in the catch block, which could fail if the body was
already consumed. Also adds a test with Request object input.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Replace dual TParams/TParamKeys type parameters with a single TParamKey,
removing unnecessary complexity while preserving runtime behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
The auditor's severity log level mappings previously used a `zod/v3`
`z.record()` schema with manual fallbacks for defaults and relied on
casting into Zod error internals (`.received`, `.options`) that changed
between v3 and v4. This replaces it with a `z.object()` schema using
`.default()` so that Zod owns the default values and type inference,
and derives the valid values and received input without reaching into
undocumented error properties.
This does not migrate all `zod/v3` imports in the package, as the
remaining usages are tied to public API types (e.g. `AnyZodObject`
from `@backstage/backend-plugin-api`).
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Add `CompletePaginationOptions` type extending `PaginationOptions`
with a `type` field supporting `'page'` (default) and `'none'`.
When using `mode: 'complete'` with `type: 'none'`, `useTable` skips
data slicing and produces `pagination: { type: 'none' }` in
`tableProps` directly.
Also sync `pageSize` state when `paginationOptions.pageSize` changes
dynamically, fixing cases where the initial value became stale.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
BUI link components with relative hrefs (e.g. `../other`) would
navigate to the wrong URL because React Aria's navigate callback
receives the raw href string and cannot resolve it correctly from
where it is called in Backstage's routing setup.
This adds a `resolveHref` flag to the component definition system.
When enabled, `useDefinition` calls `useHref()` to turn relative
hrefs into absolute paths before they reach the React Aria layer.
A compile-time type guard ensures components with `href` in their
props cannot omit the flag.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Refactor `SignInResolverFactoryOptions` and `createSchemaFromZod` to use
`TSchema extends ZodType` instead of `ZodSchema<Output, Def, Input>`,
avoiding "excessively deep" TypeScript inference errors when multiple
Zod copies are resolved in a project.
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Add `DOM.AsyncIterable` to the shared TypeScript configuration in
`@backstage/cli`, making standard async iteration methods available on
DOM APIs like `FileSystemDirectoryHandle`. This aligns behavior with
TypeScript 6.0, where this lib is included in `DOM` by default.
With the async iterable types now available, replace the custom
`IterableDirectoryHandle` and `WritableFileHandle` types in the scaffolder
plugin with the standard `FileSystemDirectoryHandle` and
`FileSystemFileHandle` DOM types. Add type guard functions for
`FileSystemHandle` since it is not a discriminated union.
Signed-off-by: Jon Koops <jonkoops@gmail.com>
TypeScript 6.0 no longer applies bivariant checking to method-shorthand
functions that don't reference `this`. This causes the `fix` callbacks in
suggestion descriptors to fail type checking when they return `void`
instead of a valid `Fix | null` value.
- Return `null` from non-fixable suggestion `fix` handlers
- Add explicit `SuggestionReportDescriptor[]` type annotation to `suggest`
- Remove redundant `@param` JSDoc annotations now covered by the array type
Signed-off-by: Jon Koops <jonkoops@gmail.com>
New plugin nav items like "Catalog Graph" cause Playwright's
substring-based getByRole name matching to find multiple elements
when searching for "Catalog". Switch to exact: true.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
* feat(ui): add showPaginationLabel to type definitions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* feat(ui): wire showPaginationLabel through useTable and Table
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* feat(ui): conditionally render pagination label based on showPaginationLabel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* chore(ui): add changeset and update API reports for showPaginationLabel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* Update .changeset/show-pagination-label.md
Co-authored-by: Johan Persson <johanopersson@gmail.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* docs(ui): document showPaginationLabel prop in docs-ui
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* fix(ui): wrap component names in backticks in changeset
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* fix(ui): move pagination display options to inner useMemo dependency array
Move showPageSizeOptions, getLabel, and showPaginationLabel from the
outer useMemo dependency array to the inner pagination useMemo
dependency array so that changes to these options correctly trigger
a new pagination object reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
* chore(ui): remove backticks from changeset
Signed-off-by: Johan Persson <johanopersson@gmail.com>
* Revert "chore(ui): remove backticks from changeset"
This reverts commit 9b7f8bb6e83c28587219b7734676b1c062661a8a.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
---------
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Johan Persson <johanopersson@gmail.com>
The last branch of the conditional is unreachable since TMessages[TKey]
is constrained to string | AnyNestedMessages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Restructure the FlattenedMessages conditional type to check
`TMessages[TKey] extends string` directly instead of using an
intermediate `infer TValue` pattern, which caused excessive type
instantiation depth in TypeScript 6.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>