docs/releases/v1.48.0-next.2-changelog.md
Upgrade Helper: https://backstage.github.io/upgrade-helper/?to=1.48.0-next.2
createServiceMock, a public utility for creating ServiceMock instances for custom service refs. This allows plugin authors to define mock creators for their own services following the same pattern as the built-in mockServices mocks.@types/jest as an optional peer dependency, since jest types are exposed in the public API surface.@backstage/plugin-catalog-react/alpha09a6aad: BREAKING: Removed the TestApiRegistry class, use TestApiProvider directly instead, storing reused APIs in a variable, e.g. const apis = [...] as const.
d2ac2ec: Added MockAlertApi and MockFeatureFlagsApi implementations to the mockApis namespace. The mock implementations include useful testing methods like clearAlerts(), waitForAlert(), getState(), setState(), and clearState() for better test ergonomics.
09a6aad: BREAKING: The mockApis namespace is no longer a re-export from @backstage/test-utils. It's now a standalone namespace with mock implementations of most core APIs. Mock API instances can be passed directly to TestApiProvider, renderInTestApp, and renderTestApp without needing [apiRef, impl] tuples. As part of this change, the .factory() method on some mocks has been removed, since it's now redundant.
// Before
import { mockApis } from '@backstage/frontend-test-utils';
renderInTestApp(<MyComponent />, {
apis: [[identityApiRef, mockApis.identity()]],
});
// After - mock APIs can be passed directly
renderInTestApp(<MyComponent />, {
apis: [mockApis.identity()],
});
This change also adds createApiMock, a public utility for creating mock API factories, intended for plugin authors to create their own .mock() variants.
15ed3f9: Added snapshot() method to ExtensionTester, which returns a tree-shaped representation of the resolved extension hierarchy. Convenient to use with toMatchInlineSnapshot().
013ec22: Added mountedRoutes option to renderTestApp for binding route refs to paths, matching the existing option in renderInTestApp:
renderTestApp({
extensions: [...],
mountedRoutes: {
'/my-path': myRouteRef,
},
});
a7e0d50: Prepare for React Router v7 migration by updating to v6.30.2 across all NFS packages and enabling v7 future flags. Convert routes from splat paths to parent/child structure with Outlet components.
Updated dependencies
b63c25b: BREAKING: Removed gray scale tokens and renamed background surface tokens to neutral tokens
The --bui-gray-1 through --bui-gray-8 tokens have been removed. The --bui-bg-surface-* and --bui-bg-neutral-on-surface-* tokens have been replaced by a unified --bui-bg-neutral-* scale.
Migration:
Replace surface tokens directly:
- background: var(--bui-bg-surface-0);
+ background: var(--bui-bg-app);
Replace on-surface tokens shifted by +1:
- background: var(--bui-bg-neutral-on-surface-0);
+ background: var(--bui-bg-neutral-1);
Replace gray tokens 1-4 with neutral equivalents (--bui-gray-5 through --bui-gray-8 have no direct replacement):
- background: var(--bui-gray-1);
+ background: var(--bui-bg-neutral-1);
c8ae765: Fixed nested Accordion icon state issue where the inner accordion's arrow icon would incorrectly show as expanded when only the outer accordion was expanded. The CSS selector now uses a direct parent selector to ensure the icon only responds to its own accordion's expanded state.
Affected components: Accordion
5c76d13: Allow ref as a prop on the Tag component
Affected components: Tag
741a98d: Allow data to be passed directly to the useTable hook using the property data instead of getData() for mode "complete".
This simplifies usage as data changes, rather than having to perform a useEffect when data changes, and then reloading the data. It also happens immediately, so stale data won't remain until a rerender (with an internal async state change), so less flickering.
Affected components: Table
a0fe1b2: Fixed changing columns after first render from crashing. It now renders the table with the new column layout as columns change.
Affected components: Table
becf851: export PasswordField component
a7e0d50: Prepare for React Router v7 migration by updating to v6.30.2 across all NFS packages and enabling v7 future flags. Convert routes from splat paths to parent/child structure with Outlet components.
8c39412: The Table component now wraps the react-aria-components Table with a ResizableTableContainer only if any column has a width property set. This means that column widths can adapt to the content otherwise (if no width is explicitly set).
Affected components: Table
20131c5: Migrated to use the standard backstage-cli package build for CSS bundling instead of a custom build script.
Updated dependencies
auth.experimentalRefreshToken.enabled configuration option. When enabled, clients can request the offline_access scope to receive refresh tokens that can be used to obtain new access tokens without re-authentication.220d6c3: Add missing translation entries for catalog UI text.
This change adds translation keys and updates relevant UI components to use the correct localized labels and text in the catalog plugin. It ensures that catalog screens such as entity layout, tabs, search result items, table labels, and other UI elements correctly reference the i18n system for translation.
No functional behavior is changed aside from the improved internationalization support.
7feb83b: Adjusted to use the new @backstage/filter-predicates types for predicate expressions.
a7e0d50: Prepare for React Router v7 migration by updating to v6.30.2 across all NFS packages and enabling v7 future flags. Convert routes from splat paths to parent/child structure with Outlet components.
75ac651: Migrated EntityRelationWarning and EntityProcessingErrorsPanel components from Material UI to Backstage UI.
Updated dependencies
491a06c: Add the ability to show icons for the tabs on the entity page (new frontend)
7feb83b: BREAKING ALPHA: All of the predicate types and functions have been moved to the @backstage/filter-predicates package.
When moving into the more general package, they were renamed as follows:
EntityPredicate -> FilterPredicateEntityPredicateExpression -> FilterPredicateExpressionEntityPredicatePrimitive -> FilterPredicatePrimitiveentityPredicateToFilterFunction -> filterPredicateToFilterFunctionEntityPredicateValue -> FilterPredicateValueac9bead: Added createTestEntityPage test utility for testing entity cards and content extensions in the new frontend system. This utility creates a test page extension that provides EntityProvider context and accepts entity extensions through input redirects:
import { renderTestApp } from '@backstage/frontend-test-utils';
import { createTestEntityPage } from '@backstage/plugin-catalog-react/testUtils';
renderTestApp({
extensions: [createTestEntityPage({ entity: myEntity }), myEntityCard],
});
catalogApiMock test utility now returns a MockWithApiFactory, allowing it to be passed directly to test utilities like renderTestApp and TestApiProvider without needing the [catalogApiRef, catalogApiMock()] tuple.UserListPicker by getting the kindParamater from the filters rather than from the queryParameters@backstage/backend-defaults from dependencies to devDependencies.InMemoryCatalogClient test utility to support ordering, pagination, full-text search, and field projection for entity query methods. Also fixed getEntityFacets to correctly handle multi-valued fields.20131c5: Added support for CSS exports in package builds. When a package declares a CSS file in its exports field (e.g., "./styles.css": "./src/styles.css"), the CLI will automatically bundle it during backstage-cli package build, resolving any @import statements. The export path is rewritten from src/ to dist/ at publish time.
Fixed backstage-cli repo fix to not add typesVersions entries for non-script exports like CSS files.
6ce4a13: Removed /alpha from scaffolderActionsExtensionPoint import
73351c2: Updated dependency webpack to ~5.104.0.
Updated dependencies
AppThemeSelector instances and missing cleanup in AppThemeSelector and AppLanguageSelector. Added dispose() method to both selectors for proper resource cleanup.b96c20e: Added optional channel option to generateProjects() to allow customizing the Playwright browser channel for testing against different browsers variants. When not provided, the function defaults to 'chrome' to maintain backward compatibility.
Example usage:
import { generateProjects } from '@backstage/e2e-test-utils';
export default defineConfig({
projects: generateProjects({ channel: 'msedge' }),
});
{org}.visualstudio.com domains used by Azure DevOpstype-deps command now follows relative imports and re-exports into declaration chunk files, and detects ambient global types such as the jest namespace.find-process to ^2.0.0.@types/jest as an optional peer dependency, since jest types are exposed in the public API surface.@backstage/frontend-test-utils dev dependency.@backstage/filter-predicates types for predicate expressions.buildEntitySearch traverse() by replacing Array.some() linear scan with a Set for O(1) duplicate path key detection.{org}.visualstudio.com domains used by Azure DevOps'blob' to 'blobs', resolving 400 errors in discovery provider.@backstage/frontend-test-utils dev dependency.@backstage/filter-predicates types for predicate expressions.catalogServiceMock.mock to use createServiceMock from @backstage/backend-test-utils, replacing the internal copy of simpleMock. Added @backstage/backend-test-utils as an optional peer dependency.@backstage/backend-defaults from dependencies to devDependencies.@testing-library/react to ^16.0.0.@backstage/filter-predicates types for predicate expressions.@xterm/addon-attach to ^0.12.0.
Updated dependency @xterm/addon-fit to ^0.11.0.@backstage/backend-defaults from dependencies to devDependencies.@backstage/frontend-test-utils dev dependency.@backstage/filter-predicates types for predicate expressions.@backstage/filter-predicates types for predicate expressions.@backstage/frontend-test-utils as a dev dependency for mock API usage in tests.@backstage/backend-defaults from dependencies to devDependencies.gitlab:group:ensureExists action to use Groups.show API instead of Groups.search for checking if a group path exists. This is more efficient as it directly retrieves the group by path rather than searching and filtering results.@backstage/frontend-test-utils as a dev dependency for mock API usage in tests.@backstage/backend-defaults from dependencies to devDependencies.@backstage-community/plugin-explore-common to ^0.12.0.@backstage/filter-predicates types for predicate expressions.@backstage/backend-defaults from dependencies to devDependencies.