From 064e750a503613d6fea810323ba19971a50a3657 Mon Sep 17 00:00:00 2001 From: elstranack Date: Fri, 7 Jan 2022 08:17:47 -0800 Subject: [PATCH 001/473] Adding hover message and an info icon. Signed-off-by: elstranack --- .changeset/swift-carpets-yawn.md | 5 ++ .../src/components/ProgressBars/Gauge.tsx | 28 ++++++-- .../ProgressBars/GaugeCard.stories.tsx | 68 +++++++++++++++++++ .../src/components/ProgressBars/GaugeCard.tsx | 19 +++++- packages/core-components/src/hooks/index.ts | 1 + .../core-components/src/hooks/useHover.ts | 42 ++++++++++++ .../src/layout/InfoCard/InfoCard.tsx | 32 ++++++++- 7 files changed, 185 insertions(+), 10 deletions(-) create mode 100644 .changeset/swift-carpets-yawn.md create mode 100644 packages/core-components/src/hooks/useHover.ts diff --git a/.changeset/swift-carpets-yawn.md b/.changeset/swift-carpets-yawn.md new file mode 100644 index 0000000000..d242b3cf81 --- /dev/null +++ b/.changeset/swift-carpets-yawn.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Adding hover message to the Gauge and an info icon to the GaugeCard. diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index 0336ebc990..bb91358133 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -17,7 +17,8 @@ import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { makeStyles, useTheme } from '@material-ui/core/styles'; import { Circle } from 'rc-progress'; -import React from 'react'; +import { useHover } from '../../hooks'; +import React, { ReactNode } from 'react'; /** @public */ export type GaugeClassKey = 'root' | 'overlay' | 'circle' | 'colorUnknown'; @@ -37,6 +38,15 @@ const useStyles = makeStyles( fontWeight: 'bold', color: theme.palette.textContrast, }, + hoveringMessageCompliant: { + fontSize: 13, + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + position: 'absolute', + wordBreak: 'break-all', + display: 'inline-block', + }, circle: { width: '80%', transform: 'translate(10%, 0)', @@ -53,6 +63,7 @@ export type GaugeProps = { inverse?: boolean; unit?: string; max?: number; + hoverMessage?: ReactNode; getColor?: GaugePropsGetColor; }; @@ -104,10 +115,11 @@ export const getProgressColor: GaugePropsGetColor = ({ */ export function Gauge(props: GaugeProps) { + const [hoverRef, isHovering] = useHover() as any; const { getColor = getProgressColor } = props; const classes = useStyles(props); const { palette } = useTheme(); - const { value, fractional, inverse, unit, max } = { + const { value, fractional, inverse, unit, max, hoverMessage } = { ...defaultGaugeProps, ...props, }; @@ -116,7 +128,7 @@ export function Gauge(props: GaugeProps) { const asActual = max !== 100 ? Math.round(value) : asPercentage; return ( -
+
-
- {isNaN(value) ? 'N/A' : `${asActual}${unit}`} -
+ {hoverMessage && isHovering ? ( +
{hoverMessage}
+ ) : ( +
+ {isNaN(value) ? 'N/A' : `${asActual}${unit}`} +
+ )}
); } diff --git a/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx b/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx index 64a6cc1b16..5ce96310b1 100644 --- a/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx +++ b/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx @@ -118,3 +118,71 @@ export const StaticColor = () => ( ); + +export const InfoMessage = () => ( + + + + + + + + + + + + + + +); + +export const HoverMessage = () => ( + + + + + + + + + + + + + + +); diff --git a/packages/core-components/src/components/ProgressBars/GaugeCard.tsx b/packages/core-components/src/components/ProgressBars/GaugeCard.tsx index 9e6c19ebfe..745c37d480 100644 --- a/packages/core-components/src/components/ProgressBars/GaugeCard.tsx +++ b/packages/core-components/src/components/ProgressBars/GaugeCard.tsx @@ -15,7 +15,7 @@ */ import { makeStyles } from '@material-ui/core/styles'; -import React from 'react'; +import React, { ReactNode } from 'react'; import { BottomLinkProps } from '../../layout/BottomLink'; import { InfoCard, InfoCardVariants } from '../../layout/InfoCard'; import { Gauge, GaugePropsGetColor } from './Gauge'; @@ -26,6 +26,8 @@ type Props = { variant?: InfoCardVariants; /** Progress in % specified as decimal, e.g. "0.23" */ progress: number; + hoverMessage?: ReactNode; + iconInfoMessage?: string; inverse?: boolean; deepLink?: BottomLinkProps; getColor?: GaugePropsGetColor; @@ -52,11 +54,21 @@ const useStyles = makeStyles( */ export function GaugeCard(props: Props) { const classes = useStyles(props); - const { title, subheader, progress, inverse, deepLink, variant, getColor } = - props; + const { + title, + subheader, + progress, + inverse, + deepLink, + hoverMessage, + iconInfoMessage, + variant, + getColor, + } = props; const gaugeProps = { inverse, + hoverMessage, getColor, value: progress, }; @@ -68,6 +80,7 @@ export function GaugeCard(props: Props) { subheader={subheader} deepLink={deepLink} variant={variant} + iconInfoMessage={iconInfoMessage} > diff --git a/packages/core-components/src/hooks/index.ts b/packages/core-components/src/hooks/index.ts index 07e585bf27..afaf68e7d9 100644 --- a/packages/core-components/src/hooks/index.ts +++ b/packages/core-components/src/hooks/index.ts @@ -16,6 +16,7 @@ export { useQueryParamState } from './useQueryParamState'; export { useSupportConfig } from './useSupportConfig'; +export { useHover } from './useHover'; export type { SupportConfig, SupportItem, diff --git a/packages/core-components/src/hooks/useHover.ts b/packages/core-components/src/hooks/useHover.ts new file mode 100644 index 0000000000..478f1fb4e3 --- /dev/null +++ b/packages/core-components/src/hooks/useHover.ts @@ -0,0 +1,42 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { useEffect, useRef, useState } from 'react'; + +export const useHover = () => { + const [value, setValue] = useState(false); + + const ref = useRef(null); + const handleMouseOver = () => setValue(true); + const handleMouseOut = () => setValue(false); + + useEffect(() => { + const node = ref.current as any; + if (node) { + node.addEventListener('mouseenter', handleMouseOver) as any; + node.addEventListener('mouseleave', handleMouseOut) as any; + + return () => { + node.removeEventListener('mouseenter', handleMouseOver); + node.removeEventListener('mouseleave', handleMouseOut); + }; + } + return () => { + setValue(false); + }; + }, [ref]); + + return [ref, value]; +}; diff --git a/packages/core-components/src/layout/InfoCard/InfoCard.tsx b/packages/core-components/src/layout/InfoCard/InfoCard.tsx index f1e67904f1..70ffd2e0cd 100644 --- a/packages/core-components/src/layout/InfoCard/InfoCard.tsx +++ b/packages/core-components/src/layout/InfoCard/InfoCard.tsx @@ -24,6 +24,8 @@ import classNames from 'classnames'; import React, { ReactNode } from 'react'; import { BottomLink, BottomLinkProps } from '../BottomLink'; import { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary'; +import Info from '@material-ui/icons/Info'; +import Tooltip from '@material-ui/core/Tooltip'; /** @public */ export type InfoCardClassKey = @@ -55,6 +57,15 @@ const useStyles = makeStyles( headerAvatar: {}, headerAction: {}, headerContent: {}, + leftIcon: { + float: 'right', + }, + tooltip: { + fontSize: 14, + }, + subheader: { + float: 'left', + }, }), { name: 'BackstageInfoCard' }, ); @@ -134,6 +145,7 @@ type Props = { children?: ReactNode; headerStyle?: object; headerProps?: CardHeaderProps; + iconInfoMessage?: ReactNode; action?: ReactNode; actionsClassName?: string; actions?: ReactNode; @@ -162,6 +174,7 @@ export function InfoCard(props: Props): JSX.Element { children, headerStyle, headerProps, + iconInfoMessage, action, actionsClassName, actions, @@ -194,6 +207,23 @@ export function InfoCard(props: Props): JSX.Element { }); } + const cardSubTitle = () => { + return ( +
+ {subheader &&
{subheader}
} + {iconInfoMessage && ( + + + + )} +
+ ); + }; + const errProps: ErrorBoundaryProps = errorBoundaryProps || (slackChannel ? { slackChannel } : {}); @@ -211,7 +241,7 @@ export function InfoCard(props: Props): JSX.Element { content: classes.headerContent, }} title={title} - subheader={subheader} + subheader={cardSubTitle()} action={action} style={{ ...headerStyle }} titleTypographyProps={titleTypographyProps} From 7f9270117a3c5e4a72f60bd2210a5c5f9c0a5759 Mon Sep 17 00:00:00 2001 From: elstranack Date: Thu, 13 Jan 2022 13:59:12 -0800 Subject: [PATCH 002/473] Removing the any and updating the api:report Signed-off-by: elstranack --- packages/core-components/api-report.md | 15 +++++++++++---- .../src/components/ProgressBars/Gauge.tsx | 11 ++++++----- packages/core-components/src/hooks/useHover.ts | 7 +++---- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index d8aef17007..43daf01d5a 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -37,6 +37,7 @@ import { default as React_2 } from 'react'; import * as React_3 from 'react'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; +import { RefObject } from 'react'; import { SessionApi } from '@backstage/core-plugin-api'; import { SignInPageProps } from '@backstage/core-plugin-api'; import { SparklinesLineProps } from 'react-sparklines'; @@ -392,6 +393,7 @@ export type GaugeProps = { inverse?: boolean; unit?: string; max?: number; + hoverMessage?: ReactNode; getColor?: GaugePropsGetColor; }; @@ -922,6 +924,7 @@ export const SidebarDivider: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1029,7 +1032,6 @@ export const SidebarDivider: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1284,6 +1286,7 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1391,7 +1394,6 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1559,6 +1561,7 @@ export const SidebarSpace: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1666,7 +1669,6 @@ export const SidebarSpace: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1833,6 +1835,7 @@ export const SidebarSpacer: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1940,7 +1943,6 @@ export const SidebarSpacer: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -2409,6 +2411,11 @@ export function useContent(): { contentRef: React_2.MutableRefObject | undefined; }; +// Warning: (ae-missing-release-tag) "useHover" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const useHover: (ref: RefObject) => boolean; + // Warning: (ae-forgotten-export) The symbol "SetQueryParams" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "useQueryParamState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index bb91358133..a2f725ecf0 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -18,7 +18,7 @@ import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { makeStyles, useTheme } from '@material-ui/core/styles'; import { Circle } from 'rc-progress'; import { useHover } from '../../hooks'; -import React, { ReactNode } from 'react'; +import React, { ReactNode, RefObject, useRef } from 'react'; /** @public */ export type GaugeClassKey = 'root' | 'overlay' | 'circle' | 'colorUnknown'; @@ -38,11 +38,11 @@ const useStyles = makeStyles( fontWeight: 'bold', color: theme.palette.textContrast, }, - hoveringMessageCompliant: { + hoveringMessage: { fontSize: 13, top: '50%', left: '50%', - transform: 'translate(-50%, -50%)', + transform: 'translate(-55%, -50%)', position: 'absolute', wordBreak: 'break-all', display: 'inline-block', @@ -115,7 +115,8 @@ export const getProgressColor: GaugePropsGetColor = ({ */ export function Gauge(props: GaugeProps) { - const [hoverRef, isHovering] = useHover() as any; + const hoverRef = useRef() as RefObject; + const isHovering = useHover(hoverRef); const { getColor = getProgressColor } = props; const classes = useStyles(props); const { palette } = useTheme(); @@ -138,7 +139,7 @@ export function Gauge(props: GaugeProps) { className={classes.circle} /> {hoverMessage && isHovering ? ( -
{hoverMessage}
+
{hoverMessage}
) : (
{isNaN(value) ? 'N/A' : `${asActual}${unit}`} diff --git a/packages/core-components/src/hooks/useHover.ts b/packages/core-components/src/hooks/useHover.ts index 478f1fb4e3..7ce3e8b5b8 100644 --- a/packages/core-components/src/hooks/useHover.ts +++ b/packages/core-components/src/hooks/useHover.ts @@ -13,12 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { useEffect, useRef, useState } from 'react'; +import { useEffect, RefObject, useState } from 'react'; -export const useHover = () => { +export const useHover = (ref: RefObject ) => { const [value, setValue] = useState(false); - const ref = useRef(null); const handleMouseOver = () => setValue(true); const handleMouseOut = () => setValue(false); @@ -38,5 +37,5 @@ export const useHover = () => { }; }, [ref]); - return [ref, value]; + return value; }; From bff82c9ed2708c9e092ee6d49125df320ff87ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 19 Jan 2022 13:21:49 +0100 Subject: [PATCH 003/473] fixup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- packages/core-components/api-report.md | 8 ++++---- packages/core-components/src/hooks/useHover.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 43daf01d5a..efdbddb979 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -924,7 +924,6 @@ export const SidebarDivider: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1032,6 +1031,7 @@ export const SidebarDivider: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1286,7 +1286,6 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1394,6 +1393,7 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1561,7 +1561,6 @@ export const SidebarSpace: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1669,6 +1668,7 @@ export const SidebarSpace: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1835,7 +1835,6 @@ export const SidebarSpacer: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1943,6 +1942,7 @@ export const SidebarSpacer: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' diff --git a/packages/core-components/src/hooks/useHover.ts b/packages/core-components/src/hooks/useHover.ts index 7ce3e8b5b8..4c5602c77c 100644 --- a/packages/core-components/src/hooks/useHover.ts +++ b/packages/core-components/src/hooks/useHover.ts @@ -15,7 +15,7 @@ */ import { useEffect, RefObject, useState } from 'react'; -export const useHover = (ref: RefObject ) => { +export const useHover = (ref: RefObject) => { const [value, setValue] = useState(false); const handleMouseOver = () => setValue(true); From 2a3f792f9e7dbba618b90bbf67654b8b6416e920 Mon Sep 17 00:00:00 2001 From: Elizabeth Stranack Date: Thu, 20 Jan 2022 14:01:39 -0800 Subject: [PATCH 004/473] Updating Commit Changes Signed-off-by: Elizabeth Stranack --- packages/core-components/api-report.md | 23 +++++----- .../src/components/ProgressBars/Gauge.tsx | 45 ++++++++++++++----- .../ProgressBars/GaugeCard.stories.tsx | 42 ++++++++++------- .../src/components/ProgressBars/GaugeCard.tsx | 12 ++--- packages/core-components/src/hooks/index.ts | 1 - .../core-components/src/hooks/useHover.ts | 41 ----------------- .../src/layout/InfoCard/InfoCard.tsx | 22 ++------- 7 files changed, 80 insertions(+), 106 deletions(-) delete mode 100644 packages/core-components/src/hooks/useHover.ts diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index efdbddb979..3743c1d16d 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -37,7 +37,6 @@ import { default as React_2 } from 'react'; import * as React_3 from 'react'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; -import { RefObject } from 'react'; import { SessionApi } from '@backstage/core-plugin-api'; import { SignInPageProps } from '@backstage/core-plugin-api'; import { SparklinesLineProps } from 'react-sparklines'; @@ -384,7 +383,12 @@ export function GaugeCard(props: Props_10): JSX.Element; export type GaugeCardClassKey = 'root'; // @public (undocumented) -export type GaugeClassKey = 'root' | 'overlay' | 'circle' | 'colorUnknown'; +export type GaugeClassKey = + | 'root' + | 'overlay' + | 'description' + | 'circle' + | 'colorUnknown'; // @public (undocumented) export type GaugeProps = { @@ -393,7 +397,7 @@ export type GaugeProps = { inverse?: boolean; unit?: string; max?: number; - hoverMessage?: ReactNode; + description?: ReactNode; getColor?: GaugePropsGetColor; }; @@ -924,6 +928,7 @@ export const SidebarDivider: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1031,7 +1036,6 @@ export const SidebarDivider: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1286,6 +1290,7 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1393,7 +1398,6 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1561,6 +1565,7 @@ export const SidebarSpace: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1668,7 +1673,6 @@ export const SidebarSpace: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1835,6 +1839,7 @@ export const SidebarSpacer: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' + | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1942,7 +1947,6 @@ export const SidebarSpacer: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' - | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -2411,11 +2415,6 @@ export function useContent(): { contentRef: React_2.MutableRefObject | undefined; }; -// Warning: (ae-missing-release-tag) "useHover" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const useHover: (ref: RefObject) => boolean; - // Warning: (ae-forgotten-export) The symbol "SetQueryParams" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "useQueryParamState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index a2f725ecf0..f71756f946 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -17,11 +17,15 @@ import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { makeStyles, useTheme } from '@material-ui/core/styles'; import { Circle } from 'rc-progress'; -import { useHover } from '../../hooks'; -import React, { ReactNode, RefObject, useRef } from 'react'; +import React, { ReactNode, useEffect, useRef, useState } from 'react'; /** @public */ -export type GaugeClassKey = 'root' | 'overlay' | 'circle' | 'colorUnknown'; +export type GaugeClassKey = + | 'root' + | 'overlay' + | 'description' + | 'circle' + | 'colorUnknown'; const useStyles = makeStyles( theme => ({ @@ -38,8 +42,8 @@ const useStyles = makeStyles( fontWeight: 'bold', color: theme.palette.textContrast, }, - hoveringMessage: { - fontSize: 13, + description: { + fontSize: '100%', top: '50%', left: '50%', transform: 'translate(-55%, -50%)', @@ -63,7 +67,7 @@ export type GaugeProps = { inverse?: boolean; unit?: string; max?: number; - hoverMessage?: ReactNode; + description?: ReactNode; getColor?: GaugePropsGetColor; }; @@ -115,12 +119,11 @@ export const getProgressColor: GaugePropsGetColor = ({ */ export function Gauge(props: GaugeProps) { - const hoverRef = useRef() as RefObject; - const isHovering = useHover(hoverRef); + const hoverRef = useRef(null); const { getColor = getProgressColor } = props; const classes = useStyles(props); const { palette } = useTheme(); - const { value, fractional, inverse, unit, max, hoverMessage } = { + const { value, fractional, inverse, unit, max, description } = { ...defaultGaugeProps, ...props, }; @@ -128,6 +131,26 @@ export function Gauge(props: GaugeProps) { const asPercentage = fractional ? Math.round(value * max) : value; const asActual = max !== 100 ? Math.round(value) : asPercentage; + const [isHovering, setValue] = useState(false); + const handleMouseOver = () => setValue(true); + const handleMouseOut = () => setValue(false); + + useEffect(() => { + const node = hoverRef.current; + if (node) { + node.addEventListener('mouseenter', handleMouseOver); + node.addEventListener('mouseleave', handleMouseOut); + + return () => { + node.removeEventListener('mouseenter', handleMouseOver); + node.removeEventListener('mouseleave', handleMouseOut); + }; + } + return () => { + setValue(false); + }; + }); + return (
- {hoverMessage && isHovering ? ( -
{hoverMessage}
+ {description && isHovering ? ( +
{description}
) : (
{isNaN(value) ? 'N/A' : `${asActual}${unit}`} diff --git a/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx b/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx index 5ce96310b1..08c7813643 100644 --- a/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx +++ b/packages/core-components/src/components/ProgressBars/GaugeCard.stories.tsx @@ -18,6 +18,8 @@ import React, { PropsWithChildren } from 'react'; import { GaugeCard } from './GaugeCard'; import Grid from '@material-ui/core/Grid'; import { MemoryRouter } from 'react-router'; +import Tooltip from '@material-ui/core/Tooltip'; +import Info from '@material-ui/icons/Info'; const linkInfo = { title: 'Go to XYZ Location', link: '#' }; @@ -126,7 +128,11 @@ export const InfoMessage = () => ( title="Progress" subheader="With a subheader" progress={0.3} - iconInfoMessage="Info Message" + icon={ + + + + } /> @@ -134,7 +140,11 @@ export const InfoMessage = () => ( title="Progress" subheader="With a subheader" progress={0.57} - iconInfoMessage="Info Message" + icon={ + + + + } /> @@ -142,7 +152,11 @@ export const InfoMessage = () => ( title="Progress" subheader="With a subheader" progress={0.89} - iconInfoMessage="Info Message" + icon={ + + + + } /> @@ -151,7 +165,11 @@ export const InfoMessage = () => ( subheader="With a subheader" inverse progress={0.2} - iconInfoMessage="Info Message" + icon={ + + + + } /> @@ -160,28 +178,20 @@ export const InfoMessage = () => ( export const HoverMessage = () => ( - + - + - + diff --git a/packages/core-components/src/components/ProgressBars/GaugeCard.tsx b/packages/core-components/src/components/ProgressBars/GaugeCard.tsx index 745c37d480..1114890523 100644 --- a/packages/core-components/src/components/ProgressBars/GaugeCard.tsx +++ b/packages/core-components/src/components/ProgressBars/GaugeCard.tsx @@ -26,8 +26,8 @@ type Props = { variant?: InfoCardVariants; /** Progress in % specified as decimal, e.g. "0.23" */ progress: number; - hoverMessage?: ReactNode; - iconInfoMessage?: string; + description?: ReactNode; + icon?: ReactNode; inverse?: boolean; deepLink?: BottomLinkProps; getColor?: GaugePropsGetColor; @@ -60,15 +60,15 @@ export function GaugeCard(props: Props) { progress, inverse, deepLink, - hoverMessage, - iconInfoMessage, + description, + icon, variant, getColor, } = props; const gaugeProps = { inverse, - hoverMessage, + description, getColor, value: progress, }; @@ -80,7 +80,7 @@ export function GaugeCard(props: Props) { subheader={subheader} deepLink={deepLink} variant={variant} - iconInfoMessage={iconInfoMessage} + icon={icon} > diff --git a/packages/core-components/src/hooks/index.ts b/packages/core-components/src/hooks/index.ts index afaf68e7d9..07e585bf27 100644 --- a/packages/core-components/src/hooks/index.ts +++ b/packages/core-components/src/hooks/index.ts @@ -16,7 +16,6 @@ export { useQueryParamState } from './useQueryParamState'; export { useSupportConfig } from './useSupportConfig'; -export { useHover } from './useHover'; export type { SupportConfig, SupportItem, diff --git a/packages/core-components/src/hooks/useHover.ts b/packages/core-components/src/hooks/useHover.ts deleted file mode 100644 index 4c5602c77c..0000000000 --- a/packages/core-components/src/hooks/useHover.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { useEffect, RefObject, useState } from 'react'; - -export const useHover = (ref: RefObject) => { - const [value, setValue] = useState(false); - - const handleMouseOver = () => setValue(true); - const handleMouseOut = () => setValue(false); - - useEffect(() => { - const node = ref.current as any; - if (node) { - node.addEventListener('mouseenter', handleMouseOver) as any; - node.addEventListener('mouseleave', handleMouseOut) as any; - - return () => { - node.removeEventListener('mouseenter', handleMouseOver); - node.removeEventListener('mouseleave', handleMouseOut); - }; - } - return () => { - setValue(false); - }; - }, [ref]); - - return value; -}; diff --git a/packages/core-components/src/layout/InfoCard/InfoCard.tsx b/packages/core-components/src/layout/InfoCard/InfoCard.tsx index 70ffd2e0cd..5c52e28543 100644 --- a/packages/core-components/src/layout/InfoCard/InfoCard.tsx +++ b/packages/core-components/src/layout/InfoCard/InfoCard.tsx @@ -24,8 +24,6 @@ import classNames from 'classnames'; import React, { ReactNode } from 'react'; import { BottomLink, BottomLinkProps } from '../BottomLink'; import { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary'; -import Info from '@material-ui/icons/Info'; -import Tooltip from '@material-ui/core/Tooltip'; /** @public */ export type InfoCardClassKey = @@ -57,12 +55,6 @@ const useStyles = makeStyles( headerAvatar: {}, headerAction: {}, headerContent: {}, - leftIcon: { - float: 'right', - }, - tooltip: { - fontSize: 14, - }, subheader: { float: 'left', }, @@ -145,7 +137,7 @@ type Props = { children?: ReactNode; headerStyle?: object; headerProps?: CardHeaderProps; - iconInfoMessage?: ReactNode; + icon?: ReactNode; action?: ReactNode; actionsClassName?: string; actions?: ReactNode; @@ -174,7 +166,7 @@ export function InfoCard(props: Props): JSX.Element { children, headerStyle, headerProps, - iconInfoMessage, + icon, action, actionsClassName, actions, @@ -211,15 +203,7 @@ export function InfoCard(props: Props): JSX.Element { return (
{subheader &&
{subheader}
} - {iconInfoMessage && ( - - - - )} + {icon && icon}
); }; From 50d039577a13ad8ff992b7be09c92e1c965a1e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 12 Nov 2021 16:54:20 +0100 Subject: [PATCH 005/473] Introduce the Context to the backend again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/rare-comics-tan.md | 5 + packages/backend-common/api-report.md | 42 ++++++ packages/backend-common/package.json | 2 + .../src/context/RootContext.test.ts | 60 ++++++++ .../backend-common/src/context/RootContext.ts | 123 ++++++++++++++++ .../src/context/features/abort.test.ts | 134 ++++++++++++++++++ .../src/context/features/abort.ts | 75 ++++++++++ .../src/context/features/values.test.ts | 52 +++++++ .../src/context/features/values.ts | 73 ++++++++++ packages/backend-common/src/context/index.ts | 18 +++ packages/backend-common/src/context/types.ts | 104 ++++++++++++++ packages/backend-common/src/index.ts | 1 + 12 files changed, 689 insertions(+) create mode 100644 .changeset/rare-comics-tan.md create mode 100644 packages/backend-common/src/context/RootContext.test.ts create mode 100644 packages/backend-common/src/context/RootContext.ts create mode 100644 packages/backend-common/src/context/features/abort.test.ts create mode 100644 packages/backend-common/src/context/features/abort.ts create mode 100644 packages/backend-common/src/context/features/values.test.ts create mode 100644 packages/backend-common/src/context/features/values.ts create mode 100644 packages/backend-common/src/context/index.ts create mode 100644 packages/backend-common/src/context/types.ts diff --git a/.changeset/rare-comics-tan.md b/.changeset/rare-comics-tan.md new file mode 100644 index 0000000000..a067ab2eb4 --- /dev/null +++ b/.changeset/rare-comics-tan.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-common': patch +--- + +Added a Context class for the backend, that handles aborting, timeouts, api resolution etc diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index d63416571d..8b925c441c 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -12,7 +12,9 @@ import { AzureIntegration } from '@backstage/integration'; import { BitbucketIntegration } from '@backstage/integration'; import { Config } from '@backstage/config'; import cors from 'cors'; +import { DateTime } from 'luxon'; import Docker from 'dockerode'; +import { Duration } from 'luxon'; import { ErrorRequestHandler } from 'express'; import express from 'express'; import { GithubCredentialsProvider } from '@backstage/integration'; @@ -145,6 +147,27 @@ export interface ContainerRunner { runContainer(opts: RunContainerOptions): Promise; } +// @public +export interface Context { + readonly abortPromise: Promise; + readonly abortSignal: AbortSignal; + readonly deadline: DateTime | undefined; + value(key: string | symbol): T | undefined; + with(...decorators: ContextDecorator[]): Context; + withAbort(): { + ctx: Context; + abort: () => void; + }; + withTimeout(timeout: Duration): Context; + withValue( + key: string | symbol, + value: T | ((previous: T | undefined) => T), + ): Context; +} + +// @public +export type ContextDecorator = (ctx: Context) => Context; + // @public @deprecated export const createDatabase: typeof createDatabaseClient; @@ -456,6 +479,25 @@ export function resolvePackagePath(name: string, ...paths: string[]): string; // @public export function resolveSafeChildPath(base: string, path: string): string; +// @public +export class RootContext implements Context { + get abortPromise(): Promise; + get abortSignal(): AbortSignal_2; + static create(): Context; + get deadline(): DateTime | undefined; + value(key: string | symbol): T | undefined; + with(...items: ContextDecorator[]): Context; + withAbort(): { + ctx: Context; + abort: () => void; + }; + withTimeout(timeout: Duration): Context; + withValue( + key: string | symbol, + value: T | ((previous: T | undefined) => T), + ): Context; +} + // @public export type RunContainerOptions = { imageName: string; diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index a5963bc77d..3008d915f9 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -41,6 +41,7 @@ "@types/cors": "^2.8.6", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", + "@types/luxon": "^2.0.4", "archiver": "^5.0.2", "aws-sdk": "^2.840.0", "compression": "^1.7.4", @@ -59,6 +60,7 @@ "knex": "^0.95.1", "lodash": "^4.17.21", "logform": "^2.3.2", + "luxon": "^2.0.2", "minimatch": "^3.0.4", "minimist": "^1.2.5", "morgan": "^1.10.0", diff --git a/packages/backend-common/src/context/RootContext.test.ts b/packages/backend-common/src/context/RootContext.test.ts new file mode 100644 index 0000000000..d83485a78b --- /dev/null +++ b/packages/backend-common/src/context/RootContext.test.ts @@ -0,0 +1,60 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Duration } from 'luxon'; +import { RootContext } from './RootContext'; + +describe('RootContext', () => { + it('can perform a manual abort', async () => { + const { ctx, abort } = RootContext.create().withAbort(); + + const cb = jest.fn(); + ctx.abortSignal.addEventListener('abort', cb); + ctx.abortPromise.then(cb); + + abort(); + + await ctx.abortPromise; + expect(cb).toBeCalledTimes(2); + }); + + it('can abort on a timeout', async () => { + const ctx = RootContext.create().withTimeout(Duration.fromMillis(200)); + const start = Date.now(); + + const cb = jest.fn(); + ctx.abortSignal.addEventListener('abort', cb); + ctx.abortPromise.then(cb); + + await ctx.abortPromise; + const delta = Date.now() - start; + + expect(delta).toBeGreaterThan(100); + expect(delta).toBeLessThan(300); + expect(cb).toBeCalledTimes(2); + }); + + it('can apply behaviors', () => { + const ctx = RootContext.create().with( + c => c.withValue('a', 1), + c => c.withValue('a', p => p! + 1), + c => c.withValue('b', 3), + ); + + expect(ctx.value('a')).toBe(2); + expect(ctx.value('b')).toBe(3); + }); +}); diff --git a/packages/backend-common/src/context/RootContext.ts b/packages/backend-common/src/context/RootContext.ts new file mode 100644 index 0000000000..889f9d3f5a --- /dev/null +++ b/packages/backend-common/src/context/RootContext.ts @@ -0,0 +1,123 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DateTime, Duration } from 'luxon'; +import { AbortSignal } from 'node-abort-controller'; +import { + abortManually, + abortOnTimeout, + ContextAbortState, +} from './features/abort'; +import { + ContextValues, + findInContextValues, + unshiftContextValues, +} from './features/values'; +import { Context, ContextDecorator } from './types'; + +// The context value key used for holding abort related state +const abortKey = Symbol('Context.abort'); + +/** + * A context that is meant to be passed as a ctx variable down the call chain, + * to pass along scoped information and abort signals. + * + * @public + */ +export class RootContext implements Context { + /** + * Creates a root context. + * + * @remarks + * + * This should normally only be called near the root of an application. The + * created context is meant to be passed down into deeper levels, which may + * or may not make derived contexts out of it. + */ + static create() { + return new RootContext(undefined).withValue( + abortKey, + abortManually(), + ); + } + + /** + * {@inheritdoc Context.abortSignal} + */ + public get abortSignal(): AbortSignal { + return this.value(abortKey)!.signal; + } + + /** + * {@inheritdoc Context.abortPromise} + */ + public get abortPromise(): Promise { + return this.value(abortKey)!.promise; + } + + /** + * {@inheritdoc Context.deadline} + */ + public get deadline(): DateTime | undefined { + return this.value(abortKey)!.deadline; + } + + private constructor(private readonly values: ContextValues) {} + + /** + * {@inheritdoc Context.withAbort} + */ + withAbort(): { ctx: Context; abort: () => void } { + const state = abortManually(this.value(abortKey)); + return { + ctx: this.withValue(abortKey, state), + abort: state.abort, + }; + } + + /** + * {@inheritdoc Context.withTimeout} + */ + withTimeout(timeout: Duration): Context { + return this.withValue(abortKey, previous => + abortOnTimeout(timeout, previous), + ); + } + + /** + * {@inheritdoc Context.with} + */ + with(...items: ContextDecorator[]): Context { + return items.reduce((prev, curr) => curr(prev), this); + } + + /** + * {@inheritdoc Context.withValue} + */ + withValue( + key: string | symbol, + value: T | ((previous: T | undefined) => T), + ): Context { + return new RootContext(unshiftContextValues(this.values, key, value)); + } + + /** + * {@inheritdoc Context.value} + */ + value(key: string | symbol): T | undefined { + return findInContextValues(this.values, key); + } +} diff --git a/packages/backend-common/src/context/features/abort.test.ts b/packages/backend-common/src/context/features/abort.test.ts new file mode 100644 index 0000000000..74cd8cbfe2 --- /dev/null +++ b/packages/backend-common/src/context/features/abort.test.ts @@ -0,0 +1,134 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Duration } from 'luxon'; +import { abortManually, abortOnTimeout } from './abort'; + +describe('ContextAbortState', () => { + describe('abortManually', () => { + it('can perform a manual abort', async () => { + const state = abortManually(); + + const cb = jest.fn(); + state.signal.addEventListener('abort', cb); + state.promise.then(cb); + + state.abort(); + + await state.promise; + expect(cb).toBeCalledTimes(2); + }); + + it('triggers child when parent is aborted', async () => { + const parent = abortManually(); + const child = abortManually(parent); + + const parentCb = jest.fn(); + parent.signal.addEventListener('abort', parentCb); + parent.promise.then(parentCb); + + const childCb = jest.fn(); + child.signal.addEventListener('abort', childCb); + child.promise.then(childCb); + + parent.abort(); + + await child.promise; + expect(parentCb).toBeCalledTimes(2); + expect(childCb).toBeCalledTimes(2); + }); + + it('does not trigger parent when child is aborted', async () => { + const parent = abortManually(); + const child = abortManually(parent); + + const parentCb = jest.fn(); + parent.signal.addEventListener('abort', parentCb); + parent.promise.then(parentCb); + + const childCb = jest.fn(); + child.signal.addEventListener('abort', childCb); + child.promise.then(childCb); + + child.abort(); + + await child.promise; + expect(parentCb).toBeCalledTimes(0); + expect(childCb).toBeCalledTimes(2); + }); + + it('only triggers once', async () => { + const state = abortManually(); + + const cb = jest.fn(); + state.signal.addEventListener('abort', cb); + state.promise.then(cb); + + state.abort(); + + await state.promise; + expect(cb).toBeCalledTimes(2); + + state.abort(); + + await state.promise; + expect(cb).toBeCalledTimes(2); + }); + }); + + describe('abortOnTimeout', () => { + it('can abort on a timeout', async () => { + const state = abortOnTimeout(Duration.fromMillis(200)); + const start = Date.now(); + + const cb = jest.fn(); + state.signal.addEventListener('abort', cb); + state.promise.then(cb); + + await state.promise; + const delta = Date.now() - start; + + expect(delta).toBeGreaterThan(100); + expect(delta).toBeLessThan(300); + expect(cb).toBeCalledTimes(2); + }); + + it('aborts early if parent triggers first', async () => { + const parent = abortManually(); + const child = abortOnTimeout(Duration.fromMillis(200), parent); + + const parentCb = jest.fn(); + parent.signal.addEventListener('abort', parentCb); + parent.promise.then(parentCb); + + const childCb = jest.fn(); + child.signal.addEventListener('abort', childCb); + child.promise.then(childCb); + + expect(parentCb).toBeCalledTimes(0); + expect(childCb).toBeCalledTimes(0); + + const start = Date.now(); + + parent.abort(); + + await child.promise; + expect(parentCb).toBeCalledTimes(2); + expect(childCb).toBeCalledTimes(2); + expect(Date.now() - start).toBeLessThan(100); + }); + }); +}); diff --git a/packages/backend-common/src/context/features/abort.ts b/packages/backend-common/src/context/features/abort.ts new file mode 100644 index 0000000000..1a37de960b --- /dev/null +++ b/packages/backend-common/src/context/features/abort.ts @@ -0,0 +1,75 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DateTime, Duration } from 'luxon'; +import { AbortController, AbortSignal } from 'node-abort-controller'; + +export type ContextAbortState = { + signal: AbortSignal; + promise: Promise; + deadline: DateTime | undefined; + abort: () => void; +}; + +export function abortManually( + previous?: ContextAbortState | undefined, +): ContextAbortState { + const controller = new AbortController(); + const abort = controller.abort.bind(controller); + previous?.signal.addEventListener('abort', abort); + + return { + signal: controller.signal, + promise: new Promise(resolve => { + controller.signal.addEventListener('abort', resolve); + }), + deadline: previous?.deadline, + abort, + }; +} + +export function abortOnTimeout( + timeout: Duration, + previous?: ContextAbortState | undefined, +): ContextAbortState { + const deadline = DateTime.now().plus(timeout); + if (previous?.deadline && deadline > previous.deadline) { + return previous; + } + + const controller = new AbortController(); + + const timeoutHandle = setTimeout(() => { + controller.abort(); + }, timeout.as('milliseconds')); + + const abort = () => { + previous?.signal.removeEventListener('abort', abort); + clearTimeout(timeoutHandle); + controller.abort(); + }; + + previous?.signal.addEventListener('abort', abort); + + return { + signal: controller.signal, + promise: new Promise(resolve => { + controller.signal.addEventListener('abort', resolve); + }), + deadline, + abort, + }; +} diff --git a/packages/backend-common/src/context/features/values.test.ts b/packages/backend-common/src/context/features/values.test.ts new file mode 100644 index 0000000000..63d2da80de --- /dev/null +++ b/packages/backend-common/src/context/features/values.test.ts @@ -0,0 +1,52 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + ContextValues, + findInContextValues, + unshiftContextValues, +} from './values'; + +describe('ContextValues', () => { + it('can start from the empty list', () => { + let list: ContextValues = undefined; + expect(findInContextValues(list, 'a')).toBeUndefined(); + list = unshiftContextValues(list, 'a', 'b'); + expect(findInContextValues(list, 'a')).toBe('b'); + expect(findInContextValues(list, 'x')).toBeUndefined(); + }); + + it('always fetches the most recent value', () => { + let list: ContextValues = undefined; + expect(findInContextValues(list, 'a')).toBeUndefined(); + list = unshiftContextValues(list, 'a', 1); + expect(findInContextValues(list, 'a')).toBe(1); + list = unshiftContextValues(list, 'a', 2); + expect(findInContextValues(list, 'a')).toBe(2); + }); + + it('handles all key types', () => { + let list: ContextValues = undefined; + const symbol1 = Symbol('str'); + const symbol2 = Symbol('str'); + list = unshiftContextValues(list, 'str', 'str'); + list = unshiftContextValues(list, symbol1, 'sym'); + expect(findInContextValues(list, 'str')).toBe('str'); + expect(findInContextValues(list, symbol1)).toBe('sym'); + expect(findInContextValues(list, 'blah')).toBeUndefined(); + expect(findInContextValues(list, symbol2)).toBeUndefined(); + }); +}); diff --git a/packages/backend-common/src/context/features/values.ts b/packages/backend-common/src/context/features/values.ts new file mode 100644 index 0000000000..b7ab062e32 --- /dev/null +++ b/packages/backend-common/src/context/features/values.ts @@ -0,0 +1,73 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * An immutable key-value list. The only operations possible are to add a new + * node at the start forming a new list, and to find by key from the start and + * backwards through the list. + */ +export type ContextValues = ContextValueNode | undefined; + +type ContextValueNode = { + key: string | symbol; + value: unknown; + next: ContextValueNode | undefined; +}; + +/** + * Creates a new list with the given key-value pair as its first element. + * + * @param list - The original list + * @param key - The key of the pair + * @param value - The value of the pair, or a function that accepts the + * previously stored value (or undefined if not found) and + * computes the new value + * @returns A new list with this pair as its first element + */ +export function unshiftContextValues( + list: ContextValues, + key: string | symbol, + value: unknown | ((previous: unknown | undefined) => unknown), +): ContextValues { + return { + key, + value: + typeof value === 'function' + ? value(findInContextValues(list, key)) + : value, + next: list, + }; +} + +/** + * Attempts to find the value associated with a given key, starting from the + * most recently added element. + * + * @param list - The list + * @param key - The key to search for + * @returns The first such value, or undefined if no match was found + */ +export function findInContextValues( + list: ContextValues, + key: string | symbol, +): T | undefined { + for (let current = list; current; current = current.next) { + if (key === current.key) { + return current.value as T; + } + } + return undefined; +} diff --git a/packages/backend-common/src/context/index.ts b/packages/backend-common/src/context/index.ts new file mode 100644 index 0000000000..a09c32bac5 --- /dev/null +++ b/packages/backend-common/src/context/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { RootContext } from './RootContext'; +export type { Context, ContextDecorator } from './types'; diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/context/types.ts new file mode 100644 index 0000000000..e3c880b4a8 --- /dev/null +++ b/packages/backend-common/src/context/types.ts @@ -0,0 +1,104 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DateTime, Duration } from 'luxon'; + +/** + * A function that accepts a context and produces a new, derived context from, + * decorated with some specific behavior. + * + * @public + */ +export type ContextDecorator = (ctx: Context) => Context; + +/** + * A context that is meant to be passed as a ctx variable down the call chain, + * to pass along scoped information and abort signals. + * + * @public + */ +export interface Context { + /** + * Returns an abort signal that triggers when the current context or any of + * its parents signal for it. + */ + readonly abortSignal: AbortSignal; + + /** + * Returns a promise that resolves when the current context or any of its + * parents signal to abort. + */ + readonly abortPromise: Promise; + + /** + * The point in time when the current context shall time out and abort, if + * applicable. + */ + readonly deadline: DateTime | undefined; + + /** + * Creates a derived context, which signals to abort operations either when + * any parent context signals, or when the current layer calls the returned + * abort function. + * + * @returns A derived context, and the function that triggers it to abort. + */ + withAbort(): { ctx: Context; abort: () => void }; + + /** + * Creates a derived context, which signals to abort operations either when + * any parent context signals, or when the given amount of time has passed. + * This may affect the deadline. + * + * @param timeout - The duration of time, after which the derived context + * will signal to abort. + * @returns A derived context with an updated deadline + */ + withTimeout(timeout: Duration): Context; + + /** + * Decorates this context with one or more behaviors. + * + * @remarks + * + * The decorators are applied in the order that they are given. + * + * @param decorators - The decorators to apply + * @returns A derived context with the relevant behaviors + */ + with(...decorators: ContextDecorator[]): Context; + + /** + * Creates a derived context, which has a specific key-value pair set as well + * as all key-value pairs set in the original context. + * + * @param key - The key of the value to set + * @param value - The value, or a function that accepts the previous value (or + * undefined if not set yet) and computes the new value + */ + withValue( + key: string | symbol, + value: T | ((previous: T | undefined) => T), + ): Context; + + /** + * Attempts to get a stored value by key from the context. + * + * @param key - The key of the value to get + * @returns The associated value, or undefined if not set + */ + value(key: string | symbol): T | undefined; +} diff --git a/packages/backend-common/src/index.ts b/packages/backend-common/src/index.ts index e430ddc1a4..238e58b2a8 100644 --- a/packages/backend-common/src/index.ts +++ b/packages/backend-common/src/index.ts @@ -22,6 +22,7 @@ export * from './cache'; export { loadBackendConfig } from './config'; +export * from './context'; export * from './database'; export * from './discovery'; export * from './hot'; From 5ae840e4f69445a2ef70433597eebac4666899ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Sat, 27 Nov 2021 12:35:45 +0100 Subject: [PATCH 006/473] Use the simpler abortSignal + deadline + value structure instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/rare-comics-tan.md | 2 +- packages/backend-common/api-report.md | 46 +-- .../src/context/AbortContext.test.ts | 265 ++++++++++++++++++ .../src/context/AbortContext.ts | 96 +++++++ .../backend-common/src/context/Contexts.ts | 107 +++++++ .../src/context/RootContext.test.ts | 48 +--- .../backend-common/src/context/RootContext.ts | 107 +------ .../src/context/ValueContext.test.ts | 57 ++++ .../src/context/ValueContext.ts | 53 ++++ .../src/context/features/abort.test.ts | 134 --------- .../src/context/features/abort.ts | 75 ----- .../src/context/features/values.test.ts | 52 ---- .../src/context/features/values.ts | 73 ----- packages/backend-common/src/context/index.ts | 2 +- packages/backend-common/src/context/types.ts | 53 +--- 15 files changed, 622 insertions(+), 548 deletions(-) create mode 100644 packages/backend-common/src/context/AbortContext.test.ts create mode 100644 packages/backend-common/src/context/AbortContext.ts create mode 100644 packages/backend-common/src/context/Contexts.ts create mode 100644 packages/backend-common/src/context/ValueContext.test.ts create mode 100644 packages/backend-common/src/context/ValueContext.ts delete mode 100644 packages/backend-common/src/context/features/abort.test.ts delete mode 100644 packages/backend-common/src/context/features/abort.ts delete mode 100644 packages/backend-common/src/context/features/values.test.ts delete mode 100644 packages/backend-common/src/context/features/values.ts diff --git a/.changeset/rare-comics-tan.md b/.changeset/rare-comics-tan.md index a067ab2eb4..12d615d3f3 100644 --- a/.changeset/rare-comics-tan.md +++ b/.changeset/rare-comics-tan.md @@ -2,4 +2,4 @@ '@backstage/backend-common': patch --- -Added a Context class for the backend, that handles aborting, timeouts, api resolution etc +Added a `Context` type for the backend, that can propagate an abort signal, a deadline, and contextual values through the call stack. The main entrypoint is the `Contexts` utility class that provides a root context creator and commonly used decorators. diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 8b925c441c..e77beef556 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -12,7 +12,6 @@ import { AzureIntegration } from '@backstage/integration'; import { BitbucketIntegration } from '@backstage/integration'; import { Config } from '@backstage/config'; import cors from 'cors'; -import { DateTime } from 'luxon'; import Docker from 'dockerode'; import { Duration } from 'luxon'; import { ErrorRequestHandler } from 'express'; @@ -149,25 +148,27 @@ export interface ContainerRunner { // @public export interface Context { - readonly abortPromise: Promise; readonly abortSignal: AbortSignal; - readonly deadline: DateTime | undefined; + readonly deadline: Date | undefined; + use(...decorators: ContextDecorator[]): Context; value(key: string | symbol): T | undefined; - with(...decorators: ContextDecorator[]): Context; - withAbort(): { - ctx: Context; - abort: () => void; - }; - withTimeout(timeout: Duration): Context; - withValue( - key: string | symbol, - value: T | ((previous: T | undefined) => T), - ): Context; } // @public export type ContextDecorator = (ctx: Context) => Context; +// @public +export class Contexts { + static root(): Context; + static setAbort(signal: AbortSignal_2): ContextDecorator; + static setTimeoutDuration(timeout: Duration): ContextDecorator; + static setTimeoutMillis(timeout: number): ContextDecorator; + static setValue( + key: string | symbol, + value: unknown | ((previous: unknown | undefined) => unknown), + ): ContextDecorator; +} + // @public @deprecated export const createDatabase: typeof createDatabaseClient; @@ -479,25 +480,6 @@ export function resolvePackagePath(name: string, ...paths: string[]): string; // @public export function resolveSafeChildPath(base: string, path: string): string; -// @public -export class RootContext implements Context { - get abortPromise(): Promise; - get abortSignal(): AbortSignal_2; - static create(): Context; - get deadline(): DateTime | undefined; - value(key: string | symbol): T | undefined; - with(...items: ContextDecorator[]): Context; - withAbort(): { - ctx: Context; - abort: () => void; - }; - withTimeout(timeout: Duration): Context; - withValue( - key: string | symbol, - value: T | ((previous: T | undefined) => T), - ): Context; -} - // @public export type RunContainerOptions = { imageName: string; diff --git a/packages/backend-common/src/context/AbortContext.test.ts b/packages/backend-common/src/context/AbortContext.test.ts new file mode 100644 index 0000000000..fc7b366c23 --- /dev/null +++ b/packages/backend-common/src/context/AbortContext.test.ts @@ -0,0 +1,265 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AbortController } from 'node-abort-controller'; +import { AbortContext } from './AbortContext'; +import { Contexts } from './Contexts'; +import { RootContext } from './RootContext'; + +describe('AbortContext', () => { + afterEach(() => { + jest.useRealTimers(); + }); + + describe('forTimeoutMillis', () => { + it('can abort on a timeout', async () => { + jest.useFakeTimers(); + const timeout = 200; + const deadline = Date.now() + timeout; + + const root = new RootContext(); + + const child = AbortContext.forTimeoutMillis(root, timeout); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(child.abortSignal.aborted).toBe(false); + expect(Math.abs(+child.deadline! - deadline)).toBeLessThan(50); + expect(childListener).toBeCalledTimes(0); + + jest.advanceTimersByTime(timeout + 1); + + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(1); + }); + + it('results in minimum deadline when parent triggers sooner', async () => { + jest.useFakeTimers(); + const parentTimeout = 200; + const childTimeout = 300; + const parentDeadline = Date.now() + parentTimeout; + const childDeadline = parentDeadline; // clamped + + const root = new RootContext(); + + const parent = AbortContext.forTimeoutMillis(root, parentTimeout); + const parentListener = jest.fn(); + parent.abortSignal.addEventListener('abort', parentListener); + + const child = AbortContext.forTimeoutMillis(parent, childTimeout); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(false); + expect(Math.abs(+parent.deadline! - parentDeadline)).toBeLessThan(50); + expect(Math.abs(+child.deadline! - childDeadline)).toBeLessThan(50); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(0); + + jest.advanceTimersByTime(parentTimeout + 1); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(1); + expect(childListener).toBeCalledTimes(1); + }); + + it('results in minimum deadline when child triggers sooner', async () => { + jest.useFakeTimers(); + const parentTimeout = 300; + const childTimeout = 200; + const parentDeadline = Date.now() + parentTimeout; + const childDeadline = Date.now() + childTimeout; + + const root = new RootContext(); + + const parent = AbortContext.forTimeoutMillis(root, parentTimeout); + const parentListener = jest.fn(); + parent.abortSignal.addEventListener('abort', parentListener); + + const child = AbortContext.forTimeoutMillis(parent, childTimeout); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(false); + expect(Math.abs(+parent.deadline! - parentDeadline)).toBeLessThan(50); + expect(Math.abs(+child.deadline! - childDeadline)).toBeLessThan(50); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(0); + + jest.advanceTimersByTime(childTimeout + 1); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(1); + + jest.advanceTimersByTime(parentTimeout - childTimeout + 1); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(1); + expect(childListener).toBeCalledTimes(1); + }); + + it('child carries over parent signal state if parent was already aborted and had no deadline', async () => { + jest.useFakeTimers(); + const childTimeout = 200; + const childDeadline = Date.now() + childTimeout; + + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forSignal(root, parentController.signal); + + parentController.abort(); + + const child = AbortContext.forTimeoutMillis(parent, childTimeout); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + expect(Math.abs(+child.deadline! - childDeadline)).toBeLessThan(50); + + jest.advanceTimersByTime(childTimeout + 1); + + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); // still + }); + + it('child carries over parent signal state if parent was already aborted and had a deadline', async () => { + jest.useFakeTimers(); + const first = new RootContext(); + + const secondController = new AbortController(); + const second = AbortContext.forSignal(first, secondController.signal); + secondController.abort(); + + const third = AbortContext.forTimeoutMillis(second, 200); + const fourth = AbortContext.forTimeoutMillis(third, 300); + + expect(third.abortSignal.aborted).toBe(true); + expect(fourth.abortSignal.aborted).toBe(true); + expect(Math.abs(+fourth.deadline! - Date.now() - 200)).toBeLessThan(50); + }); + }); + + describe('forSignal', () => { + it('signals child when parent is aborted', async () => { + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forSignal(root, parentController.signal); + const parentListener = jest.fn(); + parent.abortSignal.addEventListener('abort', parentListener); + + const childController = new AbortController(); + const child = AbortContext.forSignal(parent, childController.signal); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(false); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(0); + + parentController.abort(); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(1); + expect(childListener).toBeCalledTimes(1); + }); + + it('does not signal parent when child is aborted', async () => { + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forSignal(root, parentController.signal); + const parentListener = jest.fn(); + parent.abortSignal.addEventListener('abort', parentListener); + + const childController = new AbortController(); + const child = AbortContext.forSignal(parent, childController.signal); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(false); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(0); + + childController.abort(); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(1); + }); + + it('child carries over parent signal state if parent was already aborted', async () => { + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forSignal(root, parentController.signal); + + parentController.abort(); + + const childController = new AbortController(); + const child = AbortContext.forSignal(parent, childController.signal); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + + childController.abort(); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + }); + + it('child carries over given signal state if it was already aborted', async () => { + const root = new RootContext(); + + const childController = new AbortController(); + childController.abort(); + + const child = AbortContext.forSignal(root, childController.signal); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + }); + }); + + it('can decorate', () => { + const root = new RootContext(); + const controller = new AbortController(); + const parent = AbortContext.forSignal(root, controller.signal); + const child = parent.use( + Contexts.setValue('a', 2), + Contexts.setValue('a', 3), + ); + expect(child.value('a')).toBe(3); + }); +}); diff --git a/packages/backend-common/src/context/AbortContext.ts b/packages/backend-common/src/context/AbortContext.ts new file mode 100644 index 0000000000..a328241de2 --- /dev/null +++ b/packages/backend-common/src/context/AbortContext.ts @@ -0,0 +1,96 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AbortSignal } from 'node-abort-controller'; +import { Context, ContextDecorator } from './types'; + +/** + * A context that implements various abort related functionality. + */ +export class AbortContext implements Context { + /** + * Abort either when the parent aborts, or after the given timeout has + * expired. + */ + static forTimeoutMillis(ctx: Context, timeout: number): Context { + const desiredDeadline = new Date(Date.now() + timeout); + const actualDeadline = + ctx.deadline && ctx.deadline < desiredDeadline + ? ctx.deadline + : desiredDeadline; + + if (ctx.abortSignal.aborted) { + if (ctx.deadline && desiredDeadline === actualDeadline) { + return ctx; + } + return new AbortContext(ctx, ctx.abortSignal, actualDeadline); + } + + const controller = new AbortController(); + + const timeoutHandle = setTimeout(() => { + controller.abort(); + }, timeout); + + const abort = () => { + ctx.abortSignal.removeEventListener('abort', abort); + clearTimeout(timeoutHandle); + controller.abort(); + }; + + ctx.abortSignal.addEventListener('abort', abort); + + return new AbortContext(ctx, controller.signal, actualDeadline); + } + + /** + * Abort either when the parent aborts, or when the given signal is triggered. + */ + static forSignal(ctx: Context, signal: AbortSignal): Context { + // If the parent context was already aborted, it is fine to reuse as-is + if (ctx.abortSignal.aborted) { + return ctx; + } + + const controller = new AbortController(); + const abort = controller.abort.bind(controller); + + // If the incoming signal was already aborted, let's trigger the new one as + // well + if (signal.aborted) { + abort(); + } else { + ctx.abortSignal.addEventListener('abort', abort); + signal.addEventListener('abort', abort); + } + + return new AbortContext(ctx, controller.signal, ctx.deadline); + } + + private constructor( + private readonly parent: Context, + readonly abortSignal: AbortSignal, + readonly deadline: Date | undefined, + ) {} + + value(key: string | symbol): T | undefined { + return this.parent.value(key); + } + + use(...items: ContextDecorator[]): Context { + return items.reduce((prev, curr) => curr(prev), this as Context); + } +} diff --git a/packages/backend-common/src/context/Contexts.ts b/packages/backend-common/src/context/Contexts.ts new file mode 100644 index 0000000000..775f6f730d --- /dev/null +++ b/packages/backend-common/src/context/Contexts.ts @@ -0,0 +1,107 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Duration } from 'luxon'; +import { AbortSignal } from 'node-abort-controller'; +import { AbortContext } from './AbortContext'; +import { RootContext } from './RootContext'; +import { Context, ContextDecorator } from './types'; +import { ValueContext } from './ValueContext'; + +/** + * Common context decorators. + * + * @public + */ +export class Contexts { + /** + * Creates a root context. + * + * @remarks + * + * This should normally only be called near the root of an application. The + * created context is meant to be passed down into deeper levels, which may or + * may not make derived contexts out of it. + */ + static root(): Context { + return new RootContext(); + } + + /** + * Creates a derived context, which signals to abort operations either when + * any parent context signals, or when the given controller is aborted. + * + * @remarks + * + * If the parent context was already aborted, then it is returned as-is. + * + * If the given signal was already aborted, then a new already-aborted context + * is returned. + * + * @param signal - An abort signal that you intend to perhaps trigger at some + * later point in time. + * @returns A decorator that can be passed to {@link Context.use} + */ + static setAbort(signal: AbortSignal): ContextDecorator { + return ctx => AbortContext.forSignal(ctx, signal); + } + + /** + * Creates a derived context, which signals to abort operations either when + * any parent context signals, or when the given amount of time has passed. + * This may affect the deadline. + * + * @param timeout - The duration of time, after which the derived context will + * signal to abort. + * @returns A decorator that can be passed to {@link Context.use} + */ + static setTimeoutDuration(timeout: Duration): ContextDecorator { + return ctx => + AbortContext.forTimeoutMillis(ctx, timeout.as('milliseconds')); + } + + /** + * Creates a derived context, which signals to abort operations either when + * any parent context signals, or when the given amount of time has passed. + * This may affect the deadline. + * + * @param timeout - The number of milliseconds, after which the derived + * context will signal to abort. + * @returns A decorator that can be passed to {@link Context.use} + */ + static setTimeoutMillis(timeout: number): ContextDecorator { + return ctx => AbortContext.forTimeoutMillis(ctx, timeout); + } + + /** + * Creates a derived context, which has a specific key-value pair set as well + * as all key-value pairs that were set in the original context. + * + * @param key - The key of the value to set + * @param value - The value, or a function that accepts the previous value (or + * undefined if not set yet) and computes the new value + * @returns A decorator that can be passed to {@link Context.use} + */ + static setValue( + key: string | symbol, + value: unknown | ((previous: unknown | undefined) => unknown), + ): ContextDecorator { + return ctx => { + const v = typeof value === 'function' ? value(ctx.value(key)) : value; + return ValueContext.forConstantValue(ctx, key, v); + }; + } +} diff --git a/packages/backend-common/src/context/RootContext.test.ts b/packages/backend-common/src/context/RootContext.test.ts index d83485a78b..28a3af0a52 100644 --- a/packages/backend-common/src/context/RootContext.test.ts +++ b/packages/backend-common/src/context/RootContext.test.ts @@ -14,47 +14,23 @@ * limitations under the License. */ -import { Duration } from 'luxon'; +import { Contexts } from './Contexts'; import { RootContext } from './RootContext'; describe('RootContext', () => { - it('can perform a manual abort', async () => { - const { ctx, abort } = RootContext.create().withAbort(); - - const cb = jest.fn(); - ctx.abortSignal.addEventListener('abort', cb); - ctx.abortPromise.then(cb); - - abort(); - - await ctx.abortPromise; - expect(cb).toBeCalledTimes(2); + it('returns empty values', async () => { + const ctx = new RootContext(); + expect(ctx.abortSignal).toBeDefined(); + expect(ctx.deadline).toBeUndefined(); + expect(ctx.value('a')).toBeUndefined(); }); - it('can abort on a timeout', async () => { - const ctx = RootContext.create().withTimeout(Duration.fromMillis(200)); - const start = Date.now(); - - const cb = jest.fn(); - ctx.abortSignal.addEventListener('abort', cb); - ctx.abortPromise.then(cb); - - await ctx.abortPromise; - const delta = Date.now() - start; - - expect(delta).toBeGreaterThan(100); - expect(delta).toBeLessThan(300); - expect(cb).toBeCalledTimes(2); - }); - - it('can apply behaviors', () => { - const ctx = RootContext.create().with( - c => c.withValue('a', 1), - c => c.withValue('a', p => p! + 1), - c => c.withValue('b', 3), + it('can decorate', () => { + const parent = new RootContext(); + const child = parent.use( + Contexts.setValue('a', 2), + Contexts.setValue('a', 3), ); - - expect(ctx.value('a')).toBe(2); - expect(ctx.value('b')).toBe(3); + expect(child.value('a')).toBe(3); }); }); diff --git a/packages/backend-common/src/context/RootContext.ts b/packages/backend-common/src/context/RootContext.ts index 889f9d3f5a..ae7c18a905 100644 --- a/packages/backend-common/src/context/RootContext.ts +++ b/packages/backend-common/src/context/RootContext.ts @@ -14,110 +14,23 @@ * limitations under the License. */ -import { DateTime, Duration } from 'luxon'; -import { AbortSignal } from 'node-abort-controller'; -import { - abortManually, - abortOnTimeout, - ContextAbortState, -} from './features/abort'; -import { - ContextValues, - findInContextValues, - unshiftContextValues, -} from './features/values'; +import { AbortController } from 'node-abort-controller'; import { Context, ContextDecorator } from './types'; -// The context value key used for holding abort related state -const abortKey = Symbol('Context.abort'); +const neverAborts = new AbortController().signal; /** - * A context that is meant to be passed as a ctx variable down the call chain, - * to pass along scoped information and abort signals. - * - * @public + * An empty root context. */ export class RootContext implements Context { - /** - * Creates a root context. - * - * @remarks - * - * This should normally only be called near the root of an application. The - * created context is meant to be passed down into deeper levels, which may - * or may not make derived contexts out of it. - */ - static create() { - return new RootContext(undefined).withValue( - abortKey, - abortManually(), - ); + readonly abortSignal = neverAborts; + readonly deadline = undefined; + + value(_key: string | symbol): T | undefined { + return undefined; } - /** - * {@inheritdoc Context.abortSignal} - */ - public get abortSignal(): AbortSignal { - return this.value(abortKey)!.signal; - } - - /** - * {@inheritdoc Context.abortPromise} - */ - public get abortPromise(): Promise { - return this.value(abortKey)!.promise; - } - - /** - * {@inheritdoc Context.deadline} - */ - public get deadline(): DateTime | undefined { - return this.value(abortKey)!.deadline; - } - - private constructor(private readonly values: ContextValues) {} - - /** - * {@inheritdoc Context.withAbort} - */ - withAbort(): { ctx: Context; abort: () => void } { - const state = abortManually(this.value(abortKey)); - return { - ctx: this.withValue(abortKey, state), - abort: state.abort, - }; - } - - /** - * {@inheritdoc Context.withTimeout} - */ - withTimeout(timeout: Duration): Context { - return this.withValue(abortKey, previous => - abortOnTimeout(timeout, previous), - ); - } - - /** - * {@inheritdoc Context.with} - */ - with(...items: ContextDecorator[]): Context { - return items.reduce((prev, curr) => curr(prev), this); - } - - /** - * {@inheritdoc Context.withValue} - */ - withValue( - key: string | symbol, - value: T | ((previous: T | undefined) => T), - ): Context { - return new RootContext(unshiftContextValues(this.values, key, value)); - } - - /** - * {@inheritdoc Context.value} - */ - value(key: string | symbol): T | undefined { - return findInContextValues(this.values, key); + use(...items: ContextDecorator[]): Context { + return items.reduce((prev, curr) => curr(prev), this as Context); } } diff --git a/packages/backend-common/src/context/ValueContext.test.ts b/packages/backend-common/src/context/ValueContext.test.ts new file mode 100644 index 0000000000..99d6b2b60a --- /dev/null +++ b/packages/backend-common/src/context/ValueContext.test.ts @@ -0,0 +1,57 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Contexts } from './Contexts'; +import { RootContext } from './RootContext'; +import { ValueContext } from './ValueContext'; + +const s = Symbol(); + +describe('ValueContext', () => { + it('returns its own values, or delegates to the parent', async () => { + const root = new RootContext(); + const a = ValueContext.forConstantValue(root, 'a', 1); + const b = ValueContext.forConstantValue(a, s, 2); + const c = ValueContext.forConstantValue(b, 'a', 3); + const d = ValueContext.forConstantValue(c, 'b', 4); + + expect(a.value('a')).toBe(1); + expect(a.value('b')).toBeUndefined(); + expect(a.value(s)).toBeUndefined(); + + expect(b.value('a')).toBe(1); + expect(b.value('b')).toBeUndefined(); + expect(b.value(s)).toBe(2); + + expect(c.value('a')).toBe(3); + expect(c.value('b')).toBeUndefined(); + expect(c.value(s)).toBe(2); + + expect(d.value('a')).toBe(3); + expect(d.value('b')).toBe(4); + expect(d.value(s)).toBe(2); + }); + + it('can decorate', () => { + const root = new RootContext(); + const parent = ValueContext.forConstantValue(root, 'a', 1); + const child = parent.use( + Contexts.setValue('a', 2), + Contexts.setValue('a', 3), + ); + expect(child.value('a')).toBe(3); + }); +}); diff --git a/packages/backend-common/src/context/ValueContext.ts b/packages/backend-common/src/context/ValueContext.ts new file mode 100644 index 0000000000..1ed5e2dba5 --- /dev/null +++ b/packages/backend-common/src/context/ValueContext.ts @@ -0,0 +1,53 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Context, ContextDecorator } from './types'; + +/** + * A context that just holds a single value, and delegates the rest to its + * parent. + */ +export class ValueContext implements Context { + static forConstantValue( + ctx: Context, + key: string | symbol, + value: unknown, + ): Context { + return new ValueContext(ctx, key, value); + } + + constructor( + private readonly _parent: Context, + private readonly _key: string | symbol, + private readonly _value: unknown, + ) {} + + get abortSignal(): AbortSignal { + return this._parent.abortSignal; + } + + get deadline(): Date | undefined { + return this._parent.deadline; + } + + value(key: string | symbol): T | undefined { + return key === this._key ? (this._value as T) : this._parent.value(key); + } + + use(...items: ContextDecorator[]): Context { + return items.reduce((prev, curr) => curr(prev), this as Context); + } +} diff --git a/packages/backend-common/src/context/features/abort.test.ts b/packages/backend-common/src/context/features/abort.test.ts deleted file mode 100644 index 74cd8cbfe2..0000000000 --- a/packages/backend-common/src/context/features/abort.test.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Duration } from 'luxon'; -import { abortManually, abortOnTimeout } from './abort'; - -describe('ContextAbortState', () => { - describe('abortManually', () => { - it('can perform a manual abort', async () => { - const state = abortManually(); - - const cb = jest.fn(); - state.signal.addEventListener('abort', cb); - state.promise.then(cb); - - state.abort(); - - await state.promise; - expect(cb).toBeCalledTimes(2); - }); - - it('triggers child when parent is aborted', async () => { - const parent = abortManually(); - const child = abortManually(parent); - - const parentCb = jest.fn(); - parent.signal.addEventListener('abort', parentCb); - parent.promise.then(parentCb); - - const childCb = jest.fn(); - child.signal.addEventListener('abort', childCb); - child.promise.then(childCb); - - parent.abort(); - - await child.promise; - expect(parentCb).toBeCalledTimes(2); - expect(childCb).toBeCalledTimes(2); - }); - - it('does not trigger parent when child is aborted', async () => { - const parent = abortManually(); - const child = abortManually(parent); - - const parentCb = jest.fn(); - parent.signal.addEventListener('abort', parentCb); - parent.promise.then(parentCb); - - const childCb = jest.fn(); - child.signal.addEventListener('abort', childCb); - child.promise.then(childCb); - - child.abort(); - - await child.promise; - expect(parentCb).toBeCalledTimes(0); - expect(childCb).toBeCalledTimes(2); - }); - - it('only triggers once', async () => { - const state = abortManually(); - - const cb = jest.fn(); - state.signal.addEventListener('abort', cb); - state.promise.then(cb); - - state.abort(); - - await state.promise; - expect(cb).toBeCalledTimes(2); - - state.abort(); - - await state.promise; - expect(cb).toBeCalledTimes(2); - }); - }); - - describe('abortOnTimeout', () => { - it('can abort on a timeout', async () => { - const state = abortOnTimeout(Duration.fromMillis(200)); - const start = Date.now(); - - const cb = jest.fn(); - state.signal.addEventListener('abort', cb); - state.promise.then(cb); - - await state.promise; - const delta = Date.now() - start; - - expect(delta).toBeGreaterThan(100); - expect(delta).toBeLessThan(300); - expect(cb).toBeCalledTimes(2); - }); - - it('aborts early if parent triggers first', async () => { - const parent = abortManually(); - const child = abortOnTimeout(Duration.fromMillis(200), parent); - - const parentCb = jest.fn(); - parent.signal.addEventListener('abort', parentCb); - parent.promise.then(parentCb); - - const childCb = jest.fn(); - child.signal.addEventListener('abort', childCb); - child.promise.then(childCb); - - expect(parentCb).toBeCalledTimes(0); - expect(childCb).toBeCalledTimes(0); - - const start = Date.now(); - - parent.abort(); - - await child.promise; - expect(parentCb).toBeCalledTimes(2); - expect(childCb).toBeCalledTimes(2); - expect(Date.now() - start).toBeLessThan(100); - }); - }); -}); diff --git a/packages/backend-common/src/context/features/abort.ts b/packages/backend-common/src/context/features/abort.ts deleted file mode 100644 index 1a37de960b..0000000000 --- a/packages/backend-common/src/context/features/abort.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { DateTime, Duration } from 'luxon'; -import { AbortController, AbortSignal } from 'node-abort-controller'; - -export type ContextAbortState = { - signal: AbortSignal; - promise: Promise; - deadline: DateTime | undefined; - abort: () => void; -}; - -export function abortManually( - previous?: ContextAbortState | undefined, -): ContextAbortState { - const controller = new AbortController(); - const abort = controller.abort.bind(controller); - previous?.signal.addEventListener('abort', abort); - - return { - signal: controller.signal, - promise: new Promise(resolve => { - controller.signal.addEventListener('abort', resolve); - }), - deadline: previous?.deadline, - abort, - }; -} - -export function abortOnTimeout( - timeout: Duration, - previous?: ContextAbortState | undefined, -): ContextAbortState { - const deadline = DateTime.now().plus(timeout); - if (previous?.deadline && deadline > previous.deadline) { - return previous; - } - - const controller = new AbortController(); - - const timeoutHandle = setTimeout(() => { - controller.abort(); - }, timeout.as('milliseconds')); - - const abort = () => { - previous?.signal.removeEventListener('abort', abort); - clearTimeout(timeoutHandle); - controller.abort(); - }; - - previous?.signal.addEventListener('abort', abort); - - return { - signal: controller.signal, - promise: new Promise(resolve => { - controller.signal.addEventListener('abort', resolve); - }), - deadline, - abort, - }; -} diff --git a/packages/backend-common/src/context/features/values.test.ts b/packages/backend-common/src/context/features/values.test.ts deleted file mode 100644 index 63d2da80de..0000000000 --- a/packages/backend-common/src/context/features/values.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - ContextValues, - findInContextValues, - unshiftContextValues, -} from './values'; - -describe('ContextValues', () => { - it('can start from the empty list', () => { - let list: ContextValues = undefined; - expect(findInContextValues(list, 'a')).toBeUndefined(); - list = unshiftContextValues(list, 'a', 'b'); - expect(findInContextValues(list, 'a')).toBe('b'); - expect(findInContextValues(list, 'x')).toBeUndefined(); - }); - - it('always fetches the most recent value', () => { - let list: ContextValues = undefined; - expect(findInContextValues(list, 'a')).toBeUndefined(); - list = unshiftContextValues(list, 'a', 1); - expect(findInContextValues(list, 'a')).toBe(1); - list = unshiftContextValues(list, 'a', 2); - expect(findInContextValues(list, 'a')).toBe(2); - }); - - it('handles all key types', () => { - let list: ContextValues = undefined; - const symbol1 = Symbol('str'); - const symbol2 = Symbol('str'); - list = unshiftContextValues(list, 'str', 'str'); - list = unshiftContextValues(list, symbol1, 'sym'); - expect(findInContextValues(list, 'str')).toBe('str'); - expect(findInContextValues(list, symbol1)).toBe('sym'); - expect(findInContextValues(list, 'blah')).toBeUndefined(); - expect(findInContextValues(list, symbol2)).toBeUndefined(); - }); -}); diff --git a/packages/backend-common/src/context/features/values.ts b/packages/backend-common/src/context/features/values.ts deleted file mode 100644 index b7ab062e32..0000000000 --- a/packages/backend-common/src/context/features/values.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * An immutable key-value list. The only operations possible are to add a new - * node at the start forming a new list, and to find by key from the start and - * backwards through the list. - */ -export type ContextValues = ContextValueNode | undefined; - -type ContextValueNode = { - key: string | symbol; - value: unknown; - next: ContextValueNode | undefined; -}; - -/** - * Creates a new list with the given key-value pair as its first element. - * - * @param list - The original list - * @param key - The key of the pair - * @param value - The value of the pair, or a function that accepts the - * previously stored value (or undefined if not found) and - * computes the new value - * @returns A new list with this pair as its first element - */ -export function unshiftContextValues( - list: ContextValues, - key: string | symbol, - value: unknown | ((previous: unknown | undefined) => unknown), -): ContextValues { - return { - key, - value: - typeof value === 'function' - ? value(findInContextValues(list, key)) - : value, - next: list, - }; -} - -/** - * Attempts to find the value associated with a given key, starting from the - * most recently added element. - * - * @param list - The list - * @param key - The key to search for - * @returns The first such value, or undefined if no match was found - */ -export function findInContextValues( - list: ContextValues, - key: string | symbol, -): T | undefined { - for (let current = list; current; current = current.next) { - if (key === current.key) { - return current.value as T; - } - } - return undefined; -} diff --git a/packages/backend-common/src/context/index.ts b/packages/backend-common/src/context/index.ts index a09c32bac5..64fe635de9 100644 --- a/packages/backend-common/src/context/index.ts +++ b/packages/backend-common/src/context/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export { RootContext } from './RootContext'; +export { Contexts } from './Contexts'; export type { Context, ContextDecorator } from './types'; diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/context/types.ts index e3c880b4a8..569a133c87 100644 --- a/packages/backend-common/src/context/types.ts +++ b/packages/backend-common/src/context/types.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -import { DateTime, Duration } from 'luxon'; - /** * A function that accepts a context and produces a new, derived context from, * decorated with some specific behavior. @@ -37,37 +35,19 @@ export interface Context { */ readonly abortSignal: AbortSignal; - /** - * Returns a promise that resolves when the current context or any of its - * parents signal to abort. - */ - readonly abortPromise: Promise; - /** * The point in time when the current context shall time out and abort, if * applicable. */ - readonly deadline: DateTime | undefined; + readonly deadline: Date | undefined; /** - * Creates a derived context, which signals to abort operations either when - * any parent context signals, or when the current layer calls the returned - * abort function. + * Attempts to get a stored value by key from the context. * - * @returns A derived context, and the function that triggers it to abort. + * @param key - The key of the value to get + * @returns The associated value, or undefined if not set */ - withAbort(): { ctx: Context; abort: () => void }; - - /** - * Creates a derived context, which signals to abort operations either when - * any parent context signals, or when the given amount of time has passed. - * This may affect the deadline. - * - * @param timeout - The duration of time, after which the derived context - * will signal to abort. - * @returns A derived context with an updated deadline - */ - withTimeout(timeout: Duration): Context; + value(key: string | symbol): T | undefined; /** * Decorates this context with one or more behaviors. @@ -79,26 +59,5 @@ export interface Context { * @param decorators - The decorators to apply * @returns A derived context with the relevant behaviors */ - with(...decorators: ContextDecorator[]): Context; - - /** - * Creates a derived context, which has a specific key-value pair set as well - * as all key-value pairs set in the original context. - * - * @param key - The key of the value to set - * @param value - The value, or a function that accepts the previous value (or - * undefined if not set yet) and computes the new value - */ - withValue( - key: string | symbol, - value: T | ((previous: T | undefined) => T), - ): Context; - - /** - * Attempts to get a stored value by key from the context. - * - * @param key - The key of the value to get - * @returns The associated value, or undefined if not set - */ - value(key: string | symbol): T | undefined; + use(...decorators: ContextDecorator[]): Context; } From 95e702e50d40b9801fcd3d91a62edbd191b9747a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Sun, 28 Nov 2021 18:40:22 +0100 Subject: [PATCH 007/473] ability to abort on controllers instead of just signals, plus more tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- packages/backend-common/api-report.md | 5 +- .../src/context/AbortContext.test.ts | 92 +++++++++++++++++++ .../src/context/AbortContext.ts | 87 +++++++++++++----- .../src/context/Contexts.test.ts | 89 ++++++++++++++++++ .../backend-common/src/context/Contexts.ts | 17 ++-- .../backend-common/src/context/RootContext.ts | 4 +- .../src/context/ValueContext.ts | 1 + packages/backend-common/src/context/types.ts | 2 + 8 files changed, 262 insertions(+), 35 deletions(-) create mode 100644 packages/backend-common/src/context/Contexts.test.ts diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index e77beef556..d63eeaf11b 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -6,6 +6,7 @@ /// /// +import { AbortController as AbortController_2 } from 'node-abort-controller'; import { AbortSignal as AbortSignal_2 } from 'node-abort-controller'; import { AwsS3Integration } from '@backstage/integration'; import { AzureIntegration } from '@backstage/integration'; @@ -148,7 +149,7 @@ export interface ContainerRunner { // @public export interface Context { - readonly abortSignal: AbortSignal; + readonly abortSignal: AbortSignal_2; readonly deadline: Date | undefined; use(...decorators: ContextDecorator[]): Context; value(key: string | symbol): T | undefined; @@ -160,7 +161,7 @@ export type ContextDecorator = (ctx: Context) => Context; // @public export class Contexts { static root(): Context; - static setAbort(signal: AbortSignal_2): ContextDecorator; + static setAbort(source: AbortController_2 | AbortSignal_2): ContextDecorator; static setTimeoutDuration(timeout: Duration): ContextDecorator; static setTimeoutMillis(timeout: number): ContextDecorator; static setValue( diff --git a/packages/backend-common/src/context/AbortContext.test.ts b/packages/backend-common/src/context/AbortContext.test.ts index fc7b366c23..aa01c2209a 100644 --- a/packages/backend-common/src/context/AbortContext.test.ts +++ b/packages/backend-common/src/context/AbortContext.test.ts @@ -160,6 +160,98 @@ describe('AbortContext', () => { }); }); + describe('forController', () => { + it('signals child when parent is aborted', () => { + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forController(root, parentController); + const parentListener = jest.fn(); + parent.abortSignal.addEventListener('abort', parentListener); + + const childController = new AbortController(); + const child = AbortContext.forController(parent, childController); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(false); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(0); + + parentController.abort(); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(1); + expect(childListener).toBeCalledTimes(1); + }); + + it('does not signal parent when child is aborted', async () => { + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forController(root, parentController); + const parentListener = jest.fn(); + parent.abortSignal.addEventListener('abort', parentListener); + + const childController = new AbortController(); + const child = AbortContext.forController(parent, childController); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(false); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(0); + + childController.abort(); + + expect(parent.abortSignal.aborted).toBe(false); + expect(child.abortSignal.aborted).toBe(true); + expect(parentListener).toBeCalledTimes(0); + expect(childListener).toBeCalledTimes(1); + }); + + it('child carries over parent signal state if parent was already aborted', async () => { + const root = new RootContext(); + + const parentController = new AbortController(); + const parent = AbortContext.forController(root, parentController); + + parentController.abort(); + + const childController = new AbortController(); + const child = AbortContext.forController(parent, childController); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + + childController.abort(); + + expect(parent.abortSignal.aborted).toBe(true); + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + }); + + it('child carries over given signal state if it was already aborted', async () => { + const root = new RootContext(); + + const childController = new AbortController(); + childController.abort(); + + const child = AbortContext.forController(root, childController); + const childListener = jest.fn(); + child.abortSignal.addEventListener('abort', childListener); + + expect(child.abortSignal.aborted).toBe(true); + expect(childListener).toBeCalledTimes(0); + }); + }); + describe('forSignal', () => { it('signals child when parent is aborted', async () => { const root = new RootContext(); diff --git a/packages/backend-common/src/context/AbortContext.ts b/packages/backend-common/src/context/AbortContext.ts index a328241de2..78ad8646ed 100644 --- a/packages/backend-common/src/context/AbortContext.ts +++ b/packages/backend-common/src/context/AbortContext.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AbortSignal } from 'node-abort-controller'; +import { AbortController, AbortSignal } from 'node-abort-controller'; import { Context, ContextDecorator } from './types'; /** @@ -24,6 +24,10 @@ export class AbortContext implements Context { /** * Abort either when the parent aborts, or after the given timeout has * expired. + * + * @param ctx - The parent context + * @param timeout - A timeout value, in milliseconds + * @returns A new context */ static forTimeoutMillis(ctx: Context, timeout: number): Context { const desiredDeadline = new Date(Date.now() + timeout); @@ -40,43 +44,80 @@ export class AbortContext implements Context { } const controller = new AbortController(); - - const timeoutHandle = setTimeout(() => { - controller.abort(); - }, timeout); - - const abort = () => { - ctx.abortSignal.removeEventListener('abort', abort); - clearTimeout(timeoutHandle); - controller.abort(); - }; - + const timeoutHandle = setTimeout(abort, timeout); ctx.abortSignal.addEventListener('abort', abort); + function abort() { + ctx.abortSignal.removeEventListener('abort', abort); + clearTimeout(timeoutHandle!); + controller.abort(); + } + return new AbortContext(ctx, controller.signal, actualDeadline); } /** - * Abort either when the parent aborts, or when the given signal is triggered. + * Abort either when the parent aborts, or when the given controller is + * triggered. + * + * @remarks + * + * If you have access to the controller, this function is more efficient than + * {@link AbortContext#forSignal}. + * + * @param ctx - The parent context + * @param controller - An abort controller + * @returns A new context */ - static forSignal(ctx: Context, signal: AbortSignal): Context { - // If the parent context was already aborted, it is fine to reuse as-is + static forController(ctx: Context, controller: AbortController): Context { + // Already aborted context / signal are fine to reuse as-is if (ctx.abortSignal.aborted) { return ctx; + } else if (controller.signal.aborted) { + return new AbortContext(ctx, controller.signal, ctx.deadline); + } + + function abort() { + ctx.abortSignal.removeEventListener('abort', abort); + controller.abort(); + } + + ctx.abortSignal.addEventListener('abort', abort); + + return new AbortContext(ctx, controller.signal, ctx.deadline); + } + + /** + * Abort either when the parent aborts, or when the given signal is triggered. + * + * @remarks + * + * If you have access to the controller and not just the signal, + * {@link AbortContext#forController} is slightly more efficient to use. + * + * @param ctx - The parent context + * @param signal - An abort signal + * @returns A new context + */ + static forSignal(ctx: Context, signal: AbortSignal): Context { + // Already aborted context / signal are fine to reuse as-is + if (ctx.abortSignal.aborted) { + return ctx; + } else if (signal.aborted) { + return new AbortContext(ctx, signal, ctx.deadline); } const controller = new AbortController(); - const abort = controller.abort.bind(controller); - // If the incoming signal was already aborted, let's trigger the new one as - // well - if (signal.aborted) { - abort(); - } else { - ctx.abortSignal.addEventListener('abort', abort); - signal.addEventListener('abort', abort); + function abort() { + ctx.abortSignal.removeEventListener('abort', abort); + signal.removeEventListener('abort', abort); + controller.abort(); } + ctx.abortSignal.addEventListener('abort', abort); + signal.addEventListener('abort', abort); + return new AbortContext(ctx, controller.signal, ctx.deadline); } diff --git a/packages/backend-common/src/context/Contexts.test.ts b/packages/backend-common/src/context/Contexts.test.ts new file mode 100644 index 0000000000..6c05319a4f --- /dev/null +++ b/packages/backend-common/src/context/Contexts.test.ts @@ -0,0 +1,89 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Duration } from 'luxon'; +import { AbortController } from 'node-abort-controller'; +import { Contexts } from './Contexts'; + +describe('Contexts', () => { + afterEach(() => { + jest.useRealTimers(); + }); + + describe('root', () => { + it('can create a root', () => { + const ctx = Contexts.root(); + expect(ctx.abortSignal).toBeDefined(); + expect(ctx.deadline).toBeUndefined(); + }); + }); + + describe('setAbort', () => { + it('works for controllers', () => { + const controller = new AbortController(); + const parent = Contexts.root(); + const child = parent.use(Contexts.setAbort(controller)); + expect(child.abortSignal.aborted).toBe(false); + controller.abort(); + expect(child.abortSignal.aborted).toBe(true); + }); + + it('works for signals', () => { + const controller = new AbortController(); + const parent = Contexts.root(); + const child = parent.use(Contexts.setAbort(controller.signal)); + expect(child.abortSignal.aborted).toBe(false); + controller.abort(); + expect(child.abortSignal.aborted).toBe(true); + }); + }); + + describe('setTimeoutDuration', () => { + it('works', () => { + jest.useFakeTimers(); + const parent = Contexts.root(); + const child = parent.use( + Contexts.setTimeoutDuration(Duration.fromMillis(200)), + ); + expect(child.abortSignal.aborted).toBe(false); + jest.advanceTimersByTime(100); + expect(child.abortSignal.aborted).toBe(false); + jest.advanceTimersByTime(101); + expect(child.abortSignal.aborted).toBe(true); + }); + }); + + describe('setTimeoutMillis', () => { + it('works', () => { + jest.useFakeTimers(); + const parent = Contexts.root(); + const child = parent.use(Contexts.setTimeoutMillis(200)); + expect(child.abortSignal.aborted).toBe(false); + jest.advanceTimersByTime(100); + expect(child.abortSignal.aborted).toBe(false); + jest.advanceTimersByTime(101); + expect(child.abortSignal.aborted).toBe(true); + }); + }); + + describe('setValue', () => { + it('works', () => { + const parent = Contexts.root(); + const child = parent.use(Contexts.setValue('k', 'v')); + expect(child.value('k')).toBe('v'); + }); + }); +}); diff --git a/packages/backend-common/src/context/Contexts.ts b/packages/backend-common/src/context/Contexts.ts index 775f6f730d..7bab26f05a 100644 --- a/packages/backend-common/src/context/Contexts.ts +++ b/packages/backend-common/src/context/Contexts.ts @@ -15,7 +15,7 @@ */ import { Duration } from 'luxon'; -import { AbortSignal } from 'node-abort-controller'; +import { AbortController, AbortSignal } from 'node-abort-controller'; import { AbortContext } from './AbortContext'; import { RootContext } from './RootContext'; import { Context, ContextDecorator } from './types'; @@ -42,21 +42,24 @@ export class Contexts { /** * Creates a derived context, which signals to abort operations either when - * any parent context signals, or when the given controller is aborted. + * any parent context signals, or when the given source is aborted. * * @remarks * * If the parent context was already aborted, then it is returned as-is. * - * If the given signal was already aborted, then a new already-aborted context + * If the given source was already aborted, then a new already-aborted context * is returned. * - * @param signal - An abort signal that you intend to perhaps trigger at some - * later point in time. + * @param source - An abort controller or signal that you intend to perhaps + * trigger at some later point in time. * @returns A decorator that can be passed to {@link Context.use} */ - static setAbort(signal: AbortSignal): ContextDecorator { - return ctx => AbortContext.forSignal(ctx, signal); + static setAbort(source: AbortController | AbortSignal): ContextDecorator { + return ctx => + 'aborted' in source + ? AbortContext.forSignal(ctx, source) + : AbortContext.forController(ctx, source); } /** diff --git a/packages/backend-common/src/context/RootContext.ts b/packages/backend-common/src/context/RootContext.ts index ae7c18a905..48d24514fa 100644 --- a/packages/backend-common/src/context/RootContext.ts +++ b/packages/backend-common/src/context/RootContext.ts @@ -17,13 +17,11 @@ import { AbortController } from 'node-abort-controller'; import { Context, ContextDecorator } from './types'; -const neverAborts = new AbortController().signal; - /** * An empty root context. */ export class RootContext implements Context { - readonly abortSignal = neverAborts; + readonly abortSignal = new AbortController().signal; readonly deadline = undefined; value(_key: string | symbol): T | undefined { diff --git a/packages/backend-common/src/context/ValueContext.ts b/packages/backend-common/src/context/ValueContext.ts index 1ed5e2dba5..368e73fa05 100644 --- a/packages/backend-common/src/context/ValueContext.ts +++ b/packages/backend-common/src/context/ValueContext.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { AbortSignal } from 'node-abort-controller'; import { Context, ContextDecorator } from './types'; /** diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/context/types.ts index 569a133c87..716a03308b 100644 --- a/packages/backend-common/src/context/types.ts +++ b/packages/backend-common/src/context/types.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +import { AbortSignal } from 'node-abort-controller'; + /** * A function that accepts a context and produces a new, derived context from, * decorated with some specific behavior. From c78bf4acd49802ac3d6fa151f4e3c21e7167e2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 24 Jan 2022 14:26:08 +0100 Subject: [PATCH 008/473] only allow string keys for context values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- packages/backend-common/api-report.md | 4 ++-- packages/backend-common/src/context/AbortContext.ts | 2 +- packages/backend-common/src/context/Contexts.ts | 2 +- packages/backend-common/src/context/RootContext.ts | 2 +- .../backend-common/src/context/ValueContext.test.ts | 12 +++++------- packages/backend-common/src/context/ValueContext.ts | 10 +++------- packages/backend-common/src/context/types.ts | 2 +- 7 files changed, 14 insertions(+), 20 deletions(-) diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index d63eeaf11b..e22195c2b3 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -152,7 +152,7 @@ export interface Context { readonly abortSignal: AbortSignal_2; readonly deadline: Date | undefined; use(...decorators: ContextDecorator[]): Context; - value(key: string | symbol): T | undefined; + value(key: string): T | undefined; } // @public @@ -165,7 +165,7 @@ export class Contexts { static setTimeoutDuration(timeout: Duration): ContextDecorator; static setTimeoutMillis(timeout: number): ContextDecorator; static setValue( - key: string | symbol, + key: string, value: unknown | ((previous: unknown | undefined) => unknown), ): ContextDecorator; } diff --git a/packages/backend-common/src/context/AbortContext.ts b/packages/backend-common/src/context/AbortContext.ts index 78ad8646ed..86069d290b 100644 --- a/packages/backend-common/src/context/AbortContext.ts +++ b/packages/backend-common/src/context/AbortContext.ts @@ -127,7 +127,7 @@ export class AbortContext implements Context { readonly deadline: Date | undefined, ) {} - value(key: string | symbol): T | undefined { + value(key: string): T | undefined { return this.parent.value(key); } diff --git a/packages/backend-common/src/context/Contexts.ts b/packages/backend-common/src/context/Contexts.ts index 7bab26f05a..692248028a 100644 --- a/packages/backend-common/src/context/Contexts.ts +++ b/packages/backend-common/src/context/Contexts.ts @@ -99,7 +99,7 @@ export class Contexts { * @returns A decorator that can be passed to {@link Context.use} */ static setValue( - key: string | symbol, + key: string, value: unknown | ((previous: unknown | undefined) => unknown), ): ContextDecorator { return ctx => { diff --git a/packages/backend-common/src/context/RootContext.ts b/packages/backend-common/src/context/RootContext.ts index 48d24514fa..96f55dd76a 100644 --- a/packages/backend-common/src/context/RootContext.ts +++ b/packages/backend-common/src/context/RootContext.ts @@ -24,7 +24,7 @@ export class RootContext implements Context { readonly abortSignal = new AbortController().signal; readonly deadline = undefined; - value(_key: string | symbol): T | undefined { + value(_key: string): T | undefined { return undefined; } diff --git a/packages/backend-common/src/context/ValueContext.test.ts b/packages/backend-common/src/context/ValueContext.test.ts index 99d6b2b60a..792893833d 100644 --- a/packages/backend-common/src/context/ValueContext.test.ts +++ b/packages/backend-common/src/context/ValueContext.test.ts @@ -18,31 +18,29 @@ import { Contexts } from './Contexts'; import { RootContext } from './RootContext'; import { ValueContext } from './ValueContext'; -const s = Symbol(); - describe('ValueContext', () => { it('returns its own values, or delegates to the parent', async () => { const root = new RootContext(); const a = ValueContext.forConstantValue(root, 'a', 1); - const b = ValueContext.forConstantValue(a, s, 2); + const b = ValueContext.forConstantValue(a, 'x', 2); const c = ValueContext.forConstantValue(b, 'a', 3); const d = ValueContext.forConstantValue(c, 'b', 4); expect(a.value('a')).toBe(1); expect(a.value('b')).toBeUndefined(); - expect(a.value(s)).toBeUndefined(); + expect(a.value('x')).toBeUndefined(); expect(b.value('a')).toBe(1); expect(b.value('b')).toBeUndefined(); - expect(b.value(s)).toBe(2); + expect(b.value('x')).toBe(2); expect(c.value('a')).toBe(3); expect(c.value('b')).toBeUndefined(); - expect(c.value(s)).toBe(2); + expect(c.value('x')).toBe(2); expect(d.value('a')).toBe(3); expect(d.value('b')).toBe(4); - expect(d.value(s)).toBe(2); + expect(d.value('x')).toBe(2); }); it('can decorate', () => { diff --git a/packages/backend-common/src/context/ValueContext.ts b/packages/backend-common/src/context/ValueContext.ts index 368e73fa05..789741e45f 100644 --- a/packages/backend-common/src/context/ValueContext.ts +++ b/packages/backend-common/src/context/ValueContext.ts @@ -22,17 +22,13 @@ import { Context, ContextDecorator } from './types'; * parent. */ export class ValueContext implements Context { - static forConstantValue( - ctx: Context, - key: string | symbol, - value: unknown, - ): Context { + static forConstantValue(ctx: Context, key: string, value: unknown): Context { return new ValueContext(ctx, key, value); } constructor( private readonly _parent: Context, - private readonly _key: string | symbol, + private readonly _key: string, private readonly _value: unknown, ) {} @@ -44,7 +40,7 @@ export class ValueContext implements Context { return this._parent.deadline; } - value(key: string | symbol): T | undefined { + value(key: string): T | undefined { return key === this._key ? (this._value as T) : this._parent.value(key); } diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/context/types.ts index 716a03308b..25a6d2354b 100644 --- a/packages/backend-common/src/context/types.ts +++ b/packages/backend-common/src/context/types.ts @@ -49,7 +49,7 @@ export interface Context { * @param key - The key of the value to get * @returns The associated value, or undefined if not set */ - value(key: string | symbol): T | undefined; + value(key: string): T | undefined; /** * Decorates this context with one or more behaviors. From 5045671d32c8a8fde99bf53170da36fbf7d67c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 24 Jan 2022 15:23:37 +0100 Subject: [PATCH 009/473] remove the middleware part of context composition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- packages/backend-common/api-report.md | 18 ++++---- .../src/context/AbortContext.test.ts | 12 ----- .../src/context/AbortContext.ts | 6 +-- .../src/context/Contexts.test.ts | 13 +++--- .../backend-common/src/context/Contexts.ts | 46 ++++++++++--------- .../src/context/RootContext.test.ts | 11 +---- .../backend-common/src/context/RootContext.ts | 25 +++++++--- .../src/context/ValueContext.test.ts | 11 ----- .../src/context/ValueContext.ts | 6 +-- packages/backend-common/src/context/index.ts | 2 +- packages/backend-common/src/context/types.ts | 20 -------- 11 files changed, 63 insertions(+), 107 deletions(-) diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index e22195c2b3..478a17d1fd 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -151,23 +151,23 @@ export interface ContainerRunner { export interface Context { readonly abortSignal: AbortSignal_2; readonly deadline: Date | undefined; - use(...decorators: ContextDecorator[]): Context; value(key: string): T | undefined; } -// @public -export type ContextDecorator = (ctx: Context) => Context; - // @public export class Contexts { static root(): Context; - static setAbort(source: AbortController_2 | AbortSignal_2): ContextDecorator; - static setTimeoutDuration(timeout: Duration): ContextDecorator; - static setTimeoutMillis(timeout: number): ContextDecorator; - static setValue( + static withAbort( + parentCtx: Context, + source: AbortController_2 | AbortSignal_2, + ): Context; + static withTimeoutDuration(parentCtx: Context, timeout: Duration): Context; + static withTimeoutMillis(parentCtx: Context, timeout: number): Context; + static withValue( + parentCtx: Context, key: string, value: unknown | ((previous: unknown | undefined) => unknown), - ): ContextDecorator; + ): Context; } // @public @deprecated diff --git a/packages/backend-common/src/context/AbortContext.test.ts b/packages/backend-common/src/context/AbortContext.test.ts index aa01c2209a..f47e1d4beb 100644 --- a/packages/backend-common/src/context/AbortContext.test.ts +++ b/packages/backend-common/src/context/AbortContext.test.ts @@ -16,7 +16,6 @@ import { AbortController } from 'node-abort-controller'; import { AbortContext } from './AbortContext'; -import { Contexts } from './Contexts'; import { RootContext } from './RootContext'; describe('AbortContext', () => { @@ -343,15 +342,4 @@ describe('AbortContext', () => { expect(childListener).toBeCalledTimes(0); }); }); - - it('can decorate', () => { - const root = new RootContext(); - const controller = new AbortController(); - const parent = AbortContext.forSignal(root, controller.signal); - const child = parent.use( - Contexts.setValue('a', 2), - Contexts.setValue('a', 3), - ); - expect(child.value('a')).toBe(3); - }); }); diff --git a/packages/backend-common/src/context/AbortContext.ts b/packages/backend-common/src/context/AbortContext.ts index 86069d290b..8a119358a6 100644 --- a/packages/backend-common/src/context/AbortContext.ts +++ b/packages/backend-common/src/context/AbortContext.ts @@ -15,7 +15,7 @@ */ import { AbortController, AbortSignal } from 'node-abort-controller'; -import { Context, ContextDecorator } from './types'; +import { Context } from './types'; /** * A context that implements various abort related functionality. @@ -130,8 +130,4 @@ export class AbortContext implements Context { value(key: string): T | undefined { return this.parent.value(key); } - - use(...items: ContextDecorator[]): Context { - return items.reduce((prev, curr) => curr(prev), this as Context); - } } diff --git a/packages/backend-common/src/context/Contexts.test.ts b/packages/backend-common/src/context/Contexts.test.ts index 6c05319a4f..cbd61d20a9 100644 --- a/packages/backend-common/src/context/Contexts.test.ts +++ b/packages/backend-common/src/context/Contexts.test.ts @@ -35,7 +35,7 @@ describe('Contexts', () => { it('works for controllers', () => { const controller = new AbortController(); const parent = Contexts.root(); - const child = parent.use(Contexts.setAbort(controller)); + const child = Contexts.withAbort(parent, controller); expect(child.abortSignal.aborted).toBe(false); controller.abort(); expect(child.abortSignal.aborted).toBe(true); @@ -44,7 +44,7 @@ describe('Contexts', () => { it('works for signals', () => { const controller = new AbortController(); const parent = Contexts.root(); - const child = parent.use(Contexts.setAbort(controller.signal)); + const child = Contexts.withAbort(parent, controller.signal); expect(child.abortSignal.aborted).toBe(false); controller.abort(); expect(child.abortSignal.aborted).toBe(true); @@ -55,8 +55,9 @@ describe('Contexts', () => { it('works', () => { jest.useFakeTimers(); const parent = Contexts.root(); - const child = parent.use( - Contexts.setTimeoutDuration(Duration.fromMillis(200)), + const child = Contexts.withTimeoutDuration( + parent, + Duration.fromMillis(200), ); expect(child.abortSignal.aborted).toBe(false); jest.advanceTimersByTime(100); @@ -70,7 +71,7 @@ describe('Contexts', () => { it('works', () => { jest.useFakeTimers(); const parent = Contexts.root(); - const child = parent.use(Contexts.setTimeoutMillis(200)); + const child = Contexts.withTimeoutMillis(parent, 200); expect(child.abortSignal.aborted).toBe(false); jest.advanceTimersByTime(100); expect(child.abortSignal.aborted).toBe(false); @@ -82,7 +83,7 @@ describe('Contexts', () => { describe('setValue', () => { it('works', () => { const parent = Contexts.root(); - const child = parent.use(Contexts.setValue('k', 'v')); + const child = Contexts.withValue(parent, 'k', 'v'); expect(child.value('k')).toBe('v'); }); }); diff --git a/packages/backend-common/src/context/Contexts.ts b/packages/backend-common/src/context/Contexts.ts index 692248028a..8bb086168a 100644 --- a/packages/backend-common/src/context/Contexts.ts +++ b/packages/backend-common/src/context/Contexts.ts @@ -18,7 +18,7 @@ import { Duration } from 'luxon'; import { AbortController, AbortSignal } from 'node-abort-controller'; import { AbortContext } from './AbortContext'; import { RootContext } from './RootContext'; -import { Context, ContextDecorator } from './types'; +import { Context } from './types'; import { ValueContext } from './ValueContext'; /** @@ -51,15 +51,18 @@ export class Contexts { * If the given source was already aborted, then a new already-aborted context * is returned. * + * @param parentCtx - A parent context that shall be used as a base * @param source - An abort controller or signal that you intend to perhaps * trigger at some later point in time. - * @returns A decorator that can be passed to {@link Context.use} + * @returns A new {@link Context} */ - static setAbort(source: AbortController | AbortSignal): ContextDecorator { - return ctx => - 'aborted' in source - ? AbortContext.forSignal(ctx, source) - : AbortContext.forController(ctx, source); + static withAbort( + parentCtx: Context, + source: AbortController | AbortSignal, + ): Context { + return 'aborted' in source + ? AbortContext.forSignal(parentCtx, source) + : AbortContext.forController(parentCtx, source); } /** @@ -67,13 +70,13 @@ export class Contexts { * any parent context signals, or when the given amount of time has passed. * This may affect the deadline. * + * @param parentCtx - A parent context that shall be used as a base * @param timeout - The duration of time, after which the derived context will * signal to abort. - * @returns A decorator that can be passed to {@link Context.use} + * @returns A new {@link Context} */ - static setTimeoutDuration(timeout: Duration): ContextDecorator { - return ctx => - AbortContext.forTimeoutMillis(ctx, timeout.as('milliseconds')); + static withTimeoutDuration(parentCtx: Context, timeout: Duration): Context { + return AbortContext.forTimeoutMillis(parentCtx, timeout.as('milliseconds')); } /** @@ -81,30 +84,31 @@ export class Contexts { * any parent context signals, or when the given amount of time has passed. * This may affect the deadline. * + * @param parentCtx - A parent context that shall be used as a base * @param timeout - The number of milliseconds, after which the derived * context will signal to abort. - * @returns A decorator that can be passed to {@link Context.use} + * @returns A new {@link Context} */ - static setTimeoutMillis(timeout: number): ContextDecorator { - return ctx => AbortContext.forTimeoutMillis(ctx, timeout); + static withTimeoutMillis(parentCtx: Context, timeout: number): Context { + return AbortContext.forTimeoutMillis(parentCtx, timeout); } /** * Creates a derived context, which has a specific key-value pair set as well * as all key-value pairs that were set in the original context. * + * @param parentCtx - A parent context that shall be used as a base * @param key - The key of the value to set * @param value - The value, or a function that accepts the previous value (or * undefined if not set yet) and computes the new value - * @returns A decorator that can be passed to {@link Context.use} + * @returns A new {@link Context} */ - static setValue( + static withValue( + parentCtx: Context, key: string, value: unknown | ((previous: unknown | undefined) => unknown), - ): ContextDecorator { - return ctx => { - const v = typeof value === 'function' ? value(ctx.value(key)) : value; - return ValueContext.forConstantValue(ctx, key, v); - }; + ): Context { + const v = typeof value === 'function' ? value(parentCtx.value(key)) : value; + return ValueContext.forConstantValue(parentCtx, key, v); } } diff --git a/packages/backend-common/src/context/RootContext.test.ts b/packages/backend-common/src/context/RootContext.test.ts index 28a3af0a52..395786e3dc 100644 --- a/packages/backend-common/src/context/RootContext.test.ts +++ b/packages/backend-common/src/context/RootContext.test.ts @@ -14,23 +14,14 @@ * limitations under the License. */ -import { Contexts } from './Contexts'; import { RootContext } from './RootContext'; describe('RootContext', () => { it('returns empty values', async () => { const ctx = new RootContext(); expect(ctx.abortSignal).toBeDefined(); + expect(ctx.abortSignal.aborted).toBe(false); expect(ctx.deadline).toBeUndefined(); expect(ctx.value('a')).toBeUndefined(); }); - - it('can decorate', () => { - const parent = new RootContext(); - const child = parent.use( - Contexts.setValue('a', 2), - Contexts.setValue('a', 3), - ); - expect(child.value('a')).toBe(3); - }); }); diff --git a/packages/backend-common/src/context/RootContext.ts b/packages/backend-common/src/context/RootContext.ts index 96f55dd76a..61962380a4 100644 --- a/packages/backend-common/src/context/RootContext.ts +++ b/packages/backend-common/src/context/RootContext.ts @@ -14,21 +14,32 @@ * limitations under the License. */ -import { AbortController } from 'node-abort-controller'; -import { Context, ContextDecorator } from './types'; +import { AbortSignal } from 'node-abort-controller'; +import { Context } from './types'; + +/** + * Since the root context can never abort, and since nobody is every meant to + * dispatch events through it, we can use a static dummy instance for + * efficiency. + */ +const dummyAbortSignal: AbortSignal = Object.freeze({ + aborted: false, + addEventListener() {}, + removeEventListener() {}, + dispatchEvent() { + return true; + }, + onabort: null, +}); /** * An empty root context. */ export class RootContext implements Context { - readonly abortSignal = new AbortController().signal; + readonly abortSignal = dummyAbortSignal; readonly deadline = undefined; value(_key: string): T | undefined { return undefined; } - - use(...items: ContextDecorator[]): Context { - return items.reduce((prev, curr) => curr(prev), this as Context); - } } diff --git a/packages/backend-common/src/context/ValueContext.test.ts b/packages/backend-common/src/context/ValueContext.test.ts index 792893833d..6a216d4548 100644 --- a/packages/backend-common/src/context/ValueContext.test.ts +++ b/packages/backend-common/src/context/ValueContext.test.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { Contexts } from './Contexts'; import { RootContext } from './RootContext'; import { ValueContext } from './ValueContext'; @@ -42,14 +41,4 @@ describe('ValueContext', () => { expect(d.value('b')).toBe(4); expect(d.value('x')).toBe(2); }); - - it('can decorate', () => { - const root = new RootContext(); - const parent = ValueContext.forConstantValue(root, 'a', 1); - const child = parent.use( - Contexts.setValue('a', 2), - Contexts.setValue('a', 3), - ); - expect(child.value('a')).toBe(3); - }); }); diff --git a/packages/backend-common/src/context/ValueContext.ts b/packages/backend-common/src/context/ValueContext.ts index 789741e45f..441aaec984 100644 --- a/packages/backend-common/src/context/ValueContext.ts +++ b/packages/backend-common/src/context/ValueContext.ts @@ -15,7 +15,7 @@ */ import { AbortSignal } from 'node-abort-controller'; -import { Context, ContextDecorator } from './types'; +import { Context } from './types'; /** * A context that just holds a single value, and delegates the rest to its @@ -43,8 +43,4 @@ export class ValueContext implements Context { value(key: string): T | undefined { return key === this._key ? (this._value as T) : this._parent.value(key); } - - use(...items: ContextDecorator[]): Context { - return items.reduce((prev, curr) => curr(prev), this as Context); - } } diff --git a/packages/backend-common/src/context/index.ts b/packages/backend-common/src/context/index.ts index 64fe635de9..37a6e29c8c 100644 --- a/packages/backend-common/src/context/index.ts +++ b/packages/backend-common/src/context/index.ts @@ -15,4 +15,4 @@ */ export { Contexts } from './Contexts'; -export type { Context, ContextDecorator } from './types'; +export type { Context } from './types'; diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/context/types.ts index 25a6d2354b..57bf836560 100644 --- a/packages/backend-common/src/context/types.ts +++ b/packages/backend-common/src/context/types.ts @@ -16,14 +16,6 @@ import { AbortSignal } from 'node-abort-controller'; -/** - * A function that accepts a context and produces a new, derived context from, - * decorated with some specific behavior. - * - * @public - */ -export type ContextDecorator = (ctx: Context) => Context; - /** * A context that is meant to be passed as a ctx variable down the call chain, * to pass along scoped information and abort signals. @@ -50,16 +42,4 @@ export interface Context { * @returns The associated value, or undefined if not set */ value(key: string): T | undefined; - - /** - * Decorates this context with one or more behaviors. - * - * @remarks - * - * The decorators are applied in the order that they are given. - * - * @param decorators - The decorators to apply - * @returns A derived context with the relevant behaviors - */ - use(...decorators: ContextDecorator[]): Context; } From c35e52cfcd204ac0d63bbd49829e5cc6a0900d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 24 Jan 2022 15:50:13 +0100 Subject: [PATCH 010/473] switch to alpha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/rare-comics-tan.md | 8 +++++++- packages/backend-common/api-report.md | 4 ++-- packages/backend-common/package.json | 8 +++++--- packages/backend-common/src/context/Contexts.ts | 2 +- packages/backend-common/src/context/types.ts | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.changeset/rare-comics-tan.md b/.changeset/rare-comics-tan.md index 12d615d3f3..338dfba7c2 100644 --- a/.changeset/rare-comics-tan.md +++ b/.changeset/rare-comics-tan.md @@ -2,4 +2,10 @@ '@backstage/backend-common': patch --- -Added a `Context` type for the backend, that can propagate an abort signal, a deadline, and contextual values through the call stack. The main entrypoint is the `Contexts` utility class that provides a root context creator and commonly used decorators. +Added a `Context` type for the backend, that can propagate an abort signal, a +deadline, and contextual values through the call stack. The main entrypoint is +the `Contexts` utility class that provides a root context creator and commonly +used decorators. + +These are marked as `@alpha` for now, and are therefore only accessible via +`@backstage/backend-common/alpha`. diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 478a17d1fd..f53fb9d6e4 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -147,14 +147,14 @@ export interface ContainerRunner { runContainer(opts: RunContainerOptions): Promise; } -// @public +// @alpha export interface Context { readonly abortSignal: AbortSignal_2; readonly deadline: Date | undefined; value(key: string): T | undefined; } -// @public +// @alpha export class Contexts { static root(): Context; static withAbort( diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 3008d915f9..7bde82db0d 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -8,7 +8,8 @@ "publishConfig": { "access": "public", "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "alphaTypes": "dist/index.alpha.d.ts" }, "homepage": "https://backstage.io", "repository": { @@ -21,7 +22,7 @@ ], "license": "Apache-2.0", "scripts": { - "build": "backstage-cli build --outputs cjs,types", + "build": "backstage-cli build --experimental-type-build --outputs cjs,types", "lint": "backstage-cli lint", "test": "backstage-cli test", "prepack": "backstage-cli prepack", @@ -111,7 +112,8 @@ }, "files": [ "dist", - "config.d.ts" + "config.d.ts", + "alpha" ], "configSchema": "config.d.ts" } diff --git a/packages/backend-common/src/context/Contexts.ts b/packages/backend-common/src/context/Contexts.ts index 8bb086168a..e22a76f673 100644 --- a/packages/backend-common/src/context/Contexts.ts +++ b/packages/backend-common/src/context/Contexts.ts @@ -24,7 +24,7 @@ import { ValueContext } from './ValueContext'; /** * Common context decorators. * - * @public + * @alpha */ export class Contexts { /** diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/context/types.ts index 57bf836560..664745bbf6 100644 --- a/packages/backend-common/src/context/types.ts +++ b/packages/backend-common/src/context/types.ts @@ -20,7 +20,7 @@ import { AbortSignal } from 'node-abort-controller'; * A context that is meant to be passed as a ctx variable down the call chain, * to pass along scoped information and abort signals. * - * @public + * @alpha */ export interface Context { /** From 475f1926528c43b29fed62e13d84e33d98a63496 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Mon, 24 Jan 2022 16:27:12 +0100 Subject: [PATCH 011/473] Replace deprecated component on docs page Signed-off-by: Eoghan McIlwaine --- docs/plugins/integrating-plugin-into-software-catalog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/integrating-plugin-into-software-catalog.md b/docs/plugins/integrating-plugin-into-software-catalog.md index 71430e25a0..97efa56ac3 100644 --- a/docs/plugins/integrating-plugin-into-software-catalog.md +++ b/docs/plugins/integrating-plugin-into-software-catalog.md @@ -107,7 +107,7 @@ const systemPage = ( - + {/* Adding a new tab to the system view */} From e7dd277232d2417e687b003c6a1e204a9e32dead Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Mon, 24 Jan 2022 16:29:24 +0100 Subject: [PATCH 012/473] Remove EntitySystemDiagramCard code Signed-off-by: Eoghan McIlwaine --- plugins/catalog/src/index.ts | 1 - plugins/catalog/src/plugin.ts | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/plugins/catalog/src/index.ts b/plugins/catalog/src/index.ts index 57dd911b2d..abe34c29b9 100644 --- a/plugins/catalog/src/index.ts +++ b/plugins/catalog/src/index.ts @@ -49,7 +49,6 @@ export { EntityHasSubcomponentsCard, EntityHasSystemsCard, EntityLinksCard, - EntitySystemDiagramCard, RelatedEntitiesCard, } from './plugin'; diff --git a/plugins/catalog/src/plugin.ts b/plugins/catalog/src/plugin.ts index 5a94cd2a09..2e4ebe9570 100644 --- a/plugins/catalog/src/plugin.ts +++ b/plugins/catalog/src/plugin.ts @@ -177,20 +177,6 @@ export const EntityDependsOnResourcesCard = catalogPlugin.provide( }), ); -/** - * @deprecated This component is replaced by EntityCatalogGraphCard which is imported from `@backstage/plugin-catalog-graph`. This component will be removed in an - * upcoming release - */ -export const EntitySystemDiagramCard = catalogPlugin.provide( - createComponentExtension({ - name: 'EntitySystemDiagramCard', - component: { - lazy: () => - import('./components/SystemDiagramCard').then(m => m.SystemDiagramCard), - }, - }), -); - export const RelatedEntitiesCard = catalogPlugin.provide( createComponentExtension({ name: 'RelatedEntitiesCard', From cbe4ab0d204149ac4e6d0019d0a931c81d6b6412 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Mon, 24 Jan 2022 16:33:21 +0100 Subject: [PATCH 013/473] Remove EntitySystemDiagramCard from api report Signed-off-by: Eoghan McIlwaine --- plugins/catalog/api-report.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index ad391b594f..bc29d9ee14 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -388,12 +388,6 @@ export const EntitySwitch: { }) => null; }; -// Warning: (ae-forgotten-export) The symbol "SystemDiagramCard" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntitySystemDiagramCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public @deprecated (undocumented) -export const EntitySystemDiagramCard: SystemDiagramCard; - // Warning: (ae-missing-release-tag) "FilterContainer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) From 37092662cb39757d1ad0c1c7aa1c0d24096e3689 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Mon, 24 Jan 2022 16:56:35 +0100 Subject: [PATCH 014/473] Add changeset for the code removal Signed-off-by: Eoghan McIlwaine --- .changeset/pink-onions-ring.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pink-onions-ring.md diff --git a/.changeset/pink-onions-ring.md b/.changeset/pink-onions-ring.md new file mode 100644 index 0000000000..c7131721f5 --- /dev/null +++ b/.changeset/pink-onions-ring.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': minor +--- + +**BREAKING** Completely removed the `EntitySystemDiagramCard` component which was previously deprecated. `EntityCatalogGraphCard` should be used instead, as references to `EntitySystemDiagramCard` will now break. From 4444fa4050b9243613a76eb133d3f3ebf8113af3 Mon Sep 17 00:00:00 2001 From: Elizabeth Stranack Date: Mon, 24 Jan 2022 10:41:19 -0800 Subject: [PATCH 015/473] Fixing code request changes Signed-off-by: Elizabeth Stranack --- .../src/components/ProgressBars/Gauge.tsx | 22 ++++++++++--------- .../src/layout/InfoCard/InfoCard.tsx | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index f71756f946..89e384a452 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -16,8 +16,9 @@ import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { makeStyles, useTheme } from '@material-ui/core/styles'; +import { isNull } from 'lodash'; import { Circle } from 'rc-progress'; -import React, { ReactNode, useEffect, useRef, useState } from 'react'; +import React, { ReactNode, useEffect, useState } from 'react'; /** @public */ export type GaugeClassKey = @@ -46,7 +47,7 @@ const useStyles = makeStyles( fontSize: '100%', top: '50%', left: '50%', - transform: 'translate(-55%, -50%)', + transform: 'translate(-50%, -50%)', position: 'absolute', wordBreak: 'break-all', display: 'inline-block', @@ -119,7 +120,8 @@ export const getProgressColor: GaugePropsGetColor = ({ */ export function Gauge(props: GaugeProps) { - const hoverRef = useRef(null); + // const hoverRef = useRef(null); + const [hoverRef, setHoverRef] = useState(null); const { getColor = getProgressColor } = props; const classes = useStyles(props); const { palette } = useTheme(); @@ -131,13 +133,13 @@ export function Gauge(props: GaugeProps) { const asPercentage = fractional ? Math.round(value * max) : value; const asActual = max !== 100 ? Math.round(value) : asPercentage; - const [isHovering, setValue] = useState(false); - const handleMouseOver = () => setValue(true); - const handleMouseOut = () => setValue(false); + const [isHovering, setIsHovering] = useState(false); + const handleMouseOver = () => setIsHovering(true); + const handleMouseOut = () => setIsHovering(false); useEffect(() => { - const node = hoverRef.current; - if (node) { + const node = hoverRef; + if (node && !isNull(isHovering)) { node.addEventListener('mouseenter', handleMouseOver); node.addEventListener('mouseleave', handleMouseOut); @@ -147,12 +149,12 @@ export function Gauge(props: GaugeProps) { }; } return () => { - setValue(false); + setIsHovering(false); }; }); return ( -
+
{subheader &&
{subheader}
} - {icon && icon} + {icon}
); }; From 75b0d21e89fc94bf1885e7c8bfd435dd5fdd289d Mon Sep 17 00:00:00 2001 From: Elizabeth Stranack Date: Mon, 24 Jan 2022 11:17:43 -0800 Subject: [PATCH 016/473] Checking if description is set to use the Hover functionality Signed-off-by: Elizabeth Stranack --- packages/core-components/src/components/ProgressBars/Gauge.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index 89e384a452..2750f26c48 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -16,7 +16,6 @@ import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { makeStyles, useTheme } from '@material-ui/core/styles'; -import { isNull } from 'lodash'; import { Circle } from 'rc-progress'; import React, { ReactNode, useEffect, useState } from 'react'; @@ -139,7 +138,7 @@ export function Gauge(props: GaugeProps) { useEffect(() => { const node = hoverRef; - if (node && !isNull(isHovering)) { + if (node && description) { node.addEventListener('mouseenter', handleMouseOver); node.addEventListener('mouseleave', handleMouseOut); From 76b74230bb9869228885db503a7f6caf9e21fb40 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Mon, 24 Jan 2022 18:34:28 +0100 Subject: [PATCH 017/473] Updated changeset after review comment Signed-off-by: Eoghan McIlwaine --- .changeset/pink-onions-ring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/pink-onions-ring.md b/.changeset/pink-onions-ring.md index c7131721f5..9ab8f1ae11 100644 --- a/.changeset/pink-onions-ring.md +++ b/.changeset/pink-onions-ring.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog': minor --- -**BREAKING** Completely removed the `EntitySystemDiagramCard` component which was previously deprecated. `EntityCatalogGraphCard` should be used instead, as references to `EntitySystemDiagramCard` will now break. +**BREAKING** Completely removed the `EntitySystemDiagramCard` component which was deprecated in a previous release. Any remaining references to this component are now broken and should be replaced with `EntityCatalogGraphCard`, which can be imported from package `@backstage/plugin-catalog-graph`. \ No newline at end of file From 973229906208d9c0e9bbb03c9ee83edecc211fab Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Tue, 25 Jan 2022 09:58:13 +0100 Subject: [PATCH 018/473] Run prettier on changeset Signed-off-by: Eoghan McIlwaine --- .changeset/pink-onions-ring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/pink-onions-ring.md b/.changeset/pink-onions-ring.md index 9ab8f1ae11..2b81ad4b43 100644 --- a/.changeset/pink-onions-ring.md +++ b/.changeset/pink-onions-ring.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog': minor --- -**BREAKING** Completely removed the `EntitySystemDiagramCard` component which was deprecated in a previous release. Any remaining references to this component are now broken and should be replaced with `EntityCatalogGraphCard`, which can be imported from package `@backstage/plugin-catalog-graph`. \ No newline at end of file +**BREAKING** Completely removed the `EntitySystemDiagramCard` component which was deprecated in a previous release. Any remaining references to this component are now broken and should be replaced with `EntityCatalogGraphCard`, which can be imported from package `@backstage/plugin-catalog-graph`. From d249d6742df094a70e82e692f180e5d8644b98c8 Mon Sep 17 00:00:00 2001 From: Elizabeth Stranack Date: Tue, 25 Jan 2022 08:41:20 -0800 Subject: [PATCH 019/473] Removing comment Signed-off-by: Elizabeth Stranack --- packages/core-components/src/components/ProgressBars/Gauge.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index 2750f26c48..297e4961ce 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -119,7 +119,6 @@ export const getProgressColor: GaugePropsGetColor = ({ */ export function Gauge(props: GaugeProps) { - // const hoverRef = useRef(null); const [hoverRef, setHoverRef] = useState(null); const { getColor = getProgressColor } = props; const classes = useStyles(props); From 957d7210e604a822420e61d05d74efe7016d8ddc Mon Sep 17 00:00:00 2001 From: Elizabeth Stranack Date: Tue, 25 Jan 2022 12:40:26 -0800 Subject: [PATCH 020/473] Adding dependencies the hook Signed-off-by: Elizabeth Stranack --- .../core-components/src/components/ProgressBars/Gauge.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index 297e4961ce..11f977b387 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -132,11 +132,11 @@ export function Gauge(props: GaugeProps) { const asActual = max !== 100 ? Math.round(value) : asPercentage; const [isHovering, setIsHovering] = useState(false); - const handleMouseOver = () => setIsHovering(true); - const handleMouseOut = () => setIsHovering(false); useEffect(() => { const node = hoverRef; + const handleMouseOver = () => setIsHovering(true); + const handleMouseOut = () => setIsHovering(false); if (node && description) { node.addEventListener('mouseenter', handleMouseOver); node.addEventListener('mouseleave', handleMouseOut); @@ -149,7 +149,7 @@ export function Gauge(props: GaugeProps) { return () => { setIsHovering(false); }; - }); + }, [description, hoverRef]); return (
From 2e0dbb0e50e2774c70ce819c774a6b5eebcfcc25 Mon Sep 17 00:00:00 2001 From: Crevil Date: Wed, 26 Jan 2022 20:46:09 +0100 Subject: [PATCH 021/473] Replace @octokit/rest in scaffolder-backend Signed-off-by: Crevil --- .changeset/grumpy-teachers-remain.md | 5 + plugins/scaffolder-backend/package.json | 2 +- .../{@octokit/rest => octokit}/index.ts | 26 ++-- .../actions/builtin/github/OctokitProvider.ts | 2 +- .../github/githubActionsDispatch.test.ts | 4 +- .../builtin/github/githubWebhook.test.ts | 18 +-- .../actions/builtin/github/githubWebhook.ts | 2 +- .../src/scaffolder/actions/builtin/helpers.ts | 4 +- .../actions/builtin/publish/github.test.ts | 92 +++++------ .../actions/builtin/publish/github.ts | 14 +- .../builtin/publish/githubPullRequest.ts | 2 +- yarn.lock | 146 +++++++++++++++++- 12 files changed, 230 insertions(+), 87 deletions(-) create mode 100644 .changeset/grumpy-teachers-remain.md rename plugins/scaffolder-backend/src/scaffolder/__mocks__/{@octokit/rest => octokit}/index.ts (71%) diff --git a/.changeset/grumpy-teachers-remain.md b/.changeset/grumpy-teachers-remain.md new file mode 100644 index 0000000000..e1d29a7edd --- /dev/null +++ b/.changeset/grumpy-teachers-remain.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Migrate from deprecated package @octokit/rest to octokit diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index e9c932a211..2ab6dca6f3 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -43,7 +43,6 @@ "@backstage/types": "^0.1.1", "@gitbeaker/core": "^34.6.0", "@gitbeaker/node": "^35.1.0", - "@octokit/rest": "^18.5.3", "@octokit/webhooks": "^9.14.1", "@types/express": "^4.17.6", "azure-devops-node-api": "^11.0.1", @@ -66,6 +65,7 @@ "morgan": "^1.10.0", "node-fetch": "^2.6.1", "nunjucks": "^3.2.3", + "octokit": "^1.7.1", "octokit-plugin-create-pull-request": "^3.10.0", "uuid": "^8.2.0", "winston": "^3.2.1", diff --git a/plugins/scaffolder-backend/src/scaffolder/__mocks__/@octokit/rest/index.ts b/plugins/scaffolder-backend/src/scaffolder/__mocks__/octokit/index.ts similarity index 71% rename from plugins/scaffolder-backend/src/scaffolder/__mocks__/@octokit/rest/index.ts rename to plugins/scaffolder-backend/src/scaffolder/__mocks__/octokit/index.ts index b60c3fcb2d..de320ef498 100644 --- a/plugins/scaffolder-backend/src/scaffolder/__mocks__/@octokit/rest/index.ts +++ b/plugins/scaffolder-backend/src/scaffolder/__mocks__/octokit/index.ts @@ -19,19 +19,19 @@ export const mockGithubClient = { actions: { createWorkflowDispatch: jest.fn(), }, - }, - repos: { - createInOrg: jest.fn(), - createForAuthenticatedUser: jest.fn(), - createWebhook: jest.fn(), - addCollaborator: jest.fn(), - replaceAllTopics: jest.fn(), - }, - users: { - getByUsername: jest.fn(), - }, - teams: { - addOrUpdateRepoPermissionsInOrg: jest.fn(), + repos: { + createInOrg: jest.fn(), + createForAuthenticatedUser: jest.fn(), + createWebhook: jest.fn(), + addCollaborator: jest.fn(), + replaceAllTopics: jest.fn(), + }, + users: { + getByUsername: jest.fn(), + }, + teams: { + addOrUpdateRepoPermissionsInOrg: jest.fn(), + }, }, }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts index bf91c0e37c..a3eeec4373 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts @@ -20,7 +20,7 @@ import { GithubCredentialsProvider, ScmIntegrationRegistry, } from '@backstage/integration'; -import { Octokit } from '@octokit/rest'; +import { Octokit } from 'octokit'; import { parseRepoUrl } from '../publish/util'; export type OctokitIntegration = { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.test.ts index b725f825fe..68ef88021e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -jest.mock('@octokit/rest'); +jest.mock('octokit'); import { TemplateAction } from '../../types'; import { createGithubActionsDispatchAction } from './githubActionsDispatch'; @@ -54,7 +54,7 @@ describe('github:actions:dispatch', () => { createTemporaryDirectory: jest.fn(), }; - const { mockGithubClient } = require('@octokit/rest'); + const { mockGithubClient } = require('octokit'); beforeEach(() => { jest.resetAllMocks(); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.test.ts index fe2535ca42..b80691fdcc 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -jest.mock('@octokit/rest'); +jest.mock('octokit'); import { createGithubWebhookAction } from './githubWebhook'; import { @@ -65,7 +65,7 @@ describe('github:repository:webhook:create', () => { createTemporaryDirectory: jest.fn(), }; - const { mockGithubClient } = require('@octokit/rest'); + const { mockGithubClient } = require('octokit'); it('should call the githubApi for creating repository Webhook', async () => { const repoUrl = 'github.com?repo=repo&owner=owner'; @@ -75,7 +75,7 @@ describe('github:repository:webhook:create', () => { }); await action.handler(ctx); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push'], @@ -97,7 +97,7 @@ describe('github:repository:webhook:create', () => { }, }); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push'], @@ -118,7 +118,7 @@ describe('github:repository:webhook:create', () => { }, }); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push', 'pull_request'], @@ -139,7 +139,7 @@ describe('github:repository:webhook:create', () => { }, }); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push'], @@ -160,7 +160,7 @@ describe('github:repository:webhook:create', () => { }, }); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push'], @@ -181,7 +181,7 @@ describe('github:repository:webhook:create', () => { }, }); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push'], @@ -202,7 +202,7 @@ describe('github:repository:webhook:create', () => { }, }); - expect(mockGithubClient.repos.createWebhook).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createWebhook).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', events: ['push'], diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts index 95f1888882..39e8c3aa70 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts @@ -127,7 +127,7 @@ export function createGithubWebhookAction(options: { try { const insecure_ssl = insecureSsl ? '1' : '0'; - await client.repos.createWebhook({ + await client.rest.repos.createWebhook({ owner, repo, config: { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts index 90f060fd88..92b578d385 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts @@ -18,7 +18,7 @@ import { SpawnOptionsWithoutStdio, spawn } from 'child_process'; import { PassThrough, Writable } from 'stream'; import { Logger } from 'winston'; import { Git } from '@backstage/backend-common'; -import { Octokit } from '@octokit/rest'; +import { Octokit } from 'octokit'; import { assertError } from '@backstage/errors'; export type RunCommandOptions = { @@ -139,7 +139,7 @@ export const enableBranchProtectionOnDefaultRepoBranch = async ({ }: BranchProtectionOptions): Promise => { const tryOnce = async () => { try { - await client.repos.updateBranchProtection({ + await client.rest.repos.updateBranchProtection({ mediaType: { /** * 👇 we need this preview because allowing a custom diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts index 7724dec85e..5467ca651c 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts @@ -17,7 +17,7 @@ import { TemplateAction } from '../../types'; jest.mock('../helpers'); -jest.mock('@octokit/rest'); +jest.mock('octokit'); import { createPublishGithubAction } from './github'; import { @@ -62,7 +62,7 @@ describe('publish:github', () => { createTemporaryDirectory: jest.fn(), }; - const { mockGithubClient } = require('@octokit/rest'); + const { mockGithubClient } = require('octokit'); beforeEach(() => { jest.resetAllMocks(); @@ -76,14 +76,14 @@ describe('publish:github', () => { }); it('should call the githubApis with the correct values for createInOrg', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'Organization' }, }); - mockGithubClient.repos.createInOrg.mockResolvedValue({ data: {} }); + mockGithubClient.rest.repos.createInOrg.mockResolvedValue({ data: {} }); await action.handler(mockContext); - expect(mockGithubClient.repos.createInOrg).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createInOrg).toHaveBeenCalledWith({ description: 'description', name: 'repo', org: 'owner', @@ -98,7 +98,7 @@ describe('publish:github', () => { repoVisibility: 'public', }, }); - expect(mockGithubClient.repos.createInOrg).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.createInOrg).toHaveBeenCalledWith({ description: 'description', name: 'repo', org: 'owner', @@ -108,17 +108,17 @@ describe('publish:github', () => { }); it('should call the githubApis with the correct values for createForAuthenticatedUser', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: {}, }); await action.handler(mockContext); expect( - mockGithubClient.repos.createForAuthenticatedUser, + mockGithubClient.rest.repos.createForAuthenticatedUser, ).toHaveBeenCalledWith({ description: 'description', name: 'repo', @@ -133,7 +133,7 @@ describe('publish:github', () => { }, }); expect( - mockGithubClient.repos.createForAuthenticatedUser, + mockGithubClient.rest.repos.createForAuthenticatedUser, ).toHaveBeenCalledWith({ description: 'description', name: 'repo', @@ -142,11 +142,11 @@ describe('publish:github', () => { }); it('should call initRepoAndPush with the correct values', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -166,11 +166,11 @@ describe('publish:github', () => { }); it('should call initRepoAndPush with the correct defaultBranch main', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -219,11 +219,11 @@ describe('publish:github', () => { githubCredentialsProvider, }); - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -263,11 +263,11 @@ describe('publish:github', () => { githubCredentialsProvider, }); - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -288,11 +288,11 @@ describe('publish:github', () => { }); it('should add access for the team when it starts with the owner', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -302,7 +302,7 @@ describe('publish:github', () => { await action.handler(mockContext); expect( - mockGithubClient.teams.addOrUpdateRepoPermissionsInOrg, + mockGithubClient.rest.teams.addOrUpdateRepoPermissionsInOrg, ).toHaveBeenCalledWith({ org: 'owner', team_slug: 'blam', @@ -313,11 +313,11 @@ describe('publish:github', () => { }); it('should add outside collaborators when provided', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -332,7 +332,7 @@ describe('publish:github', () => { }, }); - expect(mockGithubClient.repos.addCollaborator).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.addCollaborator).toHaveBeenCalledWith({ username: 'outsidecollaborator', owner: 'owner', repo: 'repo', @@ -341,11 +341,11 @@ describe('publish:github', () => { }); it('should add multiple collaborators when provided', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -376,7 +376,7 @@ describe('publish:github', () => { }; expect( - mockGithubClient.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[1], + mockGithubClient.rest.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[1], ).toEqual([ { ...commonProperties, @@ -386,7 +386,7 @@ describe('publish:github', () => { ]); expect( - mockGithubClient.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[2], + mockGithubClient.rest.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[2], ).toEqual([ { ...commonProperties, @@ -397,18 +397,18 @@ describe('publish:github', () => { }); it('should ignore failures when adding multiple collaborators', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', }, }); - when(mockGithubClient.teams.addOrUpdateRepoPermissionsInOrg) + when(mockGithubClient.rest.teams.addOrUpdateRepoPermissionsInOrg) .calledWith({ org: 'owner', owner: 'owner', @@ -436,7 +436,7 @@ describe('publish:github', () => { }); expect( - mockGithubClient.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[2], + mockGithubClient.rest.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[2], ).toEqual([ { org: 'owner', @@ -449,18 +449,18 @@ describe('publish:github', () => { }); it('should add topics when provided', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', }, }); - mockGithubClient.repos.replaceAllTopics.mockResolvedValue({ + mockGithubClient.rest.repos.replaceAllTopics.mockResolvedValue({ data: { names: ['node.js'], }, @@ -474,7 +474,7 @@ describe('publish:github', () => { }, }); - expect(mockGithubClient.repos.replaceAllTopics).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.replaceAllTopics).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', names: ['node.js'], @@ -482,18 +482,18 @@ describe('publish:github', () => { }); it('should lowercase topics when provided', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', }, }); - mockGithubClient.repos.replaceAllTopics.mockResolvedValue({ + mockGithubClient.rest.repos.replaceAllTopics.mockResolvedValue({ data: { names: ['backstage'], }, @@ -507,7 +507,7 @@ describe('publish:github', () => { }, }); - expect(mockGithubClient.repos.replaceAllTopics).toHaveBeenCalledWith({ + expect(mockGithubClient.rest.repos.replaceAllTopics).toHaveBeenCalledWith({ owner: 'owner', repo: 'repo', names: ['backstage'], @@ -515,11 +515,11 @@ describe('publish:github', () => { }); it('should call output with the remoteUrl and the repoContentsUrl', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -539,11 +539,11 @@ describe('publish:github', () => { }); it('should use main as default branch', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { clone_url: 'https://github.com/clone/url.git', html_url: 'https://github.com/html/url', @@ -569,11 +569,11 @@ describe('publish:github', () => { }); it('should call enableBranchProtectionOnDefaultRepoBranch with the correct values of requireCodeOwnerReviews', async () => { - mockGithubClient.users.getByUsername.mockResolvedValue({ + mockGithubClient.rest.users.getByUsername.mockResolvedValue({ data: { type: 'User' }, }); - mockGithubClient.repos.createForAuthenticatedUser.mockResolvedValue({ + mockGithubClient.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { name: 'repository', }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index 3e529b1f17..081f9616ac 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -155,20 +155,20 @@ export function createPublishGithubAction(options: { repoUrl, ); - const user = await client.users.getByUsername({ + const user = await client.rest.users.getByUsername({ username: owner, }); const repoCreationPromise = user.data.type === 'Organization' - ? client.repos.createInOrg({ + ? client.rest.repos.createInOrg({ name: repo, org: owner, private: repoVisibility === 'private', visibility: repoVisibility, description: description, }) - : client.repos.createForAuthenticatedUser({ + : client.rest.repos.createForAuthenticatedUser({ name: repo, private: repoVisibility === 'private', description: description, @@ -177,7 +177,7 @@ export function createPublishGithubAction(options: { const { data: newRepo } = await repoCreationPromise; if (access?.startsWith(`${owner}/`)) { const [, team] = access.split('/'); - await client.teams.addOrUpdateRepoPermissionsInOrg({ + await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ org: owner, team_slug: team, owner, @@ -186,7 +186,7 @@ export function createPublishGithubAction(options: { }); // No need to add access if it's the person who owns the personal account } else if (access && access !== owner) { - await client.repos.addCollaborator({ + await client.rest.repos.addCollaborator({ owner, repo, username: access, @@ -200,7 +200,7 @@ export function createPublishGithubAction(options: { username: team_slug, } of collaborators) { try { - await client.teams.addOrUpdateRepoPermissionsInOrg({ + await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ org: owner, team_slug, owner, @@ -218,7 +218,7 @@ export function createPublishGithubAction(options: { if (topics) { try { - await client.repos.replaceAllTopics({ + await client.rest.repos.replaceAllTopics({ owner, repo, names: topics.map(t => t.toLowerCase()), diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts index 7b3e89ac2a..841d4c7a82 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts @@ -24,7 +24,7 @@ import { } from '@backstage/integration'; import { zipObject } from 'lodash'; import { createTemplateAction } from '../../createTemplateAction'; -import { Octokit } from '@octokit/rest'; +import { Octokit } from 'octokit'; import { InputError, CustomErrorBase } from '@backstage/errors'; import { createPullRequest } from 'octokit-plugin-create-pull-request'; import globby from 'globby'; diff --git a/yarn.lock b/yarn.lock index 0df29fb7d7..200406631c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4209,6 +4209,35 @@ puka "^1.0.1" read-package-json-fast "^2.0.1" +"@octokit/app@^12.0.4": + version "12.0.5" + resolved "https://registry.npmjs.org/@octokit/app/-/app-12.0.5.tgz#0b25446daffcb36967b26944410eab1ccbba0c06" + integrity sha512-lM3pIfx2h+UbvsXHFVs1ApJ9Rmp8LO4ciFSr5q/9MdHmhsH6WtwayieUn875xwB77IoR9r8czxxxASu2WCtdeA== + dependencies: + "@octokit/auth-app" "^3.3.0" + "@octokit/auth-unauthenticated" "^2.0.4" + "@octokit/core" "^3.4.0" + "@octokit/oauth-app" "^3.3.2" + "@octokit/plugin-paginate-rest" "^2.13.3" + "@octokit/types" "^6.27.1" + "@octokit/webhooks" "^9.0.1" + +"@octokit/auth-app@^3.3.0": + version "3.6.1" + resolved "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-3.6.1.tgz#aa5b02cc211175cbc28ce6c03c73373c1206d632" + integrity sha512-6oa6CFphIYI7NxxHrdVOzhG7hkcKyGyYocg7lNDSJVauVOLtylg8hNJzoUyPAYKKK0yUeoZamE/lMs2tG+S+JA== + dependencies: + "@octokit/auth-oauth-app" "^4.3.0" + "@octokit/auth-oauth-user" "^1.2.3" + "@octokit/request" "^5.6.0" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.0.3" + "@types/lru-cache" "^5.1.0" + deprecation "^2.3.1" + lru-cache "^6.0.0" + universal-github-app-jwt "^1.0.1" + universal-user-agent "^6.0.0" + "@octokit/auth-app@^3.4.0": version "3.4.0" resolved "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-3.4.0.tgz#af9f68512e7b8dd071b49e1470a1ddf88ff6a3a3" @@ -4225,6 +4254,19 @@ universal-github-app-jwt "^1.0.1" universal-user-agent "^6.0.0" +"@octokit/auth-oauth-app@^4.0.0", "@octokit/auth-oauth-app@^4.3.0": + version "4.3.0" + resolved "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-4.3.0.tgz#de02f184360ffd7cfccef861053784fc4410e7ea" + integrity sha512-cETmhmOQRHCz6cLP7StThlJROff3A/ln67Q961GuIr9zvyFXZ4lIJy9RE6Uw5O7D8IXWPU3jhDnG47FTSGQr8Q== + dependencies: + "@octokit/auth-oauth-device" "^3.1.1" + "@octokit/auth-oauth-user" "^1.2.1" + "@octokit/request" "^5.3.0" + "@octokit/types" "^6.0.3" + "@types/btoa-lite" "^1.0.0" + btoa-lite "^1.0.0" + universal-user-agent "^6.0.0" + "@octokit/auth-oauth-app@^4.1.0": version "4.1.2" resolved "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-4.1.2.tgz#bf3ff30c260e6e9f10b950386f279befb8fe907d" @@ -4260,6 +4302,18 @@ btoa-lite "^1.0.0" universal-user-agent "^6.0.0" +"@octokit/auth-oauth-user@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-1.3.0.tgz#da4e4529145181a6aa717ae858afb76ebd6e3360" + integrity sha512-3QC/TAdk7onnxfyZ24BnJRfZv8TRzQK7SEFUS9vLng4Vv6Hv6I64ujdk/CUkREec8lhrwU764SZ/d+yrjjqhaQ== + dependencies: + "@octokit/auth-oauth-device" "^3.1.1" + "@octokit/oauth-methods" "^1.1.0" + "@octokit/request" "^5.4.14" + "@octokit/types" "^6.12.2" + btoa-lite "^1.0.0" + universal-user-agent "^6.0.0" + "@octokit/auth-token@^2.4.4": version "2.4.4" resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.4.tgz#ee31c69b01d0378c12fd3ffe406030f3d94d3b56" @@ -4267,6 +4321,14 @@ dependencies: "@octokit/types" "^6.0.0" +"@octokit/auth-unauthenticated@^2.0.0", "@octokit/auth-unauthenticated@^2.0.4": + version "2.1.0" + resolved "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-2.1.0.tgz#ef97de366836e09f130de4e2205be955f9cf131c" + integrity sha512-+baofLfSL0CAv3CfGQ9rxiZZQEX8VNJMGuuS4PgrMRBUL52Ho5+hQYb63UJQshw7EXYMPDZxbXznc0y33cbPqw== + dependencies: + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.0.3" + "@octokit/core@^3.2.3": version "3.2.4" resolved "https://registry.npmjs.org/@octokit/core/-/core-3.2.4.tgz#5791256057a962eca972e31818f02454897fd106" @@ -4279,7 +4341,7 @@ before-after-hook "^2.1.0" universal-user-agent "^6.0.0" -"@octokit/core@^3.5.1": +"@octokit/core@^3.3.2", "@octokit/core@^3.4.0", "@octokit/core@^3.5.1": version "3.5.1" resolved "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== @@ -4310,6 +4372,26 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" +"@octokit/oauth-app@^3.3.2", "@octokit/oauth-app@^3.5.1": + version "3.6.0" + resolved "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-3.6.0.tgz#36f660c7eb6b5a5cd23f6207a8d95e74b6834db0" + integrity sha512-OxPw4ItQXaC2GuEXyZB7EmZ2rHvNFX4y3yAsqdFIRW7qg2HyoEPxacxza6c8wqbEEvu84b98AJ5BXm+IjPWrww== + dependencies: + "@octokit/auth-oauth-app" "^4.0.0" + "@octokit/auth-oauth-user" "^1.3.0" + "@octokit/auth-unauthenticated" "^2.0.0" + "@octokit/core" "^3.3.2" + "@octokit/oauth-authorization-url" "^4.2.1" + "@octokit/oauth-methods" "^1.2.2" + "@types/aws-lambda" "^8.10.83" + fromentries "^1.3.1" + universal-user-agent "^6.0.0" + +"@octokit/oauth-authorization-url@^4.2.1": + version "4.3.3" + resolved "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-4.3.3.tgz#6a6ef38f243086fec882b62744f39b517528dfb9" + integrity sha512-lhP/t0i8EwTmayHG4dqLXgU+uPVys4WD/qUNvC+HfB1S1dyqULm5Yx9uKc1x79aP66U1Cb4OZeW8QU/RA9A4XA== + "@octokit/oauth-authorization-url@^4.3.1": version "4.3.1" resolved "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-4.3.1.tgz#008d09bf427a7f61c70b5283040d60a456011a51" @@ -4326,6 +4408,17 @@ "@octokit/types" "^6.12.2" btoa-lite "^1.0.0" +"@octokit/oauth-methods@^1.2.2": + version "1.2.6" + resolved "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-1.2.6.tgz#b9ac65e374b2cc55ee9dd8dcdd16558550438ea7" + integrity sha512-nImHQoOtKnSNn05uk2o76om1tJWiAo4lOu2xMAHYsNr0fwopP+Dv+2MlGvaMMlFjoqVd3fF3X5ZDTKCsqgmUaQ== + dependencies: + "@octokit/oauth-authorization-url" "^4.3.1" + "@octokit/request" "^5.4.14" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.12.2" + btoa-lite "^1.0.0" + "@octokit/openapi-types@^11.2.0": version "11.2.0" resolved "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" @@ -4341,7 +4434,7 @@ resolved "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== -"@octokit/plugin-paginate-rest@^2.16.8": +"@octokit/plugin-paginate-rest@^2.13.3", "@octokit/plugin-paginate-rest@^2.16.8": version "2.17.0" resolved "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== @@ -4381,6 +4474,22 @@ "@octokit/types" "^6.34.0" deprecation "^2.3.1" +"@octokit/plugin-retry@^3.0.9": + version "3.0.9" + resolved "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz#ae625cca1e42b0253049102acd71c1d5134788fe" + integrity sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ== + dependencies: + "@octokit/types" "^6.0.3" + bottleneck "^2.15.3" + +"@octokit/plugin-throttling@^3.5.1": + version "3.5.2" + resolved "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.5.2.tgz#8b1797a5f14edbca0b8af619394056ed0ed5c9b5" + integrity sha512-Eu7kfJxU8vmHqWGNszWpg+GVp2tnAfax3XQV5CkYPEE69C+KvInJXW9WajgSeW+cxYe0UVdouzCtcreGNuJo7A== + dependencies: + "@octokit/types" "^6.0.1" + bottleneck "^2.15.3" + "@octokit/request-error@^2.0.0", "@octokit/request-error@^2.0.2", "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": version "2.1.0" resolved "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" @@ -4436,7 +4545,7 @@ dependencies: "@octokit/openapi-types" "^7.3.2" -"@octokit/types@^6.34.0": +"@octokit/types@^6.26.0", "@octokit/types@^6.27.1", "@octokit/types@^6.34.0": version "6.34.0" resolved "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== @@ -4453,7 +4562,7 @@ resolved "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-5.2.0.tgz#9d1d451f37460107409c81cab04dd473108abb02" integrity sha512-OZhKy1w8/GF4GWtdiJc+o8sloWAHRueGB78FWFLZnueK7EHV9MzDVr4weJZMflJwMK4uuYLzcnJVnAoy3yB35g== -"@octokit/webhooks@^9.14.1": +"@octokit/webhooks@^9.0.1", "@octokit/webhooks@^9.14.1": version "9.22.0" resolved "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.22.0.tgz#07a36a10358d39c1870758fae2b1ad3c24ca578d" integrity sha512-wUd7nGfDRHG6xkz311djmq6lIB2tQ+r94SNkyv9o0bQhOsrkwH8fQCM7uVsbpkGUU2lqCYsVoa8z/UC9HJgRaw== @@ -5233,6 +5342,11 @@ resolved "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.0.tgz#14264692a9d6e2fa4db3df5e56e94b5e25647ac0" integrity sha512-iIgQNzCm0v7QMhhe4Jjn9uRh+I6GoPmt03CbEtwx3ao8/EfoQcmgtqH4vQ5Db/lxiIGaWDv6nwvunuh0RyX0+A== +"@types/aws-lambda@^8.10.83": + version "8.10.92" + resolved "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.92.tgz#645f769ff88b8eba1acd35542695ac322c7757c4" + integrity sha512-dB14TltT1SNq73z3MaZfKyyBZ37NAgAFl8jze59bisR4fJ6pB6AYGxItHFkooZbN7UcVJX/cFudM4p8wp1W4rA== + "@types/aws4@^1.5.1": version "1.5.2" resolved "https://registry.npmjs.org/@types/aws4/-/aws4-1.5.2.tgz#34e35b4405a619b9205be3e7678963bc7c8a47db" @@ -8083,6 +8197,11 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= +bottleneck@^2.15.3: + version "2.19.5" + resolved "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91" + integrity sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw== + boxen@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" @@ -12513,6 +12632,11 @@ from@~0: resolved "https://registry.npmjs.org/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +fromentries@^1.3.1: + version "1.3.2" + resolved "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== + fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -18434,6 +18558,20 @@ octokit-plugin-create-pull-request@^3.10.0: dependencies: "@octokit/types" "^6.8.2" +octokit@^1.7.1: + version "1.7.1" + resolved "https://registry.npmjs.org/octokit/-/octokit-1.7.1.tgz#d86e51c8e0cec65cb64822ca2c9ff1b052593799" + integrity sha512-1b7eRgU8uWetHOWr8f9ptnVo2EKbrkOfocMeQdpgCt7tl/LK67HptFsy2Xg4fMjsJ/+onoBJW0hy/fO0In3/uA== + dependencies: + "@octokit/app" "^12.0.4" + "@octokit/core" "^3.5.1" + "@octokit/oauth-app" "^3.5.1" + "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + "@octokit/plugin-retry" "^3.0.9" + "@octokit/plugin-throttling" "^3.5.1" + "@octokit/types" "^6.26.0" + oidc-token-hash@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.1.tgz#ae6beec3ec20f0fd885e5400d175191d6e2f10c6" From 426aee1212bbce3c92c83daf597303d884193781 Mon Sep 17 00:00:00 2001 From: Crevil Date: Thu, 27 Jan 2022 08:51:36 +0100 Subject: [PATCH 022/473] Update api report Signed-off-by: Crevil --- plugins/scaffolder-backend/api-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index c33aa91bee..cfe8f5d2b0 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -20,7 +20,7 @@ import { JsonValue } from '@backstage/types'; import { Knex } from 'knex'; import { LocationSpec } from '@backstage/catalog-model'; import { Logger as Logger_2 } from 'winston'; -import { Octokit } from '@octokit/rest'; +import { Octokit } from 'octokit'; import { PluginDatabaseManager } from '@backstage/backend-common'; import { Schema } from 'jsonschema'; import { ScmIntegrationRegistry } from '@backstage/integration'; From 1eb5d32112bfc76ceb5e347d9fac68bd2bbcbe98 Mon Sep 17 00:00:00 2001 From: Marcos Borges Date: Thu, 27 Jan 2022 15:52:36 -0300 Subject: [PATCH 023/473] Added RCHLO and MIDWAY new adopters. --- ADOPTERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ADOPTERS.md b/ADOPTERS.md index b95e20757d..566b614af3 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -85,3 +85,4 @@ | [Just Eat Takeaway](https://www.justeattakeaway.com) | [Kim Wilson](https://github.com/kwilson541) | Our developer portal which centralises applications, reduces cognitive load and provides teams insights. | | [Hopin](https://hopin.com) | [Vladimir Glafirov](https://github.com/vglafirov), [Chloe Lee](https://github.com/msfuko) | Developer portal to streamline the development practices. Integrated with service catalog, software templates, application monitoring, tech docs and plugins. | | [HBO Max](https://hbomax.com) | [@mdb](https://github.com/mdb), [@nesta219](https://github.com/nesta219), [@nmische](https://github.com/nmische), [@hbomark](https://github.com/hbomark) | Developer portal hosting service catalog and API documentation, as well as cloud infrastructure details, operational visibility tools, and a custom plugin for browsing notable platform change events, such as deployments and configuration updates. | +| [RCHLO](https://www.riachuelo.com.br) & [MIDWAY](https://www.midway.com.br) | [@marcosborges](https://github.com/marcosborges), [@defaultbr](https://github.com/defaultbr) | Self-Service Platform | From 124520078c8ee3e78486d715b93f095a7710b522 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 28 Jan 2022 09:49:55 +0000 Subject: [PATCH 024/473] allow backend to start if proxy target is not set Signed-off-by: Brian Fletcher --- .../proxy-backend/src/service/router.test.ts | 71 +++++++++++++++---- plugins/proxy-backend/src/service/router.ts | 13 ++-- 2 files changed, 66 insertions(+), 18 deletions(-) diff --git a/plugins/proxy-backend/src/service/router.test.ts b/plugins/proxy-backend/src/service/router.test.ts index ddb524d3aa..f27a8cf3ae 100644 --- a/plugins/proxy-backend/src/service/router.test.ts +++ b/plugins/proxy-backend/src/service/router.test.ts @@ -30,23 +30,66 @@ const mockCreateProxyMiddleware = createProxyMiddleware as jest.MockedFunction< >; describe('createRouter', () => { - it('works', async () => { - const logger = getVoidLogger(); - const config = new ConfigReader({ - backend: { - baseUrl: 'https://example.com:7007', - listen: { - port: 7007, + describe('where all proxy config are valid', () => { + it('works', async () => { + const logger = getVoidLogger(); + const config = new ConfigReader({ + backend: { + baseUrl: 'https://example.com:7007', + listen: { + port: 7007, + }, }, - }, + proxy: { + '/test': { + target: 'https://example.com', + headers: { + Authorization: 'Bearer supersecret', + }, + }, + }, + }); + const discovery = SingleHostDiscovery.fromConfig(config); + const router = await createRouter({ + config, + logger, + discovery, + }); + expect(router).toBeDefined(); }); - const discovery = SingleHostDiscovery.fromConfig(config); - const router = await createRouter({ - config, - logger, - discovery, + }); + + describe('where buildMiddleware would fail', () => { + it('works', async () => { + const logger = getVoidLogger(); + logger.warn = jest.fn(); + const config = new ConfigReader({ + backend: { + baseUrl: 'https://example.com:7007', + listen: { + port: 7007, + }, + }, + // no target would cause the buildMiddleware to fail + proxy: { + '/test': { + headers: { + Authorization: 'Bearer supersecret', + }, + }, + }, + }); + const discovery = SingleHostDiscovery.fromConfig(config); + const router = await createRouter({ + config, + logger, + discovery, + }); + expect((logger.warn as jest.Mock).mock.calls[0][0]).toEqual( + 'skipped configuring /test due to Proxy target must be a string', + ); + expect(router).toBeDefined(); }); - expect(router).toBeDefined(); }); }); diff --git a/plugins/proxy-backend/src/service/router.ts b/plugins/proxy-backend/src/service/router.ts index c2123ae4b1..f9ce9943f5 100644 --- a/plugins/proxy-backend/src/service/router.ts +++ b/plugins/proxy-backend/src/service/router.ts @@ -185,11 +185,16 @@ export async function createRouter( const { pathname: pathPrefix } = new URL(externalUrl); const proxyConfig = options.config.getOptional('proxy') ?? {}; + Object.entries(proxyConfig).forEach(([route, proxyRouteConfig]) => { - router.use( - route, - buildMiddleware(pathPrefix, options.logger, route, proxyRouteConfig), - ); + try { + router.use( + route, + buildMiddleware(pathPrefix, options.logger, route, proxyRouteConfig), + ); + } catch (e) { + options.logger.warn(`skipped configuring ${route} due to ${e.message}`); + } }); return router; From 332d3decb20de2127caed1f76852b9763e045d54 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 28 Jan 2022 09:53:38 +0000 Subject: [PATCH 025/473] adds changeset Signed-off-by: Brian Fletcher --- .changeset/quick-jars-wait.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/quick-jars-wait.md diff --git a/.changeset/quick-jars-wait.md b/.changeset/quick-jars-wait.md new file mode 100644 index 0000000000..c6299760be --- /dev/null +++ b/.changeset/quick-jars-wait.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-proxy-backend': patch +--- + +If one of the configured proxies is configured badly enough to cause an exception when the middleware is being built it will now pass by it and continue the server startup. Previously the backend would fail to startup. From 8030dc7dd5bc8fc55e87ed62083d3fce7da6b555 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 28 Jan 2022 11:28:14 +0000 Subject: [PATCH 026/473] only skip proxies if configured to do so Signed-off-by: Brian Fletcher --- .../proxy-backend/src/service/router.test.ts | 32 ++++++++++++++++++- plugins/proxy-backend/src/service/router.ts | 7 +++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/plugins/proxy-backend/src/service/router.test.ts b/plugins/proxy-backend/src/service/router.test.ts index f27a8cf3ae..6b4d6b21a7 100644 --- a/plugins/proxy-backend/src/service/router.test.ts +++ b/plugins/proxy-backend/src/service/router.test.ts @@ -60,7 +60,36 @@ describe('createRouter', () => { }); describe('where buildMiddleware would fail', () => { - it('works', async () => { + it('throws an error if skip failures is not set', async () => { + const logger = getVoidLogger(); + logger.warn = jest.fn(); + const config = new ConfigReader({ + backend: { + baseUrl: 'https://example.com:7007', + listen: { + port: 7007, + }, + }, + // no target would cause the buildMiddleware to fail + proxy: { + '/test': { + headers: { + Authorization: 'Bearer supersecret', + }, + }, + }, + }); + const discovery = SingleHostDiscovery.fromConfig(config); + await expect( + createRouter({ + config, + logger, + discovery, + }), + ).rejects.toThrow(new Error('Proxy target must be a string')); + }); + + it('works if skip failures is set', async () => { const logger = getVoidLogger(); logger.warn = jest.fn(); const config = new ConfigReader({ @@ -84,6 +113,7 @@ describe('createRouter', () => { config, logger, discovery, + skipBrokenProxies: true, }); expect((logger.warn as jest.Mock).mock.calls[0][0]).toEqual( 'skipped configuring /test due to Proxy target must be a string', diff --git a/plugins/proxy-backend/src/service/router.ts b/plugins/proxy-backend/src/service/router.ts index f9ce9943f5..7ea59d74eb 100644 --- a/plugins/proxy-backend/src/service/router.ts +++ b/plugins/proxy-backend/src/service/router.ts @@ -51,6 +51,7 @@ export interface RouterOptions { logger: Logger; config: Config; discovery: PluginEndpointDiscovery; + skipBrokenProxies?: boolean; } export interface ProxyConfig extends Options { @@ -193,7 +194,11 @@ export async function createRouter( buildMiddleware(pathPrefix, options.logger, route, proxyRouteConfig), ); } catch (e) { - options.logger.warn(`skipped configuring ${route} due to ${e.message}`); + if (options.skipBrokenProxies) { + options.logger.warn(`skipped configuring ${route} due to ${e.message}`); + } else { + throw e; + } } }); From 947f1098ee24334c921ee25e568f42d84709eca7 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 28 Jan 2022 11:31:09 +0000 Subject: [PATCH 027/473] adds details to the changeset Signed-off-by: Brian Fletcher --- .changeset/quick-jars-wait.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.changeset/quick-jars-wait.md b/.changeset/quick-jars-wait.md index c6299760be..61bde0d377 100644 --- a/.changeset/quick-jars-wait.md +++ b/.changeset/quick-jars-wait.md @@ -2,4 +2,25 @@ '@backstage/plugin-proxy-backend': patch --- -If one of the configured proxies is configured badly enough to cause an exception when the middleware is being built it will now pass by it and continue the server startup. Previously the backend would fail to startup. +If one of the configured proxies is configured badly enough to cause an exception when the middleware is being built it can now be configured to pass the bad proxy by and continue the server startup. Previously the backend would fail to startup. + +To configure it to pass by failing proxies: + +``` +const router = await createRouter({ + config, + logger, + discovery, + skipBrokenProxies: true, +}); +``` + +If you would like it to fail if a proxy is configured badly: + +``` +const router = await createRouter({ + config, + logger, + discovery, +}); +``` From fd41c51452d27a97c55b9d2eff846ff3197e9081 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 28 Jan 2022 12:55:47 +0000 Subject: [PATCH 028/473] docs: use backstage.io link to backend-to-backend auth docs There's rightfully been some confusion in various contexts about where to find this documentation - switching to a fully qualified docs URL should make it easier to find. Signed-off-by: MT Lewis --- app-config.yaml | 3 ++- packages/create-app/templates/default-app/app-config.yaml.hbs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app-config.yaml b/app-config.yaml index b84b5de2f2..b025064c74 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -24,7 +24,8 @@ app: backend: # Used for enabling authentication, secret is shared by all backend plugins - # See backend-to-backend-auth.md in the docs for information on the format + # See https://backstage.io/docs/tutorials/backend-to-backend-auth for + # information on the format # auth: # keys: # - secret: ${BACKEND_SECRET} diff --git a/packages/create-app/templates/default-app/app-config.yaml.hbs b/packages/create-app/templates/default-app/app-config.yaml.hbs index 46e2ecbb05..618c06a0c3 100644 --- a/packages/create-app/templates/default-app/app-config.yaml.hbs +++ b/packages/create-app/templates/default-app/app-config.yaml.hbs @@ -7,7 +7,8 @@ organization: backend: # Used for enabling authentication, secret is shared by all backend plugins - # See backend-to-backend-auth.md in the docs for information on the format + # See https://backstage.io/docs/tutorials/backend-to-backend-auth for + # information on the format # auth: # keys: # - secret: ${BACKEND_SECRET} From 27e1ab0ec4222dceaa054b8e54e9a85181dc68f5 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 28 Jan 2022 13:51:47 +0000 Subject: [PATCH 029/473] addressing review suggestions Signed-off-by: Brian Fletcher --- .changeset/quick-jars-wait.md | 4 ++-- plugins/proxy-backend/src/service/router.test.ts | 2 +- plugins/proxy-backend/src/service/router.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.changeset/quick-jars-wait.md b/.changeset/quick-jars-wait.md index 61bde0d377..bbf6b42a89 100644 --- a/.changeset/quick-jars-wait.md +++ b/.changeset/quick-jars-wait.md @@ -2,7 +2,7 @@ '@backstage/plugin-proxy-backend': patch --- -If one of the configured proxies is configured badly enough to cause an exception when the middleware is being built it can now be configured to pass the bad proxy by and continue the server startup. Previously the backend would fail to startup. +Adds a new option `skipInvalidTargets` for the proxy `createRouter` which allows the proxy backend to be started with an invalid proxy configuration. If configured, it will simply skip the failed proxy and mount the other valid proxies. To configure it to pass by failing proxies: @@ -11,7 +11,7 @@ const router = await createRouter({ config, logger, discovery, - skipBrokenProxies: true, + skipInvalidProxies: true, }); ``` diff --git a/plugins/proxy-backend/src/service/router.test.ts b/plugins/proxy-backend/src/service/router.test.ts index 6b4d6b21a7..3bfcc889f4 100644 --- a/plugins/proxy-backend/src/service/router.test.ts +++ b/plugins/proxy-backend/src/service/router.test.ts @@ -113,7 +113,7 @@ describe('createRouter', () => { config, logger, discovery, - skipBrokenProxies: true, + skipInvalidProxies: true, }); expect((logger.warn as jest.Mock).mock.calls[0][0]).toEqual( 'skipped configuring /test due to Proxy target must be a string', diff --git a/plugins/proxy-backend/src/service/router.ts b/plugins/proxy-backend/src/service/router.ts index 7ea59d74eb..ca2c7870d8 100644 --- a/plugins/proxy-backend/src/service/router.ts +++ b/plugins/proxy-backend/src/service/router.ts @@ -51,7 +51,7 @@ export interface RouterOptions { logger: Logger; config: Config; discovery: PluginEndpointDiscovery; - skipBrokenProxies?: boolean; + skipInvalidProxies?: boolean; } export interface ProxyConfig extends Options { @@ -194,7 +194,7 @@ export async function createRouter( buildMiddleware(pathPrefix, options.logger, route, proxyRouteConfig), ); } catch (e) { - if (options.skipBrokenProxies) { + if (options.skipInvalidProxies) { options.logger.warn(`skipped configuring ${route} due to ${e.message}`); } else { throw e; From fcdf511b7ba68282fa6a427a2df2b6855be00c6c Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Fri, 28 Jan 2022 08:08:43 -0600 Subject: [PATCH 030/473] Added Orphan Clean Up script Signed-off-by: Andre Wanlin --- contrib/scripts/README.md | 3 +++ .../scripts/orphan-clean-up/OrphanCleanUp.ps1 | 22 +++++++++++++++++++ contrib/scripts/orphan-clean-up/README.md | 19 ++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 contrib/scripts/README.md create mode 100644 contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 create mode 100644 contrib/scripts/orphan-clean-up/README.md diff --git a/contrib/scripts/README.md b/contrib/scripts/README.md new file mode 100644 index 0000000000..8ed7e09749 --- /dev/null +++ b/contrib/scripts/README.md @@ -0,0 +1,3 @@ +# Scripts + +Here you will find a variety of script contributions. diff --git a/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 b/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 new file mode 100644 index 0000000000..105dfe7bf8 --- /dev/null +++ b/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 @@ -0,0 +1,22 @@ +<# +.DESCRIPTION +Cleanes up orphaned entities for the provided Backstage URL, defaults to the local backend +#> +param( + [string]$backstageUrl = "http://localhost:7007" +) + +$orphanApiUrl = "$backstageUrl/api/catalog/entities?filter=metadata.annotations.backstage.io/orphan=true" +$orphanDeleteApiUrl = "$backstageUrl/api/catalog/entities/by-uid" + +$orphans = Invoke-RestMethod -Method Get -Uri $orphanApiUrl + +Write-Host "" +Write-Host "Found $($orphans.length) orphaned entities" +Write-Host "" + +foreach($orphan in $orphans){ + Write-Host "Deleting orphan $($orphan.metadata.name) of kind $($orphan.kind)" + + Invoke-RestMethod -Method Delete -Uri "$orphanDeleteApiUrl/$($orphan.metadata.uid)" +} \ No newline at end of file diff --git a/contrib/scripts/orphan-clean-up/README.md b/contrib/scripts/orphan-clean-up/README.md new file mode 100644 index 0000000000..444a020e1c --- /dev/null +++ b/contrib/scripts/orphan-clean-up/README.md @@ -0,0 +1,19 @@ +# Orphan Clean Up + +## Overview + +The Orphan Clean Up script is a basic PowerShell script to delete orphaned entities in the catalog. + +## Requirements + +This script is PowerShell based so therefore needs to be ran in a PowerShell session. If you are not able to use PowerShell the script should give you a clear idea as to how to create it with another scripting language like Bash. + +## Usage + +Here's how to use the script: + +1. Download the script +2. Now start a PowerShell session +3. Next navigate to the location you downloaded the script +4. Then run this command replacing `https:\\backstage.my-company.com` with the URL of your Backstage instance: `.\OrphanCleanUp.ps1 https:\\backstage.my-company.com` +5. The script will output the number of orphaned entities it finds and then the name for each one it deletes From 60e5db75b476584c18b92dcc681f0f2a41aeca30 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 28 Jan 2022 15:10:36 +0100 Subject: [PATCH 031/473] changesets: enter prerelease Signed-off-by: Patrik Oldsberg --- .changeset/pre.json | 127 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 0000000000..f9db6af257 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,127 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "example-app": "0.2.62", + "@backstage/app-defaults": "0.1.5", + "example-backend": "0.2.62", + "@backstage/backend-common": "0.10.5", + "@backstage/backend-tasks": "0.1.4", + "@backstage/backend-test-utils": "0.1.15", + "@backstage/catalog-client": "0.5.5", + "@backstage/catalog-model": "0.9.10", + "@backstage/cli": "0.13.0", + "@backstage/cli-common": "0.1.6", + "@backstage/codemods": "0.1.31", + "@backstage/config": "0.1.13", + "@backstage/config-loader": "0.9.3", + "@backstage/core-app-api": "0.5.1", + "@backstage/core-components": "0.8.6", + "@backstage/core-plugin-api": "0.6.0", + "@backstage/create-app": "0.4.15", + "@backstage/dev-utils": "0.2.19", + "e2e-test": "0.2.0", + "embedded-techdocs-app": "0.2.61", + "@backstage/errors": "0.2.0", + "@backstage/integration": "0.7.2", + "@backstage/integration-react": "0.1.19", + "@backstage/search-common": "0.2.2", + "@techdocs/cli": "0.8.11", + "@backstage/techdocs-common": "0.11.5", + "@backstage/test-utils": "0.2.3", + "@backstage/theme": "0.2.14", + "@backstage/types": "0.1.1", + "@backstage/version-bridge": "0.1.1", + "@backstage/plugin-airbrake": "0.1.1", + "@backstage/plugin-allure": "0.1.12", + "@backstage/plugin-analytics-module-ga": "0.1.7", + "@backstage/plugin-apache-airflow": "0.1.4", + "@backstage/plugin-api-docs": "0.7.0", + "@backstage/plugin-app-backend": "0.3.22", + "@backstage/plugin-auth-backend": "0.8.0", + "@backstage/plugin-azure-devops": "0.1.12", + "@backstage/plugin-azure-devops-backend": "0.3.1", + "@backstage/plugin-azure-devops-common": "0.2.0", + "@backstage/plugin-badges": "0.2.20", + "@backstage/plugin-badges-backend": "0.1.16", + "@backstage/plugin-bazaar": "0.1.11", + "@backstage/plugin-bazaar-backend": "0.1.7", + "@backstage/plugin-bitrise": "0.1.23", + "@backstage/plugin-catalog": "0.7.10", + "@backstage/plugin-catalog-backend": "0.21.1", + "@backstage/plugin-catalog-backend-module-ldap": "0.3.10", + "@backstage/plugin-catalog-backend-module-msgraph": "0.2.13", + "@backstage/plugin-catalog-common": "0.1.1", + "@backstage/plugin-catalog-graph": "0.2.8", + "@backstage/plugin-catalog-graphql": "0.3.1", + "@backstage/plugin-catalog-import": "0.7.10", + "@backstage/plugin-catalog-react": "0.6.12", + "@backstage/plugin-circleci": "0.2.35", + "@backstage/plugin-cloudbuild": "0.2.33", + "@backstage/plugin-code-coverage": "0.1.23", + "@backstage/plugin-code-coverage-backend": "0.1.20", + "@backstage/plugin-config-schema": "0.1.19", + "@backstage/plugin-cost-insights": "0.11.18", + "@backstage/plugin-explore": "0.3.27", + "@backstage/plugin-explore-react": "0.0.11", + "@backstage/plugin-firehydrant": "0.1.13", + "@backstage/plugin-fossa": "0.2.28", + "@backstage/plugin-gcp-projects": "0.3.15", + "@backstage/plugin-git-release-manager": "0.3.9", + "@backstage/plugin-github-actions": "0.4.33", + "@backstage/plugin-github-deployments": "0.1.27", + "@backstage/plugin-gitops-profiles": "0.3.14", + "@backstage/plugin-gocd": "0.1.2", + "@backstage/plugin-graphiql": "0.2.28", + "@backstage/plugin-graphql-backend": "0.1.12", + "@backstage/plugin-home": "0.4.12", + "@backstage/plugin-ilert": "0.1.22", + "@backstage/plugin-jenkins": "0.5.18", + "@backstage/plugin-jenkins-backend": "0.1.11", + "@backstage/plugin-kafka": "0.2.26", + "@backstage/plugin-kafka-backend": "0.2.15", + "@backstage/plugin-kubernetes": "0.5.5", + "@backstage/plugin-kubernetes-backend": "0.4.5", + "@backstage/plugin-kubernetes-common": "0.2.2", + "@backstage/plugin-lighthouse": "0.2.35", + "@backstage/plugin-newrelic": "0.3.14", + "@backstage/plugin-newrelic-dashboard": "0.1.4", + "@backstage/plugin-org": "0.4.0", + "@backstage/plugin-pagerduty": "0.3.23", + "@backstage/plugin-permission-backend": "0.4.1", + "@backstage/plugin-permission-common": "0.4.0", + "@backstage/plugin-permission-node": "0.4.1", + "@backstage/plugin-permission-react": "0.3.0", + "@backstage/plugin-proxy-backend": "0.2.16", + "@backstage/plugin-rollbar": "0.3.24", + "@backstage/plugin-rollbar-backend": "0.1.19", + "@backstage/plugin-scaffolder": "0.12.0", + "@backstage/plugin-scaffolder-backend": "0.15.22", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "0.1.9", + "@backstage/plugin-scaffolder-backend-module-rails": "0.2.4", + "@backstage/plugin-scaffolder-backend-module-yeoman": "0.1.3", + "@backstage/plugin-scaffolder-common": "0.1.3", + "@backstage/plugin-search": "0.6.0", + "@backstage/plugin-search-backend": "0.4.0", + "@backstage/plugin-search-backend-module-elasticsearch": "0.0.8", + "@backstage/plugin-search-backend-module-pg": "0.2.4", + "@backstage/plugin-search-backend-node": "0.4.5", + "@backstage/plugin-sentry": "0.3.34", + "@backstage/plugin-shortcuts": "0.1.20", + "@backstage/plugin-sonarqube": "0.2.14", + "@backstage/plugin-splunk-on-call": "0.3.20", + "@backstage/plugin-tech-insights": "0.1.6", + "@backstage/plugin-tech-insights-backend": "0.2.2", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "0.1.6", + "@backstage/plugin-tech-insights-common": "0.2.1", + "@backstage/plugin-tech-insights-node": "0.2.0", + "@backstage/plugin-tech-radar": "0.5.3", + "@backstage/plugin-techdocs": "0.13.1", + "@backstage/plugin-techdocs-backend": "0.13.1", + "@backstage/plugin-todo": "0.1.20", + "@backstage/plugin-todo-backend": "0.1.19", + "@backstage/plugin-user-settings": "0.3.17", + "@backstage/plugin-xcmetrics": "0.2.16" + }, + "changesets": [] +} From e7586f3c83de784f53aa1f8f0f8ac40c3cf6b0c5 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Fri, 28 Jan 2022 08:14:57 -0600 Subject: [PATCH 032/473] Added newline to end of script Signed-off-by: Andre Wanlin --- contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 b/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 index 105dfe7bf8..1eaaa2ab2c 100644 --- a/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 +++ b/contrib/scripts/orphan-clean-up/OrphanCleanUp.ps1 @@ -19,4 +19,4 @@ foreach($orphan in $orphans){ Write-Host "Deleting orphan $($orphan.metadata.name) of kind $($orphan.kind)" Invoke-RestMethod -Method Delete -Uri "$orphanDeleteApiUrl/$($orphan.metadata.uid)" -} \ No newline at end of file +} From 2687029a67a4045cba290116db41760c774bfc75 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 28 Jan 2022 14:18:35 +0000 Subject: [PATCH 033/473] create-app: add changeset for comment update Signed-off-by: MT Lewis --- .changeset/neat-mangos-study.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/neat-mangos-study.md diff --git a/.changeset/neat-mangos-study.md b/.changeset/neat-mangos-study.md new file mode 100644 index 0000000000..7daefcadac --- /dev/null +++ b/.changeset/neat-mangos-study.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Update backend-to-backend auth link in configuration file comment From 24ef62048cf0925e00b21e1bf324eb6aeadddf93 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 28 Jan 2022 15:31:01 +0100 Subject: [PATCH 034/473] create-app: add missing catalog-graph route Signed-off-by: Johan Haals --- .changeset/purple-steaks-design.md | 18 ++++++++++++++++++ .../default-app/packages/app/src/App.tsx | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 .changeset/purple-steaks-design.md diff --git a/.changeset/purple-steaks-design.md b/.changeset/purple-steaks-design.md new file mode 100644 index 0000000000..4857c39c73 --- /dev/null +++ b/.changeset/purple-steaks-design.md @@ -0,0 +1,18 @@ +--- +'@backstage/create-app': patch +--- + +Adds missing `/catalog-graph` route to ``. + +To fix this problem for a recently created app please update your `app/src/App.tsx` + +```diff ++ import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; + + ... omitted ... + + + } /> ++ } /> + +``` diff --git a/packages/create-app/templates/default-app/packages/app/src/App.tsx b/packages/create-app/templates/default-app/packages/app/src/App.tsx index 78949b0755..5a379b5c8f 100644 --- a/packages/create-app/templates/default-app/packages/app/src/App.tsx +++ b/packages/create-app/templates/default-app/packages/app/src/App.tsx @@ -29,6 +29,7 @@ import { Root } from './components/Root'; import { AlertDisplay, OAuthRequestDialog } from '@backstage/core-components'; import { createApp } from '@backstage/app-defaults'; import { FlatRoutes } from '@backstage/core-app-api'; +import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; const app = createApp({ apis, @@ -80,6 +81,7 @@ const routes = ( {searchPage} } /> + } /> ); From f27f5197e2511864817c168d08fbf7ab82751714 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 28 Jan 2022 16:49:05 +0100 Subject: [PATCH 035/473] create-app: apply changeset for hot release Co-authored-by: Patrik Oldsberg Signed-off-by: blam --- .changeset/early-cooks-brake.md | 18 ++++++++++++++++++ .changeset/patched.json | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .changeset/early-cooks-brake.md diff --git a/.changeset/early-cooks-brake.md b/.changeset/early-cooks-brake.md new file mode 100644 index 0000000000..3a657223b2 --- /dev/null +++ b/.changeset/early-cooks-brake.md @@ -0,0 +1,18 @@ +--- +'@backstage/create-app': patch +--- + +Adds missing `/catalog-graph` route to ``. + +To fix this problem for a recently created app please update your `app/src/App.tsx` + +```diff ++ import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; + ... omitted ... + + } /> ++ } /> + +``` + +This fix also exists in version `0.4.16`, which is part of the `v0.65.1` release of Backstage. diff --git a/.changeset/patched.json b/.changeset/patched.json index 1029c8f106..f2a4688500 100644 --- a/.changeset/patched.json +++ b/.changeset/patched.json @@ -1,3 +1,5 @@ { - "currentReleaseVersion": {} + "currentReleaseVersion": { + "@backstage/create-app": "0.4.16" + } } From f0e9f82d0cf3dbed4be728b9ff4229f6a4b114a1 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 28 Jan 2022 16:55:52 +0100 Subject: [PATCH 036/473] create-app: copying the changelog from 0.4.16 release Co-authored-by: Patrik Oldsberg Signed-off-by: blam --- .changeset/early-cooks-brake.md | 15 +-------------- packages/create-app/CHANGELOG.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.changeset/early-cooks-brake.md b/.changeset/early-cooks-brake.md index 3a657223b2..3037d71ff4 100644 --- a/.changeset/early-cooks-brake.md +++ b/.changeset/early-cooks-brake.md @@ -2,17 +2,4 @@ '@backstage/create-app': patch --- -Adds missing `/catalog-graph` route to ``. - -To fix this problem for a recently created app please update your `app/src/App.tsx` - -```diff -+ import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; - ... omitted ... - - } /> -+ } /> - -``` - -This fix also exists in version `0.4.16`, which is part of the `v0.65.1` release of Backstage. +Apply the fix from `0.4.16`, which is part of the `v0.65.1` release of Backstage. diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 3c426293af..6200003dc4 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/create-app +## 0.4.16 + +### Patch Changes + +- c945cd9f7e: Adds missing `/catalog-graph` route to ``. + + To fix this problem for a recently created app please update your `app/src/App.tsx` + + ```diff + + import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; + + ... omitted ... + + + } /> + + } /> + + ``` + ## 0.4.15 ### Patch Changes From 7fdd46113542285e895227cb24f9d38bf0ac2ef3 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 28 Jan 2022 23:43:12 +0100 Subject: [PATCH 037/473] docs,workflows: updates and new branch name for emergency release flow Signed-off-by: Patrik Oldsberg --- .github/workflows/deploy_packages.yml | 2 +- docs/publishing.md | 59 +++++++++++++-------------- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index c21b7b7106..a1b5ab34a9 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -3,7 +3,7 @@ name: Deploy Packages on: workflow_dispatch: push: - branches: [master, release-*-patch] + branches: [master, patch/*] jobs: build: diff --git a/docs/publishing.md b/docs/publishing.md index ed83bddbbc..2951f7d30b 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -19,61 +19,60 @@ PR is merged. This is typically done every Thursday around noon CET. maintainers.** For this example we will be using the `@backstage/plugin-foo` package as an -example and assume that it is currently version `1.5.0` in the master branch. +example and assume that it is currently version `6.5.0` in the master branch. -In the event of a severe bug being introduced in version `1.5.0` of the -`@backstage/plugin-foo` released in the `2048-01-01` release, the following -process is used to release an emergency fix as `1.5.1`: +In the event of a severe bug being introduced in version `6.5.0` of the +`@backstage/plugin-foo` released in the `v1.18.0` Backstage release, the following +process is used to release an emergency fix as version `6.5.1` in the patch release `v1.18.1`: - [ ] Identify the release or releases that need to be patched. We should always - patch the most recent main-line release if needed, which in this example - would be `2048-01-01`. The fix may also need backporting to older major + patch the most recent major or minor main-line release if needed, which in this example + would be `v1.18.0`. The fix may also need backporting to older major versions, in which case we will want to patch the main-line release just before the one that bumped the package to each new major version. - [ ] Repeat the following steps for each release that needs to be patched: - [ ] Make sure a patch branch exists for the release that is being patched. If a patch already exists, reuse the existing branch. The branch **must - always** be named exactly `release--patch`. + always** be named exactly `patch/`. ```bash - git checkout release-2048-01-01 - git checkout -b release-2048-01-01-patch - git push --set-upstream origin release-2048-01-01-patch + git checkout v1.18.0 + git checkout -b patch/v1.18.0 + git push --set-upstream origin patch/v1.18.0 ``` - - [ ] With the `release-2048-01-01-patch` branch as a base, create a new + - [ ] With the `patch/v1.18.0` branch as a base, create a new branch for your fix. This branch can be named anything, but the following naming pattern may be suitable: ```bash - git checkout -b ${USER}/release-2048-01-01-emergency-fix + git checkout -b ${USER}/plugin-foo-v1.18.0-fix ``` - - [ ] Create a single commit that applies fixes and creates a new patch - changeset for the affected package. - - [ ] Run `yarn release` in the root of the repo in order to convert your - changeset into package version bumps and changelog entries. Commit these - changes as a second `"Generated release"` commit. - - [ ] Create PR towards the base branch (`release-2048-01-01-patch`) - containing the two commits. - - [ ] Review/Merge the PR into `release-2048-01-01-patch`. This will - automatically trigger a release. + - [ ] Create a single commit that applies fix, nothing else. + - [ ] Create a changeset for the affected package(s), then run `yarn release` in the root + of the repo in order to convert your changeset into package version bumps and changelog entries. + Commit these changes as a second `"Generated release"` commit. + - [ ] Create PR towards the base branch (`patch/v1.18.0`) containing the two commits. + - [ ] Review/Merge the PR into `patch/v1.18.0`. This will automatically trigger a release. -- [ ] Once fixes have been created for each release, the fix should be applied - to the master branch as well. Create a PR that contains the following: +- [ ] Look up the new version of our package in the patch PR as well as the new release + version, these can be found in the package `package.json` and the root `package.json`, and + will in this case be `6.5.1` and `v1.18.1`. You will need these versions later. +- [ ] Make sure you have the latest versions of the patch branch fetched, after merging the PR: `git fetch`. +- [ ] Once fixes have been created for each release, the fix should be applied to the + master branch as well. Create a PR that contains the following: - - [ ] The fix. - - [ ] A changeset with the message "Apply fix from the x.y.z patch release", - in this case `1.5.1`. You can find the version in your patch PR for the - most recent release. - - [ ] An entry in `.changeset/patched.json` that sets the current release to - that same version: + - [ ] The fix, which you can likely cherry-pick from your patch branch: `git cherry-pick origin/patch/v1.18.0^` + - [ ] An updated `CHANGELOG.md` of all patched patches from the tip of the patch branch, which you can get using `git checkout origin/patch/v1.18.0 -- plugins/foo/CHANGELOG.md`. + - [ ] A changeset with the message "Applied the fix from version `6.5.1` of this package, which is part of the `v1.18.1` release of Backstage.", + - [ ] An entry in `.changeset/patched.json` that sets the current release version to `6.5.1`: ```json { "currentReleaseVersion": { - "@backstage/plugin-foo": "1.5.1" + "@backstage/plugin-foo": "6.5.1" } } ``` From 5321d7b553bf6996378d273523e4d4d52cef85a9 Mon Sep 17 00:00:00 2001 From: Elizabeth Stranack Date: Fri, 28 Jan 2022 14:53:34 -0800 Subject: [PATCH 038/473] Updating api-report Signed-off-by: Elizabeth Stranack --- packages/core-components/api-report.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 3743c1d16d..4770e645f9 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -928,7 +928,6 @@ export const SidebarDivider: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1036,6 +1035,7 @@ export const SidebarDivider: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1290,7 +1290,6 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1398,6 +1397,7 @@ export const SidebarScrollWrapper: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1565,7 +1565,6 @@ export const SidebarSpace: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1673,6 +1672,7 @@ export const SidebarSpace: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' @@ -1839,7 +1839,6 @@ export const SidebarSpacer: React_2.ComponentType< | 'contentEditable' | 'inputMode' | 'tabIndex' - | 'onError' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -1947,6 +1946,7 @@ export const SidebarSpacer: React_2.ComponentType< | 'onInvalidCapture' | 'onLoad' | 'onLoadCapture' + | 'onError' | 'onErrorCapture' | 'onKeyDown' | 'onKeyDownCapture' From 1b954933affc28b802c27fcdfed79183550930c6 Mon Sep 17 00:00:00 2001 From: Crevil Date: Sun, 30 Jan 2022 12:45:22 +0100 Subject: [PATCH 039/473] Update changelog to be a patch Signed-off-by: Crevil --- .changeset/grumpy-teachers-remain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/grumpy-teachers-remain.md b/.changeset/grumpy-teachers-remain.md index e1d29a7edd..60653b084f 100644 --- a/.changeset/grumpy-teachers-remain.md +++ b/.changeset/grumpy-teachers-remain.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-scaffolder-backend': minor +'@backstage/plugin-scaffolder-backend': patch --- Migrate from deprecated package @octokit/rest to octokit From b40a0ccc4dc4a795acd13a33ace0c113f4b6f3fa Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 16 Jan 2022 18:34:40 +0100 Subject: [PATCH 040/473] Initial identity-awareness implementation for GA. Signed-off-by: Eric Peterson --- .changeset/analytics-station-eleven.md | 6 + .github/styles/vocab.txt | 1 + plugins/analytics-module-ga/README.md | 74 +++++- plugins/analytics-module-ga/api-report.md | 12 +- plugins/analytics-module-ga/config.d.ts | 19 ++ plugins/analytics-module-ga/package.json | 1 + .../AnalyticsApi/GoogleAnalytics.test.ts | 238 ++++++++++++++++-- .../AnalyticsApi/GoogleAnalytics.ts | 108 +++++++- plugins/analytics-module-ga/src/index.ts | 2 +- plugins/analytics-module-ga/src/plugin.ts | 3 + plugins/analytics-module-ga/src/setupTests.ts | 17 ++ .../src/util/DeferredCapture.ts | 140 +++++++++++ plugins/analytics-module-ga/src/util/index.ts | 17 ++ 13 files changed, 602 insertions(+), 36 deletions(-) create mode 100644 .changeset/analytics-station-eleven.md create mode 100644 plugins/analytics-module-ga/src/util/DeferredCapture.ts create mode 100644 plugins/analytics-module-ga/src/util/index.ts diff --git a/.changeset/analytics-station-eleven.md b/.changeset/analytics-station-eleven.md new file mode 100644 index 0000000000..e1a2366cbe --- /dev/null +++ b/.changeset/analytics-station-eleven.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-analytics-module-ga': patch +--- + +Added the ability to capture and set user IDs from Backstage's `identityApi`. For full instructions on how to +set this up, see [the User ID section of its README](https://github.com/backstage/backstage/tree/master/plugins/analytics-module-ga#user-ids) diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index 49c85e7e1c..3abe840368 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -223,6 +223,7 @@ productional Protobuf proxying Proxying +pseudonymized pubsub pygments pymdownx diff --git a/plugins/analytics-module-ga/README.md b/plugins/analytics-module-ga/README.md index a0c4fe517a..1a4bf13aad 100644 --- a/plugins/analytics-module-ga/README.md +++ b/plugins/analytics-module-ga/README.md @@ -14,15 +14,22 @@ This plugin contains no other functionality. ```tsx // packages/app/src/apis.ts -import { analyticsApiRef, configApiRef } from '@backstage/core-plugin-api'; +import { + analyticsApiRef, + configApiRef, + identityApiRef, +} from '@backstage/core-plugin-api'; import { GoogleAnalytics } from '@backstage/plugin-analytics-module-ga'; export const apis: AnyApiFactory[] = [ // Instantiate and register the GA Analytics API Implementation. createApiFactory({ api: analyticsApiRef, - deps: { configApi: configApiRef }, - factory: ({ configApi }) => GoogleAnalytics.fromConfig(configApi), + deps: { configApi: configApiRef, identityApi: identityApiRef }, + factory: ({ configApi, identityApi }) => + GoogleAnalytics.fromConfig(configApi, { + identityApi, + }), }), ]; ``` @@ -92,6 +99,66 @@ app: key: someEventContextAttr ``` +### User IDs + +This plugin supports accurately deriving user-oriented metrics (like monthly +active users) using Google Analytics' [user ID views][ga-user-id-view]. To +enable this... + +1. Be sure you've gone through the process of setting up a user ID view in your + Backstage instance's Google Analytics property (see docs linked above). +2. Make sure you instantiate `GoogleAnalytics` with an `identityApi` instance + passed to it, as shown in the installation section above. +3. Set `app.analytics.ga.identity` to either `required` or `optional` in your + `app.config.yaml`, like this: + + ```yaml + app: + analytics: + ga: + trackingId: UA-0000000-0 + identity: optional + ``` + + Set `identity` to `optional` if you need accurate session counts, including + cases where users do not sign in at all. Use `required` if you need all hits + to be associated with a user ID without exception (and don't mind if some + sessions are not captured, such as those where no sign in occur). + +Note that, to comply with GA policies, the value of the User ID is +pseudonymized before being sent to GA. By default, it is a `sha256` hash of the +current user's `userEntityRef` as returned by the `identityApi`. To set a +different value, provide a custom implementation of the `identityApi` that +resolves a `userEntityRef` of the form `PrivateUser:namespace/YOUR-VALUE`. For +example: + +```typescript +export const apis: AnyApiFactory[] = [ + createApiFactory({ + api: analyticsApiRef, + deps: { config: configApiRef, identityApi: identityApiRef }, + factory: ({ identityApi, config }) => { + return new PseudononymizedIdentity(identityApi); + }, + }), +]; + +class PseudononymizedIdentity implements IdentityApi { + constructor(private actualApi: IdentityApi) {} + async getBackstageIdentity(): Promise { + const { email = 'someone' } = await this.actualApi.getProfileInfo(); + const hashedEmail = customHashingFunction(email); + + return { + type: 'user', + userEntityRef: `PrivateUser:default/${hashedEmail}`, + ownershipEntityRefs: [], + }; + } + // ... +} +``` + ### Debugging and Testing In pre-production environments, you may wish to set additional configurations @@ -147,3 +214,4 @@ app: [what-is-a-custom-dimension]: https://support.google.com/analytics/answer/2709828 [configure-custom-dimension]: https://support.google.com/analytics/answer/2709828#configuration +[ga-user-id-view]: https://support.google.com/analytics/answer/3123669 diff --git a/plugins/analytics-module-ga/api-report.md b/plugins/analytics-module-ga/api-report.md index b0f3b736c3..a396083444 100644 --- a/plugins/analytics-module-ga/api-report.md +++ b/plugins/analytics-module-ga/api-report.md @@ -7,18 +7,20 @@ import { AnalyticsApi } from '@backstage/core-plugin-api'; import { AnalyticsEvent } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Config } from '@backstage/config'; +import { IdentityApi } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "analyticsModuleGA" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const analyticsModuleGA: BackstagePlugin<{}, {}>; -// Warning: (ae-missing-release-tag) "GoogleAnalytics" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class GoogleAnalytics implements AnalyticsApi { captureEvent(event: AnalyticsEvent): void; - static fromConfig(config: Config): GoogleAnalytics; + static fromConfig( + config: Config, + options?: { + identityApi?: IdentityApi; + }, + ): GoogleAnalytics; } // (No @packageDocumentation comment for this package) diff --git a/plugins/analytics-module-ga/config.d.ts b/plugins/analytics-module-ga/config.d.ts index ac534daae8..b91f5812c1 100644 --- a/plugins/analytics-module-ga/config.d.ts +++ b/plugins/analytics-module-ga/config.d.ts @@ -34,6 +34,25 @@ export interface Config { */ scriptSrc?: string; + /** + * Controls how the identityApi is used when sending data to GA: + * + * - `disabled`: (Default) Explicitly prevents a user's identity from + * being used when capturing events in GA. + * - `optional`: Pageviews and hits are forwarded to GA as they happen + * and only include user identity metadata once known. Guarantees + * that hits are captured for all sessions, even if no sign in + * occurs, but may result in dropped hits in User ID views. + * - `required`: All pageviews and hits are deferred until an identity + * is known. Guarantees that all data sent to GA correlates to a user + * identity, but prevents GA from receiving events for sessions in + * which a user does not sign in. An `identityApi` instance must be + * passed during instantiation when set to this value. + * + * @visibility frontend + */ + identity?: 'disabled' | 'optional' | 'required'; + /** * Whether or not to log analytics debug statements to the console. * Defaults to false. diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 255a0cae8e..264c46410f 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -21,6 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { + "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/core-components": "^0.8.6", "@backstage/core-plugin-api": "^0.6.0", diff --git a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts index cbcf95cb55..57a4d4f4c4 100644 --- a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts +++ b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts @@ -15,10 +15,17 @@ */ import { ConfigReader } from '@backstage/config'; +import { IdentityApi } from '@backstage/core-plugin-api'; import ReactGA from 'react-ga'; import { GoogleAnalytics } from './GoogleAnalytics'; describe('GoogleAnalytics', () => { + const context = { + extension: 'App', + pluginId: 'some-plugin', + routeRef: 'unknown', + releaseNum: 1337, + }; const trackingId = 'UA-000000-0'; const basicValidConfig = new ConfigReader({ app: { analytics: { ga: { trackingId, testMode: true } } }, @@ -50,12 +57,6 @@ describe('GoogleAnalytics', () => { }); describe('integration', () => { - const context = { - extension: 'App', - pluginId: 'some-plugin', - routeRef: 'unknown', - releaseNum: 1337, - }; const advancedConfig = new ConfigReader({ app: { analytics: { @@ -141,20 +142,13 @@ describe('GoogleAnalytics', () => { context, }); - // Expect a set command first. - const [setCommand, setData] = ReactGA.testModeAPI.calls[1]; - expect(setCommand).toBe('set'); - expect(setData).toMatchObject({ - dimension1: context.pluginId, - metric1: context.releaseNum, - }); - - // Followed by a send command. - const [sendCommand, sendData] = ReactGA.testModeAPI.calls[2]; - expect(sendCommand).toBe('send'); - expect(sendData).toMatchObject({ + const [command, data] = ReactGA.testModeAPI.calls[1]; + expect(command).toBe('send'); + expect(data).toMatchObject({ hitType: 'pageview', page: '/a-page', + dimension1: context.pluginId, + metric1: context.releaseNum, }); }); @@ -208,4 +202,212 @@ describe('GoogleAnalytics', () => { }); }); }); + + describe('identityApi', () => { + const identityApi = { + getBackstageIdentity: jest.fn().mockResolvedValue({ + userEntityRef: 'User:default/someone', + }), + } as unknown as IdentityApi; + + it('does not set userId unless explicitly configured', async () => { + // Instantiate with identityApi and default configs. + const api = GoogleAnalytics.fromConfig(basicValidConfig, { identityApi }); + api.captureEvent({ + action: 'navigate', + subject: '/', + context, + }); + + // Wait for any/all promises involved to settle. + await new Promise(resolve => setImmediate(resolve)); + + // A pageview should have been fired immediately. + const [command, data] = ReactGA.testModeAPI.calls[1]; + expect(command).toBe('send'); + expect(data).toMatchObject({ + hitType: 'pageview', + page: '/', + }); + + // There should not have been a UserID set. + expect(ReactGA.testModeAPI.calls).toHaveLength(2); + }); + + it('sets hashed userId when identityApi is provided', async () => { + // Instantiate with identityApi and identity set to optional + const optionalConfig = new ConfigReader({ + app: { + analytics: { + ga: { trackingId, testMode: true, identity: 'optional' }, + }, + }, + }); + const api = GoogleAnalytics.fromConfig(optionalConfig, { identityApi }); + api.captureEvent({ + action: 'navigate', + subject: '/', + context, + }); + + // Wait for any/all promises involved to settle. + await new Promise(resolve => setImmediate(resolve)); + + // A pageview should have been fired immediately. + const [command, data] = ReactGA.testModeAPI.calls[1]; + expect(command).toBe('send'); + expect(data).toMatchObject({ + hitType: 'pageview', + page: '/', + }); + + // User ID should have been set after the pageview. + const [setCommand, setData] = ReactGA.testModeAPI.calls[2]; + expect(setCommand).toBe('set'); + expect(setData).toMatchObject({ + // String indicating userEntityRef went through expected hashing. + userId: '557365723a64656661756c742f736f6d656f6e65', + }); + }); + + it('sets pre-hashed userId when PrivateUser entity ref is provided', async () => { + (identityApi.getBackstageIdentity as jest.Mock).mockResolvedValueOnce({ + userEntityRef: 'PrivateUser:hashed/s0m3hash3dvalu3', + }); + const optionalConfig = new ConfigReader({ + app: { + analytics: { + ga: { trackingId, testMode: true, identity: 'optional' }, + }, + }, + }); + const api = GoogleAnalytics.fromConfig(optionalConfig, { identityApi }); + api.captureEvent({ + action: 'navigate', + subject: '/', + context, + }); + + // Wait for any/all promises involved to settle. + await new Promise(resolve => setImmediate(resolve)); + + // User ID should have been set after the pageview. + const [setCommand, setData] = ReactGA.testModeAPI.calls[2]; + expect(setCommand).toBe('set'); + expect(setData).toMatchObject({ + userId: 's0m3hash3dvalu3', + }); + }); + + it('does not set userId when identityApi is provided and ga.identity is explicitly disabled', async () => { + // Instantiate with identityApi and identity explicitly disabled. + const disabledConfig = new ConfigReader({ + app: { + analytics: { + ga: { trackingId, testMode: true, identity: 'disabled' }, + }, + }, + }); + const api = GoogleAnalytics.fromConfig(disabledConfig, { identityApi }); + api.captureEvent({ + action: 'navigate', + subject: '/', + context, + }); + + // Wait for any/all promises involved to settle. + await new Promise(resolve => setImmediate(resolve)); + + // A pageview should have been fired immediately. + const [command, data] = ReactGA.testModeAPI.calls[1]; + expect(command).toBe('send'); + expect(data).toMatchObject({ + hitType: 'pageview', + page: '/', + }); + + // There should not have been a UserID set. + expect(ReactGA.testModeAPI.calls).toHaveLength(2); + }); + + it('throws error when ga.identity is required but no identityApi is provided', async () => { + // Instantiate without identityApi and identity explicitly disabled. + const requiredConfig = new ConfigReader({ + app: { + analytics: { + ga: { trackingId, testMode: true, identity: 'required' }, + }, + }, + }); + + expect(() => GoogleAnalytics.fromConfig(requiredConfig)).toThrow(); + }); + + it('defers event capture when ga.identity is required', async () => { + // Instantiate with identityApi and identity explicitly required. + const requiredConfig = new ConfigReader({ + app: { + analytics: { + ga: { trackingId, testMode: true, identity: 'required' }, + }, + }, + }); + const api = GoogleAnalytics.fromConfig(requiredConfig, { identityApi }); + + // Fire a pageview and an event. + api.captureEvent({ + action: 'navigate', + subject: '/', + context, + }); + api.captureEvent({ + action: 'test', + subject: 'some label', + context, + }); + + // Wait for any/all promises involved to settle. + await new Promise(resolve => setImmediate(resolve)); + + // User ID should have been set first. + const [setCommand, setData] = ReactGA.testModeAPI.calls[1]; + expect(setCommand).toBe('set'); + expect(setData).toMatchObject({ + // String indicating userEntityRef went through expected hashing. + userId: '557365723a64656661756c742f736f6d656f6e65', + }); + + // Then a pageview should have been fired with a queue time. + const [pageCommand, pageData] = ReactGA.testModeAPI.calls[2]; + expect(pageCommand).toBe('send'); + expect(pageData).toMatchObject({ + hitType: 'pageview', + page: '/', + queueTime: expect.any(Number), + }); + + // Then an event should have been fired with a queue time. + const [eventCommand, eventData] = ReactGA.testModeAPI.calls[3]; + expect(eventCommand).toBe('send'); + expect(eventData).toMatchObject({ + hitType: 'event', + queueTime: expect.any(Number), + }); + + // And subsequent hits should not have a queue time. + api.captureEvent({ + action: 'navigate', + subject: '/page-2', + context, + }); + + const [lastCommand, lastData] = ReactGA.testModeAPI.calls[4]; + expect(lastCommand).toBe('send'); + expect(lastData).toMatchObject({ + hitType: 'pageview', + page: '/page-2', + }); + expect(lastData.queueTime).toBeUndefined(); + }); + }); }); diff --git a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts index 28202607be..6e5a12df4a 100644 --- a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts +++ b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts @@ -15,13 +15,16 @@ */ import ReactGA from 'react-ga'; +import { parseEntityRef } from '@backstage/catalog-model'; import { AnalyticsApi, AnalyticsContextValue, AnalyticsEventAttributes, AnalyticsEvent, + IdentityApi, } from '@backstage/core-plugin-api'; import { Config } from '@backstage/config'; +import { DeferredCapture } from '../../../util'; type CustomDimensionOrMetricConfig = { type: 'dimension' | 'metric'; @@ -32,21 +35,33 @@ type CustomDimensionOrMetricConfig = { /** * Google Analytics API provider for the Backstage Analytics API. + * @public */ export class GoogleAnalytics implements AnalyticsApi { private readonly cdmConfig: CustomDimensionOrMetricConfig[]; + private readonly capture: DeferredCapture; /** * Instantiate the implementation and initialize ReactGA. */ private constructor(options: { + identityApi?: IdentityApi; cdmConfig: CustomDimensionOrMetricConfig[]; + identity: string; trackingId: string; scriptSrc?: string; testMode: boolean; debug: boolean; }) { - const { cdmConfig, trackingId, scriptSrc, testMode, debug } = options; + const { + cdmConfig, + identity, + trackingId, + identityApi, + scriptSrc, + testMode, + debug, + } = options; this.cdmConfig = cdmConfig; @@ -57,15 +72,28 @@ export class GoogleAnalytics implements AnalyticsApi { gaAddress: scriptSrc, titleCase: false, }); + + // If identity is required, defer event capture until identity is known. + this.capture = new DeferredCapture({ defer: identity === 'required' }); + + // Capture user only when explicitly enabled and provided. + if (identity !== 'disabled' && identityApi) { + this.setUserFrom(identityApi); + } } /** * Instantiate a fully configured GA Analytics API implementation. */ - static fromConfig(config: Config) { + static fromConfig( + config: Config, + options: { identityApi?: IdentityApi } = {}, + ) { // Get all necessary configuration. const trackingId = config.getString('app.analytics.ga.trackingId'); const scriptSrc = config.getOptionalString('app.analytics.ga.scriptSrc'); + const identity = + config.getOptionalString('app.analytics.ga.identity') || 'disabled'; const debug = config.getOptionalBoolean('app.analytics.ga.debug') ?? false; const testMode = config.getOptionalBoolean('app.analytics.ga.testMode') ?? false; @@ -83,8 +111,16 @@ export class GoogleAnalytics implements AnalyticsApi { }; }) ?? []; + if (identity === 'required' && !options.identityApi) { + throw new Error( + 'Invalid config: identity API must be provided to deps when ga.identity is required', + ); + } + // Return an implementation instance. return new GoogleAnalytics({ + ...options, + identity, trackingId, scriptSrc, cdmConfig, @@ -103,16 +139,11 @@ export class GoogleAnalytics implements AnalyticsApi { const customMetadata = this.getCustomDimensionMetrics(context, attributes); if (action === 'navigate' && context.extension === 'App') { - // Set any/all custom dimensions. - if (Object.keys(customMetadata).length) { - ReactGA.set(customMetadata); - } - - ReactGA.pageview(subject); + this.capture.pageview(subject, customMetadata); return; } - ReactGA.event({ + this.capture.event({ category: context.extension || 'App', action, label: subject, @@ -151,4 +182,63 @@ export class GoogleAnalytics implements AnalyticsApi { return customDimensionsMetrics; } + + /** + * Sets the GA userId, based on the `userEntityRef` set on the backstage + * identity loaded from a given Backstage Identity API instance. Because + * Google forbids sending any PII (including on the userId field), we hash + * the entire `userEntityRef` on behalf of integrators: + * + * - With value `User:default/name`, userId becomes `sha256(User:default/name)` + * + * If an integrator wishes to use an alternative hashing mechanism or an + * entirely different value, they may do so by passing a dummy Identity API + * implementation which returns a `userEntityRef` whose kind is the literal + * string `PrivateUser`, whose namespace is anything (it will be ignored) and + * whose name is the pre-hashed ID value. + * + * - With value `PrivateUser:default/a0n3b4n3`, userId becomes `a0n3b4n3` + * - With `PrivateUser:xyz/a0n3b4n3`, userId is `a0n3b4n3` + * + * Note: this feature requires that an integrator has set up a Google + * Analytics User ID view in the property used to track Backstage. + */ + private async setUserFrom(identityApi: IdentityApi) { + const { userEntityRef } = await identityApi.getBackstageIdentity(); + + // Prevent PII from being passed to Google Analytics. + const userId = await this.getPrivateUserId(userEntityRef); + + // Set the user ID. + ReactGA.set({ userId }); + + // Notify the deferred capture mechanism that it may proceed. + this.capture.setReady(); + } + + /** + * Returns a PII-free user ID for use in Google Analytics. + */ + private getPrivateUserId(userEntityRef: string): Promise { + const entity = parseEntityRef(userEntityRef); + + // Mechanism allowing integrators to provide their own hashed values. + if (entity.kind === 'PrivateUser') { + return Promise.resolve(entity.name); + } + + return this.hash(userEntityRef); + } + + /** + * Simple hash function; relies on web cryptography + the sha-256 algorithm. + */ + private async hash(value: string): Promise { + const digest = await crypto.subtle.digest( + 'sha-256', + new TextEncoder().encode(value), + ); + const hashArray = Array.from(new Uint8Array(digest)); + return hashArray.map(b => b.toString(16).padStart(2, '0')).join(''); + } } diff --git a/plugins/analytics-module-ga/src/index.ts b/plugins/analytics-module-ga/src/index.ts index 17a3213c6d..fca8d91658 100644 --- a/plugins/analytics-module-ga/src/index.ts +++ b/plugins/analytics-module-ga/src/index.ts @@ -15,4 +15,4 @@ */ export { analyticsModuleGA } from './plugin'; -export { GoogleAnalytics } from './apis/implementations/AnalyticsApi'; +export * from './apis/implementations/AnalyticsApi'; diff --git a/plugins/analytics-module-ga/src/plugin.ts b/plugins/analytics-module-ga/src/plugin.ts index d63ae6616f..d2b15f370e 100644 --- a/plugins/analytics-module-ga/src/plugin.ts +++ b/plugins/analytics-module-ga/src/plugin.ts @@ -15,6 +15,9 @@ */ import { createPlugin } from '@backstage/core-plugin-api'; +/** + * @public + */ export const analyticsModuleGA = createPlugin({ id: 'analytics-provider-ga', }); diff --git a/plugins/analytics-module-ga/src/setupTests.ts b/plugins/analytics-module-ga/src/setupTests.ts index fc6dbd98f8..4ed20ac097 100644 --- a/plugins/analytics-module-ga/src/setupTests.ts +++ b/plugins/analytics-module-ga/src/setupTests.ts @@ -15,3 +15,20 @@ */ import '@testing-library/jest-dom'; import 'cross-fetch/polyfill'; + +// eslint-disable-next-line no-restricted-imports +import { TextEncoder } from 'util'; + +// Mock browser crypto.subtle.digest method for sha-256 hashing. +Object.defineProperty(global.self, 'crypto', { + value: { + subtle: { + digest: (_algo: string, data: Uint8Array): ArrayBuffer => data.buffer, + }, + }, +}); + +// Also used in browser-based APIs for hashing. +Object.defineProperty(global.self, 'TextEncoder', { + value: TextEncoder, +}); diff --git a/plugins/analytics-module-ga/src/util/DeferredCapture.ts b/plugins/analytics-module-ga/src/util/DeferredCapture.ts new file mode 100644 index 0000000000..35269ce898 --- /dev/null +++ b/plugins/analytics-module-ga/src/util/DeferredCapture.ts @@ -0,0 +1,140 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import ReactGA from 'react-ga'; + +type Hit = { + timestamp: number; + data: { + hitType: 'pageview' | 'event'; + [x: string]: any; + }; +}; + +/** + * A wrapper around ReactGA that can optionally handle latent capture logic. + * + * - When defer is `false`, event data is sent directly to GA. + * - When defer is `true`, event data is queued (with a timestamp), so that it + * can be sent to GA once externally indicated to be ready. This relies on + * the `qt` or `queueTime` parameter of the Measurement Protocol. + * + * @see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#qt + */ +export class DeferredCapture { + /** + * Queue of deferred hits to be processed when ready. + */ + private queue: Hit[] = []; + + /** + * Marker indicating when it's okay to revert to synchronous capture. + */ + private doneDeferring = false; + + /** + * Whether or not deferred capture is desired. + */ + private defer: boolean; + + /** + * Holds a reference to the internal promise's resolver. When called, it will + * begin processing hits in the queue. + */ + private isReady: () => void = () => {}; + + constructor({ defer = false }: { defer: boolean }) { + this.defer = defer; + + // Set up a readiness promise that, when resolved from the outside, goes + // through all queued hits and sends them. + new Promise(resolve => { + this.isReady = resolve; + }).then(() => { + this.queue.forEach(this.sendDeferred); + }); + } + + /** + * Indicates that deferred capture may now proceed. + */ + setReady() { + if (!this.doneDeferring) { + this.isReady(); + this.doneDeferring = true; + } + } + + /** + * Either forwards the pageview directly to GA, or (if configured) enqueues + * the pageview hit to be captured when ready. + */ + pageview(path: string, metadata: ReactGA.FieldsObject = {}) { + if (this.shouldDefer()) { + this.queue.push({ + timestamp: Date.now(), + data: { + hitType: 'pageview', + page: path, + ...metadata, + }, + }); + return; + } + + ReactGA.send({ + hitType: 'pageview', + page: path, + ...metadata, + }); + } + + /** + * Either forwards the event directly to GA, or (if configured) enqueues the + * event hit to be captured when ready. + */ + event(eventDetails: ReactGA.EventArgs) { + if (this.shouldDefer()) { + this.queue.push({ + timestamp: Date.now(), + data: { + ...eventDetails, + hitType: 'event', + }, + }); + return; + } + + ReactGA.event(eventDetails); + } + + /** + * Only defer if configured and if we are still not ready. + */ + private shouldDefer() { + return this.defer && !this.doneDeferring; + } + + /** + * Sends a given hit to GA, decorated with the correct queue time. + */ + private sendDeferred(hit: Hit) { + // Send the hit with the appropriate queue time (`qt`). + ReactGA.send({ + ...hit.data, + queueTime: Date.now() - hit.timestamp, + }); + } +} diff --git a/plugins/analytics-module-ga/src/util/index.ts b/plugins/analytics-module-ga/src/util/index.ts new file mode 100644 index 0000000000..3b7a90c808 --- /dev/null +++ b/plugins/analytics-module-ga/src/util/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { DeferredCapture } from './DeferredCapture'; From 35d1d675b57b624fa51e5b04a82161b747059db5 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Tue, 25 Jan 2022 18:15:50 +0100 Subject: [PATCH 041/473] Document convention for supporting user identity in Analytics. Signed-off-by: Eric Peterson --- docs/plugins/analytics.md | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/docs/plugins/analytics.md b/docs/plugins/analytics.md index 8a58677af6..d5fd02a46d 100644 --- a/docs/plugins/analytics.md +++ b/docs/plugins/analytics.md @@ -141,6 +141,63 @@ By convention, such packages should be named `@backstage/analytics-module-[name]`, and any configuration should be keyed under `app.analytics.[name]`. +### Handling User Identity + +If the analytics platform you are integrating with has a first-class concept of +user identity, you can (optionally) choose to support this by the following this +convention: + +- Allow your implementation to be instantiated with the `identityApi` as one of + its options in a `fromConfig` static method. +- Use the `userEntityRef` resolved by `identityApi`'s `getBackstageIdentity()` + method as the basis for the user ID you send to your analytics platform. + +For example: + +```typescript +import { + AnalyticsApi, + analyticsApiRef, + AnyApiFactory, + configApiRef, + createApiFactory, + identityApiRef, + IdentityApi, +} from '@backstage/core-plugin-api'; + +// Implementation that optionally initializes with a userId. +class AcmeAnalytics implements AnalyticsApi { + private constructor(accountId: number, identityApi?: IdentityApi) { + if (identityApi) { + identityApi.getBackstageIdentity().then(identity => { + AcmeAnalytics.init(accountId, { + userId: identity.userEntityRef, + }); + }); + } else { + AcmeAnalytics.init(accountId); + } + } + + static fromConfig(config, options) { + const accountId = config.getString('app.analytics.acme.id'); + return new AcmeAnalytics(accountId, options.identityApi); + } +} + +// Your implementation should be instantiated like this: +export const apis: AnyApiFactory[] = [ + createApiFactory({ + api: analyticsApiRef, + deps: { configApi: configApiRef, identityApi: identityApiRef }, + factory: ({ configApi, identityApi }) => + AcmeAnalytics.fromConfig(configApi, { + identityApi, + }), + }), +]; +``` + ## Capturing Events To instrument an event in a component, start by retrieving an analytics tracker From 919a77845d4fcda70b3f3b84458e9f15dbb712a7 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 30 Jan 2022 18:51:18 +0100 Subject: [PATCH 042/473] Less magical custom hash mechanism. Signed-off-by: Eric Peterson --- plugins/analytics-module-ga/README.md | 41 +++++++++---------- plugins/analytics-module-ga/api-report.md | 3 ++ plugins/analytics-module-ga/package.json | 1 - .../AnalyticsApi/GoogleAnalytics.test.ts | 12 +++--- .../AnalyticsApi/GoogleAnalytics.ts | 23 +++++++---- 5 files changed, 45 insertions(+), 35 deletions(-) diff --git a/plugins/analytics-module-ga/README.md b/plugins/analytics-module-ga/README.md index 1a4bf13aad..92cfd7e9ae 100644 --- a/plugins/analytics-module-ga/README.md +++ b/plugins/analytics-module-ga/README.md @@ -128,35 +128,32 @@ enable this... Note that, to comply with GA policies, the value of the User ID is pseudonymized before being sent to GA. By default, it is a `sha256` hash of the current user's `userEntityRef` as returned by the `identityApi`. To set a -different value, provide a custom implementation of the `identityApi` that -resolves a `userEntityRef` of the form `PrivateUser:namespace/YOUR-VALUE`. For -example: +different value, provide a `userIdTransform` function alongside `identityApi` +when you instantiate `GoogleAnalytics`. This function will be passed the +`userEntityRef` as an argument and should resolve to the value you wish to set +as the user ID. For example: ```typescript +import { + analyticsApiRef, + configApiRef, + identityApiRef, +} from '@backstage/core-plugin-api'; +import { GoogleAnalytics } from '@backstage/plugin-analytics-module-ga'; + export const apis: AnyApiFactory[] = [ createApiFactory({ api: analyticsApiRef, - deps: { config: configApiRef, identityApi: identityApiRef }, - factory: ({ identityApi, config }) => { - return new PseudononymizedIdentity(identityApi); - }, + deps: { configApi: configApiRef, identityApi: identityApiRef }, + factory: ({ configApi, identityApi }) => + GoogleAnalytics.fromConfig(configApi, { + identityApi, + userIdTransform: async (userEntityRef: string): Promise => { + return customHashingFunction(userEntityRef); + }, + }), }), ]; - -class PseudononymizedIdentity implements IdentityApi { - constructor(private actualApi: IdentityApi) {} - async getBackstageIdentity(): Promise { - const { email = 'someone' } = await this.actualApi.getProfileInfo(); - const hashedEmail = customHashingFunction(email); - - return { - type: 'user', - userEntityRef: `PrivateUser:default/${hashedEmail}`, - ownershipEntityRefs: [], - }; - } - // ... -} ``` ### Debugging and Testing diff --git a/plugins/analytics-module-ga/api-report.md b/plugins/analytics-module-ga/api-report.md index a396083444..45bb84a421 100644 --- a/plugins/analytics-module-ga/api-report.md +++ b/plugins/analytics-module-ga/api-report.md @@ -19,6 +19,9 @@ export class GoogleAnalytics implements AnalyticsApi { config: Config, options?: { identityApi?: IdentityApi; + userIdTransform?: + | 'sha-256' + | ((userEntityRef: string) => Promise); }, ): GoogleAnalytics; } diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 264c46410f..255a0cae8e 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -21,7 +21,6 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/core-components": "^0.8.6", "@backstage/core-plugin-api": "^0.6.0", diff --git a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts index 57a4d4f4c4..a4f7195fec 100644 --- a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts +++ b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.test.ts @@ -270,10 +270,8 @@ describe('GoogleAnalytics', () => { }); }); - it('sets pre-hashed userId when PrivateUser entity ref is provided', async () => { - (identityApi.getBackstageIdentity as jest.Mock).mockResolvedValueOnce({ - userEntityRef: 'PrivateUser:hashed/s0m3hash3dvalu3', - }); + it('set custom-hashed userId when userIdTransform is provided', async () => { + const userIdTransform = jest.fn().mockResolvedValue('s0m3hash3dvalu3'); const optionalConfig = new ConfigReader({ app: { analytics: { @@ -281,7 +279,10 @@ describe('GoogleAnalytics', () => { }, }, }); - const api = GoogleAnalytics.fromConfig(optionalConfig, { identityApi }); + const api = GoogleAnalytics.fromConfig(optionalConfig, { + identityApi, + userIdTransform, + }); api.captureEvent({ action: 'navigate', subject: '/', @@ -297,6 +298,7 @@ describe('GoogleAnalytics', () => { expect(setData).toMatchObject({ userId: 's0m3hash3dvalu3', }); + expect(userIdTransform).toHaveBeenCalledWith('User:default/someone'); }); it('does not set userId when identityApi is provided and ga.identity is explicitly disabled', async () => { diff --git a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts index 6e5a12df4a..bdbdaebee7 100644 --- a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts +++ b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts @@ -15,7 +15,6 @@ */ import ReactGA from 'react-ga'; -import { parseEntityRef } from '@backstage/catalog-model'; import { AnalyticsApi, AnalyticsContextValue, @@ -39,6 +38,7 @@ type CustomDimensionOrMetricConfig = { */ export class GoogleAnalytics implements AnalyticsApi { private readonly cdmConfig: CustomDimensionOrMetricConfig[]; + private customUserIdTransform?: (userEntityRef: string) => Promise; private readonly capture: DeferredCapture; /** @@ -46,6 +46,7 @@ export class GoogleAnalytics implements AnalyticsApi { */ private constructor(options: { identityApi?: IdentityApi; + userIdTransform?: 'sha-256' | ((userEntityRef: string) => Promise); cdmConfig: CustomDimensionOrMetricConfig[]; identity: string; trackingId: string; @@ -58,6 +59,7 @@ export class GoogleAnalytics implements AnalyticsApi { identity, trackingId, identityApi, + userIdTransform = 'sha-256', scriptSrc, testMode, debug, @@ -76,6 +78,10 @@ export class GoogleAnalytics implements AnalyticsApi { // If identity is required, defer event capture until identity is known. this.capture = new DeferredCapture({ defer: identity === 'required' }); + // Allow custom userId transformation. + this.customUserIdTransform = + typeof userIdTransform === 'function' ? userIdTransform : undefined; + // Capture user only when explicitly enabled and provided. if (identity !== 'disabled' && identityApi) { this.setUserFrom(identityApi); @@ -87,7 +93,12 @@ export class GoogleAnalytics implements AnalyticsApi { */ static fromConfig( config: Config, - options: { identityApi?: IdentityApi } = {}, + options: { + identityApi?: IdentityApi; + userIdTransform?: + | 'sha-256' + | ((userEntityRef: string) => Promise); + } = {}, ) { // Get all necessary configuration. const trackingId = config.getString('app.analytics.ga.trackingId'); @@ -220,11 +231,9 @@ export class GoogleAnalytics implements AnalyticsApi { * Returns a PII-free user ID for use in Google Analytics. */ private getPrivateUserId(userEntityRef: string): Promise { - const entity = parseEntityRef(userEntityRef); - - // Mechanism allowing integrators to provide their own hashed values. - if (entity.kind === 'PrivateUser') { - return Promise.resolve(entity.name); + // Allow integrators to provide their own hashing transformer. + if (this.customUserIdTransform) { + return this.customUserIdTransform(userEntityRef); } return this.hash(userEntityRef); From b4b678eb5af55d33094ba23630c6c63a587d5ab4 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 30 Jan 2022 18:51:36 +0100 Subject: [PATCH 043/473] Simpler queue mechanism in DeferredCapture. Signed-off-by: Eric Peterson --- .../src/util/DeferredCapture.ts | 48 ++++--------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/plugins/analytics-module-ga/src/util/DeferredCapture.ts b/plugins/analytics-module-ga/src/util/DeferredCapture.ts index 35269ce898..38afecd74d 100644 --- a/plugins/analytics-module-ga/src/util/DeferredCapture.ts +++ b/plugins/analytics-module-ga/src/util/DeferredCapture.ts @@ -35,45 +35,22 @@ type Hit = { */ export class DeferredCapture { /** - * Queue of deferred hits to be processed when ready. + * Queue of deferred hits to be processed when ready. When undefined, hits + * can safely be sent without delay. */ - private queue: Hit[] = []; - - /** - * Marker indicating when it's okay to revert to synchronous capture. - */ - private doneDeferring = false; - - /** - * Whether or not deferred capture is desired. - */ - private defer: boolean; - - /** - * Holds a reference to the internal promise's resolver. When called, it will - * begin processing hits in the queue. - */ - private isReady: () => void = () => {}; + private queue: Hit[] | undefined; constructor({ defer = false }: { defer: boolean }) { - this.defer = defer; - - // Set up a readiness promise that, when resolved from the outside, goes - // through all queued hits and sends them. - new Promise(resolve => { - this.isReady = resolve; - }).then(() => { - this.queue.forEach(this.sendDeferred); - }); + this.queue = defer ? [] : undefined; } /** * Indicates that deferred capture may now proceed. */ setReady() { - if (!this.doneDeferring) { - this.isReady(); - this.doneDeferring = true; + if (this.queue) { + this.queue.forEach(this.sendDeferred); + this.queue = undefined; } } @@ -82,7 +59,7 @@ export class DeferredCapture { * the pageview hit to be captured when ready. */ pageview(path: string, metadata: ReactGA.FieldsObject = {}) { - if (this.shouldDefer()) { + if (this.queue) { this.queue.push({ timestamp: Date.now(), data: { @@ -106,7 +83,7 @@ export class DeferredCapture { * event hit to be captured when ready. */ event(eventDetails: ReactGA.EventArgs) { - if (this.shouldDefer()) { + if (this.queue) { this.queue.push({ timestamp: Date.now(), data: { @@ -120,13 +97,6 @@ export class DeferredCapture { ReactGA.event(eventDetails); } - /** - * Only defer if configured and if we are still not ready. - */ - private shouldDefer() { - return this.defer && !this.doneDeferring; - } - /** * Sends a given hit to GA, decorated with the correct queue time. */ From e9ca4ff2bd25c009bbe9b35f5319141b29cab1e2 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 30 Jan 2022 18:58:03 +0100 Subject: [PATCH 044/473] Deprecate useless plugin export. Signed-off-by: Eric Peterson --- plugins/analytics-module-ga/api-report.md | 2 +- plugins/analytics-module-ga/src/plugin.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/analytics-module-ga/api-report.md b/plugins/analytics-module-ga/api-report.md index 45bb84a421..9a359f81e9 100644 --- a/plugins/analytics-module-ga/api-report.md +++ b/plugins/analytics-module-ga/api-report.md @@ -9,7 +9,7 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Config } from '@backstage/config'; import { IdentityApi } from '@backstage/core-plugin-api'; -// @public (undocumented) +// @public @deprecated (undocumented) export const analyticsModuleGA: BackstagePlugin<{}, {}>; // @public diff --git a/plugins/analytics-module-ga/src/plugin.ts b/plugins/analytics-module-ga/src/plugin.ts index d2b15f370e..4eec63aa2e 100644 --- a/plugins/analytics-module-ga/src/plugin.ts +++ b/plugins/analytics-module-ga/src/plugin.ts @@ -16,6 +16,9 @@ import { createPlugin } from '@backstage/core-plugin-api'; /** + * @deprecated Importing and including this plugin in an app has no effect. + * This will be removed in a future release. + * * @public */ export const analyticsModuleGA = createPlugin({ From a65d71c584743a1f3ea580e5b6c5499be442197a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 04:12:33 +0000 Subject: [PATCH 045/473] chore(deps-dev): bump @types/js-yaml from 4.0.1 to 4.0.5 Bumps [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml) from 4.0.1 to 4.0.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-yaml) --- updated-dependencies: - dependency-name: "@types/js-yaml" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index ee92b9f917..a7994313f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5477,12 +5477,7 @@ resolved "https://registry.npmjs.org/@types/js-levenshtein/-/js-levenshtein-1.1.0.tgz#9541eec4ad6e3ec5633270a3a2b55d981edc44a9" integrity sha512-14t0v1ICYRtRVcHASzes0v/O+TIeASb8aD55cWF1PidtInhFWSXcmhzhHqGjUWf9SUq1w70cvd1cWKUULubAfQ== -"@types/js-yaml@^4.0.0": - version "4.0.1" - resolved "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.1.tgz#5544730b65a480b18ace6b6ce914e519cec2d43b" - integrity sha512-xdOvNmXmrZqqPy3kuCQ+fz6wA0xU5pji9cd1nDrflWaAWtYLLGk5ykW0H6yg5TVyehHP1pfmuuSaZkhP+kspVA== - -"@types/js-yaml@^4.0.1": +"@types/js-yaml@^4.0.0", "@types/js-yaml@^4.0.1": version "4.0.5" resolved "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== From 91faf87aaf51bde86ddd266000e028578c32915e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 04:15:54 +0000 Subject: [PATCH 046/473] chore(deps): bump camelcase-keys from 6.2.2 to 7.0.1 Bumps [camelcase-keys](https://github.com/sindresorhus/camelcase-keys) from 6.2.2 to 7.0.1. - [Release notes](https://github.com/sindresorhus/camelcase-keys/releases) - [Commits](https://github.com/sindresorhus/camelcase-keys/compare/v6.2.2...v7.0.1) --- updated-dependencies: - dependency-name: camelcase-keys dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .changeset/dependabot-2f11dff.md | 5 +++++ plugins/rollbar-backend/package.json | 2 +- yarn.lock | 20 +++++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .changeset/dependabot-2f11dff.md diff --git a/.changeset/dependabot-2f11dff.md b/.changeset/dependabot-2f11dff.md new file mode 100644 index 0000000000..f3397cad0c --- /dev/null +++ b/.changeset/dependabot-2f11dff.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-rollbar-backend': patch +--- + +chore(deps): bump `camelcase-keys` from 6.2.2 to 7.0.1 diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index c13d16f63b..eab94b6f84 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -34,7 +34,7 @@ "@backstage/backend-common": "^0.10.5", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", - "camelcase-keys": "^6.2.2", + "camelcase-keys": "^7.0.1", "compression": "^1.7.4", "cors": "^2.8.5", "express": "^4.17.1", diff --git a/yarn.lock b/yarn.lock index ee92b9f917..ba4781b99a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8112,6 +8112,16 @@ camelcase-keys@^6.2.2: map-obj "^4.0.0" quick-lru "^4.0.1" +camelcase-keys@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.1.tgz#5a57e6dfb3f6c7929dad15599ee4476a7e9a3b2d" + integrity sha512-P331lEls98pW8JLyodNWfzuz91BEDVA4VpW2/SwXnyv2K495tq1N777xzDbFgnEigfA7UIY0xa6PwR/H9jijjA== + dependencies: + camelcase "^6.2.0" + map-obj "^4.1.0" + quick-lru "^5.1.1" + type-fest "^1.2.1" + camelcase@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" @@ -16472,10 +16482,10 @@ map-obj@^1.0.0, map-obj@^1.0.1: resolved "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= -map-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" - integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== +map-obj@^4.0.0, map-obj@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== map-stream@~0.1.0: version "0.1.0" @@ -23600,7 +23610,7 @@ type-fest@^0.8.1: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-fest@^1.2.2: +type-fest@^1.2.1, type-fest@^1.2.2: version "1.4.0" resolved "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== From 9a7f28779ab80a13cf3309ee68b7180440546d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Sat, 29 Jan 2022 19:01:28 +0100 Subject: [PATCH 047/473] add catalog API docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/features/software-catalog/api.md | 237 +++++++++++++++++++++++++- 1 file changed, 235 insertions(+), 2 deletions(-) diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index f7c7b19112..74fdd55fca 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -1,7 +1,240 @@ --- id: software-catalog-api title: API -description: Documentation on Software Catalog API +description: The Software Catalog API --- -## TODO +The software catalog backend has a JSON based REST API, which can be leveraged +by external systems. This page describes its shape and features. + +## Overview + +The API surface consists of a few distinct groups of functionality. Each has a +dedicated section below. + +{% note %} + +**Note:** This page only describes some of the most commonly used parts of the +API, and is a work in progress. + +{% endnote %} + +All of the URL paths in this article are assumed to be on top of some base URL +pointing at your catalog installation. For example, if the path given in a +section below is `/entities`, and the catalog is located at +`http://localhost:7007/api/catalog` during local development, the full URL would +be `http://localhost:7007/api/catalog/entities`. The actual URL may vary from +one organization to the other, especially in production, but is commonly your +`backend.baseUrl` in your app config, plus `/catalog` at the end. + +Some or all of the endpoints may accept or require an `Authorization` header +with a `Bearer` token, which should then be the Backstage token returned by the +[`identity API`](https://backstage.io/docs/reference/core-plugin-api.identityapiref). + +## Entities + +These are the endpoints that deal with reading of entities directly. What it +exposes are final entities - i.e. the output of all processing and the stitching +process, not the raw originally ingested entity data. See [The Life of an +Entity](life-of-an-entity.md) for more details about this process and +distinction. + +### `GET /entities` + +Lists entities. Supports the following query parameters, described in sections +below: + +- [`filter`](#filtering), for selecting only a subset of all entities +- [`fields`](#field-selection), for selecting only parts of the full data + structure of each entity +- [`offset`, `limit`, and `after`](#pagination) for pagination + +The return type is JSON, as an array of [`Entity`](descriptor-format.md). + +#### Filtering + +You can pass in one or more filter sets that get matched against each entity. +Each filter set is a number of conditions that all have to match for the +condition to be true (conditions effectively have an AND between them). At least +one filter set has to be true for the entity to be part of the result set +(filter sets effectively have an OR between them). + +Example: + +```text +/entities?filter=kind=user,metadata.namespace=default&filter=kind=group,spec.type + + Return entities that match + + Filter set 1: + Condition 1: kind = user + AND + Condition 2: metadata.namespace = default + + OR + + Filter set 2: + Condition 1: kind = group + AND + Condition 2: spec.type exists +``` + +Each condition is either on the form ``, or on the form `=`. +The first form asserts on the existence of a certain key (with any value), and +the second asserts that the key exists and has a certain value. All checks are +always case _insensitive_. + +In all cases, the key is a simplified JSON path in a given piece of entity data. +Each part of the path is a key of an object, and the traversal also descends +through arrays. There are two special forms: + +- Array items that are simple value types (such as strings) match on a key-value + pair where the key is the item as a string, and the value is the string `true` +- Relations can be matched on a `relations.=` form + +Let's look at a simplified example to illustrate the concept: + +```json +{ + "a": { + "b": ["c", { "d": 1 }], + "e": 7 + } +} +``` + +This would match any one of the following conditions: + +- `a` +- `a.b` +- `a.b.c` +- `a.b.c=true` +- `a.b.d` +- `a.b.d=1` +- `a.e` +- `a.e=7` + +Some more real world usable examples: + +- Return all orphaned entities: + + `/entities?filter=metadata.annotations.backstage.io/orphan=true` + +- Return all users and groups: + + `/entities?filter=kind=user&filter=kind=group` + +- Return all service components: + + `/entities?filter=kind=component,spec.type=service` + +- Return all entities with the `java` tag: + + `/entities?filter=metadata.tags.java` + +- Return all users who are members of the `ops` group (note that the full + [reference](references.md) of the group is used): + + `/entities?filter=kind=user,relations.memberof=group:default/ops` + +#### Field selection + +By default the full entities are returned, but you can pass in a `fields` query +parameter which selects what parts of the entity data to retain. This makes the +response smaller and faster to transfer, and may allow the catalog to perform +more efficient queries. + +The query parameter value is a comma separated list of simplified JSON paths +like above. Each path corresponds to the key of either a value, or of a subtree +root that you want to keep in the output. The rest is pruned away. For example, +specifying `?fields=metadata.name,metadata.annotations,spec` retains only the +`name` and `annotations` fields of the `metadata` of each entity (it'll be an +object with at most two keys), keeps the entire `spec` unchanged, and cuts out +all other roots such as `relations`. + +Some more real world usable examples: + +- Return only enough data to form the full ref of each entity: + + `/entities?fields=kind,metadata.namespace,metadata.name` + +#### Pagination + +You may pass the `offset` and `limit` query parameters to do classical +pagination through the set of entities. There is also an `after` query parameter +to return the next page of results after the previous one when performing cursor +based pagination. + +Each paginated response that has a next page of data, will have a `Link`, +`rel="next"` header pointing to the query path to the next page. + +Example: Getting the first page: + +```text +GET /entities?limit=2 +HTTP/1.1 200 OK +link: ; rel="next" + +[{"metadata":{... +``` + +Getting the next page, since we detect the presence of the `Link` header: + +```text +GET /entities?limit=2&after=eyJsaW1pdCI6Miwib2Zmc2V0IjoyfQ%3D%3D +HTTP/1.1 200 OK +link: ; rel="next" + +[{"metadata":{... +``` + +### `GET /entities/by-uid/` + +Gets an entity by its `metadata.uid` field value. + +The return type is JSON, as a single [`Entity`](descriptor-format.md), or a 404 +error if there was no entity with that UID. + +### `DELETE /entities/by-uid/` + +Deletes an entity by its `metadata.uid` field value. + +{% note %} + +**Note:** This method of deletion is appropriate for orphaned entities, but not +for removal of "live" entities that are actively being updated by a location. +Please read below. + +{% endnote %} + +The most common user flow is that you register a location (see below), and then +the catalog keeps itself up to date with that location and the subtree of things +that may spawn from it. This means that the catalog is a live-updating view of +an actual authoritative data source. If there's something keeping the entity +"alive" in the catalog, it will just reappear shortly after deletion with the +method described in this section. To properly remove entities, you typically +want to instead unregister the location that causes the entity to appear. + +However if you have an orphaned entity, for example after removing the reference +to its file from a `Location` entity, or if a processor has stopped producing +your entity, then this deletion method is appropriate. + +The return type is always an empty 204 response, whether an entity with this UID +existed or not. + +### `GET /entities/by-name///` + +Gets an entity by its `kind`, `metadata.namespace`, and `metadata.name` field +value. These are special in that they form the entity's unique +[reference](references.md) triplet. + +The return type is JSON, as a single [`Entity`](descriptor-format.md), or a 404 +error if there was no entity with that reference triplet. + +## Locations + +TODO + +## Other + +TODO From c710467ba2fa3c95cb322ed51d49506f7443ff26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 31 Jan 2022 10:06:45 +0100 Subject: [PATCH 048/473] fix callouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/features/software-catalog/api.md | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index 74fdd55fca..71e229651a 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -12,12 +12,8 @@ by external systems. This page describes its shape and features. The API surface consists of a few distinct groups of functionality. Each has a dedicated section below. -{% note %} - -**Note:** This page only describes some of the most commonly used parts of the -API, and is a work in progress. - -{% endnote %} +> **Note:** This page only describes some of the most commonly used parts of the +> API, and is a work in progress. All of the URL paths in this article are assumed to be on top of some base URL pointing at your catalog installation. For example, if the path given in a @@ -199,13 +195,9 @@ error if there was no entity with that UID. Deletes an entity by its `metadata.uid` field value. -{% note %} - -**Note:** This method of deletion is appropriate for orphaned entities, but not -for removal of "live" entities that are actively being updated by a location. -Please read below. - -{% endnote %} +> **Note:** This method of deletion is appropriate for orphaned entities, but +> not for removal of "live" entities that are actively being updated by a +> location. Please read below. The most common user flow is that you register a location (see below), and then the catalog keeps itself up to date with that location and the subtree of things From 7f84a4b60606fc535eedf81b7a914df60078bd93 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 31 Jan 2022 10:15:17 +0100 Subject: [PATCH 049/473] storybook: Add [npm|yarn]rc files Signed-off-by: Johan Haals --- storybook/.npmrc | 2 ++ storybook/.yarnrc | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 storybook/.npmrc create mode 100644 storybook/.yarnrc diff --git a/storybook/.npmrc b/storybook/.npmrc new file mode 100644 index 0000000000..c3c66347fd --- /dev/null +++ b/storybook/.npmrc @@ -0,0 +1,2 @@ +registry=https://registry.npmjs.org/ +engine-strict=true diff --git a/storybook/.yarnrc b/storybook/.yarnrc new file mode 100644 index 0000000000..4cdaac2408 --- /dev/null +++ b/storybook/.yarnrc @@ -0,0 +1,9 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +registry "https://registry.npmjs.org/" +disable-self-update-check true +lastUpdateCheck 1580389148099 +yarn-path ".yarn/releases/yarn-1.22.1.js" +network-timeout 300000 From 2bed92aca8290731d7afeeee809944a6b475a778 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 31 Jan 2022 10:33:18 +0100 Subject: [PATCH 050/473] update yarn-path Signed-off-by: Johan Haals --- storybook/.yarnrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storybook/.yarnrc b/storybook/.yarnrc index 4cdaac2408..cc90cdf663 100644 --- a/storybook/.yarnrc +++ b/storybook/.yarnrc @@ -5,5 +5,5 @@ registry "https://registry.npmjs.org/" disable-self-update-check true lastUpdateCheck 1580389148099 -yarn-path ".yarn/releases/yarn-1.22.1.js" +yarn-path "../yarn/releases/yarn-1.22.1.js" network-timeout 300000 From 93b8b48fbb5a74b6f99a1a6ea3e92002db5875ce Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 31 Jan 2022 10:37:15 +0100 Subject: [PATCH 051/473] fix invalid yarn-path Signed-off-by: Johan Haals --- storybook/.yarnrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storybook/.yarnrc b/storybook/.yarnrc index cc90cdf663..2b1d0857dd 100644 --- a/storybook/.yarnrc +++ b/storybook/.yarnrc @@ -5,5 +5,5 @@ registry "https://registry.npmjs.org/" disable-self-update-check true lastUpdateCheck 1580389148099 -yarn-path "../yarn/releases/yarn-1.22.1.js" +yarn-path "../.yarn/releases/yarn-1.22.1.js" network-timeout 300000 From bf1b48596228df3fe0590935ac17b52d80ed31c2 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 31 Jan 2022 10:59:20 +0100 Subject: [PATCH 052/473] update api report Signed-off-by: Johan Haals --- plugins/rollbar-backend/api-report.md | 67 +++++++++++++++++++++------ 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/plugins/rollbar-backend/api-report.md b/plugins/rollbar-backend/api-report.md index 0fa4383564..d51292121f 100644 --- a/plugins/rollbar-backend/api-report.md +++ b/plugins/rollbar-backend/api-report.md @@ -33,13 +33,21 @@ export class RollbarApi { environment: string; item_id?: number; }, - ): Promise; - // Warning: (ae-forgotten-export) The symbol "RollbarProject" needs to be exported by the entry point index.d.ts - // + ): Promise< + { + count: number; + timestamp: number; + }[] + >; // (undocumented) - getAllProjects(): Promise; - // Warning: (ae-forgotten-export) The symbol "RollbarItemCount" needs to be exported by the entry point index.d.ts - // + getAllProjects(): Promise< + { + id: number; + name: string; + status: string; + accountId: number; + }[] + >; // (undocumented) getOccuranceCounts( projectName: string, @@ -47,15 +55,25 @@ export class RollbarApi { environment: string; item_id?: number; }, - ): Promise; + ): Promise< + { + count: number; + timestamp: number; + }[] + >; // (undocumented) - getProject(projectName: string): Promise; - // Warning: (ae-forgotten-export) The symbol "RollbarItemsResponse" needs to be exported by the entry point index.d.ts - // + getProject(projectName: string): Promise<{ + id: number; + name: string; + status: string; + accountId: number; + }>; // (undocumented) - getProjectItems(projectName: string): Promise; - // Warning: (ae-forgotten-export) The symbol "RollbarTopActiveItem" needs to be exported by the entry point index.d.ts - // + getProjectItems(projectName: string): Promise<{ + page: number; + items: RollbarItem[]; + totalCount: number; + }>; // (undocumented) getTopActiveItems( projectName: string, @@ -63,7 +81,23 @@ export class RollbarApi { hours: number; environment: string; }, - ): Promise; + ): Promise< + { + item: { + id: number; + counter: number; + environment: string; + framework: RollbarFrameworkId; + lastOccurrenceTimestamp: number; + level: number; + occurrences: number; + projectId: number; + title: string; + uniqueOccurrences: number; + }; + counts: number[]; + }[] + >; } // Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -77,4 +111,9 @@ export interface RouterOptions { // (undocumented) rollbarApi?: RollbarApi; } + +// Warnings were encountered during analysis: +// +// src/api/RollbarApi.d.ts:21:9 - (ae-forgotten-export) The symbol "RollbarItem" needs to be exported by the entry point index.d.ts +// src/api/RollbarApi.d.ts:32:13 - (ae-forgotten-export) The symbol "RollbarFrameworkId" needs to be exported by the entry point index.d.ts ``` From 991ffe45cda20b0f06cc883c0830cee1aa8968c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 09:59:53 +0000 Subject: [PATCH 053/473] chore(deps-dev): bump @storybook/react in /storybook Bumps [@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/app/react) from 6.4.14 to 6.4.17. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.17/app/react) --- updated-dependencies: - dependency-name: "@storybook/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 397 +++++++++++++++++++++++++++-------------- 2 files changed, 264 insertions(+), 135 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index a58d5df8c2..e714aae653 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -20,7 +20,7 @@ "@storybook/addon-links": "^6.4.14", "@storybook/addon-storysource": "^6.4.14", "@storybook/addons": "^6.4.14", - "@storybook/react": "^6.4.14", + "@storybook/react": "^6.4.17", "storybook-dark-mode": "^1.0.8" }, "peerDependencies": { diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 498d2027ce..738d14ef79 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1394,7 +1394,7 @@ react-syntax-highlighter "^13.5.3" regenerator-runtime "^0.13.7" -"@storybook/addons@6.4.14", "@storybook/addons@^6.4.14": +"@storybook/addons@6.4.14": version "6.4.14" resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.14.tgz#45d6937bc2ece33ceadc5358b2a2298d2a0d1e95" integrity sha512-Snu42ejLyBAh6PWdlrdI72HKN1oKY7q0R9qEID2wk953WrqgGu4URakp14YLxghJCyKTSfGPs6LNZRRI6H5xgA== @@ -1411,6 +1411,23 @@ global "^4.4.0" regenerator-runtime "^0.13.7" +"@storybook/addons@6.4.17", "@storybook/addons@^6.4.14": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.17.tgz#d040db3ddcf72fd9e7df8b8fce2a6dc88578c87e" + integrity sha512-C/hji0Bc7+tssGqaD0JYd/Pz0GM46xbRpdgHSVLInYdhJrb5a9IG6INCbcB8CXeReDKWJCLAaj2+z79Wa96bFQ== + dependencies: + "@storybook/api" "6.4.17" + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" + "@storybook/csf" "0.0.2--canary.87bc651.0" + "@storybook/router" "6.4.17" + "@storybook/theming" "6.4.17" + "@types/webpack-env" "^1.16.0" + core-js "^3.8.2" + global "^4.4.0" + regenerator-runtime "^0.13.7" + "@storybook/api@6.4.14": version "6.4.14" resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.14.tgz#a477646f7e020a362f044d2e614e3d1a86ba8f6f" @@ -1434,10 +1451,33 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/builder-webpack4@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/builder-webpack4/-/builder-webpack4-6.4.14.tgz#77f45d164f5b93776fa154252706c6b73bd0edc5" - integrity sha512-hRzwdNNLxuyb0XPpvbTSkQuqG2frhog2SsjgPVXorsSMPr95owo9Nq9hp+TnywpvaR9lrPlESzhhv2sSR3blTw== +"@storybook/api@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.17.tgz#82c3d756c85a65ecd8a3c3d9ce890e581175003a" + integrity sha512-O0ssHVy40t4QD5CNdNESbJo7uZd86UWYrHCFjgeC2gmxrMgBD+ajO34N4HoQFC/F+/84om2/z8RYAGKu/WpoTA== + dependencies: + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" + "@storybook/csf" "0.0.2--canary.87bc651.0" + "@storybook/router" "6.4.17" + "@storybook/semver" "^7.3.2" + "@storybook/theming" "6.4.17" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + store2 "^2.12.0" + telejson "^5.3.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/builder-webpack4@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/builder-webpack4/-/builder-webpack4-6.4.17.tgz#ad71aaa0a271941e2efe114d5bf7bc8feaa13dcf" + integrity sha512-jE1JehWj5gjLwafGuvV1OyBFVVhBCvv6ESc3QPm+jrsf4ZyB9xliTsnPt3bDggQhWpTEbxgGw7IkVc83ss4AOw== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -1460,22 +1500,22 @@ "@babel/preset-env" "^7.12.11" "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" - "@storybook/addons" "6.4.14" - "@storybook/api" "6.4.14" - "@storybook/channel-postmessage" "6.4.14" - "@storybook/channels" "6.4.14" - "@storybook/client-api" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/components" "6.4.14" - "@storybook/core-common" "6.4.14" - "@storybook/core-events" "6.4.14" - "@storybook/node-logger" "6.4.14" - "@storybook/preview-web" "6.4.14" - "@storybook/router" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/api" "6.4.17" + "@storybook/channel-postmessage" "6.4.17" + "@storybook/channels" "6.4.17" + "@storybook/client-api" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/components" "6.4.17" + "@storybook/core-common" "6.4.17" + "@storybook/core-events" "6.4.17" + "@storybook/node-logger" "6.4.17" + "@storybook/preview-web" "6.4.17" + "@storybook/router" "6.4.17" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.4.14" - "@storybook/theming" "6.4.14" - "@storybook/ui" "6.4.14" + "@storybook/store" "6.4.17" + "@storybook/theming" "6.4.17" + "@storybook/ui" "6.4.17" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" autoprefixer "^9.8.6" @@ -1509,26 +1549,26 @@ webpack-hot-middleware "^2.25.1" webpack-virtual-modules "^0.2.2" -"@storybook/channel-postmessage@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.4.14.tgz#ce719041768ea8c0d64b7edc32ec7c774fba9b19" - integrity sha512-z+fBi/eAAswELWOdlIFI9XXNjyxfguKyqKGSQ7qdz3eFyxeuWnxTa9aZsnLIXpPKY9QPydpBSJcIKUCdN6DbIg== +"@storybook/channel-postmessage@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.4.17.tgz#9f439bee440479bfe8f86092701b3b63afc5195a" + integrity sha512-IaVkO/w7bn95Psm1iROlSsc/DHh9RiA7F151VLFD9VTh55qiIfeRssfBXIg3ueGUWm0K+Y9J1jQbcqJoEniMtw== dependencies: - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" core-js "^3.8.2" global "^4.4.0" qs "^6.10.0" telejson "^5.3.2" -"@storybook/channel-websocket@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/channel-websocket/-/channel-websocket-6.4.14.tgz#d71a4c8a4b36e2e89a4a3c56af3e0aa50353e02f" - integrity sha512-4Y6TDeYLzItGIaYKo3s6xxSmUF11j96dOX7n74ax45zcMhpp/XwG5i0FU1DtGb5PnhPxg+vJmKa1IgizzaWRYg== +"@storybook/channel-websocket@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/channel-websocket/-/channel-websocket-6.4.17.tgz#780cc68bb3a31069196b35a232013764cc2320a3" + integrity sha512-HtApo/3upDvxSl6VU04F/JznMIltUHeyEqaQNlkqJbQ1VQEHky/M/XJZWT4I/b+nGMXCt0+z0P0ikZ6VZKzFsw== dependencies: - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" core-js "^3.8.2" global "^4.4.0" telejson "^5.3.2" @@ -1542,18 +1582,27 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-api@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.4.14.tgz#d2053511971e06d70bba2accfbd1f6c0f2084e2a" - integrity sha512-hqdgE0zKVhcqG/8t/veJRgjsOT076LeKxoA+w2Ga4iU+reIGui/GvLsjvyFFTyOMHVeo2Ze4LW63oTYKF/I5iQ== +"@storybook/channels@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.4.17.tgz#95d05745a96b6059cea26d45aacca3967c401e26" + integrity sha512-C6ON1olkkHc+FaDerkwL1yYGDL1xtFP+eMlm42ZaO06sIT9qv9EkJZ3GU/PNLTeXYMX4OsZl9kjz2whD4rN7gg== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/channel-postmessage" "6.4.14" - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" + core-js "^3.8.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/client-api@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.4.17.tgz#34476732eb4a698e7dcc774a21feca4529581889" + integrity sha512-qK8Bvsr2KzndAu8RxbBrieNUCltO/ynwtAohJ/29hAg/duf94CZjN0HkuTpQmd4lDip11d9o4Fz5UBWC0zMyOw== + dependencies: + "@storybook/addons" "6.4.17" + "@storybook/channel-postmessage" "6.4.17" + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/store" "6.4.14" + "@storybook/store" "6.4.17" "@types/qs" "^6.9.5" "@types/webpack-env" "^1.16.0" core-js "^3.8.2" @@ -1576,6 +1625,14 @@ core-js "^3.8.2" global "^4.4.0" +"@storybook/client-logger@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.4.17.tgz#50652859592c489b671f010455b8ce85d21a1b3d" + integrity sha512-awKBTOWHXHBxAIl8a/Zy/BitIw49A+0RnhPGuf8aFAw2Ym/vKR4bI8lRHVPtlR6RIHFp5rC1g32HmCQfKE22Fw== + dependencies: + core-js "^3.8.2" + global "^4.4.0" + "@storybook/components@6.4.14": version "6.4.14" resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.14.tgz#546b34fe3feb09e670b76ff71d889bf5f566f1e4" @@ -1606,21 +1663,51 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/core-client@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/core-client/-/core-client-6.4.14.tgz#8f5dc6fe2295e479225bd396404a43679a15637e" - integrity sha512-e9pzKz52DVhmo8+sUEDvagwGKVqWZ6NQBIt3mBvd79/zXTPkFRnSVitOyYErqhgN1kuwocTg+2BigRr3H0qXaQ== +"@storybook/components@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.17.tgz#5be383682d9538c35c96463723cb17740f105fb6" + integrity sha512-R6imELCWlHWQiprYMeeXLKgUQK4m698G/jvkc1xUxAThpTxwgROTcpw5qnJA0k+wltjGn4t6MBWKHhheGZc6Hg== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/channel-postmessage" "6.4.14" - "@storybook/channel-websocket" "6.4.14" - "@storybook/client-api" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" + "@popperjs/core" "^2.6.0" + "@storybook/client-logger" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/preview-web" "6.4.14" - "@storybook/store" "6.4.14" - "@storybook/ui" "6.4.14" + "@storybook/theming" "6.4.17" + "@types/color-convert" "^2.0.0" + "@types/overlayscrollbars" "^1.12.0" + "@types/react-syntax-highlighter" "11.0.5" + color-convert "^2.0.1" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + markdown-to-jsx "^7.1.3" + memoizerific "^1.11.3" + overlayscrollbars "^1.13.1" + polished "^4.0.5" + prop-types "^15.7.2" + react-colorful "^5.1.2" + react-popper-tooltip "^3.1.1" + react-syntax-highlighter "^13.5.3" + react-textarea-autosize "^8.3.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/core-client@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/core-client/-/core-client-6.4.17.tgz#baff9629a0723f9485d608c00357d45921a78a0d" + integrity sha512-uXO+DW5XI6fWLtQIBIBlBFeYGsy2qZEe3lxxXwBHwIjsDq53/1CmhEPuzC3jAsy5ddeKC2yEEHUdy3d3wkusIQ== + dependencies: + "@storybook/addons" "6.4.17" + "@storybook/channel-postmessage" "6.4.17" + "@storybook/channel-websocket" "6.4.17" + "@storybook/client-api" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" + "@storybook/csf" "0.0.2--canary.87bc651.0" + "@storybook/preview-web" "6.4.17" + "@storybook/store" "6.4.17" + "@storybook/ui" "6.4.17" airbnb-js-shims "^2.2.1" ansi-to-html "^0.6.11" core-js "^3.8.2" @@ -1632,10 +1719,10 @@ unfetch "^4.2.0" util-deprecate "^1.0.2" -"@storybook/core-common@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/core-common/-/core-common-6.4.14.tgz#137b935855f0cc785ec55b386312747949e30e99" - integrity sha512-7NRmtcY2INmobsmUUX4afO78RHpyQMO8vboy6H8HRtfcw6fy4zaHoCb7gZZfvvn8gtBWNmwip8I9XK5BpRrh3Q== +"@storybook/core-common@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/core-common/-/core-common-6.4.17.tgz#bd2b14cfd1473f5f31f40c747afb62ea4a4ada6e" + integrity sha512-aOSG5Yvd8eoZsjvVlk7sS8iRXWT/dleHoHPXtKmHJnGcIZ1dcgr4wZqoOvL8dGhNNoU4Wx9dkJepqHD0+E/UgA== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -1658,7 +1745,7 @@ "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" "@babel/register" "^7.12.1" - "@storybook/node-logger" "6.4.14" + "@storybook/node-logger" "6.4.17" "@storybook/semver" "^7.3.2" "@types/node" "^14.0.10" "@types/pretty-hrtime" "^1.0.0" @@ -1694,22 +1781,29 @@ dependencies: core-js "^3.8.2" -"@storybook/core-server@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/core-server/-/core-server-6.4.14.tgz#0bef36e1203eb56e1c9bbf7f02122500c8f7d534" - integrity sha512-SzO8SaLTZ36Q4PNhJD4XJjlnonbR2Os0gzTknDBbwyIRPUtFUdk6isSG14RM5yYWPM0QQIs9og5ztSPX58YZlw== +"@storybook/core-events@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.4.17.tgz#ad70c883673a2060f1c7c4aa8f5926fc14119f4a" + integrity sha512-k6wNjQLZZ8A/rt4gLz0M4ebTORKYYz2B9hZ3LvPJftNVqv+bTFAV4KVks6bBlvbJWpJ+eCPEyfeSP9Np2QIFMQ== + dependencies: + core-js "^3.8.2" + +"@storybook/core-server@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/core-server/-/core-server-6.4.17.tgz#16f31635565c19248a45a793a7c2150597f3a4cc" + integrity sha512-wXYF4VD2EJ/6uFK+wAo/TgUyfD/lfMzzbAw2gBZAjYp7y7Zwj3svGqUfkFuPQG0/E9gmQfEmlyhTPPZImBFeBg== dependencies: "@discoveryjs/json-ext" "^0.5.3" - "@storybook/builder-webpack4" "6.4.14" - "@storybook/core-client" "6.4.14" - "@storybook/core-common" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/builder-webpack4" "6.4.17" + "@storybook/core-client" "6.4.17" + "@storybook/core-common" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/csf-tools" "6.4.14" - "@storybook/manager-webpack4" "6.4.14" - "@storybook/node-logger" "6.4.14" + "@storybook/csf-tools" "6.4.17" + "@storybook/manager-webpack4" "6.4.17" + "@storybook/node-logger" "6.4.17" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.4.14" + "@storybook/store" "6.4.17" "@types/node" "^14.0.10" "@types/node-fetch" "^2.5.7" "@types/pretty-hrtime" "^1.0.0" @@ -1742,18 +1836,18 @@ webpack "4" ws "^8.2.3" -"@storybook/core@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/core/-/core-6.4.14.tgz#c20a1432f22603eb2d3523389ff1311fffbba24f" - integrity sha512-41WNDXKMZuCKnvbLBBYCd1+ip4uJ4AGeCOhmp/KZK7TgkitJ0JrvyRgnbpXR8bAMiOv2Hh9t9Vmi5D3QZ8COlg== +"@storybook/core@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/core/-/core-6.4.17.tgz#61892e2eb484a44fc9d69515c3068b1f64173327" + integrity sha512-wquJcEebw9kXJ7pThcmEsDNK0ykd3ir0uL5tkBzPGNIj7dozpzy24Fo9JSr0rNWHNtE7JczdIAQTcumowLTDig== dependencies: - "@storybook/core-client" "6.4.14" - "@storybook/core-server" "6.4.14" + "@storybook/core-client" "6.4.17" + "@storybook/core-server" "6.4.17" -"@storybook/csf-tools@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/csf-tools/-/csf-tools-6.4.14.tgz#c5112e17f07dae4c7b922aefd45dccbbc9e49803" - integrity sha512-mRFsIhzFA2JBeUqdvl6+WM6HmHXaWGLbCgalzGqX65i1pSvhmC3jHh0OTTypMj9XneWH6/cHQh7LvivYbjJ8Cg== +"@storybook/csf-tools@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/csf-tools/-/csf-tools-6.4.17.tgz#e7d2b9de95317d706657c294d7beee1d7b307ec4" + integrity sha512-GnaO1dX4wTvMKBthbbHLHcrDTXwZ7PooZmT1fTCeokzaobZzyv1cUtF1hlPQa3zA75kRE5AznJ0jmBVhHe0/9Q== dependencies: "@babel/core" "^7.12.10" "@babel/generator" "^7.12.11" @@ -1780,20 +1874,20 @@ dependencies: lodash "^4.17.15" -"@storybook/manager-webpack4@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/manager-webpack4/-/manager-webpack4-6.4.14.tgz#b8ca3a11d0fb18ef6ca3e58e1c36b2eb8226ccbf" - integrity sha512-j565G7vZLBXK60J1hiZhbeZ6K48y8CMMZCcIihqsFv/4jj0kI3Ba4IhCrOkHiqiRM89mRu5/Ga3DnHTBvIYIEA== +"@storybook/manager-webpack4@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/manager-webpack4/-/manager-webpack4-6.4.17.tgz#8fc6d5dba0587446defe78ced67b7033886c4c47" + integrity sha512-ekHudBR8FVSE475YQZZs9sqwou7YqFv03hNVOcvIJ36cZBgMbSkG8q50cK4uru2xCOedTK15SKIoFZQQ77cmQQ== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-template-literals" "^7.12.1" "@babel/preset-react" "^7.12.10" - "@storybook/addons" "6.4.14" - "@storybook/core-client" "6.4.14" - "@storybook/core-common" "6.4.14" - "@storybook/node-logger" "6.4.14" - "@storybook/theming" "6.4.14" - "@storybook/ui" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/core-client" "6.4.17" + "@storybook/core-common" "6.4.17" + "@storybook/node-logger" "6.4.17" + "@storybook/theming" "6.4.17" + "@storybook/ui" "6.4.17" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" babel-loader "^8.0.0" @@ -1822,10 +1916,10 @@ webpack-dev-middleware "^3.7.3" webpack-virtual-modules "^0.2.2" -"@storybook/node-logger@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.4.14.tgz#2e96f4e3e06c78c3d065e59818515209122d9ae4" - integrity sha512-mowC0adx4hLtCqGMQKRfNmiRYAL2PYdk3ojc91qzIKNrjSYnE4U8d9qlw5WLx1PKEnZVji3+QiYfNHpA/8PoKw== +"@storybook/node-logger@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.4.17.tgz#14fe3091b2030413c2f43f0de3e9408b27591d9c" + integrity sha512-gymFKjmOdi9fAJCaM4C8I/5Go4hPsOAcVNixpjAQYsvNQQZ1Yjm2zcSdD+QOuLJ36NTxgOFxT4ESbC2AfSjyqA== dependencies: "@types/npmlog" "^4.1.2" chalk "^4.1.0" @@ -1833,17 +1927,17 @@ npmlog "^5.0.1" pretty-hrtime "^1.0.3" -"@storybook/preview-web@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/preview-web/-/preview-web-6.4.14.tgz#4d7035d5aa0e8c41c9a2ff21c2a3b3cbae9f3688" - integrity sha512-3E++OYz+OCyJBIchkNCJRtxEU7XNDBdIvKRTCx48X+Uv5qoLeCpXiXOSK/42LlraWZkfBs56yHv9VSqJoQ8VwA== +"@storybook/preview-web@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/preview-web/-/preview-web-6.4.17.tgz#d29bbfa8f66428ef5e2202c4c364c1892d8cbf7b" + integrity sha512-fJIE/LO7I09w334AH71ojRpIiHLQrBUidkZlIQbjEmHn/GZBTePlf3CevrERA12FbCLoUbeS5nadk2dEg6YnUw== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/channel-postmessage" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/channel-postmessage" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/store" "6.4.14" + "@storybook/store" "6.4.17" ansi-to-html "^0.6.11" core-js "^3.8.2" global "^4.4.0" @@ -1868,22 +1962,22 @@ react-docgen-typescript "^2.0.0" tslib "^2.0.0" -"@storybook/react@^6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/react/-/react-6.4.14.tgz#7be241ecfa412312681bb54c82327764d70ffb70" - integrity sha512-wlPjE5Xcarc5NTgnHchvGE56EVYioAyRZoYvb/YyiCX1+A8sQkwS2qTTH8e/pdG539A4NMrciMosvjvEPZcEvg== +"@storybook/react@^6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/react/-/react-6.4.17.tgz#c12f22c3365d4213c662bf1e26520e72c68b0c33" + integrity sha512-hAMEyMcWC5fEdzXOYr0S9/QHclXbbJpl7Vl9dd56wxbHx4FFwcJ7R5hroLntPsHXU+rGTF9/EqehmEa/Jd0l4w== dependencies: "@babel/preset-flow" "^7.12.1" "@babel/preset-react" "^7.12.10" "@pmmmwh/react-refresh-webpack-plugin" "^0.5.1" - "@storybook/addons" "6.4.14" - "@storybook/core" "6.4.14" - "@storybook/core-common" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/core" "6.4.17" + "@storybook/core-common" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/node-logger" "6.4.14" + "@storybook/node-logger" "6.4.17" "@storybook/react-docgen-typescript-plugin" "1.0.2-canary.253f8c1.0" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.4.14" + "@storybook/store" "6.4.17" "@types/webpack-env" "^1.16.0" babel-plugin-add-react-displayname "^0.0.5" babel-plugin-named-asset-import "^0.3.1" @@ -1915,6 +2009,23 @@ react-router-dom "^6.0.0" ts-dedent "^2.0.0" +"@storybook/router@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/router/-/router-6.4.17.tgz#d53c4f9a4ccaa21a7bbe8d875a1a81c9dba2a6f2" + integrity sha512-GLhzth83BB2BbUkM/+ld2JITIbDQtzFLs/CnZZQKq6aR93Kou6VK2epHnIwrPyWbP6rsGavR/8L/UWeBdwwTrQ== + dependencies: + "@storybook/client-logger" "6.4.17" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + history "5.0.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + qs "^6.10.0" + react-router "^6.0.0" + react-router-dom "^6.0.0" + ts-dedent "^2.0.0" + "@storybook/semver@^7.3.2": version "7.3.2" resolved "https://registry.npmjs.org/@storybook/semver/-/semver-7.3.2.tgz#f3b9c44a1c9a0b933c04e66d0048fcf2fa10dac0" @@ -1939,14 +2050,14 @@ prettier ">=2.2.1 <=2.3.0" regenerator-runtime "^0.13.7" -"@storybook/store@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/store/-/store-6.4.14.tgz#2ec5601e1c40a27f164b570d4c2b84c57d3a4115" - integrity sha512-D9KoJuNvwb9mEQD60GTPYSbQuXWZQHE8RBxCq7d7Qu46mrhlsNTOwt09lIgmuM3jAVto3FxnXY4U81RwJza7tg== +"@storybook/store@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/store/-/store-6.4.17.tgz#a68b687628b82f8ca0ef2c74f5d65f5a30e94f86" + integrity sha512-0rWk8u7gtzBOp5NvuIrL6abBHaDxax7e+yBPvU9tR0GZ7X0ALhOhJFRIo+lW9sZTUrcuSinOJ8Acyb0ZvnYCkg== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" core-js "^3.8.2" fast-deep-equal "^3.1.3" @@ -1978,21 +2089,39 @@ resolve-from "^5.0.0" ts-dedent "^2.0.0" -"@storybook/ui@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/ui/-/ui-6.4.14.tgz#59f08ac8d8eb782fa13fc9a8dd715222c96bf234" - integrity sha512-nZsd8GXzYwmmTjZUB7pJMh+Q1fST0d2lFkhDHakxLaPLwumibw9NHJ7bRWYHFlAVYpD0c2+POP3FpOW5Bjby1A== +"@storybook/theming@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.4.17.tgz#f0a03d2d3239638ac171e97a8f089ee2656a8287" + integrity sha512-7+U72/VdhoMb00q1URMzdTW3OYHJogro2i2hScgKR+ndL4/dtSmetJ/1z9PuoFxLxHgdLKcwMAV0fZAjEYlhCA== dependencies: "@emotion/core" "^10.1.1" - "@storybook/addons" "6.4.14" - "@storybook/api" "6.4.14" - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/components" "6.4.14" - "@storybook/core-events" "6.4.14" - "@storybook/router" "6.4.14" + "@emotion/is-prop-valid" "^0.8.6" + "@emotion/styled" "^10.0.27" + "@storybook/client-logger" "6.4.17" + core-js "^3.8.2" + deep-object-diff "^1.1.0" + emotion-theming "^10.0.27" + global "^4.4.0" + memoizerific "^1.11.3" + polished "^4.0.5" + resolve-from "^5.0.0" + ts-dedent "^2.0.0" + +"@storybook/ui@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/ui/-/ui-6.4.17.tgz#926aa1dbb4d3f9a28afe6edd6a0e5cb667be8e19" + integrity sha512-vBYV8PmvhYgMjjTRLtOHIisGqr1nfajAgOC+wfYvGLbF0npVEt5PfDieG1LTRc1OaItWLpKKJcByqSfL/y9Qow== + dependencies: + "@emotion/core" "^10.1.1" + "@storybook/addons" "6.4.17" + "@storybook/api" "6.4.17" + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/components" "6.4.17" + "@storybook/core-events" "6.4.17" + "@storybook/router" "6.4.17" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.4.14" + "@storybook/theming" "6.4.17" copy-to-clipboard "^3.3.1" core-js "^3.8.2" core-js-pure "^3.8.2" From 6d71920820835d3391ef6c7fb2afcac606218bfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 11:01:56 +0000 Subject: [PATCH 054/473] chore(deps-dev): bump @storybook/addon-links in /storybook Bumps [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/addons/links) from 6.4.14 to 6.4.17. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.17/addons/links) --- updated-dependencies: - dependency-name: "@storybook/addon-links" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index e714aae653..09191096ca 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@storybook/addon-a11y": "^6.4.14", "@storybook/addon-actions": "^6.4.14", - "@storybook/addon-links": "^6.4.14", + "@storybook/addon-links": "^6.4.17", "@storybook/addon-storysource": "^6.4.14", "@storybook/addons": "^6.4.14", "@storybook/react": "^6.4.17", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 738d14ef79..8c82e953d7 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1356,16 +1356,16 @@ util-deprecate "^1.0.2" uuid-browser "^3.1.0" -"@storybook/addon-links@^6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-6.4.14.tgz#7dedd5502cf1fecdcfc845e59a10769cb32ec175" - integrity sha512-Y+5tdmAdkFzk0OC9wJnHdpVfhq3uqqlrAUFE3QYeof4uL6wLNSr2pl0BzCGQtnTfLs0i0bExXaTP5pZhwSnQoA== +"@storybook/addon-links@^6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-6.4.17.tgz#83675642669c239c8d3ddaacd75348366e280426" + integrity sha512-ytGEe7sfOW10wwc0NIWSGtNgGM8ql8EOg7ZhrgXiRgQE0vD5NXRJi8FWzBdb06/G3cURYwveKR4Ea9mABZEaUw== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/router" "6.4.14" + "@storybook/router" "6.4.17" "@types/qs" "^6.9.5" core-js "^3.8.2" global "^4.4.0" From c810594492bc73eef27fb0f9ec295db9f02d911a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 31 Jan 2022 12:18:13 +0100 Subject: [PATCH 055/473] disable docker in more test runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .github/workflows/deploy_packages.yml | 1 + .github/workflows/verify_e2e-linux.yml | 2 ++ .github/workflows/verify_e2e-techdocs.yml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index a1b5ab34a9..459f48336e 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -123,6 +123,7 @@ jobs: bash <(curl -s https://codecov.io/bash) -f packages/core-components/coverage/* -F core-components bash <(curl -s https://codecov.io/bash) -f packages/core-plugin-api/coverage/* -F core-plugin-api env: + BACKSTAGE_TEST_DISABLE_DOCKER: 1 BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres13.ports[5432] }} BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres9.ports[5432] }} BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING: mysql://root:root@localhost:${{ job.services.mysql8.ports[3306] }}/ignored diff --git a/.github/workflows/verify_e2e-linux.yml b/.github/workflows/verify_e2e-linux.yml index 4098b44406..6694ace02b 100644 --- a/.github/workflows/verify_e2e-linux.yml +++ b/.github/workflows/verify_e2e-linux.yml @@ -78,3 +78,5 @@ jobs: run: | sudo sysctl fs.inotify.max_user_watches=524288 yarn e2e-test run + env: + BACKSTAGE_TEST_DISABLE_DOCKER: 1 diff --git a/.github/workflows/verify_e2e-techdocs.yml b/.github/workflows/verify_e2e-techdocs.yml index 7e9a7e85fa..3806eade25 100644 --- a/.github/workflows/verify_e2e-techdocs.yml +++ b/.github/workflows/verify_e2e-techdocs.yml @@ -44,3 +44,5 @@ jobs: - name: techdocs-cli e2e test working-directory: packages/techdocs-cli run: yarn test:e2e:ci + env: + BACKSTAGE_TEST_DISABLE_DOCKER: 1 From 80b6cf3380c8cfa189b0c2b430f21640972ea283 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 31 Jan 2022 13:01:56 +0100 Subject: [PATCH 056/473] scripts/prepare-release: more main branches Signed-off-by: Patrik Oldsberg --- scripts/prepare-release.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/prepare-release.js b/scripts/prepare-release.js index 7bb3794d9c..bfae8e661c 100755 --- a/scripts/prepare-release.js +++ b/scripts/prepare-release.js @@ -25,6 +25,9 @@ const { promisify } = require('util'); const execFile = promisify(execFileCb); +// All of these are considered to be main-line release branches +const MAIN_BRANCHES = ['master', 'origin/master', 'changeset-release/master']; + const DEPENDENCY_TYPES = [ 'dependencies', 'devDependencies', @@ -147,7 +150,7 @@ async function updateBackstageReleaseVersion() { const { version: currentVersion } = package; let nextVersion; - if (branchName === 'master') { + if (MAIN_BRANCHES.includes(branchName)) { if (preMode === 'pre') { if (semver.prerelease(currentVersion)) { nextVersion = semver.inc(currentVersion, 'pre', preTag); From 0f85999d07a75dc450b9911e6d2b2e1bd2965881 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 12:20:27 +0000 Subject: [PATCH 057/473] chore(deps-dev): bump @storybook/addon-a11y in /storybook Bumps [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/addons/a11y) from 6.4.14 to 6.4.17. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.17/addons/a11y) --- updated-dependencies: - dependency-name: "@storybook/addon-a11y" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 09191096ca..120c5925f1 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -15,7 +15,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@storybook/addon-a11y": "^6.4.14", + "@storybook/addon-a11y": "^6.4.17", "@storybook/addon-actions": "^6.4.14", "@storybook/addon-links": "^6.4.17", "@storybook/addon-storysource": "^6.4.14", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 8c82e953d7..ed9a856160 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1310,19 +1310,19 @@ resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz#830beaec4b4091a9e9398ac50f865ddea52186b9" integrity sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA== -"@storybook/addon-a11y@^6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-6.4.14.tgz#e281551850992ad3b6a693b5b7059344763c984e" - integrity sha512-YehZ4AytPX9kduqZ/HByMluXlftQlKGkALXnM48uXlQlN51ZzjtUzvyvqHyow1g3lg/THFuEGvKEiT/ebThhpg== +"@storybook/addon-a11y@^6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-6.4.17.tgz#b7efe7f7a52c81392e06efafc34044db784fd3ce" + integrity sha512-uIgl9vJwY4//7i+JEu47Lgi1wOGOskHQ0+H/S8DPGcEMF2xqK/w3BjgSEWa8NPYfYyxkf/yHvCIsa99b/3phUg== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/api" "6.4.14" - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/components" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/api" "6.4.17" + "@storybook/channels" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/components" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/theming" "6.4.14" + "@storybook/theming" "6.4.17" axe-core "^4.2.0" core-js "^3.8.2" global "^4.4.0" From 409725e9c2f7152d5ff0c3bb592f0cc4722e552c Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 31 Jan 2022 07:11:45 -0600 Subject: [PATCH 058/473] Updated readme Signed-off-by: Andre Wanlin --- contrib/scripts/orphan-clean-up/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/scripts/orphan-clean-up/README.md b/contrib/scripts/orphan-clean-up/README.md index 444a020e1c..a6a25a4e7d 100644 --- a/contrib/scripts/orphan-clean-up/README.md +++ b/contrib/scripts/orphan-clean-up/README.md @@ -2,7 +2,9 @@ ## Overview -The Orphan Clean Up script is a basic PowerShell script to delete orphaned entities in the catalog. +The Orphan Clean Up script is a basic PowerShell script to delete orphaned entities in the catalog. This script also assumes that you do not have authentication setup for your Backstage API endpoints. + +_Warning:_ There is a risk of entities being orphaned (and being deleted by this script) in case of the location having problems and returning a 404 status code. This might lead to accidental deletion of entities until the processing loop has recreated the entity. ## Requirements From d8ebc62a108aa86a9b0cb01c1e10d4e4ee1f3d48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 13:30:49 +0000 Subject: [PATCH 059/473] chore(deps-dev): bump @storybook/addon-storysource in /storybook Bumps [@storybook/addon-storysource](https://github.com/storybookjs/storybook/tree/HEAD/addons/storysource) from 6.4.14 to 6.4.17. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.17/addons/storysource) --- updated-dependencies: - dependency-name: "@storybook/addon-storysource" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 120c5925f1..02e52fb937 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -18,7 +18,7 @@ "@storybook/addon-a11y": "^6.4.17", "@storybook/addon-actions": "^6.4.14", "@storybook/addon-links": "^6.4.17", - "@storybook/addon-storysource": "^6.4.14", + "@storybook/addon-storysource": "^6.4.17", "@storybook/addons": "^6.4.14", "@storybook/react": "^6.4.17", "storybook-dark-mode": "^1.0.8" diff --git a/storybook/yarn.lock b/storybook/yarn.lock index ed9a856160..5b15ee9adf 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1374,18 +1374,18 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" -"@storybook/addon-storysource@^6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/addon-storysource/-/addon-storysource-6.4.14.tgz#dd5421b79b43671e5921701b66cd69500d750e8f" - integrity sha512-vifb7M9x65dZq2f5wfQoVBRapfROK5oXS6VsV3xpqs308oD8IL0fP0KrIRYwJIpRxjTWf+C75Lyd2teoDD9S1w== +"@storybook/addon-storysource@^6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/addon-storysource/-/addon-storysource-6.4.17.tgz#b5ca9ab8307de18d8885bcb181a4c867991b5dee" + integrity sha512-LBUyk3JXr9qalQazUsYbV50v9S2aI162y8wprpk1hF5YBZp2gL07+59sYww4riHZ+jZA+2oR5+TcTs8sRFFuXg== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/api" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/components" "6.4.14" - "@storybook/router" "6.4.14" - "@storybook/source-loader" "6.4.14" - "@storybook/theming" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/api" "6.4.17" + "@storybook/client-logger" "6.4.17" + "@storybook/components" "6.4.17" + "@storybook/router" "6.4.17" + "@storybook/source-loader" "6.4.17" + "@storybook/theming" "6.4.17" core-js "^3.8.2" estraverse "^5.2.0" loader-utils "^2.0.0" @@ -2034,13 +2034,13 @@ core-js "^3.6.5" find-up "^4.1.0" -"@storybook/source-loader@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/source-loader/-/source-loader-6.4.14.tgz#d1e6c2df0918e4867b3e4b5ce748685938f77d87" - integrity sha512-3hqVTK5+rQFK7Jf6/jYO/24daYIMn9L1vCAo9xSFgy999OMw7967ZmVMGMgVkOh7GQSZmzt3kMonv4bDmIGJMw== +"@storybook/source-loader@6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/source-loader/-/source-loader-6.4.17.tgz#d17e73f88f8c2a714fe129bf66ad692b4d4e0c97" + integrity sha512-OAETI21mL/jwmb9e/JtFDIsLWoOOWOAIm3Cj89XHQz/5VkYljZxdh2icb6xDHR8PtEaXj4+sBWQUG3L+a/a9QQ== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/client-logger" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/client-logger" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" core-js "^3.8.2" estraverse "^5.2.0" From 1da4ff22da002fb09e45acd6200c165d2ade0c6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 14:00:38 +0000 Subject: [PATCH 060/473] chore(deps): bump cronstrue from 1.122.0 to 1.123.0 Bumps [cronstrue](https://github.com/bradymholt/cronstrue) from 1.122.0 to 1.123.0. - [Release notes](https://github.com/bradymholt/cronstrue/releases) - [Commits](https://github.com/bradymholt/cronstrue/compare/v1.122.0...v1.123.0) --- updated-dependencies: - dependency-name: cronstrue dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 458ae2cb2f..d13edb974c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9406,9 +9406,9 @@ create-require@^1.1.0: integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cronstrue@^1.122.0: - version "1.122.0" - resolved "https://registry.npmjs.org/cronstrue/-/cronstrue-1.122.0.tgz#bd6838077b476d28f61d381398b47b8c3912a126" - integrity sha512-PFuhZd+iPQQ0AWTXIEYX+t3nFGzBrWxmTWUKJOrsGRewaBSLKZ4I1f8s2kryU75nNxgyugZgiGh2OJsCTA/XlA== + version "1.123.0" + resolved "https://registry.npmjs.org/cronstrue/-/cronstrue-1.123.0.tgz#de622dd8ea07981790f488d3f89a25e6e728ac8b" + integrity sha512-hVu9yNYRYr+jj5KET1p7FaBxFwtCHM1ByffP9lZ6yJ6p53u4VEmzH8117v9PUydxWNzc8Eq+sCZEzsKcB3ckiA== cross-env@^7.0.0: version "7.0.3" From dd64f72bf23f589968e9cf93831478bbbc6f3ba0 Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Mon, 31 Jan 2022 15:16:58 +0100 Subject: [PATCH 061/473] Updated the Code of Conduct to point to the CNCF Code of Conduct Signed-off-by: Lee Mills --- CODE_OF_CONDUCT.md | 70 ++-------------------------------------------- 1 file changed, 2 insertions(+), 68 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6990f72c3f..7597dd437c 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,69 +1,3 @@ -# Code of Conduct +# Community Code of Conduct -This code of conduct outlines our expectations for participants within the **Spotify FOSS** community, as well as steps to reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates this code of conduct may be banned from the community. - -Our open source community strives to: - -- **Be friendly and patient.** -- **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. -- **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language. -- **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. -- **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. -- **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. - -## Definitions - -Harassment includes, but is not limited to: - -- Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, age, regional discrimination, political or religious affiliation -- Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment -- Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person's gender identity. You must address people by the name they give you when not addressing them by their username or handle -- Physical contact and simulated physical contact (e.g., textual descriptions like “_hug_” or “_backrub_”) without consent or after a request to stop -- Threats of violence, both physical and psychological -- Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm -- Deliberate intimidation -- Stalking or following -- Harassing photography or recording, including logging online activity for harassment purposes -- Sustained disruption of discussion -- Unwelcome sexual attention, including gratuitous or off-topic sexual images or behaviour -- Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others -- Continued one-on-one communication after requests to cease -- Deliberate “outing” of any aspect of a person’s identity without their consent except as necessary to protect others from intentional abuse -- Publication of non-harassing private communication - -Our open source community prioritizes marginalized people’s safety over privileged people’s comfort. We will not act on complaints regarding: - -- ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’ -- Reasonable communication of boundaries, such as “leave me alone,” “go away,” or “I’m not discussing this with you” -- Refusal to explain or debate social justice concepts -- Communicating in a ‘tone’ you don’t find congenial -- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions - -### Diversity Statement - -We encourage everyone to participate and are committed to building a community for all. Although we will fail at times, we seek to treat everyone both as fairly and equally as possible. Whenever a participant has made a mistake, we expect them to take responsibility for it. If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong. - -Although this list cannot be exhaustive, we explicitly honor diversity in age, gender, gender identity or expression, culture, ethnicity, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, and technical ability. We will not tolerate discrimination based on any of the protected -characteristics above, including participants with disabilities. - -### Reporting Issues - -If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting us via **fossboard@spotify.com**. All reports will be handled with discretion. In your report please include: - -- Your contact information. -- Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please - include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. -- Any additional information that may be helpful. - -After filing a report, a representative will contact you personally, review the incident, follow up with any additional questions, and make a decision as to how to respond. If the person who is harassing you is part of the response team, they will recuse themselves from handling your incident. If the complaint originates from a member of the response team, it will be handled by a different member of the response team. We will respect confidentiality requests for the purpose of protecting victims of abuse. - -### Attribution & Acknowledgements - -We all stand on the shoulders of giants across many open source communities. We'd like to thank the communities and projects that established code of conducts and diversity statements as our inspiration: - -- [Django](https://www.djangoproject.com/conduct/reporting/) -- [Python](https://www.python.org/community/diversity/) -- [Ubuntu](http://www.ubuntu.com/about/about-ubuntu/conduct) -- [Contributor Covenant](http://contributor-covenant.org/) -- [Geek Feminism](http://geekfeminism.org/about/code-of-conduct/) -- [Citizen Code of Conduct](http://citizencodeofconduct.org/) +Backstage follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). From 319f4b79a2a5f6964dae99ac3630679037f2e464 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Mon, 31 Jan 2022 15:31:52 +0000 Subject: [PATCH 062/473] allow providing holding text for scaffolder loading Signed-off-by: Brian Fletcher --- .changeset/smart-boxes-double.md | 5 +++++ plugins/scaffolder/api-report.md | 2 ++ plugins/scaffolder/src/components/Router.tsx | 12 ++++++++++-- .../scaffolder/src/components/TaskPage/TaskPage.tsx | 10 +++++++--- 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .changeset/smart-boxes-double.md diff --git a/.changeset/smart-boxes-double.md b/.changeset/smart-boxes-double.md new file mode 100644 index 0000000000..64a2fe9656 --- /dev/null +++ b/.changeset/smart-boxes-double.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +The ScaffolderPage can be passed an optional `loadingHoldingText` string. It will replace the Loading text in the scaffolder task page. diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index b77fb5f939..c7a95f177e 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -246,7 +246,9 @@ export const ScaffolderFieldExtensions: React_2.ComponentType; export const ScaffolderPage: ({ TemplateCardComponent, groups, + loadingHoldingText, }: { + loadingHoldingText?: string | undefined; TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta2; diff --git a/plugins/scaffolder/src/components/Router.tsx b/plugins/scaffolder/src/components/Router.tsx index e667c676f2..10a78e1071 100644 --- a/plugins/scaffolder/src/components/Router.tsx +++ b/plugins/scaffolder/src/components/Router.tsx @@ -31,6 +31,7 @@ import { import { useElementFilter } from '@backstage/core-plugin-api'; type RouterProps = { + loadingHoldingText?: string; TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta2 }> | undefined; @@ -41,7 +42,11 @@ type RouterProps = { }>; }; -export const Router = ({ TemplateCardComponent, groups }: RouterProps) => { +export const Router = ({ + TemplateCardComponent, + groups, + loadingHoldingText, +}: RouterProps) => { const outlet = useOutlet(); const customFieldExtensions = useElementFilter(outlet, elements => @@ -79,7 +84,10 @@ export const Router = ({ TemplateCardComponent, groups }: RouterProps) => { path="/templates/:templateName" element={} /> - } /> + } + /> } /> ); diff --git a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx index 9f5dad2adc..04e303b4f4 100644 --- a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx +++ b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx @@ -218,7 +218,11 @@ export const TaskStatusStepper = memo( const hasLinks = ({ entityRef, remoteUrl, links = [] }: TaskOutput): boolean => !!(entityRef || remoteUrl || links.length > 0); -export const TaskPage = () => { +type TaskPageProps = { + loadingHoldingText?: string; +}; + +export const TaskPage = ({ loadingHoldingText }: TaskPageProps) => { const classes = useStyles(); const navigate = useNavigate(); const rootLink = useRouteRef(rootRouteRef); @@ -256,7 +260,7 @@ export const TaskPage = () => { const logAsString = useMemo(() => { if (!currentStepId) { - return 'Loading...'; + return loadingHoldingText ? loadingHoldingText : 'Loading...'; } const log = taskStream.stepLogs[currentStepId]; @@ -264,7 +268,7 @@ export const TaskPage = () => { return 'Waiting for logs...'; } return log.join('\n'); - }, [taskStream.stepLogs, currentStepId]); + }, [taskStream.stepLogs, currentStepId, loadingHoldingText]); const taskNotFound = taskStream.completed === true && From 359c31e31d8f2ef451b6e3d312c1b699e584949f Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Mon, 31 Jan 2022 18:19:53 +0100 Subject: [PATCH 063/473] Add support for source tags pointing to relative assets. Signed-off-by: Eric Peterson --- .changeset/techdocs-lets-call-the-whole-thing-off.md | 5 +++++ .../src/reader/transformers/addBaseUrl.test.ts | 12 +++++++++++- .../techdocs/src/reader/transformers/addBaseUrl.ts | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .changeset/techdocs-lets-call-the-whole-thing-off.md diff --git a/.changeset/techdocs-lets-call-the-whole-thing-off.md b/.changeset/techdocs-lets-call-the-whole-thing-off.md new file mode 100644 index 0000000000..60cf25d65b --- /dev/null +++ b/.changeset/techdocs-lets-call-the-whole-thing-off.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Added support for documentation using the raw `` tag to point to relative resources like audio or video files. diff --git a/plugins/techdocs/src/reader/transformers/addBaseUrl.test.ts b/plugins/techdocs/src/reader/transformers/addBaseUrl.test.ts index 11e8375420..0fb72caab3 100644 --- a/plugins/techdocs/src/reader/transformers/addBaseUrl.test.ts +++ b/plugins/techdocs/src/reader/transformers/addBaseUrl.test.ts @@ -42,6 +42,10 @@ const fixture = ` Download Now + `; @@ -88,12 +92,18 @@ describe('addBaseUrl', () => { ); expect(techdocsStorageApi.getBaseUrl).toHaveBeenNthCalledWith( 3, - 'astyle.css', + 'avideo.mp4', mockEntityId, '', ); expect(techdocsStorageApi.getBaseUrl).toHaveBeenNthCalledWith( 4, + 'astyle.css', + mockEntityId, + '', + ); + expect(techdocsStorageApi.getBaseUrl).toHaveBeenNthCalledWith( + 5, 'afile.pdf', mockEntityId, '', diff --git a/plugins/techdocs/src/reader/transformers/addBaseUrl.ts b/plugins/techdocs/src/reader/transformers/addBaseUrl.ts index 8f08ec83a6..f3906b7b91 100644 --- a/plugins/techdocs/src/reader/transformers/addBaseUrl.ts +++ b/plugins/techdocs/src/reader/transformers/addBaseUrl.ts @@ -84,6 +84,7 @@ export const addBaseUrl = ({ await Promise.all([ updateDom(dom.querySelectorAll('img'), 'src'), updateDom(dom.querySelectorAll('script'), 'src'), + updateDom(dom.querySelectorAll('source'), 'src'), updateDom(dom.querySelectorAll('link'), 'href'), updateDom(dom.querySelectorAll('a[download]'), 'href'), ]); From e8df3310781237c965d78a88eb2b0285f12ae8a8 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Mon, 31 Jan 2022 18:39:45 +0100 Subject: [PATCH 064/473] Update docs to match reality. Signed-off-by: Eric Peterson --- .../AnalyticsApi/GoogleAnalytics.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts index bdbdaebee7..ad7205983c 100644 --- a/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts +++ b/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts @@ -203,13 +203,10 @@ export class GoogleAnalytics implements AnalyticsApi { * - With value `User:default/name`, userId becomes `sha256(User:default/name)` * * If an integrator wishes to use an alternative hashing mechanism or an - * entirely different value, they may do so by passing a dummy Identity API - * implementation which returns a `userEntityRef` whose kind is the literal - * string `PrivateUser`, whose namespace is anything (it will be ignored) and - * whose name is the pre-hashed ID value. - * - * - With value `PrivateUser:default/a0n3b4n3`, userId becomes `a0n3b4n3` - * - With `PrivateUser:xyz/a0n3b4n3`, userId is `a0n3b4n3` + * entirely different value, they may do so by passing a `userIdTransform` + * function alongside the `identityApi` to `GoogleAnalytics.fromConfig()`. + * This function receives the `userEntityRef` as an argument and should + * resolve to a hashed version of whatever identifier they choose. * * Note: this feature requires that an integrator has set up a Google * Analytics User ID view in the property used to track Backstage. @@ -228,7 +225,8 @@ export class GoogleAnalytics implements AnalyticsApi { } /** - * Returns a PII-free user ID for use in Google Analytics. + * Returns a PII-free (according to Google's terms of service) user ID for + * use in Google Analytics. */ private getPrivateUserId(userEntityRef: string): Promise { // Allow integrators to provide their own hashing transformer. From f7257dff6f25ba48879f4eba84674b5fc70e0d15 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 30 Jan 2022 19:16:30 +0100 Subject: [PATCH 065/473] Allow links to not be tracked (or tracked custom). Signed-off-by: Eric Peterson --- .changeset/analytics-det-tyckte-inte-jag.md | 6 +++++ packages/core-components/api-report.md | 1 + .../src/components/Link/Link.test.tsx | 27 +++++++++++++++++++ .../src/components/Link/Link.tsx | 7 +++-- plugins/catalog-react/api-report.md | 1 + 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .changeset/analytics-det-tyckte-inte-jag.md diff --git a/.changeset/analytics-det-tyckte-inte-jag.md b/.changeset/analytics-det-tyckte-inte-jag.md new file mode 100644 index 0000000000..bc486e64c4 --- /dev/null +++ b/.changeset/analytics-det-tyckte-inte-jag.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-catalog-react': patch +--- + +The `` component now accepts a `noTrack` prop, which prevents the `click` event from being captured by the Analytics API. This can be used if tracking is explicitly not warranted, or in order to use custom link tracking in specific situations. diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 88e7f4efab..47ca3d3cf8 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -599,6 +599,7 @@ export function Link(props: LinkProps): JSX.Element; export type LinkProps = LinkProps_2 & LinkProps_3 & { component?: ElementType; + noTrack?: boolean; }; // Warning: (ae-missing-release-tag) "LoginRequestListItemClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) diff --git a/packages/core-components/src/components/Link/Link.test.tsx b/packages/core-components/src/components/Link/Link.test.tsx index 2d00aad827..8c6ed54d76 100644 --- a/packages/core-components/src/components/Link/Link.test.tsx +++ b/packages/core-components/src/components/Link/Link.test.tsx @@ -76,6 +76,33 @@ describe('', () => { }); }); + it('does not capture click when noTrack is set', async () => { + const linkText = 'Navigate!'; + const analyticsApi = new MockAnalyticsApi(); + const customOnClick = jest.fn(); + + const { getByText } = render( + wrapInTestApp( + + + {linkText} + + , + ), + ); + + fireEvent.click(getByText(linkText)); + + // Analytics event should have been fired. + await waitFor(() => { + // Custom onClick handler should have been fired. + expect(customOnClick).toHaveBeenCalled(); + + // But there should be no analytics event. + expect(analyticsApi.getEvents()).toHaveLength(0); + }); + }); + describe('isExternalUri', () => { it.each([ [true, 'http://'], diff --git a/packages/core-components/src/components/Link/Link.tsx b/packages/core-components/src/components/Link/Link.tsx index 8866150f86..30796c4e05 100644 --- a/packages/core-components/src/components/Link/Link.tsx +++ b/packages/core-components/src/components/Link/Link.tsx @@ -29,6 +29,7 @@ export const isExternalUri = (uri: string) => /^([a-z+.-]+):/.test(uri); export type LinkProps = MaterialLinkProps & RouterLinkProps & { component?: ElementType; + noTrack?: boolean; }; declare function LinkType(props: LinkProps): JSX.Element; @@ -62,7 +63,7 @@ const getNodeText = (node: React.ReactNode): string => { * - Captures Link clicks as analytics events. */ const ActualLink = React.forwardRef( - ({ onClick, ...props }, ref) => { + ({ onClick, noTrack, ...props }, ref) => { const analytics = useAnalytics(); const to = String(props.to); const linkText = getNodeText(props.children) || to; @@ -71,7 +72,9 @@ const ActualLink = React.forwardRef( const handleClick = (event: React.MouseEvent) => { onClick?.(event); - analytics.captureEvent('click', linkText, { attributes: { to } }); + if (!noTrack) { + analytics.captureEvent('click', linkText, { attributes: { to } }); + } }; return external ? ( diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 398bace903..8c3ba0daa3 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -573,6 +573,7 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent< | 'gutterBottom' | 'paragraph' | 'variantMapping' + | 'noTrack' | 'TypographyClasses' | 'entityRef' | 'defaultKind' From 12a5c884f345b164018443acae9ea2ccda476770 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 04:12:04 +0000 Subject: [PATCH 066/473] chore(deps): bump raw-body from 2.4.1 to 2.4.2 Bumps [raw-body](https://github.com/stream-utils/raw-body) from 2.4.1 to 2.4.2. - [Release notes](https://github.com/stream-utils/raw-body/releases) - [Changelog](https://github.com/stream-utils/raw-body/blob/master/HISTORY.md) - [Commits](https://github.com/stream-utils/raw-body/compare/2.4.1...2.4.2) --- updated-dependencies: - dependency-name: raw-body dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index d13edb974c..02c6806818 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8098,11 +8098,6 @@ bytes@3.0.0: resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - bytes@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" @@ -13436,17 +13431,6 @@ http-deceiver@^1.2.7: resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= -http-errors@1.7.3: - version "1.7.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-errors@1.8.1: version "1.8.1" resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" @@ -20177,7 +20161,7 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.2: +raw-body@2.4.2, raw-body@^2.4.1: version "2.4.2" resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32" integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ== @@ -20187,16 +20171,6 @@ raw-body@2.4.2: iconv-lite "0.4.24" unpipe "1.0.0" -raw-body@^2.4.1: - version "2.4.1" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" - integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== - dependencies: - bytes "3.1.0" - http-errors "1.7.3" - iconv-lite "0.4.24" - unpipe "1.0.0" - rc-progress@3.2.4: version "3.2.4" resolved "https://registry.npmjs.org/rc-progress/-/rc-progress-3.2.4.tgz#4036acdae2566438545bc4df2203248babaf7549" @@ -21816,11 +21790,6 @@ setprototypeof@1.1.0: resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -23433,11 +23402,6 @@ toggle-selection@^1.0.6: resolved "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI= -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - toidentifier@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" From b623eddf5505e6cc28e9c92e12f52d3951e2f26d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 04:31:54 +0000 Subject: [PATCH 067/473] chore(deps-dev): bump @storybook/addon-actions in /storybook Bumps [@storybook/addon-actions](https://github.com/storybookjs/storybook/tree/HEAD/addons/actions) from 6.4.14 to 6.4.17. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.17/addons/actions) --- updated-dependencies: - dependency-name: "@storybook/addon-actions" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 147 +++-------------------------------------- 2 files changed, 10 insertions(+), 139 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 02e52fb937..13c3c310df 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@storybook/addon-a11y": "^6.4.17", - "@storybook/addon-actions": "^6.4.14", + "@storybook/addon-actions": "^6.4.17", "@storybook/addon-links": "^6.4.17", "@storybook/addon-storysource": "^6.4.17", "@storybook/addons": "^6.4.14", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 5b15ee9adf..17c00cb3a7 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1332,17 +1332,17 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-actions@^6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.4.14.tgz#be5590438943487b4243b2fe16619557cb9ca0ce" - integrity sha512-EBraATDCKCbb1IpT+bTIV+noFIoK5ykXj8Nt0qmQGD2OC1cZovIyH3DigyD0/3D55znGzxqRruTK8lm0nc1jbg== +"@storybook/addon-actions@^6.4.17": + version "6.4.17" + resolved "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.4.17.tgz#93a8190b07f776ba4670cb7021adc81ff7a094ad" + integrity sha512-8TYdgzJMMKvfHvSp8N3Bsj78xGw9lNHTYkh0IE0TGGwRVOEU6xNBkao6ktXzM3gTB+6U6OZn8Y//NCzLsoTUHg== dependencies: - "@storybook/addons" "6.4.14" - "@storybook/api" "6.4.14" - "@storybook/components" "6.4.14" - "@storybook/core-events" "6.4.14" + "@storybook/addons" "6.4.17" + "@storybook/api" "6.4.17" + "@storybook/components" "6.4.17" + "@storybook/core-events" "6.4.17" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/theming" "6.4.14" + "@storybook/theming" "6.4.17" core-js "^3.8.2" fast-deep-equal "^3.1.3" global "^4.4.0" @@ -1394,23 +1394,6 @@ react-syntax-highlighter "^13.5.3" regenerator-runtime "^0.13.7" -"@storybook/addons@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.14.tgz#45d6937bc2ece33ceadc5358b2a2298d2a0d1e95" - integrity sha512-Snu42ejLyBAh6PWdlrdI72HKN1oKY7q0R9qEID2wk953WrqgGu4URakp14YLxghJCyKTSfGPs6LNZRRI6H5xgA== - dependencies: - "@storybook/api" "6.4.14" - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" - "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/router" "6.4.14" - "@storybook/theming" "6.4.14" - "@types/webpack-env" "^1.16.0" - core-js "^3.8.2" - global "^4.4.0" - regenerator-runtime "^0.13.7" - "@storybook/addons@6.4.17", "@storybook/addons@^6.4.14": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.17.tgz#d040db3ddcf72fd9e7df8b8fce2a6dc88578c87e" @@ -1428,29 +1411,6 @@ global "^4.4.0" regenerator-runtime "^0.13.7" -"@storybook/api@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.14.tgz#a477646f7e020a362f044d2e614e3d1a86ba8f6f" - integrity sha512-GGGwB5+EquoausTXYx4dnLBBk2sOiS1Z58mDj0swBXCZdjfyUfLyxjxvvb/hl65ltufWP3IdmlKKaLiuARXNtw== - dependencies: - "@storybook/channels" "6.4.14" - "@storybook/client-logger" "6.4.14" - "@storybook/core-events" "6.4.14" - "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/router" "6.4.14" - "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.4.14" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - lodash "^4.17.21" - memoizerific "^1.11.3" - regenerator-runtime "^0.13.7" - store2 "^2.12.0" - telejson "^5.3.2" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/api@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.17.tgz#82c3d756c85a65ecd8a3c3d9ce890e581175003a" @@ -1573,15 +1533,6 @@ global "^4.4.0" telejson "^5.3.2" -"@storybook/channels@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.4.14.tgz#f7a5416c971febd26ed7b03a75d99fd819790e48" - integrity sha512-3QOVxFG6ZAxDXCta1ie4SUPQ3s50yHeuZzVg6uPp+DcC1FrXeDFYBcU9t0j/jrSgbeKcnFHWxmRHNy1BRyWv/A== - dependencies: - core-js "^3.8.2" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/channels@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.4.17.tgz#95d05745a96b6059cea26d45aacca3967c401e26" @@ -1617,14 +1568,6 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-logger@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.4.14.tgz#a7aed982407e4146548f9ac4b3af5eba24cd045e" - integrity sha512-4VmFWZxhpeiG5fDhfqAyQbCfXZSBKS4fNKf35ABWiHStZRDndxml8K5WFtmOmMvVzjrGQx8HesenYMawK6xo/Q== - dependencies: - core-js "^3.8.2" - global "^4.4.0" - "@storybook/client-logger@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.4.17.tgz#50652859592c489b671f010455b8ce85d21a1b3d" @@ -1633,36 +1576,6 @@ core-js "^3.8.2" global "^4.4.0" -"@storybook/components@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.14.tgz#546b34fe3feb09e670b76ff71d889bf5f566f1e4" - integrity sha512-M7unerbOnvg+UN7qPxBCBWzK/boVdSSQxRiPAr1OL3M4OyEU8+TNPdQeAG0aF4zqtU0BrsDf4E85EznoMXUiFQ== - dependencies: - "@popperjs/core" "^2.6.0" - "@storybook/client-logger" "6.4.14" - "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/theming" "6.4.14" - "@types/color-convert" "^2.0.0" - "@types/overlayscrollbars" "^1.12.0" - "@types/react-syntax-highlighter" "11.0.5" - color-convert "^2.0.1" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - lodash "^4.17.21" - markdown-to-jsx "^7.1.3" - memoizerific "^1.11.3" - overlayscrollbars "^1.13.1" - polished "^4.0.5" - prop-types "^15.7.2" - react-colorful "^5.1.2" - react-popper-tooltip "^3.1.1" - react-syntax-highlighter "^13.5.3" - react-textarea-autosize "^8.3.0" - regenerator-runtime "^0.13.7" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/components@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.17.tgz#5be383682d9538c35c96463723cb17740f105fb6" @@ -1774,13 +1687,6 @@ util-deprecate "^1.0.2" webpack "4" -"@storybook/core-events@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.4.14.tgz#37293c0fce703f2643cec6f24fc6ef7c40e30ded" - integrity sha512-9QFltg2mxTDjMBfmVtFHtrAEPY/i0oVp2kVdTWo6g05cPffYKAjNUnUVjUl7yiqcQmdEcdqUUQ0ut3xgmcYi/A== - dependencies: - core-js "^3.8.2" - "@storybook/core-events@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.4.17.tgz#ad70c883673a2060f1c7c4aa8f5926fc14119f4a" @@ -1992,23 +1898,6 @@ ts-dedent "^2.0.0" webpack "4" -"@storybook/router@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/router/-/router-6.4.14.tgz#46fd46eadafc0d6b647be13702704c5fcf8f11e3" - integrity sha512-5+tePyINtwPYm4izgOBZ2sX2ViWtfmmO2vwOAPlWWEGzsRosVQsGMdZv1R8rk4Jl/TotMjlTmd8I1/BufEeIeQ== - dependencies: - "@storybook/client-logger" "6.4.14" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - history "5.0.0" - lodash "^4.17.21" - memoizerific "^1.11.3" - qs "^6.10.0" - react-router "^6.0.0" - react-router-dom "^6.0.0" - ts-dedent "^2.0.0" - "@storybook/router@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/router/-/router-6.4.17.tgz#d53c4f9a4ccaa21a7bbe8d875a1a81c9dba2a6f2" @@ -2071,24 +1960,6 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/theming@6.4.14": - version "6.4.14" - resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.4.14.tgz#f034914eb1853a80f588c7c141d47af0595f6d1f" - integrity sha512-kqmXNnIoOSAS4cgr9PitMgVrOps725O99eTsJNxB6J1Ide0CsA5v2tV6AmQn/scnpCQNr8uSjZerNlEcl/ensg== - dependencies: - "@emotion/core" "^10.1.1" - "@emotion/is-prop-valid" "^0.8.6" - "@emotion/styled" "^10.0.27" - "@storybook/client-logger" "6.4.14" - core-js "^3.8.2" - deep-object-diff "^1.1.0" - emotion-theming "^10.0.27" - global "^4.4.0" - memoizerific "^1.11.3" - polished "^4.0.5" - resolve-from "^5.0.0" - ts-dedent "^2.0.0" - "@storybook/theming@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.4.17.tgz#f0a03d2d3239638ac171e97a8f089ee2656a8287" From 2e5c4d1a151580e61b60ce5599e0bc83cc52231f Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 15:17:04 +0100 Subject: [PATCH 068/473] chore: added some additional scopes support for the ScmAuthApi Signed-off-by: blam --- .../integration-react/src/api/ScmAuth.test.ts | 52 +++++++++++++++++++ packages/integration-react/src/api/ScmAuth.ts | 48 ++++++++++++++--- .../integration-react/src/api/ScmAuthApi.ts | 10 ++++ 3 files changed, 102 insertions(+), 8 deletions(-) diff --git a/packages/integration-react/src/api/ScmAuth.test.ts b/packages/integration-react/src/api/ScmAuth.test.ts index 2d0ea9b97d..4ebfef749e 100644 --- a/packages/integration-react/src/api/ScmAuth.test.ts +++ b/packages/integration-react/src/api/ScmAuth.test.ts @@ -141,6 +141,58 @@ describe('ScmAuth', () => { }); }); + it('should support additional provided scopes from the caller', async () => { + const mockAuthApi = { + getAccessToken: async (scopes: string[]) => { + return scopes.join(' '); + }, + }; + + const githubAuth = ScmAuth.forGithub(mockAuthApi); + await expect( + githubAuth.getCredentials({ + url: 'http://example.com', + additionalScope: { + customScopes: { github: ['org:read', 'workflow:write'] }, + }, + }), + ).resolves.toMatchObject({ + token: 'repo read:org read:user org:read workflow:write', + }); + + const gitlabAuth = ScmAuth.forGitlab(mockAuthApi); + await expect( + gitlabAuth.getCredentials({ + url: 'http://example.com', + additionalScope: { customScopes: { gitlab: ['write_repository'] } }, + }), + ).resolves.toMatchObject({ + token: 'read_user read_api read_repository write_repository', + }); + + const azureAuth = ScmAuth.forAzure(mockAuthApi); + await expect( + azureAuth.getCredentials({ + url: 'http://example.com', + additionalScope: { customScopes: { azure: ['vso.org'] } }, + }), + ).resolves.toMatchObject({ + token: 'vso.build vso.code vso.graph vso.project vso.profile vso.org', + }); + + const bitbucketAuth = ScmAuth.forBitbucket(mockAuthApi); + await expect( + bitbucketAuth.getCredentials({ + url: 'http://example.com', + additionalScope: { + customScopes: { bitbucket: ['snippet:write', 'issue:write'] }, + }, + }), + ).resolves.toMatchObject({ + token: 'account team pullrequest snippet issue snippet:write issue:write', + }); + }); + it('should handle host option', () => { const mockAuthApi = { getAccessToken: jest.fn(), diff --git a/packages/integration-react/src/api/ScmAuth.ts b/packages/integration-react/src/api/ScmAuth.ts index be3216962d..f450d63cec 100644 --- a/packages/integration-react/src/api/ScmAuth.ts +++ b/packages/integration-react/src/api/ScmAuth.ts @@ -35,6 +35,9 @@ type ScopeMapping = { repoWrite: string[]; }; +// An enum of all supported providers +type ProviderName = 'generic' | 'github' | 'azure' | 'bitbucket' | 'gitlab'; + class ScmAuthMux implements ScmAuthApi { #providers: Array; @@ -93,12 +96,14 @@ export class ScmAuth implements ScmAuthApi { github: githubAuthApiRef, gitlab: gitlabAuthApiRef, azure: microsoftAuthApiRef, + bitbucket: bitbucketAuthApiRef, }, - factory: ({ github, gitlab, azure }) => + factory: ({ github, gitlab, azure, bitbucket }) => ScmAuth.merge( ScmAuth.forGithub(github), ScmAuth.forGitlab(gitlab), ScmAuth.forAzure(azure), + ScmAuth.forBitbucket(bitbucket), ), }); } @@ -116,7 +121,7 @@ export class ScmAuth implements ScmAuthApi { }; }, ): ScmAuth { - return new ScmAuth(authApi, options.host, options.scopeMapping); + return new ScmAuth('generic', authApi, options.host, options.scopeMapping); } /** @@ -139,7 +144,7 @@ export class ScmAuth implements ScmAuthApi { }, ): ScmAuth { const host = options?.host ?? 'github.com'; - return new ScmAuth(githubAuthApi, host, { + return new ScmAuth('github', githubAuthApi, host, { default: ['repo', 'read:org', 'read:user'], repoWrite: ['gist'], }); @@ -165,7 +170,7 @@ export class ScmAuth implements ScmAuthApi { }, ): ScmAuth { const host = options?.host ?? 'gitlab.com'; - return new ScmAuth(gitlabAuthApi, host, { + return new ScmAuth('gitlab', gitlabAuthApi, host, { default: ['read_user', 'read_api', 'read_repository'], repoWrite: ['write_repository', 'api'], }); @@ -191,7 +196,7 @@ export class ScmAuth implements ScmAuthApi { }, ): ScmAuth { const host = options?.host ?? 'dev.azure.com'; - return new ScmAuth(microsoftAuthApi, host, { + return new ScmAuth('azure', microsoftAuthApi, host, { default: [ 'vso.build', 'vso.code', @@ -223,7 +228,7 @@ export class ScmAuth implements ScmAuthApi { }, ): ScmAuth { const host = options?.host ?? 'bitbucket.org'; - return new ScmAuth(bitbucketAuthApi, host, { + return new ScmAuth('bitbucket', bitbucketAuthApi, host, { default: ['account', 'team', 'pullrequest', 'snippet', 'issue'], repoWrite: ['pullrequest:write', 'snippet:write', 'issue:write'], }); @@ -240,11 +245,18 @@ export class ScmAuth implements ScmAuthApi { #api: OAuthApi; #host: string; #scopeMapping: ScopeMapping; + #providerName: ProviderName; - private constructor(api: OAuthApi, host: string, scopeMapping: ScopeMapping) { + private constructor( + providerName: ProviderName, + api: OAuthApi, + host: string, + scopeMapping: ScopeMapping, + ) { this.#api = api; this.#host = host; this.#scopeMapping = scopeMapping; + this.#providerName = providerName; } /** @@ -254,6 +266,16 @@ export class ScmAuth implements ScmAuthApi { return url.host === this.#host; } + private getAdditionalScopesForProvider( + additionalScopes: ScmAuthTokenOptions['additionalScope'], + ): string[] { + if (!additionalScopes?.customScopes || this.#providerName === 'generic') { + return []; + } + + return additionalScopes.customScopes?.[this.#providerName] ?? []; + } + /** * Fetches credentials for the given resource. */ @@ -267,7 +289,17 @@ export class ScmAuth implements ScmAuthApi { scopes.push(...this.#scopeMapping.repoWrite); } - const token = await this.#api.getAccessToken(scopes, restOptions); + const additionalScopes = + this.getAdditionalScopesForProvider(additionalScope); + + if (additionalScopes.length) { + scopes.push(...additionalScopes); + } + + const uniqueScopes = [...new Set(scopes)]; + + const token = await this.#api.getAccessToken(uniqueScopes, restOptions); + return { token, headers: { diff --git a/packages/integration-react/src/api/ScmAuthApi.ts b/packages/integration-react/src/api/ScmAuthApi.ts index 44b007c4a2..be65842bc1 100644 --- a/packages/integration-react/src/api/ScmAuthApi.ts +++ b/packages/integration-react/src/api/ScmAuthApi.ts @@ -44,6 +44,16 @@ export interface ScmAuthTokenOptions extends AuthRequestOptions { * the ability to create things like issues and pull requests. */ repoWrite?: boolean; + /** + * Allow an arbitrary list of scopes provided from the user + * to request from the provider. + */ + customScopes?: { + github?: string[]; + azure?: string[]; + bitbucket?: string[]; + gitlab?: string[]; + }; }; } From 6d9f426eabc5d32d7d77c5101e10b0154bbe538c Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 16:23:43 +0100 Subject: [PATCH 069/473] feat: added a SecretsContext for storing the secrets in the frontend and being able to add secrets to the context using a hooks Signed-off-by: blam --- .../secrets/SecretsContext.test.tsx | 41 ++++++++++ .../src/components/secrets/SecretsContext.tsx | 74 +++++++++++++++++++ .../src/components/secrets/index.ts | 16 ++++ 3 files changed, 131 insertions(+) create mode 100644 plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx create mode 100644 plugins/scaffolder/src/components/secrets/SecretsContext.tsx create mode 100644 plugins/scaffolder/src/components/secrets/index.ts diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx new file mode 100644 index 0000000000..f238b4be86 --- /dev/null +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx @@ -0,0 +1,41 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React, { useContext } from 'react'; +import { + useSecretsContext, + SecretsContextProvider, + SecretsContext, +} from './SecretsContext'; +import { renderHook, act } from '@testing-library/react-hooks'; + +describe('SecretsContext', () => { + it('should allow the setting of secrets in the context', async () => { + const { result } = renderHook( + () => ({ + hook: useSecretsContext(), + context: useContext(SecretsContext), + }), + { + wrapper: ({ children }) => ( + {children} + ), + }, + ); + + act(() => result.current.hook.setSecret({ foo: 'bar' })); + expect(result.current.context?.secrets.foo).toEqual('bar'); + }); +}); diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx new file mode 100644 index 0000000000..0a3358be31 --- /dev/null +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx @@ -0,0 +1,74 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React, { + useState, + useCallback, + useContext, + createContext, + PropsWithChildren, +} from 'react'; +import { JsonObject } from '@backstage/types'; + +type SecretsContextContents = { + secrets: JsonObject; + setSecrets: React.Dispatch>; +}; + +/** + * The actual context object. + */ +export const SecretsContext = createContext( + undefined, +); + +/** + * The Context Provider that holds the state for the secrets. + * + * @public + */ +export const SecretsContextProvider = ({ children }: PropsWithChildren<{}>) => { + const [secrets, setSecrets] = useState({}); + + return ( + + {children} + + ); +}; + +/** + * Hook to access the secrets context. + * @public + */ +export const useSecretsContext = () => { + const value = useContext(SecretsContext); + if (!value) { + throw new Error( + 'useSecretsContext must be used within a SecretsContextProvider', + ); + } + + const { secrets, setSecrets } = value; + + const setSecret = useCallback( + (input: JsonObject) => { + setSecrets({ ...secrets, ...input }); + }, + [secrets, setSecrets], + ); + + return { setSecret }; +}; diff --git a/plugins/scaffolder/src/components/secrets/index.ts b/plugins/scaffolder/src/components/secrets/index.ts new file mode 100644 index 0000000000..2f2cbdf7ac --- /dev/null +++ b/plugins/scaffolder/src/components/secrets/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { useSecretsContext } from './SecretsContext'; From 288ad92b64e53bc5075b865eba58e15077c19677 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 16:52:50 +0100 Subject: [PATCH 070/473] feat: reworking the secret types for the context. Signed-off-by: blam --- plugins/scaffolder/src/components/Router.tsx | 7 ++++++- .../src/components/TemplatePage/TemplatePage.tsx | 10 ++++++++-- .../src/components/secrets/SecretsContext.test.tsx | 2 ++ .../src/components/secrets/SecretsContext.tsx | 9 ++++----- plugins/scaffolder/src/index.ts | 1 + 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/scaffolder/src/components/Router.tsx b/plugins/scaffolder/src/components/Router.tsx index e667c676f2..ab79f9dec3 100644 --- a/plugins/scaffolder/src/components/Router.tsx +++ b/plugins/scaffolder/src/components/Router.tsx @@ -21,6 +21,7 @@ import { ScaffolderPage } from './ScaffolderPage'; import { TemplatePage } from './TemplatePage'; import { TaskPage } from './TaskPage'; import { ActionsPage } from './ActionsPage'; +import { SecretsContextProvider } from './secrets/SecretsContext'; import { FieldExtensionOptions, @@ -77,7 +78,11 @@ export const Router = ({ TemplateCardComponent, groups }: RouterProps) => { /> } + element={ + + + + } /> } /> } /> diff --git a/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx b/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx index 8ce7ecf6b3..852ae3d81c 100644 --- a/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx +++ b/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx @@ -17,12 +17,13 @@ import { JsonObject, JsonValue } from '@backstage/types'; import { LinearProgress } from '@material-ui/core'; import { FormValidation, IChangeEvent } from '@rjsf/core'; import qs from 'qs'; -import React, { useCallback, useState } from 'react'; +import React, { useCallback, useContext, useState } from 'react'; import { generatePath, Navigate, useNavigate } from 'react-router'; import { useParams } from 'react-router-dom'; import useAsync from 'react-use/lib/useAsync'; import { scaffolderApiRef } from '../../api'; import { CustomFieldValidator, FieldExtensionOptions } from '../../extensions'; +import { SecretsContext } from '../secrets/SecretsContext'; import { rootRouteRef } from '../../routes'; import { MultistepJsonForm } from '../MultistepJsonForm'; @@ -115,6 +116,7 @@ export const TemplatePage = ({ customFieldExtensions?: FieldExtensionOptions[]; }) => { const apiHolder = useApiHolder(); + const secretsContext = useContext(SecretsContext); const errorApi = useApi(errorApiRef); const scaffolderApi = useApi(scaffolderApiRef); const { templateName } = useParams(); @@ -135,7 +137,11 @@ export const TemplatePage = ({ ); const handleCreate = async () => { - const id = await scaffolderApi.scaffold(templateName, formState); + const id = await scaffolderApi.scaffold( + templateName, + formState, + secretsContext?.secrets, + ); const formParams = qs.stringify( { formData: formState }, diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx index f238b4be86..5699b3188a 100644 --- a/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx @@ -34,8 +34,10 @@ describe('SecretsContext', () => { ), }, ); + expect(result.current.context?.secrets.foo).toEqual(undefined); act(() => result.current.hook.setSecret({ foo: 'bar' })); + expect(result.current.context?.secrets.foo).toEqual('bar'); }); }); diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx index 0a3358be31..771a53fda1 100644 --- a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx @@ -20,11 +20,10 @@ import React, { createContext, PropsWithChildren, } from 'react'; -import { JsonObject } from '@backstage/types'; type SecretsContextContents = { - secrets: JsonObject; - setSecrets: React.Dispatch>; + secrets: Record; + setSecrets: React.Dispatch>>; }; /** @@ -40,7 +39,7 @@ export const SecretsContext = createContext( * @public */ export const SecretsContextProvider = ({ children }: PropsWithChildren<{}>) => { - const [secrets, setSecrets] = useState({}); + const [secrets, setSecrets] = useState>({}); return ( @@ -64,7 +63,7 @@ export const useSecretsContext = () => { const { secrets, setSecrets } = value; const setSecret = useCallback( - (input: JsonObject) => { + (input: Record) => { setSecrets({ ...secrets, ...input }); }, [secrets, setSecrets], diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index 3cf65d7a07..133234e20b 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -56,3 +56,4 @@ export { FavouriteTemplate } from './components/FavouriteTemplate'; export { TemplateList } from './components/TemplateList'; export type { TemplateListProps } from './components/TemplateList'; export { TemplateTypePicker } from './components/TemplateTypePicker'; +export * from './components/secrets'; From 6708dbfffe6e1c3b2a9035839af73ef97d29e37e Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 19:10:08 +0100 Subject: [PATCH 071/473] feat: added grabbing the token from the form with a debounce to not happen on every key press Signed-off-by: blam --- packages/integration-react/src/api/ScmAuth.ts | 1 + .../RepoUrlPicker/RepoUrlPicker.test.tsx | 53 +++++++++++++++++++ .../fields/RepoUrlPicker/RepoUrlPicker.tsx | 45 +++++++++++++++- .../RepoUrlPicker/RepoUrlPickerHost.tsx | 2 +- .../src/components/secrets/SecretsContext.tsx | 4 +- 5 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx diff --git a/packages/integration-react/src/api/ScmAuth.ts b/packages/integration-react/src/api/ScmAuth.ts index f450d63cec..071374e6cb 100644 --- a/packages/integration-react/src/api/ScmAuth.ts +++ b/packages/integration-react/src/api/ScmAuth.ts @@ -15,6 +15,7 @@ */ import { + bitbucketAuthApiRef, createApiFactory, githubAuthApiRef, gitlabAuthApiRef, diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx new file mode 100644 index 0000000000..f31b152882 --- /dev/null +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -0,0 +1,53 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { render } from '@testing-library/react'; +import { RepoUrlPicker } from './RepoUrlPicker'; +import Form from '@rjsf/core'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; +import { + scmIntegrationsApiRef, + scmAuthApiRef, +} from '@backstage/integration-react'; +import { scaffolderApiRef } from '../../../api'; +import { SecretsContextProvider } from '../../secrets/SecretsContext'; + +describe('RepoUrlPicker', () => { + describe('happy path rendering', () => { + it('should render the repo url picker', async () => { + const { getByRole } = await renderInTestApp( + + +
+ + , + , + ); + + console.log(getByRole('form')); + }); + }); +}); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index 998fa41588..b4a1eedc8e 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -14,7 +14,10 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import { scmIntegrationsApiRef } from '@backstage/integration-react'; +import { + scmIntegrationsApiRef, + scmAuthApiRef, +} from '@backstage/integration-react'; import React, { useEffect, useState, useMemo, useCallback } from 'react'; import { GithubRepoPicker } from './GithubRepoPicker'; import { GitlabRepoPicker } from './GitlabRepoPicker'; @@ -24,10 +27,21 @@ import { FieldExtensionComponentProps } from '../../../extensions'; import { RepoUrlPickerHost } from './RepoUrlPickerHost'; import { parseRepoPickerUrl, serializeRepoPickerUrl } from './utils'; import { RepoUrlPickerState } from './types'; +import useDebounce from 'react-use/lib/useDebounce'; +import { useSecretsContext } from '../../secrets'; export interface RepoUrlPickerUiOptions { allowedHosts?: string[]; allowedOwners?: string[]; + requestUserCredentials?: { + resultSecretsKey: string; + additionalScopes?: { + github?: string[]; + gitlab?: string[]; + bitbucket?: string[]; + azure?: string[]; + }; + }; } export const RepoUrlPicker = ( @@ -38,7 +52,8 @@ export const RepoUrlPicker = ( parseRepoPickerUrl(formData), ); const integrationApi = useApi(scmIntegrationsApiRef); - + const scmAuthApi = useApi(scmAuthApiRef); + const { setSecret } = useSecretsContext(); const allowedHosts = useMemo( () => uiSchema?.['ui:options']?.allowedHosts ?? [], [uiSchema], @@ -66,6 +81,32 @@ export const RepoUrlPicker = ( [setState], ); + useDebounce( + async () => { + const { requestUserCredentials } = uiSchema?.['ui:options'] ?? {}; + + if ( + !requestUserCredentials || + !(state.host && state.owner && !state.repoName) + ) { + return; + } + + // user has requested that we use the users credentials + const { token } = await scmAuthApi.getCredentials({ + url: `https://${state.host}/${state.owner}/${state.repoName}`, + additionalScope: { + repoWrite: true, + customScopes: requestUserCredentials.additionalScopes, + }, + }); + + setSecret({ [requestUserCredentials.resultSecretsKey]: token }); + }, + 1000, + [state], + ); + const hostType = (state.host && integrationApi.byHost(state.host)?.type) ?? null; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx index 261429c757..652e214714 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx @@ -37,7 +37,7 @@ export const RepoUrlPickerHost = (props: { }); useEffect(() => { - if (hosts && !host) { + if (hosts && hosts.length && !host) { // This is only hear to set the default as the first one in the hosts array // if the host is not set yet and there is a list of hosts. onChange(hosts[0]); diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx index 771a53fda1..4f8295bb27 100644 --- a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx @@ -64,9 +64,9 @@ export const useSecretsContext = () => { const setSecret = useCallback( (input: Record) => { - setSecrets({ ...secrets, ...input }); + setSecrets(currentSecrets => ({ ...currentSecrets, ...input })); }, - [secrets, setSecrets], + [setSecrets], ); return { setSecret }; From 5521945cc712d3166ff62aae1c7b01a81bd36ba7 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 19:37:04 +0100 Subject: [PATCH 072/473] feat: added some more behaviour to the HostPicker as noticed that when no hosts are supplied it breaks currently Signed-off-by: blam --- .../RepoUrlPicker/RepoUrlPicker.test.tsx | 19 ++++++++++++++++--- .../fields/RepoUrlPicker/RepoUrlPicker.tsx | 6 +++++- .../RepoUrlPicker/RepoUrlPickerHost.tsx | 19 +++++++++++++------ 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index f31b152882..6f37a9a1f6 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -14,26 +14,37 @@ * limitations under the License. */ import React from 'react'; -import { render } from '@testing-library/react'; import { RepoUrlPicker } from './RepoUrlPicker'; import Form from '@rjsf/core'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; import { scmIntegrationsApiRef, + ScmIntegrationsApi, scmAuthApiRef, } from '@backstage/integration-react'; import { scaffolderApiRef } from '../../../api'; import { SecretsContextProvider } from '../../secrets/SecretsContext'; +import { ScaffolderApi } from '../../..'; describe('RepoUrlPicker', () => { + const mockScaffolderApi: Partial = { + getIntegrationsList: async () => [ + { host: 'github.com', type: 'github', title: 'github.com' }, + ], + }; + + const mockIntegrationsApi: Partial = { + byHost: () => ({ type: 'github' }), + }; + describe('happy path rendering', () => { it('should render the repo url picker', async () => { const { getByRole } = await renderInTestApp( @@ -47,6 +58,8 @@ describe('RepoUrlPicker', () => { , ); + await new Promise(resolve => setTimeout(resolve, 3000)); + console.log(getByRole('form')); }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index b4a1eedc8e..e436a76f3c 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -93,6 +93,8 @@ export const RepoUrlPicker = ( } // user has requested that we use the users credentials + // so lets grab them using the scmAuthApi and pass through + // any additional scopes from the ui:options const { token } = await scmAuthApi.getCredentials({ url: `https://${state.host}/${state.owner}/${state.repoName}`, additionalScope: { @@ -101,10 +103,12 @@ export const RepoUrlPicker = ( }, }); + // set the secret using the key provided in the the ui:options for use + // in the templating the manifest with ${{ secrets[resultSecretsKey] }} setSecret({ [requestUserCredentials.resultSecretsKey]: token }); }, 1000, - [state], + [state, uiSchema], ); const hostType = diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx index 652e214714..ec09494a1b 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx @@ -37,16 +37,23 @@ export const RepoUrlPickerHost = (props: { }); useEffect(() => { - if (hosts && hosts.length && !host) { - // This is only hear to set the default as the first one in the hosts array - // if the host is not set yet and there is a list of hosts. - onChange(hosts[0]); + // If there is no host chosen currently + if (!host) { + // Set the first of the allowedHosts option if that available + if (hosts?.length) { + onChange(hosts[0]); + // if there's no hosts provided, fallback to using the first integration + } else if (integrations?.length) { + onChange(integrations[0].host); + } } - }, [hosts, host, onChange]); + }, [hosts, host, onChange, integrations]); + // If there are no allowedHosts provided, then show all integrations. Otherwise, only show integrations + // that are provided in the dropdown for the user to choose from. const hostsOptions: SelectItem[] = integrations ? integrations - .filter(i => hosts?.includes(i.host)) + .filter(i => (hosts?.length ? hosts?.includes(i.host) : true)) .map(i => ({ label: i.title, value: i.host })) : [{ label: 'Loading...', value: 'loading' }]; From 3e96fa47d0e47af505ba3e38c777c61513f49afa Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 20:20:17 +0100 Subject: [PATCH 073/473] chore: need to convert these to empty strings as they are controlled input values and material ui throws some errors in the frontend unless we have them Signed-off-by: blam --- .../RepoUrlPicker/RepoUrlPicker.test.tsx | 23 +++++++++++++++---- .../components/fields/RepoUrlPicker/utils.ts | 22 +++++++++--------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 6f37a9a1f6..07ee5c2dad 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -25,6 +25,7 @@ import { import { scaffolderApiRef } from '../../../api'; import { SecretsContextProvider } from '../../secrets/SecretsContext'; import { ScaffolderApi } from '../../..'; +import { fireEvent } from '@testing-library/react'; describe('RepoUrlPicker', () => { const mockScaffolderApi: Partial = { @@ -38,8 +39,9 @@ describe('RepoUrlPicker', () => { }; describe('happy path rendering', () => { - it('should render the repo url picker', async () => { - const { getByRole } = await renderInTestApp( + it('should render the repo url picker with minimal props', async () => { + const onSubmit = jest.fn(); + const { getAllByRole, getByRole } = await renderInTestApp( { schema={{ type: 'string' }} uiSchema={{ 'ui:field': 'RepoUrlPicker' }} fields={{ RepoUrlPicker: RepoUrlPicker }} + onSubmit={onSubmit} /> - , , ); - await new Promise(resolve => setTimeout(resolve, 3000)); + const [ownerInput, repoInput] = getAllByRole('textbox'); + const submitButton = getByRole('button'); - console.log(getByRole('form')); + fireEvent.change(ownerInput, { target: { value: 'backstage' } }); + fireEvent.change(repoInput, { target: { value: 'repo123' } }); + + fireEvent.click(submitButton); + + expect(onSubmit).toHaveBeenCalledWith( + expect.objectContaining({ + formData: 'github.com?owner=backstage&repo=repo123', + }), + expect.anything(), + ); }); }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/utils.ts b/plugins/scaffolder/src/components/fields/RepoUrlPicker/utils.ts index d1f2302d3e..2f17f0aef7 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/utils.ts +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/utils.ts @@ -44,22 +44,22 @@ export function serializeRepoPickerUrl(data: RepoUrlPickerState) { export function parseRepoPickerUrl( url: string | undefined, ): RepoUrlPickerState { - let host = undefined; - let owner = undefined; - let repoName = undefined; - let organization = undefined; - let workspace = undefined; - let project = undefined; + let host = ''; + let owner = ''; + let repoName = ''; + let organization = ''; + let workspace = ''; + let project = ''; try { if (url) { const parsed = new URL(`https://${url}`); host = parsed.host; - owner = parsed.searchParams.get('owner') || undefined; - repoName = parsed.searchParams.get('repo') || undefined; - organization = parsed.searchParams.get('organization') || undefined; - workspace = parsed.searchParams.get('workspace') || undefined; - project = parsed.searchParams.get('project') || undefined; + owner = parsed.searchParams.get('owner') || ''; + repoName = parsed.searchParams.get('repo') || ''; + organization = parsed.searchParams.get('organization') || ''; + workspace = parsed.searchParams.get('workspace') || ''; + project = parsed.searchParams.get('project') || ''; } } catch { /* ok */ From 2ae059d35a13072cd5cafb4fbd6f67b806cdb53a Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 20:38:56 +0100 Subject: [PATCH 074/473] feat: testing the RepoUrlPicker component with SecretsContexts Signed-off-by: blam --- .../RepoUrlPicker/RepoUrlPicker.test.tsx | 85 ++++++++++++++++++- .../fields/RepoUrlPicker/RepoUrlPicker.tsx | 4 +- 2 files changed, 86 insertions(+), 3 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 07ee5c2dad..153d05c657 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -21,16 +21,18 @@ import { scmIntegrationsApiRef, ScmIntegrationsApi, scmAuthApiRef, + ScmAuthApi, } from '@backstage/integration-react'; import { scaffolderApiRef } from '../../../api'; import { SecretsContextProvider } from '../../secrets/SecretsContext'; import { ScaffolderApi } from '../../..'; -import { fireEvent } from '@testing-library/react'; +import { act, fireEvent } from '@testing-library/react'; describe('RepoUrlPicker', () => { const mockScaffolderApi: Partial = { getIntegrationsList: async () => [ { host: 'github.com', type: 'github', title: 'github.com' }, + { host: 'dev.azure.com', type: 'azure', title: 'dev.azure.com' }, ], }; @@ -38,6 +40,10 @@ describe('RepoUrlPicker', () => { byHost: () => ({ type: 'github' }), }; + const mockScmAuthApi: Partial = { + getCredentials: jest.fn().mockResolvedValue({ token: 'abc123' }), + }; + describe('happy path rendering', () => { it('should render the repo url picker with minimal props', async () => { const onSubmit = jest.fn(); @@ -75,5 +81,82 @@ describe('RepoUrlPicker', () => { expect.anything(), ); }); + + it('should render properly with allowedHosts', async () => { + const { getByRole } = await renderInTestApp( + + + + + , + ); + + expect( + getByRole('option', { name: 'dev.azure.com' }), + ).toBeInTheDocument(); + }); + }); + + describe('requestUserCredentials', () => { + it('should call the scmAuthApi with the correct params', async () => { + const { getByRole, getAllByRole } = await renderInTestApp( + + + + + , + ); + + const [ownerInput, repoInput] = getAllByRole('textbox'); + + await act(async () => { + fireEvent.change(ownerInput, { target: { value: 'backstage' } }); + fireEvent.change(repoInput, { target: { value: 'repo123' } }); + + // need to wait for the debounce to finish + await new Promise(resolve => setTimeout(resolve, 600)); + }); + + expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({ + url: 'https://github.com/backstage/repo123', + additionalScope: { + repoWrite: true, + customScopes: { + github: ['workflow:write'], + }, + }, + }); + }); }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index e436a76f3c..549bab6a9b 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -87,7 +87,7 @@ export const RepoUrlPicker = ( if ( !requestUserCredentials || - !(state.host && state.owner && !state.repoName) + !(state.host && state.owner && state.repoName) ) { return; } @@ -107,7 +107,7 @@ export const RepoUrlPicker = ( // in the templating the manifest with ${{ secrets[resultSecretsKey] }} setSecret({ [requestUserCredentials.resultSecretsKey]: token }); }, - 1000, + 500, [state, uiSchema], ); From 7d740b86c9c23dbcd570ecaebc4d3113248da407 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 20:40:03 +0100 Subject: [PATCH 075/473] chore: added a todo for test Signed-off-by: blam --- .../src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 153d05c657..67fab3c188 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -158,5 +158,7 @@ describe('RepoUrlPicker', () => { }, }); }); + + // TODO(blam): need a test here for making sure that the secret is pushed to the context }); }); From b61c34067658f55ae85be839c315320fc4002599 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 20:46:50 +0100 Subject: [PATCH 076/473] chore: generated API reports Signed-off-by: blam --- packages/integration-react/api-report.md | 7 +++++++ plugins/scaffolder/api-report.md | 15 +++++++++++++++ .../fields/RepoUrlPicker/RepoUrlPicker.test.tsx | 2 +- .../src/components/secrets/SecretsContext.tsx | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/integration-react/api-report.md b/packages/integration-react/api-report.md index 2db29631a3..5b0c9d6174 100644 --- a/packages/integration-react/api-report.md +++ b/packages/integration-react/api-report.md @@ -29,6 +29,7 @@ export class ScmAuth implements ScmAuthApi { ProfileInfoApi & BackstageIdentityApi & SessionApi; + bitbucket: OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi; } >; static forAuthApi( @@ -82,6 +83,12 @@ export const scmAuthApiRef: ApiRef; export interface ScmAuthTokenOptions extends AuthRequestOptions { additionalScope?: { repoWrite?: boolean; + customScopes?: { + github?: string[]; + azure?: string[]; + bitbucket?: string[]; + gitlab?: string[]; + }; }; url: string; } diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index b77fb5f939..cff2aab821 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -164,6 +164,16 @@ export interface RepoUrlPickerUiOptions { allowedHosts?: string[]; // (undocumented) allowedOwners?: string[]; + // (undocumented) + requestUserCredentials?: { + resultSecretsKey: string; + additionalScopes?: { + github?: string[]; + gitlab?: string[]; + bitbucket?: string[]; + azure?: string[]; + }; + }; } // @public @@ -317,4 +327,9 @@ export const TextValuePicker: ({ idSchema, placeholder, }: FieldProps) => JSX.Element; + +// @public +export const useSecretsContext: () => { + setSecret: (input: Record) => void; +}; ``` diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 67fab3c188..f10dd3ea0e 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -112,7 +112,7 @@ describe('RepoUrlPicker', () => { describe('requestUserCredentials', () => { it('should call the scmAuthApi with the correct params', async () => { - const { getByRole, getAllByRole } = await renderInTestApp( + const { getAllByRole } = await renderInTestApp( { ); } - const { secrets, setSecrets } = value; + const { setSecrets } = value; const setSecret = useCallback( (input: Record) => { From cee44ad2898bcd6aa2ac7ca7778c921c992cb864 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 25 Jan 2022 20:53:33 +0100 Subject: [PATCH 077/473] chore: added changeset Signed-off-by: blam --- .changeset/lemon-jars-teach.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/lemon-jars-teach.md diff --git a/.changeset/lemon-jars-teach.md b/.changeset/lemon-jars-teach.md new file mode 100644 index 0000000000..d8392d3a92 --- /dev/null +++ b/.changeset/lemon-jars-teach.md @@ -0,0 +1,6 @@ +--- +'@backstage/integration-react': patch +'@backstage/plugin-scaffolder': patch +--- + +Added the ability to collect users `oauth` token from the `RepoUrlPicker` for use in the template manifest From c345946703cd65082a04a7aa8825a84a2e045bdc Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 09:27:15 +0100 Subject: [PATCH 078/473] chore: added a test to check the secrets context is being updated with the secrets returned from the scmAuthApi Signed-off-by: blam --- .../RepoUrlPicker/RepoUrlPicker.test.tsx | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index f10dd3ea0e..8456825462 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import React from 'react'; +import React, { useContext } from 'react'; import { RepoUrlPicker } from './RepoUrlPicker'; import Form from '@rjsf/core'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; @@ -24,7 +24,10 @@ import { ScmAuthApi, } from '@backstage/integration-react'; import { scaffolderApiRef } from '../../../api'; -import { SecretsContextProvider } from '../../secrets/SecretsContext'; +import { + SecretsContextProvider, + SecretsContext, +} from '../../secrets/SecretsContext'; import { ScaffolderApi } from '../../..'; import { act, fireEvent } from '@testing-library/react'; @@ -112,7 +115,11 @@ describe('RepoUrlPicker', () => { describe('requestUserCredentials', () => { it('should call the scmAuthApi with the correct params', async () => { - const { getAllByRole } = await renderInTestApp( + const SecretsComponent = () => { + const value = useContext(SecretsContext); + return
{JSON.stringify(value)}
; + }; + const { getAllByRole, getByTestId } = await renderInTestApp( { }} fields={{ RepoUrlPicker: RepoUrlPicker }} /> + , ); @@ -157,8 +165,14 @@ describe('RepoUrlPicker', () => { }, }, }); - }); - // TODO(blam): need a test here for making sure that the secret is pushed to the context + const currentSecrets = JSON.parse( + getByTestId('current-secrets').textContent!, + ); + + expect(currentSecrets).toEqual({ + secrets: { testKey: 'abc123' }, + }); + }); }); }); From c91ba8cf2fe1a4ee779c5a8266191a2d906c50b3 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 09:42:29 +0100 Subject: [PATCH 079/473] feat: Added the ability for the scaffolder backend engine to template secrets into the input of actions Signed-off-by: blam --- .../tasks/NunjucksWorkflowRunner.test.ts | 54 +++++++++++++++++++ .../tasks/NunjucksWorkflowRunner.ts | 9 +++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts index 161d5b865b..2fc6b99406 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts @@ -497,6 +497,60 @@ describe('DefaultWorkflowRunner', () => { expect.objectContaining({ secrets: { foo: 'bar' } }), ); }); + + it('should be able to template secrets into the input of an action', async () => { + const task = createMockTaskWithSpec( + { + apiVersion: 'scaffolder.backstage.io/v1beta3', + steps: [ + { + id: 'test', + name: 'name', + action: 'jest-mock-action', + input: { + b: '${{ secrets.foo }}', + }, + }, + ], + output: {}, + parameters: {}, + }, + { foo: 'bar' }, + ); + + await runner.execute(task); + + expect(fakeActionHandler).toHaveBeenCalledWith( + expect.objectContaining({ input: { b: 'bar' } }), + ); + }); + + it('does not allow templating of secrets as an output', async () => { + const task = createMockTaskWithSpec( + { + apiVersion: 'scaffolder.backstage.io/v1beta3', + steps: [ + { + id: 'test', + name: 'name', + action: 'jest-mock-action', + input: { + b: '${{ secrets.foo }}', + }, + }, + ], + output: { + b: '${{ secrets.foo }}', + }, + parameters: {}, + }, + { foo: 'bar' }, + ); + + const executedTask = await runner.execute(task); + + expect(executedTask.output.b).toBeUndefined(); + }); }); describe('filters', () => { diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index 5089998834..889e94d000 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -53,6 +53,7 @@ type TemplateContext = { steps: { [stepName: string]: { output: { [outputName: string]: JsonValue } }; }; + secrets?: Record; }; const isValidTaskSpec = (taskSpec: TaskSpec): taskSpec is TaskSpecV1beta3 => { @@ -231,8 +232,14 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { const action = this.options.actionRegistry.get(step.action); const { taskLogger, streamLogger } = createStepLogger({ task, step }); + // Secrets are only passed when templating the input to actions for security reasons const input = - (step.input && this.render(step.input, context, renderTemplate)) ?? + (step.input && + this.render( + step.input, + { ...context, secrets: task.secrets ?? {} }, + renderTemplate, + )) ?? {}; if (action.schema?.input) { From 2c34749bb66bef1b3ce12acb0fe409024044677a Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 16:23:05 +0100 Subject: [PATCH 080/473] feat: added support for overriding the token used for publish actions. Signed-off-by: blam --- .../builtin/github/OctokitProvider.test.ts | 11 +++++ .../actions/builtin/github/OctokitProvider.ts | 19 ++++++++- .../builtin/github/githubActionsDispatch.ts | 20 +++++++-- .../actions/builtin/github/githubWebhook.ts | 12 +++++- .../actions/builtin/publish/azure.ts | 20 ++++++--- .../actions/builtin/publish/bitbucket.ts | 41 +++++++++++++++---- .../actions/builtin/publish/github.ts | 14 ++++++- .../builtin/publish/githubPullRequest.ts | 21 +++++++++- .../actions/builtin/publish/gitlab.ts | 17 ++++++-- .../builtin/publish/gitlabMergeRequest.ts | 12 +++++- 10 files changed, 157 insertions(+), 30 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.test.ts index 0d4353c857..e2449917ab 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.test.ts @@ -74,4 +74,15 @@ describe('getOctokit', () => { expect(owner).toBe('owner'); expect(repo).toBe('bob'); }); + + it('should return an octokit client with the passed in token if it is provided', async () => { + const { client, token, owner, repo } = await octokitProvider.getOctokit( + 'github.com?repo=bob&owner=owner', + { token: 'tokenlols2' }, + ); + expect(client).toBeDefined(); + expect(token).toBe('tokenlols2'); + expect(owner).toBe('owner'); + expect(repo).toBe('bob'); + }); }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts index a3eeec4373..3ac66a0023 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/OctokitProvider.ts @@ -52,7 +52,10 @@ export class OctokitProvider { * * @param repoUrl - Repository URL */ - async getOctokit(repoUrl: string): Promise { + async getOctokit( + repoUrl: string, + options?: { token?: string }, + ): Promise { const { owner, repo, host } = parseRepoUrl(repoUrl, this.integrations); if (!owner) { @@ -65,7 +68,19 @@ export class OctokitProvider { throw new InputError(`No integration for host ${host}`); } - // TODO(blam): Consider changing this API to have owner, repo interface instead of URL as the it's + // Short circuit the internal Github Token provider the token provided + // by the action or the caller. + if (options?.token) { + const client = new Octokit({ + auth: options.token, + baseUrl: integrationConfig.apiBaseUrl, + previews: ['nebula-preview'], + }); + + return { client, token: options.token, owner, repo }; + } + + // TODO(blam): Consider changing this API to have owner, repoo interface instead of URL as the it's // needless to create URL and then parse again the other side. const { token } = await this.githubCredentialsProvider.getCredentials({ url: `https://${host}/${encodeURIComponent(owner)}/${encodeURIComponent( diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.ts index 1f7f0f60b9..0c8b4d4aab 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubActionsDispatch.ts @@ -37,6 +37,7 @@ export function createGithubActionsDispatchAction(options: { workflowId: string; branchOrTagName: string; workflowInputs?: { [key: string]: string }; + token?: string; }>({ id: 'github:actions:dispatch', description: @@ -68,18 +69,31 @@ export function createGithubActionsDispatchAction(options: { 'Inputs keys and values to send to GitHub Action configured on the workflow file. The maximum number of properties is 10. ', type: 'object', }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The GITHUB_TOKEN to use for authorization to GitHub', + }, }, }, }, async handler(ctx) { - const { repoUrl, workflowId, branchOrTagName, workflowInputs } = - ctx.input; + const { + repoUrl, + workflowId, + branchOrTagName, + workflowInputs, + token: providedToken, + } = ctx.input; ctx.logger.info( `Dispatching workflow ${workflowId} for repo ${repoUrl} on ${branchOrTagName}`, ); - const { client, owner, repo } = await octokitProvider.getOctokit(repoUrl); + const { client, owner, repo } = await octokitProvider.getOctokit( + repoUrl, + { token: providedToken }, + ); await client.rest.actions.createWorkflowDispatch({ owner, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts index 39e8c3aa70..660c7793f2 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubWebhook.ts @@ -47,6 +47,7 @@ export function createGithubWebhookAction(options: { active?: boolean; contentType?: ContentType; insecureSsl?: boolean; + token?: string; }>({ id: 'github:webhook', description: 'Creates webhook for a repository on GitHub.', @@ -107,6 +108,11 @@ export function createGithubWebhookAction(options: { type: 'boolean', description: `Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Default 'false'`, }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The GITHUB_TOKEN to use for authorization to GitHub', + }, }, }, }, @@ -119,11 +125,15 @@ export function createGithubWebhookAction(options: { active = true, contentType = 'form', insecureSsl = false, + token: providedToken, } = ctx.input; ctx.logger.info(`Creating webhook ${webhookUrl} for repo ${repoUrl}`); - const { client, owner, repo } = await octokitProvider.getOctokit(repoUrl); + const { client, owner, repo } = await octokitProvider.getOctokit( + repoUrl, + { token: providedToken }, + ); try { const insecure_ssl = insecureSsl ? '1' : '0'; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts index 7e394a8d8b..2fd26c9de8 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts @@ -34,6 +34,7 @@ export function createPublishAzureAction(options: { description?: string; defaultBranch?: string; sourcePath?: string; + token?: string; }>({ id: 'publish:azure', description: @@ -57,10 +58,16 @@ export function createPublishAzureAction(options: { description: `Sets the default branch on the repository. The default value is 'master'`, }, sourcePath: { - title: + title: 'Source Path', + description: 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', type: 'string', }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The AZURE_TOKEN to use for authorization to Azure', + }, }, }, output: { @@ -98,12 +105,13 @@ export function createPublishAzureAction(options: { `No matching integration configuration for host ${host}, please check your integrations config`, ); } - if (!integrationConfig.config.token) { + + if (!integrationConfig.config.token && !ctx.input.token) { throw new InputError(`No token provided for Azure Integration ${host}`); } - const authHandler = getPersonalAccessTokenHandler( - integrationConfig.config.token, - ); + + const token = ctx.input.token ?? integrationConfig.config.token!; + const authHandler = getPersonalAccessTokenHandler(token); const webApi = new WebApi(`https://${host}/${organization}`, authHandler); const client = await webApi.getGitApi(); @@ -139,7 +147,7 @@ export function createPublishAzureAction(options: { defaultBranch, auth: { username: 'notempty', - password: integrationConfig.config.token, + password: token, }, logger: ctx.logger, commitMessage: config.getOptionalString( diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts index fbfe87b076..bc0be1a309 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts @@ -205,6 +205,7 @@ export function createPublishBitbucketAction(options: { repoVisibility: 'private' | 'public'; sourcePath?: string; enableLFS: boolean; + token?: string; }>({ id: 'publish:bitbucket', description: @@ -233,15 +234,23 @@ export function createPublishBitbucketAction(options: { description: `Sets the default branch on the repository. The default value is 'master'`, }, sourcePath: { - title: + title: 'Source Path', + description: 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', type: 'string', }, enableLFS: { - title: + title: 'Enable LFS?', + description: 'Enable LFS for the repository. Only available for hosted Bitbucket.', type: 'boolean', }, + token: { + title: 'Authentication Token', + type: 'string', + description: + 'The BITBUCKET_TOKEN to use for authorization to BitBucket', + }, }, }, output: { @@ -296,7 +305,12 @@ export function createPublishBitbucketAction(options: { ); } - const authorization = getAuthorizationHeader(integrationConfig.config); + const authorization = getAuthorizationHeader( + ctx.input.token + ? { host: integrationConfig.config.host, token: ctx.input.token } + : integrationConfig.config, + ); + const apiBaseUrl = integrationConfig.config.apiBaseUrl; const createMethod = @@ -320,17 +334,28 @@ export function createPublishBitbucketAction(options: { email: config.getOptionalString('scaffolder.defaultAuthor.email'), }; - await initRepoAndPush({ - dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), - remoteUrl, - auth: { + let auth; + + if (ctx.input.token) { + auth = { + username: 'x-token-auth', + password: ctx.input.token, + }; + } else { + auth = { username: integrationConfig.config.username ? integrationConfig.config.username : 'x-token-auth', password: integrationConfig.config.appPassword ? integrationConfig.config.appPassword : integrationConfig.config.token ?? '', - }, + }; + } + + await initRepoAndPush({ + dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), + remoteUrl, + auth, defaultBranch, logger: ctx.logger, commitMessage: config.getOptionalString( diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index 081f9616ac..c91c703eaa 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -52,6 +52,7 @@ export function createPublishGithubAction(options: { requireCodeOwnerReviews?: boolean; repoVisibility: 'private' | 'internal' | 'public'; collaborators: Collaborator[]; + token?: string; topics?: string[]; }>({ id: 'publish:github', @@ -77,7 +78,8 @@ export function createPublishGithubAction(options: { type: 'string', }, requireCodeOwnerReviews: { - title: + title: 'Require CODEOWNER Reviews?', + description: 'Require an approved review in PR including files with a designated Code Owner', type: 'boolean', }, @@ -92,7 +94,8 @@ export function createPublishGithubAction(options: { description: `Sets the default branch on the repository. The default value is 'master'`, }, sourcePath: { - title: + title: 'Source Path', + description: 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', type: 'string', }, @@ -116,6 +119,11 @@ export function createPublishGithubAction(options: { }, }, }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The GITHUB_TOKEN to use for authorization to GitHub', + }, topics: { title: 'Topics', type: 'array', @@ -149,10 +157,12 @@ export function createPublishGithubAction(options: { defaultBranch = 'master', collaborators, topics, + token: providedToken, } = ctx.input; const { client, token, owner, repo } = await octokitProvider.getOctokit( repoUrl, + { token: providedToken }, ); const user = await client.rest.users.getByUsername({ diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts index 841d4c7a82..50d54c93c8 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts @@ -55,6 +55,7 @@ export type GithubPullRequestActionInput = { repoUrl: string; targetPath?: string; sourcePath?: string; + token?: string; }; export type ClientFactoryInput = { @@ -63,6 +64,7 @@ export type ClientFactoryInput = { host: string; owner: string; repo: string; + token?: string; }; export const defaultClientFactory = async ({ @@ -71,13 +73,22 @@ export const defaultClientFactory = async ({ owner, repo, host = 'github.com', + token: providedToken, }: ClientFactoryInput): Promise => { const integrationConfig = integrations.github.byHost(host)?.config; + const OctokitPR = Octokit.plugin(createPullRequest); if (!integrationConfig) { throw new InputError(`No integration for host ${host}`); } + if (providedToken) { + return new OctokitPR({ + auth: providedToken, + baseUrl: integrationConfig.apiBaseUrl, + }); + } + const credentialsProvider = githubCredentialsProvider || SingleInstanceGithubCredentialsProvider.create(integrationConfig); @@ -94,8 +105,6 @@ export const defaultClientFactory = async ({ ); } - const OctokitPR = Octokit.plugin(createPullRequest); - return new OctokitPR({ auth: token, baseUrl: integrationConfig.apiBaseUrl, @@ -151,6 +160,11 @@ export const createPublishGithubPullRequestAction = ({ title: 'Repository Subdirectory', description: 'Subdirectory of repository to apply changes to', }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The GITHUB_TOKEN to use for authorization to GitHub', + }, }, }, output: { @@ -173,6 +187,7 @@ export const createPublishGithubPullRequestAction = ({ description, targetPath, sourcePath, + token: providedToken, } = ctx.input; const { owner, repo, host } = parseRepoUrl(repoUrl, integrations); @@ -189,7 +204,9 @@ export const createPublishGithubPullRequestAction = ({ host, owner, repo, + token: providedToken, }); + const fileRoot = sourcePath ? resolveSafeChildPath(ctx.workspacePath, sourcePath) : ctx.workspacePath; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts index 5941f52746..be81db45d8 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts @@ -33,6 +33,7 @@ export function createPublishGitlabAction(options: { defaultBranch?: string; repoVisibility: 'private' | 'internal' | 'public'; sourcePath?: string; + token?: string; }>({ id: 'publish:gitlab', description: @@ -57,10 +58,16 @@ export function createPublishGitlabAction(options: { description: `Sets the default branch on the repository. The default value is 'master'`, }, sourcePath: { - title: + title: 'Source Path', + description: 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', type: 'string', }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The GITLAB_TOKEN to use for authorization to GitLab', + }, }, }, output: { @@ -100,13 +107,15 @@ export function createPublishGitlabAction(options: { ); } - if (!integrationConfig.config.token) { + if (!integrationConfig.config.token && !ctx.input.token) { throw new InputError(`No token available for host ${host}`); } + const token = ctx.input.token || integrationConfig.config.token!; + const client = new Gitlab({ host: integrationConfig.config.baseUrl, - token: integrationConfig.config.token, + token, }); let { id: targetNamespace } = (await client.Namespaces.show(owner)) as { @@ -140,7 +149,7 @@ export function createPublishGitlabAction(options: { defaultBranch, auth: { username: 'oauth2', - password: integrationConfig.config.token, + password: token, }, logger: ctx.logger, commitMessage: config.getOptionalString( diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index 2ac369249b..9ed4efe748 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -31,6 +31,7 @@ export type GitlabMergeRequestActionInput = { description: string; branchName: string; targetPath: string; + token?: string; }; export const createPublishGitlabMergeRequestAction = (options: { @@ -75,6 +76,11 @@ export const createPublishGitlabMergeRequestAction = (options: { title: 'Repository Subdirectory', description: 'Subdirectory of repository to apply changes to', }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The GITLAB_TOKEN to use for authorization to GitLab', + }, }, }, output: { @@ -107,13 +113,15 @@ export const createPublishGitlabMergeRequestAction = (options: { ); } - if (!integrationConfig.config.token) { + if (!integrationConfig.config.token && !ctx.input.token) { throw new InputError(`No token available for host ${host}`); } + const token = ctx.input.token ?? integrationConfig.config.token!; + const api = new Gitlab({ host: integrationConfig.config.baseUrl, - token: integrationConfig.config.token, + token, }); const fileRoot = ctx.workspacePath; From 72eccc0f5dc6dbbf52df81b12105c74892caa343 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 17:47:26 +0100 Subject: [PATCH 081/473] chore: added tests for ensuring that the token is used properly when passed into the actions Signed-off-by: blam --- .../actions/builtin/publish/azure.test.ts | 26 +++++++++++++ .../actions/builtin/publish/bitbucket.test.ts | 39 +++++++++++++++++++ .../actions/builtin/publish/gitlab.test.ts | 22 +++++++++++ 3 files changed, 87 insertions(+) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.test.ts index cee99e1646..9247109121 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.test.ts @@ -119,6 +119,32 @@ describe('publish:azure', () => { ).rejects.toThrow(/Unable to create the repository/); }); + it('should not throw if there is a token provided through ctx.input', async () => { + mockGitClient.createRepository.mockImplementation(() => ({ + remoteUrl: 'http://google.com', + })); + + await action.handler({ + ...mockContext, + input: { + repoUrl: 'myazurehostnotoken.com?repo=bob&owner=owner&organization=org', + token: 'lols', + }, + }); + + expect(WebApi).toHaveBeenCalledWith( + 'https://myazurehostnotoken.com/org', + expect.any(Function), + ); + + expect(mockGitClient.createRepository).toHaveBeenCalledWith( + { + name: 'bob', + }, + 'owner', + ); + }); + it('should throw if there is no remoteUrl returned', async () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: null, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.test.ts index 2678abd9dd..3d14710f3e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.test.ts @@ -194,6 +194,45 @@ describe('publish:bitbucket', () => { }); }); + it('should work if the token is provided through ctx.input', async () => { + expect.assertions(2); + server.use( + rest.post( + 'https://notoken.bitbucket.com/rest/api/1.0/projects/project/repos', + (req, res, ctx) => { + expect(req.headers.get('Authorization')).toBe('Bearer lols'); + expect(req.body).toEqual({ public: false, name: 'repo' }); + return res( + ctx.status(201), + ctx.set('Content-Type', 'application/json'), + ctx.json({ + links: { + self: [ + { + href: 'https://bitbucket.mycompany.com/projects/project/repos/repo', + }, + ], + clone: [ + { + name: 'http', + href: 'https://bitbucket.mycompany.com/scm/project/repo', + }, + ], + }, + }), + ); + }, + ), + ); + await action.handler({ + ...mockContext, + input: { + repoUrl: 'notoken.bitbucket.com?project=project&repo=repo', + token: 'lols', + }, + }); + }); + describe('LFS for hosted bitbucket', () => { const repoCreationResponse = { links: { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.test.ts index 2cd27da359..a32fea8830 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.test.ts @@ -96,6 +96,28 @@ describe('publish:gitlab', () => { ).rejects.toThrow(/No token available for host/); }); + it('should work when there is a token provided through ctx.input', async () => { + mockGitlabClient.Namespaces.show.mockResolvedValue({ id: 1234 }); + mockGitlabClient.Projects.create.mockResolvedValue({ + http_url_to_repo: 'http://mockurl.git', + }); + + await action.handler({ + ...mockContext, + input: { + repoUrl: 'hosted.gitlab.com?repo=bob&owner=owner', + token: 'token', + }, + }); + + expect(mockGitlabClient.Namespaces.show).toHaveBeenCalledWith('owner'); + expect(mockGitlabClient.Projects.create).toHaveBeenCalledWith({ + namespace_id: 1234, + name: 'bob', + visibility: 'private', + }); + }); + it('should call the correct Gitlab APIs when the owner is an organization', async () => { mockGitlabClient.Namespaces.show.mockResolvedValue({ id: 1234 }); mockGitlabClient.Projects.create.mockResolvedValue({ From 0f264c4f842c7010109339d53d99e5a108d107ff Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 17:55:16 +0100 Subject: [PATCH 082/473] chore: api-reports needed updating for scaffolder bacend Signed-off-by: blam --- plugins/scaffolder-backend/api-report.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index cfe8f5d2b0..5e7b5a428b 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -299,7 +299,12 @@ export class OctokitProvider { githubCredentialsProvider?: GithubCredentialsProvider, ); // Warning: (ae-forgotten-export) The symbol "OctokitIntegration" needs to be exported by the entry point index.d.ts - getOctokit(repoUrl: string): Promise; + getOctokit( + repoUrl: string, + options?: { + token?: string; + }, + ): Promise; } // @public From c95df1631e4ae930dfbbd172520699e2256f3040 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 18:08:13 +0100 Subject: [PATCH 083/473] chore: added changeset and updating documentation about being able to grab the user token Signed-off-by: blam --- .changeset/twenty-queens-scream.md | 5 + .../software-templates/writing-templates.md | 115 ++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 .changeset/twenty-queens-scream.md diff --git a/.changeset/twenty-queens-scream.md b/.changeset/twenty-queens-scream.md new file mode 100644 index 0000000000..4ea1152ae2 --- /dev/null +++ b/.changeset/twenty-queens-scream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +Added support for templating secrets into actions input, and also added an extra `token` input argument to all publishers to provide a token that would override the `integrations.config` diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index a1dffe1580..22525541f3 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -287,6 +287,121 @@ The `RepoUrlPicker` is a custom field that we provide part of the `plugin-scaffolder`. You can provide your own custom fields by [writing your own Custom Field Extensions](./writing-custom-field-extensions.md) +##### Using the Users `oauth` token + +There's a little bit of extra magic that you get out of the box when using the +`RepoUrlPicker` as a field input. You can provide some additional options under +`ui:options` to allow the `RepoUrlPicker` to grab an `oauth` token for the user +for the required `repository`. + +This is great for when you are wanting to create a new repository, or wanting to +perform operations on top of an existing repository. + +A sample template that takes advantage of this is like so: + +```yaml +# Notice the v1beta3 version +apiVersion: scaffolder.backstage.io/v1beta3 +kind: Template +# some metadata about the template itself +metadata: + name: v1beta3-demo + title: Test Action template + description: scaffolder v1beta3 template demo +spec: + owner: backstage/techdocs-core + type: service + + # these are the steps which are rendered in the frontend with the form input + parameters: + - title: Fill in some steps + required: + - name + properties: + name: + title: Name + type: string + description: Unique name of the component + ui:autofocus: true + ui:options: + rows: 5 + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + allowedKinds: + - Group + - title: Choose a location + required: + - repoUrl + properties: + repoUrl: + title: Repository Location + type: string + ui:field: RepoUrlPicker + ui:options: + requestUserCredentials: + resultSecretsKey: USER_OAUTH_TOKEN + additionalScopes: + github: + - workflow:write + allowedHosts: + - github.com + + # here's the steps that are executed in series in the scaffolder backend + steps: + - id: fetch-base + name: Fetch Base + action: fetch:template + input: + url: ./template + values: + name: ${{ parameters.name }} + owner: ${{ parameters.owner }} + + - id: fetch-docs + name: Fetch Docs + action: fetch:plain + input: + targetPath: ./community + url: https://github.com/backstage/community/tree/main/backstage-community-sessions + + - id: publish + name: Publish + action: publish:github + input: + allowedHosts: ['github.com'] + description: This is ${{ parameters.name }} + repoUrl: ${{ parameters.repoUrl }} + token: ${{ secrets.USER_OAUTH_TOKEN }} + + - id: register + name: Register + action: catalog:register + input: + repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} + catalogInfoPath: '/catalog-info.yaml' + + # some outputs which are saved along with the job for use in the frontend + output: + remoteUrl: ${{ steps.publish.output.remoteUrl }} + entityRef: ${{ steps.register.output.entityRef }} +``` + +You will see from above that there is an additional `requestUserCredentials` +object that is passed to the `RepoUrlPicker`. This object defines what the +returned `secret` should be stored as when accessing using +`${{ secrets.secretName }}`, in this case it is `USER_OAUTH_TOKEN`. And then you +will see that there is an additional `input` field into the `publish:github` +action called `token`, in which you can use the `secret` like so: +`token: ${{ secrets.USER_OAUTH_TOKEN }}`. + +There's also the ability to pass additional scopes when requesting the `oauth` +token from the user, which you can do on a per-provider basis, in case your +template can be published to multiple providers. + #### The Owner Picker When the scaffolder needs to add new components to the catalog, it needs to have From b856b156c2ee96660627dcc2f46e1c4a06a3b06e Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 26 Jan 2022 18:13:01 +0100 Subject: [PATCH 084/473] docs: making the docs a little clearer Signed-off-by: blam --- .../software-templates/writing-templates.md | 56 +++---------------- 1 file changed, 7 insertions(+), 49 deletions(-) diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 22525541f3..398e18dfd1 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -300,10 +300,8 @@ perform operations on top of an existing repository. A sample template that takes advantage of this is like so: ```yaml -# Notice the v1beta3 version apiVersion: scaffolder.backstage.io/v1beta3 kind: Template -# some metadata about the template itself metadata: name: v1beta3-demo title: Test Action template @@ -312,27 +310,9 @@ spec: owner: backstage/techdocs-core type: service - # these are the steps which are rendered in the frontend with the form input parameters: - - title: Fill in some steps - required: - - name - properties: - name: - title: Name - type: string - description: Unique name of the component - ui:autofocus: true - ui:options: - rows: 5 - owner: - title: Owner - type: string - description: Owner of the component - ui:field: OwnerPicker - ui:options: - allowedKinds: - - Group + ... + - title: Choose a location required: - repoUrl @@ -342,6 +322,7 @@ spec: type: string ui:field: RepoUrlPicker ui:options: + # here's the new option you can pass to the RepoUrlPicker requestUserCredentials: resultSecretsKey: USER_OAUTH_TOKEN additionalScopes: @@ -349,24 +330,10 @@ spec: - workflow:write allowedHosts: - github.com + ... - # here's the steps that are executed in series in the scaffolder backend steps: - - id: fetch-base - name: Fetch Base - action: fetch:template - input: - url: ./template - values: - name: ${{ parameters.name }} - owner: ${{ parameters.owner }} - - - id: fetch-docs - name: Fetch Docs - action: fetch:plain - input: - targetPath: ./community - url: https://github.com/backstage/community/tree/main/backstage-community-sessions + ... - id: publish name: Publish @@ -375,19 +342,10 @@ spec: allowedHosts: ['github.com'] description: This is ${{ parameters.name }} repoUrl: ${{ parameters.repoUrl }} + # here's where the secret can be used token: ${{ secrets.USER_OAUTH_TOKEN }} - - id: register - name: Register - action: catalog:register - input: - repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} - catalogInfoPath: '/catalog-info.yaml' - - # some outputs which are saved along with the job for use in the frontend - output: - remoteUrl: ${{ steps.publish.output.remoteUrl }} - entityRef: ${{ steps.register.output.entityRef }} + ... ``` You will see from above that there is an additional `requestUserCredentials` From c1be2801a9011704bc677b88f9789e7fcc6dcd7d Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 31 Jan 2022 20:53:13 +0100 Subject: [PATCH 085/473] chore: rewording `PROVIDER_TOKEN` to `token` Signed-off-by: blam --- .../src/scaffolder/actions/builtin/publish/azure.ts | 2 +- .../src/scaffolder/actions/builtin/publish/bitbucket.ts | 3 +-- .../src/scaffolder/actions/builtin/publish/github.ts | 2 +- .../scaffolder/actions/builtin/publish/githubPullRequest.ts | 2 +- .../src/scaffolder/actions/builtin/publish/gitlab.ts | 2 +- .../scaffolder/actions/builtin/publish/gitlabMergeRequest.ts | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts index 2fd26c9de8..4f67a0e45f 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts @@ -66,7 +66,7 @@ export function createPublishAzureAction(options: { token: { title: 'Authentication Token', type: 'string', - description: 'The AZURE_TOKEN to use for authorization to Azure', + description: 'The token to use for authorization to Azure', }, }, }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts index bc0be1a309..8ba8592642 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts @@ -248,8 +248,7 @@ export function createPublishBitbucketAction(options: { token: { title: 'Authentication Token', type: 'string', - description: - 'The BITBUCKET_TOKEN to use for authorization to BitBucket', + description: 'The token to use for authorization to BitBucket', }, }, }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index c91c703eaa..139fad04d4 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -122,7 +122,7 @@ export function createPublishGithubAction(options: { token: { title: 'Authentication Token', type: 'string', - description: 'The GITHUB_TOKEN to use for authorization to GitHub', + description: 'The token to use for authorization to GitHub', }, topics: { title: 'Topics', diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts index 50d54c93c8..80333c4966 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts @@ -163,7 +163,7 @@ export const createPublishGithubPullRequestAction = ({ token: { title: 'Authentication Token', type: 'string', - description: 'The GITHUB_TOKEN to use for authorization to GitHub', + description: 'The token to use for authorization to GitHub', }, }, }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts index be81db45d8..a04766f941 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts @@ -66,7 +66,7 @@ export function createPublishGitlabAction(options: { token: { title: 'Authentication Token', type: 'string', - description: 'The GITLAB_TOKEN to use for authorization to GitLab', + description: 'The token to use for authorization to GitLab', }, }, }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index 9ed4efe748..281b72789f 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -79,7 +79,7 @@ export const createPublishGitlabMergeRequestAction = (options: { token: { title: 'Authentication Token', type: 'string', - description: 'The GITLAB_TOKEN to use for authorization to GitLab', + description: 'The token to use for authorization to GitLab', }, }, }, From 37a3fc75c06fa51a9e2dfb85ae54a5eb7ad28d60 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 31 Jan 2022 20:58:51 +0100 Subject: [PATCH 086/473] chore: more code review fixes Signed-off-by: blam --- docs/features/software-templates/writing-templates.md | 4 ++-- plugins/scaffolder/api-report.md | 4 ++-- .../fields/RepoUrlPicker/RepoUrlPicker.test.tsx | 2 +- .../components/fields/RepoUrlPicker/RepoUrlPicker.tsx | 10 +++++----- .../src/components/secrets/SecretsContext.test.tsx | 4 ++-- .../src/components/secrets/SecretsContext.tsx | 4 ++-- plugins/scaffolder/src/components/secrets/index.ts | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 398e18dfd1..415f8cd85e 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -322,9 +322,9 @@ spec: type: string ui:field: RepoUrlPicker ui:options: - # here's the new option you can pass to the RepoUrlPicker + # Here's the option you can pass to the RepoUrlPicker requestUserCredentials: - resultSecretsKey: USER_OAUTH_TOKEN + secretsKey: USER_OAUTH_TOKEN additionalScopes: github: - workflow:write diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index cff2aab821..80b5faf201 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -166,7 +166,7 @@ export interface RepoUrlPickerUiOptions { allowedOwners?: string[]; // (undocumented) requestUserCredentials?: { - resultSecretsKey: string; + secretsKey: string; additionalScopes?: { github?: string[]; gitlab?: string[]; @@ -329,7 +329,7 @@ export const TextValuePicker: ({ }: FieldProps) => JSX.Element; // @public -export const useSecretsContext: () => { +export const useTemplateSecrets: () => { setSecret: (input: Record) => void; }; ``` diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 8456825462..3769176cb4 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -134,7 +134,7 @@ describe('RepoUrlPicker', () => { 'ui:field': 'RepoUrlPicker', 'ui:options': { requestUserCredentials: { - resultSecretsKey: 'testKey', + secretsKey: 'testKey', additionalScopes: { github: ['workflow:write'] }, }, }, diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index 549bab6a9b..c8b1a0cf31 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -28,13 +28,13 @@ import { RepoUrlPickerHost } from './RepoUrlPickerHost'; import { parseRepoPickerUrl, serializeRepoPickerUrl } from './utils'; import { RepoUrlPickerState } from './types'; import useDebounce from 'react-use/lib/useDebounce'; -import { useSecretsContext } from '../../secrets'; +import { useTemplateSecrets } from '../../secrets'; export interface RepoUrlPickerUiOptions { allowedHosts?: string[]; allowedOwners?: string[]; requestUserCredentials?: { - resultSecretsKey: string; + secretsKey: string; additionalScopes?: { github?: string[]; gitlab?: string[]; @@ -53,7 +53,7 @@ export const RepoUrlPicker = ( ); const integrationApi = useApi(scmIntegrationsApiRef); const scmAuthApi = useApi(scmAuthApiRef); - const { setSecret } = useSecretsContext(); + const { setSecret } = useTemplateSecrets(); const allowedHosts = useMemo( () => uiSchema?.['ui:options']?.allowedHosts ?? [], [uiSchema], @@ -104,8 +104,8 @@ export const RepoUrlPicker = ( }); // set the secret using the key provided in the the ui:options for use - // in the templating the manifest with ${{ secrets[resultSecretsKey] }} - setSecret({ [requestUserCredentials.resultSecretsKey]: token }); + // in the templating the manifest with ${{ secrets[secretsKey] }} + setSecret({ [requestUserCredentials.secretsKey]: token }); }, 500, [state, uiSchema], diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx index 5699b3188a..37d35c9015 100644 --- a/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.test.tsx @@ -15,7 +15,7 @@ */ import React, { useContext } from 'react'; import { - useSecretsContext, + useTemplateSecrets, SecretsContextProvider, SecretsContext, } from './SecretsContext'; @@ -25,7 +25,7 @@ describe('SecretsContext', () => { it('should allow the setting of secrets in the context', async () => { const { result } = renderHook( () => ({ - hook: useSecretsContext(), + hook: useTemplateSecrets(), context: useContext(SecretsContext), }), { diff --git a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx index f66171b0dd..6570f9d901 100644 --- a/plugins/scaffolder/src/components/secrets/SecretsContext.tsx +++ b/plugins/scaffolder/src/components/secrets/SecretsContext.tsx @@ -52,11 +52,11 @@ export const SecretsContextProvider = ({ children }: PropsWithChildren<{}>) => { * Hook to access the secrets context. * @public */ -export const useSecretsContext = () => { +export const useTemplateSecrets = () => { const value = useContext(SecretsContext); if (!value) { throw new Error( - 'useSecretsContext must be used within a SecretsContextProvider', + 'useTemplateSecrets must be used within a SecretsContextProvider', ); } diff --git a/plugins/scaffolder/src/components/secrets/index.ts b/plugins/scaffolder/src/components/secrets/index.ts index 2f2cbdf7ac..44adb2a00a 100644 --- a/plugins/scaffolder/src/components/secrets/index.ts +++ b/plugins/scaffolder/src/components/secrets/index.ts @@ -13,4 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { useSecretsContext } from './SecretsContext'; +export { useTemplateSecrets } from './SecretsContext'; From ac23003f62f18a969a4ac8a0c6a52a72d8ef156f Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 31 Jan 2022 21:17:53 +0100 Subject: [PATCH 087/473] chore: encode some values too Signed-off-by: blam --- .../fields/RepoUrlPicker/RepoUrlPicker.test.tsx | 3 +-- .../src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 3769176cb4..829495cdda 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -23,12 +23,11 @@ import { scmAuthApiRef, ScmAuthApi, } from '@backstage/integration-react'; -import { scaffolderApiRef } from '../../../api'; +import { scaffolderApiRef, ScaffolderApi } from '../../../api'; import { SecretsContextProvider, SecretsContext, } from '../../secrets/SecretsContext'; -import { ScaffolderApi } from '../../..'; import { act, fireEvent } from '@testing-library/react'; describe('RepoUrlPicker', () => { diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index c8b1a0cf31..1ccaed4e86 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -92,11 +92,17 @@ export const RepoUrlPicker = ( return; } + const [host, owner, repoName] = [ + state.host, + state.owner, + state.repoName, + ].map(encodeURIComponent); + // user has requested that we use the users credentials // so lets grab them using the scmAuthApi and pass through // any additional scopes from the ui:options const { token } = await scmAuthApi.getCredentials({ - url: `https://${state.host}/${state.owner}/${state.repoName}`, + url: `https://${host}/${owner}/${repoName}`, additionalScope: { repoWrite: true, customScopes: requestUserCredentials.additionalScopes, From 7d2589de9da5bb25e4e0a60129fa12becccc3f37 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 31 Jan 2022 21:24:35 +0100 Subject: [PATCH 088/473] chore: adding a link to the docs Signed-off-by: blam --- .changeset/twenty-queens-scream.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/twenty-queens-scream.md b/.changeset/twenty-queens-scream.md index 4ea1152ae2..92626ed12c 100644 --- a/.changeset/twenty-queens-scream.md +++ b/.changeset/twenty-queens-scream.md @@ -2,4 +2,5 @@ '@backstage/plugin-scaffolder-backend': patch --- -Added support for templating secrets into actions input, and also added an extra `token` input argument to all publishers to provide a token that would override the `integrations.config` +Added support for templating secrets into actions input, and also added an extra `token` input argument to all publishers to provide a token that would override the `integrations.config`. +You can find more information over at [Writing Templates](https://backstage.io/docs/features/software-templates/writing-templates#using-the-users-oauth-token) From e1580cf73ae74c22e340cb113bd22c607298c0eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Feb 2022 08:53:29 +0000 Subject: [PATCH 089/473] Version Packages (next) --- .changeset/patched.json | 4 +- .changeset/pre.json | 25 ++- package.json | 2 +- packages/app-defaults/CHANGELOG.md | 7 + packages/app-defaults/package.json | 6 +- packages/app/CHANGELOG.md | 47 ++++ packages/app/package.json | 84 ++++---- packages/backend-common/package.json | 2 +- packages/backend-tasks/package.json | 4 +- packages/backend-test-utils/CHANGELOG.md | 7 + packages/backend-test-utils/package.json | 6 +- packages/backend/CHANGELOG.md | 16 ++ packages/backend/package.json | 22 +- packages/catalog-client/package.json | 2 +- packages/catalog-model/package.json | 2 +- packages/cli/CHANGELOG.md | 6 + packages/cli/package.json | 6 +- packages/codemods/CHANGELOG.md | 7 + packages/codemods/package.json | 2 +- packages/core-app-api/package.json | 2 +- packages/core-components/CHANGELOG.md | 8 + packages/core-components/package.json | 4 +- packages/core-plugin-api/package.json | 2 +- packages/create-app/CHANGELOG.md | 53 +++++ packages/create-app/package.json | 2 +- packages/dev-utils/CHANGELOG.md | 10 + packages/dev-utils/package.json | 12 +- packages/embedded-techdocs-app/CHANGELOG.md | 12 ++ packages/embedded-techdocs-app/package.json | 16 +- packages/errors/package.json | 2 +- packages/integration-react/CHANGELOG.md | 7 + packages/integration-react/package.json | 8 +- packages/integration/package.json | 2 +- packages/search-common/package.json | 2 +- packages/techdocs-cli/CHANGELOG.md | 6 + packages/techdocs-cli/package.json | 4 +- packages/techdocs-common/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/theme/package.json | 2 +- packages/types/package.json | 2 +- packages/version-bridge/package.json | 2 +- plugins/airbrake/CHANGELOG.md | 7 + plugins/airbrake/package.json | 10 +- plugins/allure/CHANGELOG.md | 8 + plugins/allure/package.json | 10 +- plugins/analytics-module-ga/CHANGELOG.md | 9 + plugins/analytics-module-ga/package.json | 8 +- plugins/apache-airflow/CHANGELOG.md | 7 + plugins/apache-airflow/package.json | 8 +- plugins/api-docs/CHANGELOG.md | 9 + plugins/api-docs/package.json | 12 +- plugins/app-backend/package.json | 4 +- plugins/auth-backend/CHANGELOG.md | 32 +++ plugins/auth-backend/package.json | 4 +- plugins/azure-devops-backend/package.json | 2 +- plugins/azure-devops-common/package.json | 2 +- plugins/azure-devops/CHANGELOG.md | 8 + plugins/azure-devops/package.json | 10 +- plugins/badges-backend/package.json | 2 +- plugins/badges/CHANGELOG.md | 8 + plugins/badges/package.json | 10 +- plugins/bazaar-backend/CHANGELOG.md | 7 + plugins/bazaar-backend/package.json | 6 +- plugins/bazaar/CHANGELOG.md | 10 + plugins/bazaar/package.json | 14 +- plugins/bitrise/CHANGELOG.md | 8 + plugins/bitrise/package.json | 10 +- .../catalog-backend-module-ldap/CHANGELOG.md | 7 + .../catalog-backend-module-ldap/package.json | 6 +- .../CHANGELOG.md | 7 + .../package.json | 6 +- plugins/catalog-backend/CHANGELOG.md | 9 + plugins/catalog-backend/package.json | 8 +- plugins/catalog-common/package.json | 2 +- plugins/catalog-graph/CHANGELOG.md | 8 + plugins/catalog-graph/package.json | 10 +- plugins/catalog-graphql/package.json | 2 +- plugins/catalog-import/CHANGELOG.md | 42 ++++ plugins/catalog-import/package.json | 12 +- plugins/catalog-react/CHANGELOG.md | 7 + plugins/catalog-react/package.json | 6 +- plugins/catalog/CHANGELOG.md | 9 + plugins/catalog/package.json | 12 +- plugins/circleci/CHANGELOG.md | 8 + plugins/circleci/package.json | 10 +- plugins/cloudbuild/CHANGELOG.md | 8 + plugins/cloudbuild/package.json | 10 +- plugins/code-coverage-backend/package.json | 2 +- plugins/code-coverage/CHANGELOG.md | 8 + plugins/code-coverage/package.json | 10 +- plugins/config-schema/CHANGELOG.md | 7 + plugins/config-schema/package.json | 8 +- plugins/cost-insights/CHANGELOG.md | 7 + plugins/cost-insights/package.json | 8 +- plugins/explore-react/package.json | 4 +- plugins/explore/CHANGELOG.md | 8 + plugins/explore/package.json | 10 +- plugins/firehydrant/CHANGELOG.md | 8 + plugins/firehydrant/package.json | 10 +- plugins/fossa/CHANGELOG.md | 8 + plugins/fossa/package.json | 10 +- plugins/gcp-projects/CHANGELOG.md | 7 + plugins/gcp-projects/package.json | 8 +- plugins/git-release-manager/CHANGELOG.md | 7 + plugins/git-release-manager/package.json | 8 +- plugins/github-actions/CHANGELOG.md | 8 + plugins/github-actions/package.json | 10 +- plugins/github-deployments/CHANGELOG.md | 9 + plugins/github-deployments/package.json | 12 +- plugins/gitops-profiles/CHANGELOG.md | 7 + plugins/gitops-profiles/package.json | 8 +- plugins/gocd/CHANGELOG.md | 8 + plugins/gocd/package.json | 10 +- plugins/graphiql/CHANGELOG.md | 7 + plugins/graphiql/package.json | 8 +- plugins/graphql-backend/package.json | 2 +- plugins/home/CHANGELOG.md | 8 + plugins/home/package.json | 10 +- plugins/ilert/CHANGELOG.md | 8 + plugins/ilert/package.json | 10 +- plugins/jenkins-backend/package.json | 2 +- plugins/jenkins/CHANGELOG.md | 8 + plugins/jenkins/package.json | 10 +- plugins/kafka-backend/package.json | 2 +- plugins/kafka/CHANGELOG.md | 8 + plugins/kafka/package.json | 10 +- plugins/kubernetes-backend/package.json | 2 +- plugins/kubernetes-common/package.json | 2 +- plugins/kubernetes/CHANGELOG.md | 8 + plugins/kubernetes/package.json | 10 +- plugins/lighthouse/CHANGELOG.md | 8 + plugins/lighthouse/package.json | 10 +- plugins/newrelic-dashboard/CHANGELOG.md | 8 + plugins/newrelic-dashboard/package.json | 10 +- plugins/newrelic/CHANGELOG.md | 7 + plugins/newrelic/package.json | 8 +- plugins/org/CHANGELOG.md | 9 + plugins/org/package.json | 10 +- plugins/pagerduty/CHANGELOG.md | 9 + plugins/pagerduty/package.json | 10 +- plugins/permission-backend/CHANGELOG.md | 8 + plugins/permission-backend/package.json | 8 +- plugins/permission-common/package.json | 2 +- plugins/permission-node/CHANGELOG.md | 7 + plugins/permission-node/package.json | 6 +- plugins/permission-react/package.json | 2 +- plugins/proxy-backend/CHANGELOG.md | 27 +++ plugins/proxy-backend/package.json | 4 +- plugins/rollbar-backend/CHANGELOG.md | 6 + plugins/rollbar-backend/package.json | 4 +- plugins/rollbar/CHANGELOG.md | 8 + plugins/rollbar/package.json | 10 +- .../CHANGELOG.md | 7 + .../package.json | 6 +- .../CHANGELOG.md | 7 + .../package.json | 6 +- .../CHANGELOG.md | 7 + .../package.json | 4 +- plugins/scaffolder-backend/CHANGELOG.md | 9 + plugins/scaffolder-backend/package.json | 8 +- plugins/scaffolder-common/package.json | 2 +- plugins/scaffolder/CHANGELOG.md | 10 + plugins/scaffolder/package.json | 14 +- .../package.json | 2 +- plugins/search-backend-module-pg/package.json | 4 +- plugins/search-backend-node/package.json | 2 +- plugins/search-backend/CHANGELOG.md | 8 + plugins/search-backend/package.json | 8 +- plugins/search/CHANGELOG.md | 8 + plugins/search/package.json | 10 +- plugins/sentry/CHANGELOG.md | 8 + plugins/sentry/package.json | 10 +- plugins/shortcuts/CHANGELOG.md | 7 + plugins/shortcuts/package.json | 8 +- plugins/sonarqube/CHANGELOG.md | 8 + plugins/sonarqube/package.json | 10 +- plugins/splunk-on-call/CHANGELOG.md | 8 + plugins/splunk-on-call/package.json | 10 +- .../package.json | 2 +- plugins/tech-insights-backend/package.json | 4 +- plugins/tech-insights-common/package.json | 2 +- plugins/tech-insights-node/package.json | 2 +- plugins/tech-insights/CHANGELOG.md | 8 + plugins/tech-insights/package.json | 10 +- plugins/tech-radar/CHANGELOG.md | 7 + plugins/tech-radar/package.json | 8 +- plugins/techdocs-backend/package.json | 2 +- plugins/techdocs/CHANGELOG.md | 12 ++ plugins/techdocs/package.json | 16 +- plugins/todo-backend/package.json | 2 +- plugins/todo/CHANGELOG.md | 8 + plugins/todo/package.json | 10 +- plugins/user-settings/CHANGELOG.md | 7 + plugins/user-settings/package.json | 8 +- plugins/xcmetrics/CHANGELOG.md | 7 + plugins/xcmetrics/package.json | 8 +- yarn.lock | 204 +++++++++++++----- 197 files changed, 1380 insertions(+), 477 deletions(-) diff --git a/.changeset/patched.json b/.changeset/patched.json index f2a4688500..1029c8f106 100644 --- a/.changeset/patched.json +++ b/.changeset/patched.json @@ -1,5 +1,3 @@ { - "currentReleaseVersion": { - "@backstage/create-app": "0.4.16" - } + "currentReleaseVersion": {} } diff --git a/.changeset/pre.json b/.changeset/pre.json index f9db6af257..f1f3832fce 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -123,5 +123,28 @@ "@backstage/plugin-user-settings": "0.3.17", "@backstage/plugin-xcmetrics": "0.2.16" }, - "changesets": [] + "changesets": [ + "analytics-station-eleven", + "bright-buttons-rescue", + "dependabot-2f11dff", + "dependabot-9ec400d", + "dependabot-f969614", + "early-cooks-brake", + "flat-cars-begin", + "gold-queens-clap", + "grumpy-teachers-remain", + "nasty-pets-glow", + "neat-mangos-study", + "purple-steaks-design", + "quick-jars-wait", + "sharp-dragons-divide", + "sour-chairs-double", + "tall-rats-lie", + "tame-ads-exercise", + "techdocs-lets-call-the-whole-thing-off", + "thirty-houses-juggle", + "tiny-buses-compete", + "witty-lamps-laugh", + "witty-lizards-nail" + ] } diff --git a/package.json b/package.json index 8701ac5f05..997e87035b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "**/@roadiehq/**/@backstage/plugin-catalog": "*", "**/@roadiehq/**/@backstage/catalog-model": "*" }, - "version": "0.65.0", + "version": "0.66.0-next.0", "dependencies": { "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.15.0", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 4bca4d5182..588b674cfc 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/app-defaults +## 0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.5 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index ecd8d11bec..37f6061fd5 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "0.1.5", + "version": "0.1.6-next.0", "private": false, "publishConfig": { "access": "public", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-app-api": "^0.5.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/plugin-permission-react": "^0.3.0", @@ -42,7 +42,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 56d38f8e5a..eefdd6f016 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,52 @@ # example-app +## 0.2.63-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-org@0.4.1-next.0 + - @backstage/plugin-pagerduty@0.3.24-next.0 + - @backstage/plugin-catalog-import@0.8.0-next.0 + - @backstage/plugin-techdocs@0.13.2-next.0 + - @backstage/plugin-scaffolder@0.12.1-next.0 + - @backstage/cli@0.13.1-next.0 + - @backstage/app-defaults@0.1.6-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-airbrake@0.1.2-next.0 + - @backstage/plugin-apache-airflow@0.1.5-next.0 + - @backstage/plugin-api-docs@0.7.1-next.0 + - @backstage/plugin-azure-devops@0.1.13-next.0 + - @backstage/plugin-badges@0.2.21-next.0 + - @backstage/plugin-catalog@0.7.11-next.0 + - @backstage/plugin-catalog-graph@0.2.9-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + - @backstage/plugin-circleci@0.2.36-next.0 + - @backstage/plugin-cloudbuild@0.2.34-next.0 + - @backstage/plugin-code-coverage@0.1.24-next.0 + - @backstage/plugin-cost-insights@0.11.19-next.0 + - @backstage/plugin-explore@0.3.28-next.0 + - @backstage/plugin-gcp-projects@0.3.16-next.0 + - @backstage/plugin-github-actions@0.4.34-next.0 + - @backstage/plugin-gocd@0.1.3-next.0 + - @backstage/plugin-graphiql@0.2.29-next.0 + - @backstage/plugin-home@0.4.13-next.0 + - @backstage/plugin-jenkins@0.5.19-next.0 + - @backstage/plugin-kafka@0.2.27-next.0 + - @backstage/plugin-kubernetes@0.5.6-next.0 + - @backstage/plugin-lighthouse@0.2.36-next.0 + - @backstage/plugin-newrelic@0.3.15-next.0 + - @backstage/plugin-newrelic-dashboard@0.1.5-next.0 + - @backstage/plugin-rollbar@0.3.25-next.0 + - @backstage/plugin-search@0.6.1-next.0 + - @backstage/plugin-sentry@0.3.35-next.0 + - @backstage/plugin-shortcuts@0.1.21-next.0 + - @backstage/plugin-tech-insights@0.1.7-next.0 + - @backstage/plugin-tech-radar@0.5.4-next.0 + - @backstage/plugin-todo@0.1.21-next.0 + - @backstage/plugin-user-settings@0.3.18-next.0 + ## 0.2.62 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index 37ae4ad9bd..6f2e921c81 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,54 +1,54 @@ { "name": "example-app", - "version": "0.2.62", + "version": "0.2.63-next.0", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.5", + "@backstage/app-defaults": "^0.1.6-next.0", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-airbrake": "^0.1.1", - "@backstage/plugin-api-docs": "^0.7.0", - "@backstage/plugin-azure-devops": "^0.1.12", - "@backstage/plugin-apache-airflow": "^0.1.4", - "@backstage/plugin-badges": "^0.2.20", - "@backstage/plugin-catalog": "^0.7.10", - "@backstage/plugin-catalog-graph": "^0.2.8", - "@backstage/plugin-catalog-import": "^0.7.10", - "@backstage/plugin-catalog-react": "^0.6.12", - "@backstage/plugin-circleci": "^0.2.35", - "@backstage/plugin-cloudbuild": "^0.2.33", - "@backstage/plugin-code-coverage": "^0.1.23", - "@backstage/plugin-cost-insights": "^0.11.18", - "@backstage/plugin-explore": "^0.3.27", - "@backstage/plugin-gcp-projects": "^0.3.15", - "@backstage/plugin-github-actions": "^0.4.33", - "@backstage/plugin-gocd": "^0.1.2", - "@backstage/plugin-graphiql": "^0.2.28", - "@backstage/plugin-home": "^0.4.12", - "@backstage/plugin-jenkins": "^0.5.18", - "@backstage/plugin-kafka": "^0.2.26", - "@backstage/plugin-kubernetes": "^0.5.5", - "@backstage/plugin-lighthouse": "^0.2.35", - "@backstage/plugin-newrelic": "^0.3.14", - "@backstage/plugin-newrelic-dashboard": "^0.1.4", - "@backstage/plugin-org": "^0.4.0", - "@backstage/plugin-pagerduty": "0.3.23", - "@backstage/plugin-rollbar": "^0.3.24", - "@backstage/plugin-scaffolder": "^0.12.0", - "@backstage/plugin-search": "^0.6.0", - "@backstage/plugin-sentry": "^0.3.34", - "@backstage/plugin-shortcuts": "^0.1.20", - "@backstage/plugin-tech-radar": "^0.5.3", - "@backstage/plugin-techdocs": "^0.13.1", - "@backstage/plugin-todo": "^0.1.20", - "@backstage/plugin-user-settings": "^0.3.17", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-airbrake": "^0.1.2-next.0", + "@backstage/plugin-api-docs": "^0.7.1-next.0", + "@backstage/plugin-azure-devops": "^0.1.13-next.0", + "@backstage/plugin-apache-airflow": "^0.1.5-next.0", + "@backstage/plugin-badges": "^0.2.21-next.0", + "@backstage/plugin-catalog": "^0.7.11-next.0", + "@backstage/plugin-catalog-graph": "^0.2.9-next.0", + "@backstage/plugin-catalog-import": "^0.8.0-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-circleci": "^0.2.36-next.0", + "@backstage/plugin-cloudbuild": "^0.2.34-next.0", + "@backstage/plugin-code-coverage": "^0.1.24-next.0", + "@backstage/plugin-cost-insights": "^0.11.19-next.0", + "@backstage/plugin-explore": "^0.3.28-next.0", + "@backstage/plugin-gcp-projects": "^0.3.16-next.0", + "@backstage/plugin-github-actions": "^0.4.34-next.0", + "@backstage/plugin-gocd": "^0.1.3-next.0", + "@backstage/plugin-graphiql": "^0.2.29-next.0", + "@backstage/plugin-home": "^0.4.13-next.0", + "@backstage/plugin-jenkins": "^0.5.19-next.0", + "@backstage/plugin-kafka": "^0.2.27-next.0", + "@backstage/plugin-kubernetes": "^0.5.6-next.0", + "@backstage/plugin-lighthouse": "^0.2.36-next.0", + "@backstage/plugin-newrelic": "^0.3.15-next.0", + "@backstage/plugin-newrelic-dashboard": "^0.1.5-next.0", + "@backstage/plugin-org": "^0.4.1-next.0", + "@backstage/plugin-pagerduty": "0.3.24-next.0", + "@backstage/plugin-rollbar": "^0.3.25-next.0", + "@backstage/plugin-scaffolder": "^0.12.1-next.0", + "@backstage/plugin-search": "^0.6.1-next.0", + "@backstage/plugin-sentry": "^0.3.35-next.0", + "@backstage/plugin-shortcuts": "^0.1.21-next.0", + "@backstage/plugin-tech-radar": "^0.5.4-next.0", + "@backstage/plugin-techdocs": "^0.13.2-next.0", + "@backstage/plugin-todo": "^0.1.21-next.0", + "@backstage/plugin-user-settings": "^0.3.18-next.0", "@backstage/search-common": "^0.2.2", - "@backstage/plugin-tech-insights": "^0.1.6", + "@backstage/plugin-tech-insights": "^0.1.7-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 4040b778bf..b8f56c1fbe 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -81,7 +81,7 @@ } }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@types/archiver": "^5.1.0", "@types/compression": "^1.7.0", diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index 45a404f457..838f38dbd2 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -43,8 +43,8 @@ "zod": "^3.9.5" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.15", - "@backstage/cli": "^0.13.0", + "@backstage/backend-test-utils": "^0.1.16-next.0", + "@backstage/cli": "^0.13.1-next.0", "jest": "^26.0.1", "wait-for-expect": "^3.0.2" }, diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 0b3fc1f5b2..006ea6d634 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/backend-test-utils +## 0.1.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.13.1-next.0 + ## 0.1.15 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index dbbc122fc9..7aabe3e08d 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.15", + "version": "0.1.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -31,7 +31,7 @@ }, "dependencies": { "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/config": "^0.1.13", "knex": "^0.95.1", "mysql2": "^2.2.5", @@ -41,7 +41,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "jest": "^26.0.1" }, "files": [ diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 10962ab2bc..8882a9203e 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,21 @@ # example-backend +## 0.2.63-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.0 + - @backstage/plugin-rollbar-backend@0.1.20-next.0 + - @backstage/plugin-catalog-backend@0.21.2-next.0 + - @backstage/plugin-scaffolder-backend@0.15.23-next.0 + - @backstage/plugin-proxy-backend@0.2.17-next.0 + - @backstage/plugin-permission-backend@0.4.2-next.0 + - @backstage/plugin-permission-node@0.4.2-next.0 + - @backstage/plugin-search-backend@0.4.1-next.0 + - example-app@0.2.63-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.2.5-next.0 + ## 0.2.62 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 44544703d8..c9e1c9d7c3 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.62", + "version": "0.2.63-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,23 +31,23 @@ "@backstage/config": "^0.1.13", "@backstage/integration": "^0.7.2", "@backstage/plugin-app-backend": "^0.3.22", - "@backstage/plugin-auth-backend": "^0.8.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.0", "@backstage/plugin-azure-devops-backend": "^0.3.1", "@backstage/plugin-badges-backend": "^0.1.16", - "@backstage/plugin-catalog-backend": "^0.21.1", + "@backstage/plugin-catalog-backend": "^0.21.2-next.0", "@backstage/plugin-code-coverage-backend": "^0.1.20", "@backstage/plugin-graphql-backend": "^0.1.12", "@backstage/plugin-jenkins-backend": "^0.1.11", "@backstage/plugin-kubernetes-backend": "^0.4.5", "@backstage/plugin-kafka-backend": "^0.2.15", - "@backstage/plugin-permission-backend": "^0.4.1", + "@backstage/plugin-permission-backend": "^0.4.2-next.0", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.1", - "@backstage/plugin-proxy-backend": "^0.2.16", - "@backstage/plugin-rollbar-backend": "^0.1.19", - "@backstage/plugin-scaffolder-backend": "^0.15.22", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.4", - "@backstage/plugin-search-backend": "^0.4.0", + "@backstage/plugin-permission-node": "^0.4.2-next.0", + "@backstage/plugin-proxy-backend": "^0.2.17-next.0", + "@backstage/plugin-rollbar-backend": "^0.1.20-next.0", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.5-next.0", + "@backstage/plugin-search-backend": "^0.4.1-next.0", "@backstage/plugin-search-backend-node": "^0.4.5", "@backstage/plugin-search-backend-module-elasticsearch": "^0.0.8", "@backstage/plugin-search-backend-module-pg": "^0.2.4", @@ -72,7 +72,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5" diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index 543c107e65..a216a70d27 100644 --- a/packages/catalog-client/package.json +++ b/packages/catalog-client/package.json @@ -35,7 +35,7 @@ "cross-fetch": "^3.0.6" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7", "msw": "^0.35.0" }, diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index 2d9218ec0b..0b9b30fe3e 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -43,7 +43,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7", "@types/lodash": "^4.14.151", "yaml": "^1.9.2" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 7d63801beb..bcea1a68ee 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/cli +## 0.13.1-next.0 + +### Patch Changes + +- 80f510caee: Log warning if unable to parse yarn.lock + ## 0.13.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 8979387896..824e8e5efc 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.13.0", + "version": "0.13.1-next.0", "private": false, "publishConfig": { "access": "public" @@ -117,10 +117,10 @@ "devDependencies": { "@backstage/backend-common": "^0.10.5", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@backstage/theme": "^0.2.14", "@types/diff": "^5.0.0", diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index 8f5b1bcbbc..ec2fbfee4e 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/codemods +## 0.1.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.31 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index 98ce532aee..9cd2cb8567 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/codemods", "description": "A collection of codemods for Backstage projects", - "version": "0.1.31", + "version": "0.1.32-next.0", "private": false, "publishConfig": { "access": "public", diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index e6bf5e9582..b60008a1a8 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -45,7 +45,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index abbcab5e49..a22b029abd 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/core-components +## 0.8.7-next.0 + +### Patch Changes + +- 4c773ed25c: Change subtitle of Header style to use palette.bursts.fontColor +- f465b63b7f: Fix an issue where changes related to the `MobileSidebar` prevented scrolling pages. Additionally improve the menu of the `MobileSidebar` to not overlay the `BottomNavigation`. +- a681cb9c2f: Make linkTarget configurable for MarkdownContent component + ## 0.8.6 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 8037d52837..ed4df67a89 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.8.6", + "version": "0.8.7-next.0", "private": false, "publishConfig": { "access": "public", @@ -74,7 +74,7 @@ }, "devDependencies": { "@backstage/core-app-api": "^0.5.1", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 10146ee8e4..2de6170d73 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -43,7 +43,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 6200003dc4..411043b83a 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,58 @@ # @backstage/create-app +## 0.4.18-next.0 + +### Patch Changes + +- f27f5197e2: Apply the fix from `0.4.16`, which is part of the `v0.65.1` release of Backstage. +- 2687029a67: Update backend-to-backend auth link in configuration file comment +- 24ef62048c: Adds missing `/catalog-graph` route to ``. + + To fix this problem for a recently created app please update your `app/src/App.tsx` + + ```diff + + import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; + + ... omitted ... + + + } /> + + } /> + + ``` + +- cef64b1561: Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication. + + These changes are **required** to `packages/backend/src/plugins/auth.ts`: + + ```diff + export default async function createPlugin({ + logger, + database, + config, + discovery, + + tokenManager, + }: PluginEnvironment): Promise { + return await createRouter({ + logger, + config, + database, + discovery, + + tokenManager, + }); + } + ``` + +- e39d88bd84: Switched the `app` dependency in the backend to use a file target rather than version. + + To apply this change to an existing app, make the following change to `packages/backend/package.json`: + + ```diff + "dependencies": { + - "app": "0.0.0", + + "app": "file:../app", + ``` + ## 0.4.16 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 3d7dfead49..2b35b5e289 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.15", + "version": "0.4.18-next.0", "private": false, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index a170884538..f424bce947 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/dev-utils +## 0.2.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/app-defaults@0.1.6-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.19 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index bf29c742a9..585ff0f83d 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "0.2.19", + "version": "0.2.20-next.0", "private": false, "publishConfig": { "access": "public", @@ -29,13 +29,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/app-defaults": "^0.1.5", + "@backstage/app-defaults": "^0.1.6-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/catalog-model": "^0.9.10", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/test-utils": "^0.2.3", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -55,7 +55,7 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/embedded-techdocs-app/CHANGELOG.md b/packages/embedded-techdocs-app/CHANGELOG.md index d8039973e7..299423dd1d 100644 --- a/packages/embedded-techdocs-app/CHANGELOG.md +++ b/packages/embedded-techdocs-app/CHANGELOG.md @@ -1,5 +1,17 @@ # embedded-techdocs-app +## 0.2.62-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-techdocs@0.13.2-next.0 + - @backstage/cli@0.13.1-next.0 + - @backstage/app-defaults@0.1.6-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog@0.7.11-next.0 + ## 0.2.61 ### Patch Changes diff --git a/packages/embedded-techdocs-app/package.json b/packages/embedded-techdocs-app/package.json index b9dab2d19e..bfda40905b 100644 --- a/packages/embedded-techdocs-app/package.json +++ b/packages/embedded-techdocs-app/package.json @@ -1,19 +1,19 @@ { "name": "embedded-techdocs-app", - "version": "0.2.61", + "version": "0.2.62-next.0", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.5", + "@backstage/app-defaults": "^0.1.6-next.0", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/config": "^0.1.13", "@backstage/core-app-api": "^0.5.1", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-catalog": "^0.7.10", - "@backstage/plugin-techdocs": "^0.13.1", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog": "^0.7.11-next.0", + "@backstage/plugin-techdocs": "^0.13.2-next.0", "@backstage/test-utils": "^0.2.3", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.11.0", @@ -26,7 +26,7 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/errors/package.json b/packages/errors/package.json index 53a0ea93b8..7861793aef 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -35,7 +35,7 @@ "serialize-error": "^8.0.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7" }, "files": [ diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index c7bb73285f..35c60a86f1 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/integration-react +## 0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.19 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index c8aa4fd3b9..ae028d39c2 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", "@backstage/theme": "^0.2.14", @@ -35,8 +35,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", - "@backstage/dev-utils": "^0.2.19", + "@backstage/cli": "^0.13.1-next.0", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/packages/integration/package.json b/packages/integration/package.json index 10400d791f..c4e0b003f2 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -39,7 +39,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/config-loader": "^0.9.3", "@backstage/test-utils": "^0.2.3", "@types/jest": "^26.0.7", diff --git a/packages/search-common/package.json b/packages/search-common/package.json index 1023158754..b574675724 100644 --- a/packages/search-common/package.json +++ b/packages/search-common/package.json @@ -40,7 +40,7 @@ "@backstage/plugin-permission-common": "^0.4.0-next.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "jest": { "roots": [ diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index c261e83731..05e621ce62 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @techdocs/cli +## 0.8.12-next.0 + +### Patch Changes + +- 14472509a3: Use a local file dependency for embedded-techdocs-app, to ensure that it's always pulled out of the workspace + ## 0.8.11 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index c1e150b7e3..d8a46ed261 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "0.8.11", + "version": "0.8.12-next.0", "private": false, "publishConfig": { "access": "public" @@ -32,7 +32,7 @@ "techdocs-cli": "bin/techdocs-cli" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/commander": "^2.12.2", "@types/fs-extra": "^9.0.6", "@types/http-proxy": "^1.17.4", diff --git a/packages/techdocs-common/package.json b/packages/techdocs-common/package.json index a82dda2eae..5e4d423036 100644 --- a/packages/techdocs-common/package.json +++ b/packages/techdocs-common/package.json @@ -60,7 +60,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/fs-extra": "^9.0.5", "@types/js-yaml": "^4.0.0", "@types/mime-types": "^2.1.0", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index e396a47917..318db4e0ed 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -51,7 +51,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "msw": "^0.35.0" diff --git a/packages/theme/package.json b/packages/theme/package.json index cd7517b2d8..517a517ba7 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -31,7 +31,7 @@ "@material-ui/core": "^4.12.2" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist" diff --git a/packages/types/package.json b/packages/types/package.json index 881e30081f..0a0f78ca3d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -31,7 +31,7 @@ }, "dependencies": {}, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/zen-observable": "^0.8.0", "zen-observable": "^0.8.15" }, diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json index ce5456bea8..7b841704d5 100644 --- a/packages/version-bridge/package.json +++ b/packages/version-bridge/package.json @@ -33,7 +33,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2" diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index 36d322a0e0..357e32bb05 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-airbrake +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index e037e38009..b0bc63d17d 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -34,10 +34,10 @@ }, "devDependencies": { "@types/object-hash": "^2.2.1", - "@backstage/app-defaults": "^0.1.5", - "@backstage/cli": "^0.13.0", + "@backstage/app-defaults": "^0.1.6-next.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index 290838ac3d..5641aec797 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-allure +## 0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.12 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 4d8768dc03..cfabf4e57a 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.12", + "version": "0.1.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,9 +23,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -37,9 +37,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index 8b82c050d3..27a5ce04e7 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-analytics-module-ga +## 0.1.8-next.0 + +### Patch Changes + +- b40a0ccc4d: Added the ability to capture and set user IDs from Backstage's `identityApi`. For full instructions on how to + set this up, see [the User ID section of its README](https://github.com/backstage/backstage/tree/master/plugins/analytics-module-ga#user-ids) +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 255a0cae8e..e3f0ec00e8 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -35,9 +35,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index 4349718587..9bca4cfdb7 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-apache-airflow +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 32fdd8b5cb..a39dce2910 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -33,9 +33,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index 5e495a99a8..d8af0d3798 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-api-docs +## 0.7.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog@0.7.11-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.7.0 ### Minor Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 08a1de6464..dd149f3133 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.7.0", + "version": "0.7.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "dependencies": { "@asyncapi/react-component": "1.0.0-next.32", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog": "^0.7.10", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog": "^0.7.11-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,9 +53,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 9b9cfe01e7..f65f23a420 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -47,8 +47,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.15", - "@backstage/cli": "^0.13.0", + "@backstage/backend-test-utils": "^0.1.16-next.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/types": "^0.1.1", "@types/supertest": "^2.0.8", "mock-fs": "^5.1.0", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 2bbd544eea..05836979fd 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/plugin-auth-backend +## 0.9.0-next.0 + +### Minor Changes + +- cef64b1561: **BREAKING** Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication. + + These changes are **required** to `packages/backend/src/plugins/auth.ts`: + + ```diff + export default async function createPlugin({ + logger, + database, + config, + discovery, + + tokenManager, + }: PluginEnvironment): Promise { + return await createRouter({ + logger, + config, + database, + discovery, + + tokenManager, + }); + } + ``` + + **BREAKING** The `CatalogIdentityClient` constructor now expects a `TokenManager` instead of a `TokenIssuer`. The `TokenManager` interface is used to generate a server token when [resolving a user's identity and membership through the catalog](https://backstage.io/docs/auth/identity-resolver). Using server tokens for these requests allows the auth-backend to bypass authorization checks when permissions are enabled for Backstage. This change will break apps that rely on the user tokens that were previously used by the client. Refer to the ["Backend-to-backend Authentication" tutorial](https://backstage.io/docs/tutorials/backend-to-backend-auth) for more information on server token usage. + +### Patch Changes + +- 28a5f9d0b1: chore(deps): bump `passport` from 0.4.1 to 0.5.2 + ## 0.8.0 ### Minor Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 5b4e4b22ba..80ec297ea5 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.8.0", + "version": "0.9.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -73,7 +73,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index d0bcca2db9..638857fabb 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.35.0" diff --git a/plugins/azure-devops-common/package.json b/plugins/azure-devops-common/package.json index 0b9b3ad3d6..8a3c884fed 100644 --- a/plugins/azure-devops-common/package.json +++ b/plugins/azure-devops-common/package.json @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist" diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 4076ca6fc0..042dad9a9d 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-azure-devops +## 0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.12 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index bc92e208d3..45d5e46cee 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.1.12", + "version": "0.1.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,11 +28,11 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/plugin-azure-devops-common": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,9 +46,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index a2c74623f1..01c6d4b1fc 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -45,7 +45,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 32226f40db..fa3b72c00d 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-badges +## 0.2.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.20 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 3a21138d70..b46f4450bb 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges", "description": "A Backstage plugin that generates README badges for your entities", - "version": "0.2.20", + "version": "0.2.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,10 +28,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,9 +43,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index ab4bd8d674..ab73c8ab04 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-bazaar-backend +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.1.16-next.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 14f2332eb2..d3c6cab9cf 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ }, "dependencies": { "@backstage/backend-common": "^0.10.5", - "@backstage/backend-test-utils": "^0.1.15", + "@backstage/backend-test-utils": "^0.1.16-next.0", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -31,7 +31,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index ea92aa9f27..949910ae40 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bazaar +## 0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/cli@0.13.1-next.0 + - @backstage/plugin-catalog@0.7.11-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.11 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 40ea514392..9dd3bf5125 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.11", + "version": "0.1.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,11 +23,11 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.0", - "@backstage/core-components": "^0.8.6", + "@backstage/cli": "^0.13.1-next.0", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog": "^0.7.10", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog": "^0.7.11-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -44,8 +44,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", - "@backstage/dev-utils": "^0.2.19", + "@backstage/cli": "^0.13.1-next.0", + "@backstage/dev-utils": "^0.2.20-next.0", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.0.6" }, diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index a62137d1e1..f91dbbd5b3 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitrise +## 0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.23 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 87f377632b..ee1a91ba23 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitrise", "description": "A Backstage plugin that integrates towards Bitrise", - "version": "0.1.23", + "version": "0.1.24-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 4495964ca8..c6e97d4906 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.3.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@0.21.2-next.0 + ## 0.3.10 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 1b43e66b47..79dbf3335c 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", "description": "A Backstage catalog backend modules that helps integrate towards LDAP", - "version": "0.3.10", + "version": "0.3.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-backend": "^0.21.1", + "@backstage/plugin-catalog-backend": "^0.21.2-next.0", "@backstage/types": "^0.1.1", "@types/ldapjs": "^2.2.0", "ldapjs": "^2.2.0", @@ -40,7 +40,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index bd04fbcef7..4a36db457b 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.2.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@0.21.2-next.0 + ## 0.2.13 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 09d55c42e9..dd387fb05d 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", "description": "A Backstage catalog backend modules that helps integrate towards Microsoft Graph", - "version": "0.2.13", + "version": "0.2.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "@azure/msal-node": "^1.1.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/plugin-catalog-backend": "^0.21.1", + "@backstage/plugin-catalog-backend": "^0.21.2-next.0", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -43,7 +43,7 @@ }, "devDependencies": { "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@types/lodash": "^4.14.151", "msw": "^0.35.0" diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index 523fcd0bd1..94097a6745 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-backend +## 0.21.2-next.0 + +### Patch Changes + +- fac5f112b4: chore(deps): bump `prom-client` from 13.2.0 to 14.0.1 +- 5bbffa60be: Pass authorization token to location service inside location api routes +- Updated dependencies + - @backstage/plugin-permission-node@0.4.2-next.0 + ## 0.21.1 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 748ff77592..95bdb2fcf2 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "0.21.1", + "version": "0.21.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,7 +38,7 @@ "@backstage/integration": "^0.7.2", "@backstage/plugin-catalog-common": "^0.1.1", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.1", + "@backstage/plugin-permission-node": "^0.4.2-next.0", "@backstage/search-common": "^0.2.2", "@backstage/types": "^0.1.1", "@octokit/graphql": "^4.5.8", @@ -65,8 +65,8 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.15", - "@backstage/cli": "^0.13.0", + "@backstage/backend-test-utils": "^0.1.16-next.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/plugin-permission-common": "^0.4.0", "@backstage/test-utils": "^0.2.3", "@types/core-js": "^2.5.4", diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 05fc678e59..340a4baa8a 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -33,7 +33,7 @@ "@backstage/plugin-permission-common": "^0.4.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist" diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index b4f2fdac78..0da33cddf9 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-graph +## 0.2.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.8 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 9b61fd3438..49cce2ae51 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.2.8", + "version": "0.2.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,9 +23,9 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,9 +42,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 4c10c93354..4e4f61b103 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -43,7 +43,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@graphql-codegen/cli": "^2.3.1", "@graphql-codegen/typescript": "^2.4.2", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index 81fb253736..652f39ed61 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,47 @@ # @backstage/plugin-catalog-import +## 0.8.0-next.0 + +### Minor Changes + +- 2e8764b95f: Make filename, branch name and examples URLs used in catalog import customizable. + + Catalog backend ingestion loop can be already configured to fetch targets with custom catalog filename (other than `catalog-info.yaml`). It's now possible to customize said filename and branch name used in pull requests created by catalog import flow too. This allows organizations to further customize Backstage experience and to better reflect their branding. + + Filename (default: `catalog-info.yaml`) and branch name (default: `backstage-integration`) used in pull requests can be configured in `app-config.yaml` as follows: + + ```yaml + // app-config.yaml + + catalog: + import: + entityFilename: anvil.yaml + pullRequestBranchName: anvil-integration + ``` + + Following React components have also been updated to accept optional props for providing example entity and repository paths: + + ```tsx + + ``` + + ```tsx + + ``` + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.7.10 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 2508543541..cd3323a6b4 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-import", "description": "A Backstage plugin the helps you import entities into your catalog", - "version": "0.7.10", + "version": "0.8.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/config": "^0.1.13", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -57,9 +57,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index a98178af1d..48cc93e7b1 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-react +## 0.6.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.6.12 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 66045c1ff1..282ddc02ed 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "0.6.12", + "version": "0.6.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", @@ -54,7 +54,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", "@backstage/plugin-catalog-common": "^0.1.1", "@backstage/test-utils": "^0.2.3", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index bcbfdf4fc2..4cf5533dbf 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog +## 0.7.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.7.10 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 066b2d99f5..8d06e50b09 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "0.7.10", + "version": "0.7.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,12 +33,12 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/integration-react": "^0.1.19", + "@backstage/integration-react": "^0.1.20-next.0", "@backstage/plugin-catalog-common": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -54,9 +54,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/plugin-permission-react": "^0.3.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index 1373040c3c..303114a79c 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-circleci +## 0.2.36-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.35 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 7a32e67b71..cb11885fb4 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-circleci", "description": "A Backstage plugin that integrates towards Circle CI", - "version": "0.2.35", + "version": "0.2.36-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,9 +52,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index f26431c739..6f7e0f7562 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-cloudbuild +## 0.2.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.33 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 3424d01ba9..808faac15b 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cloudbuild", "description": "A Backstage plugin that integrates towards Google Cloud Build", - "version": "0.2.33", + "version": "0.2.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,9 +49,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 433feaefa3..aa60df0893 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -36,7 +36,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 06212ea885..eb1a926900 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-code-coverage +## 0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.23 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index bf7ce4e794..47837e09ba 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.1.23", + "version": "0.1.24-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,9 +43,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index c83111f01b..05e694f3eb 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-config-schema +## 0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.19 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index e1602227a6..51705222d2 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-config-schema", "description": "A Backstage plugin that lets you browse the configuration schema of your app", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", @@ -38,9 +38,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 0144c3e74c..4a068b20d6 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-cost-insights +## 0.11.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.11.18 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 6ee59ee652..48c4916beb 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights", "description": "A Backstage plugin that helps you keep track of your cloud spend", - "version": "0.11.18", + "version": "0.11.19-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -57,9 +57,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 02705b3476..902933b7d3 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -32,8 +32,8 @@ "@backstage/core-plugin-api": "^0.6.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", - "@backstage/dev-utils": "^0.2.19", + "@backstage/cli": "^0.13.1-next.0", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 8e1487383f..0dc472d3f0 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-explore +## 0.3.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.3.27 ### Patch Changes diff --git a/plugins/explore/package.json b/plugins/explore/package.json index f88ffef654..d9c87d1826 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore", "description": "A Backstage plugin for building an exploration page of your software ecosystem", - "version": "0.3.27", + "version": "0.3.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/plugin-explore-react": "^0.0.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -50,9 +50,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index 153f86f858..7af43b2697 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-firehydrant +## 0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.13 ### Patch Changes diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 5a869b7f9b..d9e93dd983 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-firehydrant", "description": "A Backstage plugin that integrates towards FireHydrant", - "version": "0.1.13", + "version": "0.1.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,9 +36,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index 3b429d6cca..a65d8a223a 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-fossa +## 0.2.29-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.28 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index 2a3160e4ab..05157e9ed7 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-fossa", "description": "A Backstage plugin that integrates towards FOSSA", - "version": "0.2.28", + "version": "0.2.29-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,10 +33,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,9 +50,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index ea8da0ec9f..7df85f2a37 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-gcp-projects +## 0.3.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.3.15 ### Patch Changes diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index b9359af966..d5632e0a13 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.15", + "version": "0.3.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,9 +44,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index cb074928b8..5ba514faa9 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-git-release-manager +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.3.9 ### Patch Changes diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index dbc50e6921..016a66cd29 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.9", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", "@backstage/theme": "^0.2.14", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index 41290f828d..a36f91f452 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-github-actions +## 0.4.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.4.33 ### Patch Changes diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 38040080d7..ac573db408 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.4.33", + "version": "0.4.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,10 +34,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,9 +52,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index f14d3c5873..913b4b16bd 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-github-deployments +## 0.1.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.27 ### Patch Changes diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index 5dc19d31c7..b67ca5de3d 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.27", + "version": "0.1.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,12 +22,12 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 99abdd84be..99ccf963de 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-gitops-profiles +## 0.3.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.3.14 ### Patch Changes diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 7a66e1f3fc..5d85351024 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.14", + "version": "0.3.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -45,9 +45,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index b286f71049..bf1553c234 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-gocd +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index ab08e2b8e1..35bc70858d 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,10 +29,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,9 +46,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index f374fc6ed5..02af5cb5f2 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-graphiql +## 0.2.29-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.2.28 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 91ccf00da4..30fb37c3b9 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.28", + "version": "0.2.29-next.0", "private": false, "publishConfig": { "access": "public", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -45,9 +45,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 448841b184..db4cfe077a 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "eslint-plugin-graphql": "^4.0.0", "msw": "^0.35.0", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index 4d481a5c1d..31d2f7b725 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-home +## 0.4.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-search@0.6.1-next.0 + ## 0.4.12 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index e29d48e6c1..0f3b53c78c 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.12", + "version": "0.4.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", - "@backstage/plugin-search": "^0.6.0", + "@backstage/plugin-search": "^0.6.1-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -37,9 +37,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index b3aa5af13c..e2d19592e8 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-ilert +## 0.1.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.22 ### Patch Changes diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index 6d305b8ab4..c762d6606b 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.1.22", + "version": "0.1.23-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,10 +22,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index f07ea7e816..a595f1b0ce 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jenkins": "^0.23.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 1cd917016c..3e2291dbf5 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-jenkins +## 0.5.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.5.18 ### Patch Changes diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index f900cbded9..66d0073df3 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.5.18", + "version": "0.5.19-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,10 +33,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,9 +50,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index 0554ef3cbd..f8270b0b1d 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -44,7 +44,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest-when": "^2.7.2", "@types/lodash": "^4.14.151", "jest-when": "^3.1.0", diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index d7ac050483..48d7cfcbbb 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kafka +## 0.2.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.26 ### Patch Changes diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index db0ac89b19..3eb131df06 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.2.26", + "version": "0.2.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,9 +36,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 1f8e5870c2..95cd3c0217 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -55,7 +55,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/aws4": "^1.5.1", "supertest": "^6.1.3", "aws-sdk-mock": "^5.2.1", diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index d18c9a2b78..5a493b7dd7 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -39,7 +39,7 @@ "@kubernetes/client-node": "^0.16.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "jest": { "roots": [ diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index bea22c84ae..d3aef232e8 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kubernetes +## 0.5.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.5.5 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 7f4addccac..c29475f66d 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.5.5", + "version": "0.5.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/plugin-kubernetes-common": "^0.2.2", "@kubernetes/client-node": "^0.16.0", "@backstage/theme": "^0.2.14", @@ -53,9 +53,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index 618c6f270c..c420bc2549 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-lighthouse +## 0.2.36-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.35 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index faa33a7dea..bd2df0e95e 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.2.35", + "version": "0.2.36-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,9 +48,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index d49b88bdf1..24f20b3ac1 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-newrelic-dashboard +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index a4899865e2..7f710cbdf2 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,18 +21,18 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.13.0", - "@backstage/dev-utils": "^0.2.19", + "@backstage/cli": "^0.13.1-next.0", + "@backstage/dev-utils": "^0.2.20-next.0", "@testing-library/jest-dom": "^5.10.1", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.0.6" diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index 87feb883dd..a42c8cf3de 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-newrelic +## 0.3.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.3.14 ### Patch Changes diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 48a5050ad6..fecb36805d 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.14", + "version": "0.3.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,9 +44,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index d7a4ed8e42..397bcb7b82 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-org +## 0.4.1-next.0 + +### Patch Changes + +- ef86143c16: Added `relations.memberof` filter to the catalog api call in `MemberListCard` to avoid fetching all the User entity kinds from catalog-backend. +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.4.0 ### Minor Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index 0994e0dbfa..5975d66246 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.4.0", + "version": "0.4.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ }, "devDependencies": { "@backstage/catalog-client": "^0.5.5", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index 5cccf1debe..fe22454657 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-pagerduty +## 0.3.24-next.0 + +### Patch Changes + +- 5a459626bc: Fix change events tab error when change events exist +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.3.23 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index c01c2ce2ba..2a57f5b0d5 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.3.23", + "version": "0.3.24-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,9 +49,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 7719376104..629a7d5f96 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-permission-backend +## 0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.0 + - @backstage/plugin-permission-node@0.4.2-next.0 + ## 0.4.1 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 691d7eeefc..aeba1577bf 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.4.1", + "version": "0.4.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ "@backstage/backend-common": "^0.10.5", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-auth-backend": "^0.8.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.0", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.1", + "@backstage/plugin-permission-node": "^0.4.2-next.0", "@types/express": "*", "dataloader": "^2.0.0", "express": "^4.17.1", @@ -36,7 +36,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index 69af3054c0..103f342490 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -45,7 +45,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7", "msw": "^0.35.0" } diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index a552e2c67b..e1f62551e3 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-permission-node +## 0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.0 + ## 0.4.1 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 11fb27f34e..5a0213ef63 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.4.1", + "version": "0.4.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "@backstage/backend-common": "^0.10.5", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-auth-backend": "^0.8.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.0", "@backstage/plugin-permission-common": "^0.4.0", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -40,7 +40,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index dd3a2c696f..e4ae819247 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -39,7 +39,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index d70862e1a2..7e8cd6803f 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/plugin-proxy-backend +## 0.2.17-next.0 + +### Patch Changes + +- 332d3decb2: Adds a new option `skipInvalidTargets` for the proxy `createRouter` which allows the proxy backend to be started with an invalid proxy configuration. If configured, it will simply skip the failed proxy and mount the other valid proxies. + + To configure it to pass by failing proxies: + + ``` + const router = await createRouter({ + config, + logger, + discovery, + skipInvalidProxies: true, + }); + ``` + + If you would like it to fail if a proxy is configured badly: + + ``` + const router = await createRouter({ + config, + logger, + discovery, + }); + ``` + ## 0.2.16 ### Patch Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 78e6a2e553..031f8e5665 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-proxy-backend", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", - "version": "0.2.16", + "version": "0.2.17-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -43,7 +43,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index a8feeee4a6..d14c5644a8 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-rollbar-backend +## 0.1.20-next.0 + +### Patch Changes + +- 91faf87aaf: chore(deps): bump `camelcase-keys` from 6.2.2 to 7.0.1 + ## 0.1.19 ### Patch Changes diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index eab94b6f84..8972572f1f 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar-backend", "description": "A Backstage backend plugin that integrates towards Rollbar", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@types/supertest": "^2.0.8", "msw": "^0.36.3", diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index d414e3d841..5fc59c3efd 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar +## 0.3.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.3.24 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index dc7ede62cf..2a4a18979c 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.3.24", + "version": "0.3.25-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,9 +50,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index fd0bf3e177..cbc1119062 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@0.15.23-next.0 + ## 0.1.9 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index e1571c95b1..ed267e2846 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.1.9", + "version": "0.1.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "@backstage/backend-common": "^0.10.5", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-scaffolder-backend": "^0.15.22", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", "@backstage/config": "^0.1.13", "@backstage/types": "^0.1.1", "command-exists": "^1.2.9", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/fs-extra": "^9.0.1", "@types/mock-fs": "^4.13.0", "@types/jest": "^26.0.7", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 4615185fb4..94e0c5b411 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@0.15.23-next.0 + ## 0.2.4 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 2779b42631..3e73840fed 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.2.4", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/backend-common": "^0.10.5", - "@backstage/plugin-scaffolder-backend": "^0.15.22", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", @@ -31,7 +31,7 @@ "fs-extra": "^9.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index 02c2a7f7bd..fb6c0bdab8 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@0.15.23-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index fe2e7dfc6a..30fcbdc8e5 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/plugin-scaffolder-backend": "^0.15.21", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", "@backstage/types": "^0.1.1", "winston": "^3.2.1", "yeoman-environment": "^3.6.0" diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 9941990066..41582a5f4e 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend +## 0.15.23-next.0 + +### Patch Changes + +- 2e0dbb0e50: Migrate from deprecated package @octokit/rest to octokit +- Updated dependencies + - @backstage/plugin-catalog-backend@0.21.2-next.0 + - @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.10-next.0 + ## 0.15.22 ### Patch Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index efcaf2b712..790d6ed273 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "0.15.22", + "version": "0.15.23-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,9 +37,9 @@ "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-backend": "^0.21.1", + "@backstage/plugin-catalog-backend": "^0.21.2-next.0", "@backstage/plugin-scaffolder-common": "^0.1.3", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.9", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.10-next.0", "@backstage/types": "^0.1.1", "@gitbeaker/core": "^34.6.0", "@gitbeaker/node": "^35.1.0", @@ -73,7 +73,7 @@ "vm2": "^3.9.5" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index d37219fe97..c1d99b987b 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -40,6 +40,6 @@ "@backstage/types": "^0.1.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" } } diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 81fd54b5aa..eb46870e2b 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder +## 0.12.1-next.0 + +### Patch Changes + +- a681cb9c2f: Make linkTarget configurable for MarkdownContent component +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.12.0 ### Minor Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index a5c6e78f13..8a48e7b29f 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "0.12.0", + "version": "0.12.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/plugin-scaffolder-common": "^0.1.3", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -67,10 +67,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", - "@backstage/plugin-catalog": "^0.7.10", + "@backstage/dev-utils": "^0.2.20-next.0", + "@backstage/plugin-catalog": "^0.7.11-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 42944fba0d..714235c947 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@elastic/elasticsearch-mock": "^0.3.0" }, "files": [ diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 2b7b9bbc77..0fa4ca3f8d 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -27,8 +27,8 @@ "knex": "^0.95.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.15", - "@backstage/cli": "^0.13.0" + "@backstage/backend-test-utils": "^0.1.16-next.0", + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist", diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index 7610c054c5..ee65c5528e 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist" diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index ed7b0811ad..342d56af32 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search-backend +## 0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.0 + - @backstage/plugin-permission-node@0.4.2-next.0 + ## 0.4.0 ### Minor Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index d3292e88bd..02093f07d6 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend", "description": "The Backstage backend plugin that provides your backstage app with search", - "version": "0.4.0", + "version": "0.4.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,9 +24,9 @@ "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/search-common": "^0.2.2", - "@backstage/plugin-auth-backend": "^0.8.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.0", "@backstage/plugin-permission-common": "^0.4.0-next.0", - "@backstage/plugin-permission-node": "^0.4.1", + "@backstage/plugin-permission-node": "^0.4.2-next.0", "@backstage/plugin-search-backend-node": "^0.4.5", "@backstage/types": "^0.1.1", "@types/express": "^4.17.6", @@ -40,7 +40,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 412edde26c..5abfb45f0b 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search +## 0.6.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.6.0 ### Minor Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index 478b49d072..5c66dab402 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search", "description": "The Backstage plugin that provides your backstage app with search", - "version": "0.6.0", + "version": "0.6.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/search-common": "^0.2.2", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -52,9 +52,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index 6e09dbf91a..ae94faaa19 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-sentry +## 0.3.35-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.3.34 ### Patch Changes diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index bcfaa33d41..8f7e487f1c 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sentry", "description": "A Backstage plugin that integrates towards Sentry", - "version": "0.3.34", + "version": "0.3.35-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,9 +49,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/shortcuts/CHANGELOG.md b/plugins/shortcuts/CHANGELOG.md index e9388c293e..0d382afeb3 100644 --- a/plugins/shortcuts/CHANGELOG.md +++ b/plugins/shortcuts/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-shortcuts +## 0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.1.20 ### Patch Changes diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index a830943dbc..0ea2c6d367 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-shortcuts", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", - "version": "0.1.20", + "version": "0.1.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -39,9 +39,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index d3b5ce4f2f..116c26a30e 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-sonarqube +## 0.2.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.2.14 ### Patch Changes diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 656430ce69..d249074eb1 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.2.14", + "version": "0.2.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,9 +50,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index b5e77459bc..dfde9b7013 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-splunk-on-call +## 0.3.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.3.20 ### Patch Changes diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index ada127bbfc..557d486ab2 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-splunk-on-call", "description": "A Backstage plugin that integrates towards Splunk On-Call", - "version": "0.3.20", + "version": "0.3.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,9 +48,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index 66f13b7d1f..d9ca5449f5 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -43,7 +43,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/node-cron": "^3.0.1" }, "files": [ diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index febaf37dac..80620bd016 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -51,8 +51,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.15", - "@backstage/cli": "^0.13.0", + "@backstage/backend-test-utils": "^0.1.16-next.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "@types/node-cron": "^3.0.0", "@types/semver": "^7.3.8", diff --git a/plugins/tech-insights-common/package.json b/plugins/tech-insights-common/package.json index 48ccb0d1a1..2d9f166b09 100644 --- a/plugins/tech-insights-common/package.json +++ b/plugins/tech-insights-common/package.json @@ -35,7 +35,7 @@ "@backstage/types": "^0.1.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist" diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 6bca50cd0a..405c3cfe03 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -38,7 +38,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0" + "@backstage/cli": "^0.13.1-next.0" }, "files": [ "dist" diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index c760b0c5f5..78147429bb 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 1d4266777f..dafbd52ffb 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/plugin-tech-insights-common": "^0.2.1", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -39,9 +39,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index 5648323b33..c224d374f9 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-tech-radar +## 0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.5.3 ### Patch Changes diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index cf612f7dce..af6390083d 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", - "version": "0.5.3", + "version": "0.5.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -46,9 +46,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index c760783243..7e5fb16472 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -53,7 +53,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/test-utils": "^0.2.3", "@types/dockerode": "^3.3.0", "msw": "^0.35.0", diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index 2796548251..677746ec49 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-techdocs +## 0.13.2-next.0 + +### Patch Changes + +- 359c31e31d: Added support for documentation using the raw `` tag to point to relative resources like audio or video files. +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/integration-react@0.1.20-next.0 + - @backstage/plugin-catalog@0.7.11-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + - @backstage/plugin-search@0.6.1-next.0 + ## 0.13.1 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 783ad7a5df..3585dd4ced 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "0.13.1", + "version": "0.13.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,14 +34,14 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.19", - "@backstage/plugin-catalog": "^0.7.10", - "@backstage/plugin-catalog-react": "^0.6.12", - "@backstage/plugin-search": "^0.6.0", + "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog": "^0.7.11-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-search": "^0.6.1-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -62,9 +62,9 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index 3a8eb1dcac..d90ebb2f08 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -39,7 +39,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index d3679e2fd9..1d5a7b42cc 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-todo +## 0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + - @backstage/plugin-catalog-react@0.6.13-next.0 + ## 0.1.20 ### Patch Changes diff --git a/plugins/todo/package.json b/plugins/todo/package.json index c2fa299175..254aa4fdb4 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo", "description": "A Backstage plugin that lets you browse TODO comments in your source code", - "version": "0.1.20", + "version": "0.1.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,10 +28,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.12", + "@backstage/plugin-catalog-react": "^0.6.13-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,9 +42,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index 091a12c728..8abf24f743 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-user-settings +## 0.3.18-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.3.17 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 94987cf96d..a4d0e4d46f 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings", "description": "A Backstage plugin that provides a settings page", - "version": "0.3.17", + "version": "0.3.18-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,9 +44,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index 632947f505..f2b15f69dd 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-xcmetrics +## 0.2.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.0 + ## 0.2.16 ### Patch Changes diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index bd994dfc28..8e77220dc7 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-xcmetrics", "description": "A Backstage plugin that shows XCode build metrics for your components", - "version": "0.2.16", + "version": "0.2.17-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.6", + "@backstage/core-components": "^0.8.7-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", @@ -37,9 +37,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.0", + "@backstage/cli": "^0.13.1-next.0", "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.19", + "@backstage/dev-utils": "^0.2.20-next.0", "@backstage/test-utils": "^0.2.3", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/yarn.lock b/yarn.lock index 02c6806818..70a00d7cd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1366,6 +1366,49 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@backstage/core-components@*", "@backstage/core-components@^0.8.0", "@backstage/core-components@^0.8.5", "@backstage/core-components@^0.8.6": + version "0.8.6" + resolved "https://registry.npmjs.org/@backstage/core-components/-/core-components-0.8.6.tgz#ad365c2d8ee99ec1280c1212b7de14a922dd6f34" + integrity sha512-dPbsENsqd6NBqg1ZcwZdOBdK4XxjkDP78ANE5Opcx1Kas+LpvFEPSSrK9AYkbZS4SK71vbreAmk/ovCLpj5Odg== + dependencies: + "@backstage/config" "^0.1.13" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/errors" "^0.2.0" + "@backstage/theme" "^0.2.14" + "@material-table/core" "^3.1.0" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + "@types/react-sparklines" "^1.7.0" + "@types/react-text-truncate" "^0.14.0" + ansi-regex "^5.0.1" + classnames "^2.2.6" + d3-selection "^3.0.0" + d3-shape "^3.0.0" + d3-zoom "^3.0.0" + dagre "^0.8.5" + history "^5.0.0" + immer "^9.0.1" + lodash "^4.17.21" + pluralize "^8.0.0" + prop-types "^15.7.2" + qs "^6.9.4" + rc-progress "3.2.4" + react-helmet "6.1.0" + react-hook-form "^7.12.2" + react-markdown "^8.0.0" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-sparklines "^1.7.0" + react-syntax-highlighter "^15.4.5" + react-text-truncate "^0.17.0" + react-use "^17.2.4" + react-virtualized-auto-sizer "^1.0.6" + react-window "^1.8.6" + remark-gfm "^3.0.1" + zen-observable "^0.8.15" + zod "^3.11.6" + "@backstage/core-plugin-api@^0.4.0": version "0.4.1" resolved "https://registry.npmjs.org/@backstage/core-plugin-api/-/core-plugin-api-0.4.1.tgz#c0a13504bdfa61ae3d0db96934cd6c32a7574446" @@ -1382,6 +1425,69 @@ react-use "^17.2.4" zen-observable "^0.8.15" +"@backstage/integration-react@^0.1.10", "@backstage/integration-react@^0.1.19": + version "0.1.19" + resolved "https://registry.npmjs.org/@backstage/integration-react/-/integration-react-0.1.19.tgz#99ac8bfb3f2bd0758fab04157660d7d34f4231a4" + integrity sha512-sYPERl63XJwmlsQ981BeCnqZjD1WsTU39x1lNIdO+EAOpy3LHe9qO5T4wSNLZgJvaliK1KuKf3w4ClU+qcDYvg== + dependencies: + "@backstage/config" "^0.1.13" + "@backstage/core-components" "^0.8.5" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/integration" "^0.7.2" + "@backstage/theme" "^0.2.14" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + react-use "^17.2.4" + +"@backstage/plugin-catalog-react@^0.6.12", "@backstage/plugin-catalog-react@^0.6.5": + version "0.6.12" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog-react/-/plugin-catalog-react-0.6.12.tgz#df6e9017ff6ad2e87395af11a277aadd95aef58b" + integrity sha512-0ezerRaR5dbYfoXvsxguUDqAhBxlblPl3uvzHhRDfUcV1r9L+UjKIlRB2tjC8rVtzAh7ob486viKAe6wKnbB5g== + dependencies: + "@backstage/catalog-client" "^0.5.5" + "@backstage/catalog-model" "^0.9.10" + "@backstage/core-components" "^0.8.5" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/errors" "^0.2.0" + "@backstage/integration" "^0.7.2" + "@backstage/plugin-permission-common" "^0.4.0" + "@backstage/plugin-permission-react" "^0.3.0" + "@backstage/types" "^0.1.1" + "@backstage/version-bridge" "^0.1.1" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + jwt-decode "^3.1.0" + lodash "^4.17.21" + qs "^6.9.4" + react-router "6.0.0-beta.0" + react-use "^17.2.4" + zen-observable "^0.8.15" + +"@backstage/plugin-catalog@*": + version "0.7.10" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog/-/plugin-catalog-0.7.10.tgz#0d434a91b61ed98d143a42d472c2ffdfff0fd64f" + integrity sha512-lNvoDL3GGoXtnfFCFnCrvtX7c13LHPuzpS7FWroKcg/3K/AoshUTr8OXQJht56djszzE02ne9r91VIBlYJ1DaQ== + dependencies: + "@backstage/catalog-client" "^0.5.5" + "@backstage/catalog-model" "^0.9.10" + "@backstage/core-components" "^0.8.6" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/errors" "^0.2.0" + "@backstage/integration-react" "^0.1.19" + "@backstage/plugin-catalog-common" "^0.1.1" + "@backstage/plugin-catalog-react" "^0.6.12" + "@backstage/theme" "^0.2.14" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + history "^5.0.0" + lodash "^4.17.21" + react-helmet "6.1.0" + react-router "6.0.0-beta.0" + react-use "^17.2.4" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -10724,18 +10830,18 @@ elliptic@^6.0.0: minimalistic-crypto-utils "^1.0.1" "embedded-techdocs-app@file:packages/embedded-techdocs-app": - version "0.2.61" + version "0.2.62-next.0" dependencies: - "@backstage/app-defaults" "^0.1.5" + "@backstage/app-defaults" "^0.1.6-next.0" "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.0" + "@backstage/cli" "^0.13.1-next.0" "@backstage/config" "^0.1.13" "@backstage/core-app-api" "^0.5.1" - "@backstage/core-components" "^0.8.6" + "@backstage/core-components" "^0.8.7-next.0" "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.19" - "@backstage/plugin-catalog" "^0.7.10" - "@backstage/plugin-techdocs" "^0.13.1" + "@backstage/integration-react" "^0.1.20-next.0" + "@backstage/plugin-catalog" "^0.7.11-next.0" + "@backstage/plugin-techdocs" "^0.13.2-next.0" "@backstage/test-utils" "^0.2.3" "@backstage/theme" "^0.2.14" "@material-ui/core" "^4.11.0" @@ -11521,52 +11627,52 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" "example-app@file:packages/app": - version "0.2.62" + version "0.2.63-next.0" dependencies: - "@backstage/app-defaults" "^0.1.5" + "@backstage/app-defaults" "^0.1.6-next.0" "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.0" + "@backstage/cli" "^0.13.1-next.0" "@backstage/core-app-api" "^0.5.1" - "@backstage/core-components" "^0.8.6" + "@backstage/core-components" "^0.8.7-next.0" "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.19" - "@backstage/plugin-airbrake" "^0.1.1" - "@backstage/plugin-apache-airflow" "^0.1.4" - "@backstage/plugin-api-docs" "^0.7.0" - "@backstage/plugin-azure-devops" "^0.1.12" - "@backstage/plugin-badges" "^0.2.20" - "@backstage/plugin-catalog" "^0.7.10" - "@backstage/plugin-catalog-graph" "^0.2.8" - "@backstage/plugin-catalog-import" "^0.7.10" - "@backstage/plugin-catalog-react" "^0.6.12" - "@backstage/plugin-circleci" "^0.2.35" - "@backstage/plugin-cloudbuild" "^0.2.33" - "@backstage/plugin-code-coverage" "^0.1.23" - "@backstage/plugin-cost-insights" "^0.11.18" - "@backstage/plugin-explore" "^0.3.27" - "@backstage/plugin-gcp-projects" "^0.3.15" - "@backstage/plugin-github-actions" "^0.4.33" - "@backstage/plugin-gocd" "^0.1.2" - "@backstage/plugin-graphiql" "^0.2.28" - "@backstage/plugin-home" "^0.4.12" - "@backstage/plugin-jenkins" "^0.5.18" - "@backstage/plugin-kafka" "^0.2.26" - "@backstage/plugin-kubernetes" "^0.5.5" - "@backstage/plugin-lighthouse" "^0.2.35" - "@backstage/plugin-newrelic" "^0.3.14" - "@backstage/plugin-newrelic-dashboard" "^0.1.4" - "@backstage/plugin-org" "^0.4.0" - "@backstage/plugin-pagerduty" "0.3.23" - "@backstage/plugin-rollbar" "^0.3.24" - "@backstage/plugin-scaffolder" "^0.12.0" - "@backstage/plugin-search" "^0.6.0" - "@backstage/plugin-sentry" "^0.3.34" - "@backstage/plugin-shortcuts" "^0.1.20" - "@backstage/plugin-tech-insights" "^0.1.6" - "@backstage/plugin-tech-radar" "^0.5.3" - "@backstage/plugin-techdocs" "^0.13.1" - "@backstage/plugin-todo" "^0.1.20" - "@backstage/plugin-user-settings" "^0.3.17" + "@backstage/integration-react" "^0.1.20-next.0" + "@backstage/plugin-airbrake" "^0.1.2-next.0" + "@backstage/plugin-apache-airflow" "^0.1.5-next.0" + "@backstage/plugin-api-docs" "^0.7.1-next.0" + "@backstage/plugin-azure-devops" "^0.1.13-next.0" + "@backstage/plugin-badges" "^0.2.21-next.0" + "@backstage/plugin-catalog" "^0.7.11-next.0" + "@backstage/plugin-catalog-graph" "^0.2.9-next.0" + "@backstage/plugin-catalog-import" "^0.8.0-next.0" + "@backstage/plugin-catalog-react" "^0.6.13-next.0" + "@backstage/plugin-circleci" "^0.2.36-next.0" + "@backstage/plugin-cloudbuild" "^0.2.34-next.0" + "@backstage/plugin-code-coverage" "^0.1.24-next.0" + "@backstage/plugin-cost-insights" "^0.11.19-next.0" + "@backstage/plugin-explore" "^0.3.28-next.0" + "@backstage/plugin-gcp-projects" "^0.3.16-next.0" + "@backstage/plugin-github-actions" "^0.4.34-next.0" + "@backstage/plugin-gocd" "^0.1.3-next.0" + "@backstage/plugin-graphiql" "^0.2.29-next.0" + "@backstage/plugin-home" "^0.4.13-next.0" + "@backstage/plugin-jenkins" "^0.5.19-next.0" + "@backstage/plugin-kafka" "^0.2.27-next.0" + "@backstage/plugin-kubernetes" "^0.5.6-next.0" + "@backstage/plugin-lighthouse" "^0.2.36-next.0" + "@backstage/plugin-newrelic" "^0.3.15-next.0" + "@backstage/plugin-newrelic-dashboard" "^0.1.5-next.0" + "@backstage/plugin-org" "^0.4.1-next.0" + "@backstage/plugin-pagerduty" "0.3.24-next.0" + "@backstage/plugin-rollbar" "^0.3.25-next.0" + "@backstage/plugin-scaffolder" "^0.12.1-next.0" + "@backstage/plugin-search" "^0.6.1-next.0" + "@backstage/plugin-sentry" "^0.3.35-next.0" + "@backstage/plugin-shortcuts" "^0.1.21-next.0" + "@backstage/plugin-tech-insights" "^0.1.7-next.0" + "@backstage/plugin-tech-radar" "^0.5.4-next.0" + "@backstage/plugin-techdocs" "^0.13.2-next.0" + "@backstage/plugin-todo" "^0.1.21-next.0" + "@backstage/plugin-user-settings" "^0.3.18-next.0" "@backstage/search-common" "^0.2.2" "@backstage/theme" "^0.2.14" "@material-ui/core" "^4.12.2" From 300f8cdaee54fc40fc94c493e0c1a40cdd50fcfe Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 14 Jan 2022 13:35:24 +0000 Subject: [PATCH 090/473] catalog-react: fix filter resetting bug in UserListPicker Signed-off-by: MT Lewis --- .changeset/itchy-bulldogs-dance.md | 5 ++ .../UserListPicker/UserListPicker.test.tsx | 83 ++++++++++++++++++- .../UserListPicker/UserListPicker.tsx | 44 ++++++---- 3 files changed, 113 insertions(+), 19 deletions(-) create mode 100644 .changeset/itchy-bulldogs-dance.md diff --git a/.changeset/itchy-bulldogs-dance.md b/.changeset/itchy-bulldogs-dance.md new file mode 100644 index 0000000000..a5123c0c27 --- /dev/null +++ b/.changeset/itchy-bulldogs-dance.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Fix bug with filter resetting based on user ownership diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx index f6a4c59374..a032d8fc46 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx @@ -69,8 +69,9 @@ const apis = TestApiRegistry.from( [storageApiRef, MockStorageApi.create()], ); -const mockIsOwnedEntity = (entity: Entity) => - entity.metadata.name === 'component-1'; +const mockIsOwnedEntity = jest.fn( + (entity: Entity) => entity.metadata.name === 'component-1', +); const mockIsStarredEntity = (entity: Entity) => entity.metadata.name === 'component-3'; @@ -250,4 +251,82 @@ describe('', () => { ), }); }); + + describe('filter resetting', () => { + let updateFilters: jest.Mock; + + const picker = ({ loading }: { loading: boolean }) => ( + + + + + + ); + + beforeEach(() => { + updateFilters = jest.fn(); + }); + + describe('when the user does not own any entities', () => { + beforeEach(() => { + mockIsOwnedEntity.mockReturnValue(false); + }); + + it('does not reset the filter while entities are loading', () => { + render(picker({ loading: true })); + + expect(updateFilters).not.toHaveBeenCalledWith({ + user: new UserListFilter( + 'all', + mockIsOwnedEntity, + mockIsStarredEntity, + ), + }); + }); + + it('resets the filter to "all" when entities are loaded', () => { + render(picker({ loading: false })); + + expect(updateFilters).toHaveBeenLastCalledWith({ + user: new UserListFilter( + 'all', + mockIsOwnedEntity, + mockIsStarredEntity, + ), + }); + }); + }); + + describe('when the user owns entities', () => { + beforeEach(() => { + mockIsOwnedEntity.mockReturnValue(true); + }); + + it('does not reset the filter while entities are loading', () => { + render(picker({ loading: true })); + + expect(updateFilters).not.toHaveBeenCalledWith({ + user: new UserListFilter( + 'all', + mockIsOwnedEntity, + mockIsStarredEntity, + ), + }); + }); + + it('does not reset the filter when entities are loaded', () => { + render(picker({ loading: false })); + + expect(updateFilters).toHaveBeenLastCalledWith({ + user: new UserListFilter( + 'owned', + mockIsOwnedEntity, + mockIsStarredEntity, + ), + }); + }); + }); + }); }); diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx index 8746752b08..dcad74f760 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx @@ -130,7 +130,7 @@ export const UserListPicker = ({ const classes = useStyles(); const configApi = useApi(configApiRef); const orgName = configApi.getOptionalString('organization.name') ?? 'Company'; - const { filters, updateFilters, backendEntities, queryParameters } = + const { filters, updateFilters, backendEntities, queryParameters, loading } = useEntityListProvider(); // Remove group items that aren't in availableFilters and exclude @@ -161,19 +161,36 @@ export const UserListPicker = ({ [isOwnedEntity, isStarredEntity], ); + const [selectedUserFilter, setSelectedUserFilter] = useState( + [queryParameters.user].flat()[0] ?? initialFilter, + ); + // To show proper counts for each section, apply all other frontend filters _except_ the user // filter that's controlled by this picker. - const [entitiesWithoutUserFilter, setEntitiesWithoutUserFilter] = - useState(backendEntities); - const totalOwnedUserEntities = entitiesWithoutUserFilter.filter(entity => - ownedFilter.filterEntity(entity), - ).length; - const [selectedUserFilter, setSelectedUserFilter] = useState( - totalOwnedUserEntities > 0 - ? [queryParameters.user].flat()[0] ?? initialFilter - : 'all', + const entitiesWithoutUserFilter = useMemo( + () => + backendEntities.filter( + reduceEntityFilters( + compact(Object.values({ ...filters, user: undefined })), + ), + ), + [filters, backendEntities], ); + const totalOwnedUserEntities = useMemo( + () => + entitiesWithoutUserFilter.filter(entity => + ownedFilter.filterEntity(entity), + ).length, + [entitiesWithoutUserFilter, ownedFilter], + ); + + useEffect(() => { + if (!loading && totalOwnedUserEntities === 0) { + setSelectedUserFilter('all'); + } + }, [loading, totalOwnedUserEntities, setSelectedUserFilter]); + useEffect(() => { updateFilters({ user: selectedUserFilter @@ -186,13 +203,6 @@ export const UserListPicker = ({ }); }, [selectedUserFilter, isOwnedEntity, isStarredEntity, updateFilters]); - useEffect(() => { - const filterFn = reduceEntityFilters( - compact(Object.values({ ...filters, user: undefined })), - ); - setEntitiesWithoutUserFilter(backendEntities.filter(filterFn)); - }, [filters, backendEntities]); - function getFilterCount(id: UserListFilterKind) { switch (id) { case 'owned': From dc3fe7c3ead198bb778399ef7e1f04345cfe3cf8 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 14 Jan 2022 14:20:39 +0000 Subject: [PATCH 091/473] catalog-react: disable groups with 0 entries in UserListPicker Signed-off-by: MT Lewis --- .../src/components/UserListPicker/UserListPicker.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx index dcad74f760..7c909167c9 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx @@ -233,6 +233,7 @@ export const UserListPicker = ({ onClick={() => setSelectedUserFilter(item.id)} selected={item.id === filters.user?.value} className={classes.menuItem} + disabled={getFilterCount(item.id) === 0} > {item.icon && ( From 17d812bdf25434e4e4c4cb259b4a96da957438a6 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 14 Jan 2022 14:36:16 +0000 Subject: [PATCH 092/473] catalog-react: generalize empty group handling Signed-off-by: MT Lewis --- .../UserListPicker/UserListPicker.tsx | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx index 7c909167c9..30102681d7 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx @@ -177,19 +177,29 @@ export const UserListPicker = ({ [filters, backendEntities], ); - const totalOwnedUserEntities = useMemo( - () => - entitiesWithoutUserFilter.filter(entity => + const filterCounts = useMemo>( + () => ({ + all: entitiesWithoutUserFilter.length, + starred: entitiesWithoutUserFilter.filter(entity => + starredFilter.filterEntity(entity), + ).length, + owned: entitiesWithoutUserFilter.filter(entity => ownedFilter.filterEntity(entity), ).length, - [entitiesWithoutUserFilter, ownedFilter], + }), + [entitiesWithoutUserFilter, starredFilter, ownedFilter], ); useEffect(() => { - if (!loading && totalOwnedUserEntities === 0) { + if ( + !loading && + !!selectedUserFilter && + selectedUserFilter !== 'all' && + filterCounts[selectedUserFilter] === 0 + ) { setSelectedUserFilter('all'); } - }, [loading, totalOwnedUserEntities, setSelectedUserFilter]); + }, [loading, filterCounts, selectedUserFilter, setSelectedUserFilter]); useEffect(() => { updateFilters({ @@ -203,19 +213,6 @@ export const UserListPicker = ({ }); }, [selectedUserFilter, isOwnedEntity, isStarredEntity, updateFilters]); - function getFilterCount(id: UserListFilterKind) { - switch (id) { - case 'owned': - return totalOwnedUserEntities; - case 'starred': - return entitiesWithoutUserFilter.filter(entity => - starredFilter.filterEntity(entity), - ).length; - default: - return entitiesWithoutUserFilter.length; - } - } - return ( {filterGroups.map(group => ( @@ -233,7 +230,7 @@ export const UserListPicker = ({ onClick={() => setSelectedUserFilter(item.id)} selected={item.id === filters.user?.value} className={classes.menuItem} - disabled={getFilterCount(item.id) === 0} + disabled={filterCounts[item.id] === 0} > {item.icon && ( @@ -249,7 +246,7 @@ export const UserListPicker = ({ - {getFilterCount(item.id) ?? '-'} + {filterCounts[item.id] ?? '-'} ))} From ce383faaef7edcb371c73e49668212b62f68d148 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 28 Jan 2022 10:26:20 +0000 Subject: [PATCH 093/473] catalog-react: generalise UserListPicker filter resetting tests Signed-off-by: MT Lewis --- .../UserListPicker/UserListPicker.test.tsx | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx index a032d8fc46..b776f26926 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx @@ -73,8 +73,9 @@ const mockIsOwnedEntity = jest.fn( (entity: Entity) => entity.metadata.name === 'component-1', ); -const mockIsStarredEntity = (entity: Entity) => - entity.metadata.name === 'component-3'; +const mockIsStarredEntity = jest.fn( + (entity: Entity) => entity.metadata.name === 'component-3', +); jest.mock('../../hooks', () => { const actual = jest.requireActual('../../hooks'); @@ -252,7 +253,11 @@ describe('', () => { }); }); - describe('filter resetting', () => { + describe.each` + type | filterFn + ${'owned'} | ${mockIsOwnedEntity} + ${'starred'} | ${mockIsStarredEntity} + `('filter resetting for $type entities', ({ type, filterFn }) => { let updateFilters: jest.Mock; const picker = ({ loading }: { loading: boolean }) => ( @@ -260,7 +265,7 @@ describe('', () => { - + ); @@ -269,9 +274,9 @@ describe('', () => { updateFilters = jest.fn(); }); - describe('when the user does not own any entities', () => { + describe(`when there are no ${type} entities match the filter`, () => { beforeEach(() => { - mockIsOwnedEntity.mockReturnValue(false); + filterFn.mockReturnValue(false); }); it('does not reset the filter while entities are loading', () => { @@ -299,9 +304,9 @@ describe('', () => { }); }); - describe('when the user owns entities', () => { + describe(`when there are some ${type} entities present`, () => { beforeEach(() => { - mockIsOwnedEntity.mockReturnValue(true); + filterFn.mockReturnValue(true); }); it('does not reset the filter while entities are loading', () => { @@ -321,7 +326,7 @@ describe('', () => { expect(updateFilters).toHaveBeenLastCalledWith({ user: new UserListFilter( - 'owned', + type, mockIsOwnedEntity, mockIsStarredEntity, ), From 91ffc2ade2c5e8739ddc899db174700aeeb354b1 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 28 Jan 2022 10:29:27 +0000 Subject: [PATCH 094/473] catalog: update DefaultCatalogPage test This test appears to be checking for a regression in which the filter reset from starred to owned after starring an entity. As a precursor, it tried to select all three possible filters, but now it's no longer possible to select filters that don't have any matching entities. Now that the behaviour of menu items when there are no items in that filter has changed, this commit updates the test to confirm that the menu item starts disabled, and then enables when an entity is starred. Signed-off-by: MT Lewis --- .../components/UserListPicker/UserListPicker.tsx | 8 ++------ .../CatalogPage/DefaultCatalogPage.test.tsx | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx index 30102681d7..d731a185fc 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx @@ -231,6 +231,7 @@ export const UserListPicker = ({ selected={item.id === filters.user?.value} className={classes.menuItem} disabled={filterCounts[item.id] === 0} + data-testid={`user-picker-${item.id}`} > {item.icon && ( @@ -238,12 +239,7 @@ export const UserListPicker = ({ )} - - {item.label} - + {item.label} {filterCounts[item.id] ?? '-'} diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx index 135a2a590d..20acff3c50 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx @@ -263,10 +263,12 @@ describe('DefaultCatalogPage', () => { const { getByTestId } = await renderWrapped(); fireEvent.click(getByTestId('user-picker-owned')); await expect(screen.findByText(/Owned \(1\)/)).resolves.toBeInTheDocument(); - fireEvent.click(screen.getByTestId('user-picker-starred')); - await expect( - screen.findByText(/Starred \(0\)/), - ).resolves.toBeInTheDocument(); + // The "Starred" menu option should initially be disabled, since there + // aren't any starred entities. + await expect(screen.getByTestId('user-picker-starred')).toHaveAttribute( + 'aria-disabled', + 'true', + ); fireEvent.click(screen.getByTestId('user-picker-all')); await expect(screen.findByText(/All \(2\)/)).resolves.toBeInTheDocument(); @@ -274,6 +276,12 @@ describe('DefaultCatalogPage', () => { fireEvent.click(starredIcons[0]); await expect(screen.findByText(/All \(2\)/)).resolves.toBeInTheDocument(); + // Now that we've starred an entity, the "Starred" menu option should be + // enabled. + await expect(screen.getByTestId('user-picker-starred')).not.toHaveAttribute( + 'aria-disabled', + 'true', + ); fireEvent.click(screen.getByTestId('user-picker-starred')); await expect( screen.findByText(/Starred \(1\)/), From 569715b9f0a43922cd1519ca1f98151e5fb94393 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Tue, 1 Feb 2022 11:37:12 +0000 Subject: [PATCH 095/473] catalog-react: expand bugfix description in changeset Signed-off-by: MT Lewis --- .changeset/itchy-bulldogs-dance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/itchy-bulldogs-dance.md b/.changeset/itchy-bulldogs-dance.md index a5123c0c27..b3d34654e8 100644 --- a/.changeset/itchy-bulldogs-dance.md +++ b/.changeset/itchy-bulldogs-dance.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-react': patch --- -Fix bug with filter resetting based on user ownership +Fix bug: previously the filter would be set to "all" on page load, even if the `initiallySelectedFilter` on the `DefaultCatalogPage` was set to something else, or a different query param was supplied. Now, the prop and query params control the filter as expected. Additionally, after this change any filters which match 0 items will be disabled, and the filter will be reverted to 'all' if they're set on page load. From ba59832aedb0f7232fca9e0f324979715c4fe742 Mon Sep 17 00:00:00 2001 From: Joon Park Date: Wed, 19 Jan 2022 17:06:00 +0000 Subject: [PATCH 096/473] Integrate catalog-import with permissions Signed-off-by: Joon Park --- .changeset/cyan-turtles-relax.md | 5 +++++ .changeset/fresh-insects-attack.md | 5 +++++ .changeset/silver-eagles-reply.md | 5 +++++ packages/app/package.json | 2 ++ packages/app/src/App.tsx | 8 +++++++- packages/create-app/src/lib/versions.ts | 4 ++++ .../default-app/packages/app/package.json.hbs | 2 ++ .../templates/default-app/packages/app/src/App.tsx | 8 +++++++- plugins/catalog-common/api-report.md | 3 +++ plugins/catalog-common/src/index.ts | 1 + plugins/catalog-common/src/permissions.ts | 14 ++++++++++++++ plugins/scaffolder/package.json | 2 ++ .../components/ScaffolderPage/ScaffolderPage.tsx | 14 ++++++++++---- 13 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 .changeset/cyan-turtles-relax.md create mode 100644 .changeset/fresh-insects-attack.md create mode 100644 .changeset/silver-eagles-reply.md diff --git a/.changeset/cyan-turtles-relax.md b/.changeset/cyan-turtles-relax.md new file mode 100644 index 0000000000..294159e2bd --- /dev/null +++ b/.changeset/cyan-turtles-relax.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-common': patch +--- + +Add catalogEntityCreatePermission diff --git a/.changeset/fresh-insects-attack.md b/.changeset/fresh-insects-attack.md new file mode 100644 index 0000000000..3c22df67c0 --- /dev/null +++ b/.changeset/fresh-insects-attack.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Permission the Register Existing Component button diff --git a/.changeset/silver-eagles-reply.md b/.changeset/silver-eagles-reply.md new file mode 100644 index 0000000000..2eabca0b1f --- /dev/null +++ b/.changeset/silver-eagles-reply.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Permission the catalog-import route diff --git a/packages/app/package.json b/packages/app/package.json index 6f2e921c81..c6e7be8c5d 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -17,6 +17,7 @@ "@backstage/plugin-apache-airflow": "^0.1.5-next.0", "@backstage/plugin-badges": "^0.2.21-next.0", "@backstage/plugin-catalog": "^0.7.11-next.0", + "@backstage/plugin-catalog-common": "^0.1.1", "@backstage/plugin-catalog-graph": "^0.2.9-next.0", "@backstage/plugin-catalog-import": "^0.8.0-next.0", "@backstage/plugin-catalog-react": "^0.6.13-next.0", @@ -38,6 +39,7 @@ "@backstage/plugin-newrelic-dashboard": "^0.1.5-next.0", "@backstage/plugin-org": "^0.4.1-next.0", "@backstage/plugin-pagerduty": "0.3.24-next.0", + "@backstage/plugin-permission-react": "^0.3.0", "@backstage/plugin-rollbar": "^0.3.25-next.0", "@backstage/plugin-scaffolder": "^0.12.1-next.0", "@backstage/plugin-search": "^0.6.1-next.0", diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 9be424a145..345915189a 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -86,6 +86,8 @@ import * as plugins from './plugins'; import { techDocsPage } from './components/techdocs/TechDocsPage'; import { ApacheAirflowPage } from '@backstage/plugin-apache-airflow'; +import { PermissionedRoute } from '@backstage/plugin-permission-react'; +import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; const app = createApp({ apis, @@ -140,7 +142,11 @@ const routes = ( > {entityPage} - } /> + } + /> } /> - } /> + } + /> }> {searchPage} diff --git a/plugins/catalog-common/api-report.md b/plugins/catalog-common/api-report.md index e2ee2d3225..9826a8ddef 100644 --- a/plugins/catalog-common/api-report.md +++ b/plugins/catalog-common/api-report.md @@ -5,6 +5,9 @@ ```ts import { Permission } from '@backstage/plugin-permission-common'; +// @public +export const catalogEntityCreatePermission: Permission; + // @public export const catalogEntityDeletePermission: Permission; diff --git a/plugins/catalog-common/src/index.ts b/plugins/catalog-common/src/index.ts index 05d5ed2ba5..9eddf37452 100644 --- a/plugins/catalog-common/src/index.ts +++ b/plugins/catalog-common/src/index.ts @@ -24,6 +24,7 @@ export { RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityReadPermission, + catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityRefreshPermission, catalogLocationReadPermission, diff --git a/plugins/catalog-common/src/permissions.ts b/plugins/catalog-common/src/permissions.ts index b4c6c4377c..52c225e441 100644 --- a/plugins/catalog-common/src/permissions.ts +++ b/plugins/catalog-common/src/permissions.ts @@ -38,6 +38,20 @@ export const catalogEntityReadPermission: Permission = { resourceType: RESOURCE_TYPE_CATALOG_ENTITY, }; +/** + * This permission is used to authorize actions that involve creating a new + * catalog entity. This includes registering an existing component into the + * catalog. + * @public + */ +export const catalogEntityCreatePermission: Permission = { + name: 'catalog.entity.create', + attributes: { + action: 'create', + }, + resourceType: RESOURCE_TYPE_CATALOG_ENTITY, +}; + /** * This permission is used to designate actions that involve removing one or * more entities from the catalog. diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 8a48e7b29f..a85d13f56e 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -39,7 +39,9 @@ "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", "@backstage/integration-react": "^0.1.20-next.0", + "@backstage/plugin-catalog-common": "^0.1.1", "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-permission-react": "^0.3.0", "@backstage/plugin-scaffolder-common": "^0.1.3", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", diff --git a/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx b/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx index c147c8e118..116b7ed82a 100644 --- a/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx +++ b/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx @@ -37,6 +37,8 @@ import React, { ComponentType } from 'react'; import { registerComponentRouteRef } from '../../routes'; import { TemplateList } from '../TemplateList'; import { TemplateTypePicker } from '../TemplateTypePicker'; +import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; +import { usePermission } from '@backstage/plugin-permission-react'; const useStyles = makeStyles(theme => ({ contentWrapper: { @@ -72,6 +74,8 @@ export const ScaffolderPageContents = ({ }, }; + const { allowed } = usePermission(catalogEntityCreatePermission); + return (
- + {allowed && ( + + )} Create new software components using standard templates. Different templates create different kinds of components (services, websites, From 86b1c46bd5c11d49b8e1604c893ae17688bf6e52 Mon Sep 17 00:00:00 2001 From: Joon Park Date: Mon, 31 Jan 2022 15:21:35 +0000 Subject: [PATCH 097/473] Add changeset descriptions Signed-off-by: Joon Park --- .changeset/cyan-turtles-relax.md | 2 ++ .changeset/silver-eagles-reply.md | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.changeset/cyan-turtles-relax.md b/.changeset/cyan-turtles-relax.md index 294159e2bd..e7a8aa4c8a 100644 --- a/.changeset/cyan-turtles-relax.md +++ b/.changeset/cyan-turtles-relax.md @@ -3,3 +3,5 @@ --- Add catalogEntityCreatePermission + +The `catalogEntityCreatePermission` can be imported and used when authoring a permission policy to restrict/grant a user's access to the catalog import plugin. (And the "Register Existing Component" button which navigates there). diff --git a/.changeset/silver-eagles-reply.md b/.changeset/silver-eagles-reply.md index 2eabca0b1f..adfbab2284 100644 --- a/.changeset/silver-eagles-reply.md +++ b/.changeset/silver-eagles-reply.md @@ -3,3 +3,21 @@ --- Permission the catalog-import route + +Use the `PermissionedRoute` for `CatalogImportPage` instead of the normal `Route`: + +```diff +// app/src/App.tsx +... ++ import { PermissionedRoute } from '@backstage/plugin-permission-react'; ++ import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; + +... + +- } /> ++ } ++ /> +``` From fd6decb02dafcc2b264d8c3546996f153c532eb6 Mon Sep 17 00:00:00 2001 From: Joon Park Date: Tue, 1 Feb 2022 11:07:55 +0000 Subject: [PATCH 098/473] Fix changeset descriptions Signed-off-by: Joon Park --- .changeset/cyan-turtles-relax.md | 4 +--- .changeset/silver-eagles-reply.md | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.changeset/cyan-turtles-relax.md b/.changeset/cyan-turtles-relax.md index e7a8aa4c8a..4f7857c30c 100644 --- a/.changeset/cyan-turtles-relax.md +++ b/.changeset/cyan-turtles-relax.md @@ -2,6 +2,4 @@ '@backstage/plugin-catalog-common': patch --- -Add catalogEntityCreatePermission - -The `catalogEntityCreatePermission` can be imported and used when authoring a permission policy to restrict/grant a user's access to the catalog import plugin. (And the "Register Existing Component" button which navigates there). +Adds new `catalogEntityCreatePermission` which can be imported and used when authoring a permission policy to restrict/grant a user's access to the catalog import plugin. (And the "Register Existing Component" button which navigates there). diff --git a/.changeset/silver-eagles-reply.md b/.changeset/silver-eagles-reply.md index adfbab2284..db69525768 100644 --- a/.changeset/silver-eagles-reply.md +++ b/.changeset/silver-eagles-reply.md @@ -2,12 +2,14 @@ '@backstage/create-app': patch --- -Permission the catalog-import route +Permission the `catalog-import` route + +The following changes are **required** if you intend to add permissions to your existing app. Use the `PermissionedRoute` for `CatalogImportPage` instead of the normal `Route`: ```diff -// app/src/App.tsx +// packages/app/src/App.tsx ... + import { PermissionedRoute } from '@backstage/plugin-permission-react'; + import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; From 742434a6ba08f8b2f2b414e0953d22acd9c2f43a Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Tue, 1 Feb 2022 13:39:23 +0100 Subject: [PATCH 099/473] Fix TechDocs download bug when backend/app hosts are the same. Signed-off-by: Eric Peterson --- .changeset/techdocs-funkar-varje-gang.md | 5 ++++ .../documented-component/docs/extensions.md | 6 +++++ .../transformers/addLinkClickListener.test.ts | 27 +++++++++++++++++++ .../transformers/addLinkClickListener.ts | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .changeset/techdocs-funkar-varje-gang.md diff --git a/.changeset/techdocs-funkar-varje-gang.md b/.changeset/techdocs-funkar-varje-gang.md new file mode 100644 index 0000000000..727820e5f8 --- /dev/null +++ b/.changeset/techdocs-funkar-varje-gang.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Fixed a bug where links to files within a TechDocs site that use the `download` attribute would result in a 404 in cases where the TechDocs backend and Backstage frontend application are on the same host. diff --git a/plugins/techdocs-backend/examples/documented-component/docs/extensions.md b/plugins/techdocs-backend/examples/documented-component/docs/extensions.md index e9337ce042..0fda26302d 100644 --- a/plugins/techdocs-backend/examples/documented-component/docs/extensions.md +++ b/plugins/techdocs-backend/examples/documented-component/docs/extensions.md @@ -88,6 +88,12 @@ Weather: :sunny: :umbrella: :cloud: :snowflake: Animals: :tiger: :horse: :turtle: :wolf: :frog: +### Attributes + +[A Download Link](./images/backstage-logo-cncf.svg){: download } + +![A Scaled Image](./images/backstage-logo-cncf.svg){: style="width: 100px" } + ### MDX truly sane lists - attributes diff --git a/plugins/techdocs/src/reader/transformers/addLinkClickListener.test.ts b/plugins/techdocs/src/reader/transformers/addLinkClickListener.test.ts index fe3a6e557c..f079750d8a 100644 --- a/plugins/techdocs/src/reader/transformers/addLinkClickListener.test.ts +++ b/plugins/techdocs/src/reader/transformers/addLinkClickListener.test.ts @@ -71,4 +71,31 @@ describe('addLinkClickListener', () => { expect(fn).toHaveBeenCalledTimes(0); }); + + it('does not call onClick when a link has a download attribute', async () => { + const fn = jest.fn(); + const shadowDom = await createTestShadowDom( + ` + + + + Download + + + `, + { + preTransformers: [], + postTransformers: [ + addLinkClickListener({ + baseUrl: 'http://localhost:3000', + onClick: fn, + }), + ], + }, + ); + + shadowDom.querySelector('a')?.click(); + + expect(fn).toHaveBeenCalledTimes(0); + }); }); diff --git a/plugins/techdocs/src/reader/transformers/addLinkClickListener.ts b/plugins/techdocs/src/reader/transformers/addLinkClickListener.ts index f02d88793b..3d0bd137c0 100644 --- a/plugins/techdocs/src/reader/transformers/addLinkClickListener.ts +++ b/plugins/techdocs/src/reader/transformers/addLinkClickListener.ts @@ -32,7 +32,7 @@ export const addLinkClickListener = ({ const href = target.getAttribute('href'); if (!href) return; - if (href.startsWith(baseUrl)) { + if (href.startsWith(baseUrl) && !elem.hasAttribute('download')) { e.preventDefault(); onClick(e, href); } From 82f855f9a0945b741910ee9c53d3869a0474db13 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 1 Feb 2022 14:59:03 +0100 Subject: [PATCH 100/473] scripts/prepare-release: fix base version handling in non-prereleases Signed-off-by: Patrik Oldsberg --- scripts/prepare-release.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/prepare-release.js b/scripts/prepare-release.js index bfae8e661c..8025022cf8 100755 --- a/scripts/prepare-release.js +++ b/scripts/prepare-release.js @@ -62,14 +62,22 @@ async function updatePatchVersions() { throw new Error(`Invalid base version ${version} for package ${name}`); } - const currentVersion = semver.parse(pkg.packageJson.version); - const targetVersion = semver.parse(version).inc('patch'); - targetVersion.prerelease = currentVersion.prerelease; + let targetVersion = version; + + // If we're currently in a pre-release we need to manually execute the + // patch bump up to the next version. And we also need to make sure we + // resume the releases at the same pre-release tag. + const currentPrerelease = semver.prerelease(pkg.packageJson.version); + if (currentPrerelease) { + const parsed = targetVersion.parse(version); + parsed.inc('patch'); + parsed.prerelease = currentPrerelease; + targetVersion = parsed.format(); + } - const targetVersionString = targetVersion.format(); pendingVersionBumps.set(name, { - targetVersion: targetVersionString, - targetRange: `^${targetVersionString}`, + targetVersion, + targetRange: `^${targetVersion}`, }); } From 11c86325ea7a260d50d6e5ed4acfec17322d7176 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 1 Feb 2022 15:13:17 +0100 Subject: [PATCH 101/473] chore: added missing path require Signed-off-by: blam --- scripts/create-release-tag.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create-release-tag.js b/scripts/create-release-tag.js index a71afe513b..297898ef97 100755 --- a/scripts/create-release-tag.js +++ b/scripts/create-release-tag.js @@ -17,6 +17,7 @@ */ const { Octokit } = require('@octokit/rest'); +const path = require('path'); const baseOptions = { owner: 'backstage', From 06f84f7e678fca28f5621613e86b274ce39f515f Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Tue, 1 Feb 2022 14:21:39 +0000 Subject: [PATCH 102/473] Stop abbreviating 'params' to make Vale happy Signed-off-by: MT Lewis --- .changeset/itchy-bulldogs-dance.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.changeset/itchy-bulldogs-dance.md b/.changeset/itchy-bulldogs-dance.md index b3d34654e8..a2acad4d34 100644 --- a/.changeset/itchy-bulldogs-dance.md +++ b/.changeset/itchy-bulldogs-dance.md @@ -2,4 +2,9 @@ '@backstage/plugin-catalog-react': patch --- -Fix bug: previously the filter would be set to "all" on page load, even if the `initiallySelectedFilter` on the `DefaultCatalogPage` was set to something else, or a different query param was supplied. Now, the prop and query params control the filter as expected. Additionally, after this change any filters which match 0 items will be disabled, and the filter will be reverted to 'all' if they're set on page load. +Fix bug: previously the filter would be set to "all" on page load, even if the +`initiallySelectedFilter` on the `DefaultCatalogPage` was set to something else, +or a different query parameter was supplied. Now, the prop and query parameters +control the filter as expected. Additionally, after this change any filters +which match 0 items will be disabled, and the filter will be reverted to 'all' +if they're set on page load. From 410ce6ed2a4e38b43c57911284584fd56bbbc59c Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Tue, 1 Feb 2022 14:23:43 +0000 Subject: [PATCH 103/473] Allow providing a TaskPageComponent Signed-off-by: Brian Fletcher --- .changeset/smart-boxes-double.md | 2 +- plugins/scaffolder/api-report.md | 14 ++++++++++++-- plugins/scaffolder/src/components/Router.tsx | 10 ++++------ .../src/components/TaskPage/TaskPage.tsx | 8 ++++---- plugins/scaffolder/src/index.ts | 1 + 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.changeset/smart-boxes-double.md b/.changeset/smart-boxes-double.md index 64a2fe9656..81d708297e 100644 --- a/.changeset/smart-boxes-double.md +++ b/.changeset/smart-boxes-double.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder': patch --- -The ScaffolderPage can be passed an optional `loadingHoldingText` string. It will replace the Loading text in the scaffolder task page. +The ScaffolderPage can be passed an optional `TaskPageComponent` with a `loadingText` string. It will replace the Loading text in the scaffolder task page. diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index c7a95f177e..befafc766b 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -21,8 +21,10 @@ import { FieldValidation } from '@rjsf/core'; import { IconButton } from '@material-ui/core'; import { JsonObject } from '@backstage/types'; import { JSONSchema } from '@backstage/catalog-model'; +import { JSXElementConstructor } from 'react'; import { Observable } from '@backstage/types'; import { default as React_2 } from 'react'; +import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -245,15 +247,17 @@ export const ScaffolderFieldExtensions: React_2.ComponentType; // @public (undocumented) export const ScaffolderPage: ({ TemplateCardComponent, + TaskPageComponent, groups, - loadingHoldingText, }: { - loadingHoldingText?: string | undefined; TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta2; }> | undefined; + TaskPageComponent?: + | ReactElement> + | undefined; groups?: | { title?: string | undefined; @@ -277,6 +281,12 @@ const scaffolderPlugin: BackstagePlugin< export { scaffolderPlugin as plugin }; export { scaffolderPlugin }; +// Warning: (ae-forgotten-export) The symbol "TaskPageProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "TaskPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const TaskPage: ({ loadingText }: TaskPageProps) => JSX.Element; + // Warning: (ae-missing-release-tag) "TemplateList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/plugins/scaffolder/src/components/Router.tsx b/plugins/scaffolder/src/components/Router.tsx index 10a78e1071..17a1606bc9 100644 --- a/plugins/scaffolder/src/components/Router.tsx +++ b/plugins/scaffolder/src/components/Router.tsx @@ -31,10 +31,10 @@ import { import { useElementFilter } from '@backstage/core-plugin-api'; type RouterProps = { - loadingHoldingText?: string; TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta2 }> | undefined; + TaskPageComponent?: React.ReactElement | undefined; groups?: Array<{ title?: string; titleComponent?: React.ReactNode; @@ -44,10 +44,11 @@ type RouterProps = { export const Router = ({ TemplateCardComponent, + TaskPageComponent, groups, - loadingHoldingText, }: RouterProps) => { const outlet = useOutlet(); + const TaskPageElement = TaskPageComponent || ; const customFieldExtensions = useElementFilter(outlet, elements => elements @@ -84,10 +85,7 @@ export const Router = ({ path="/templates/:templateName" element={} /> - } - /> + } /> ); diff --git a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx index 04e303b4f4..065c7b4478 100644 --- a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx +++ b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx @@ -219,10 +219,10 @@ const hasLinks = ({ entityRef, remoteUrl, links = [] }: TaskOutput): boolean => !!(entityRef || remoteUrl || links.length > 0); type TaskPageProps = { - loadingHoldingText?: string; + loadingText?: string; }; -export const TaskPage = ({ loadingHoldingText }: TaskPageProps) => { +export const TaskPage = ({ loadingText }: TaskPageProps) => { const classes = useStyles(); const navigate = useNavigate(); const rootLink = useRouteRef(rootRouteRef); @@ -260,7 +260,7 @@ export const TaskPage = ({ loadingHoldingText }: TaskPageProps) => { const logAsString = useMemo(() => { if (!currentStepId) { - return loadingHoldingText ? loadingHoldingText : 'Loading...'; + return loadingText ? loadingText : 'Loading...'; } const log = taskStream.stepLogs[currentStepId]; @@ -268,7 +268,7 @@ export const TaskPage = ({ loadingHoldingText }: TaskPageProps) => { return 'Waiting for logs...'; } return log.join('\n'); - }, [taskStream.stepLogs, currentStepId, loadingHoldingText]); + }, [taskStream.stepLogs, currentStepId, loadingText]); const taskNotFound = taskStream.completed === true && diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index 3cf65d7a07..893ab82025 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -56,3 +56,4 @@ export { FavouriteTemplate } from './components/FavouriteTemplate'; export { TemplateList } from './components/TemplateList'; export type { TemplateListProps } from './components/TemplateList'; export { TemplateTypePicker } from './components/TemplateTypePicker'; +export { TaskPage } from './components/TaskPage'; From 1233350ccd18deb0fbba7a6348fed9e5b45cfe0d Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 1 Feb 2022 15:46:38 +0100 Subject: [PATCH 104/473] chore: updating release scripts to have proper includes and fixing next release formatting Co-authored-by: Patrik Oldsberg Signed-off-by: blam --- scripts/create-github-release.js | 4 ++-- scripts/create-release-tag.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/create-github-release.js b/scripts/create-github-release.js index 6150b5f4bd..f25c6838fb 100755 --- a/scripts/create-github-release.js +++ b/scripts/create-github-release.js @@ -142,7 +142,8 @@ async function getReleaseDescriptionFromCommitMessage(commitMessage) { // Use the PR description to prepare for the release description const isChangesetRelease = commitMessage.includes(CHANGESET_RELEASE_BRANCH); if (isChangesetRelease) { - return data.body.split('\n').slice(3).join('\n'); + const lines = data.body.split('\n'); + return lines.slice(lines.indexOf('# Releases') + 1).join('\n'); } return data.body; @@ -182,7 +183,6 @@ async function main() { const releaseDescription = await getReleaseDescriptionFromCommitMessage( commitMessage, ); - await createRelease(releaseDescription); } diff --git a/scripts/create-release-tag.js b/scripts/create-release-tag.js index 297898ef97..042b00866a 100755 --- a/scripts/create-release-tag.js +++ b/scripts/create-release-tag.js @@ -18,6 +18,7 @@ const { Octokit } = require('@octokit/rest'); const path = require('path'); +const fs = require('fs-extra'); const baseOptions = { owner: 'backstage', From 3ee4d1bdb51189da456d4e734cf860923de5273a Mon Sep 17 00:00:00 2001 From: Adam Tester Date: Tue, 1 Feb 2022 16:38:24 +0000 Subject: [PATCH 105/473] Fix incorrect package name in changelog Signed-off-by: Adam Tester --- packages/create-app/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 411043b83a..d4eb6f1a96 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -102,7 +102,7 @@ To make this change to an existing app: - Add `@backstage/catalog-graph-plugin` as a `dependency` in `packages/app/package.json` + Add `@backstage/plugin-catalog-graph` as a `dependency` in `packages/app/package.json` Apply the following changes to the `packages/app/src/components/catalog/EntityPage.tsx` file: From 1854bd771bf6235d35e3aa733233d555ea9d5f25 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Fri, 28 Jan 2022 19:29:54 +0100 Subject: [PATCH 106/473] Code coverage plugin: fix breadcrumbs Signed-off-by: Eoghan McIlwaine --- .../components/FileExplorer/FileExplorer.tsx | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx b/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx index 790de6e00f..3d41a1ff64 100644 --- a/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx +++ b/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx @@ -131,6 +131,17 @@ const formatInitialData = (value: any) => { }); }; +export const getObjectsAtPath = ( + curData: CoverageTableRow | undefined, + path: string[], +): CoverageTableRow[] | undefined => { + let data = curData?.files; + for (const fragment of path) { + data = data?.find(d => d.path === fragment)?.files; + } + return data; +}; + export const FileExplorer = () => { const { entity } = useEntity(); const [curData, setCurData] = useState(); @@ -175,14 +186,10 @@ export const FileExplorer = () => { } }; - const moveUpIntoPath = (path: string) => { - const pathArray = path.split('/').filter(p => p.length); - let data = curData?.files; - pathArray.forEach(p => { - data = data?.find(d => d.path === p)?.files; - }); - setCurPath(path); - setTableData(data); + const moveUpIntoPath = (idx: number) => { + const path = curPath.split('/').slice(0, idx + 1); + setCurPath(path.join('/')); + setTableData(getObjectsAtPath(curData, path.slice(1))); }; const columns: TableColumn[] = [ @@ -270,8 +277,8 @@ export const FileExplorer = () => { color: `${idx !== lastPathElementIndex && 'lightblue'}`, cursor: `${idx !== lastPathElementIndex && 'pointer'}`, }} - onKeyDown={() => moveUpIntoPath(pathElement)} - onClick={() => moveUpIntoPath(pathElement)} + onKeyDown={() => moveUpIntoPath(idx)} + onClick={() => moveUpIntoPath(idx)} > {pathElement || 'root'}
From 3a5b41a2afeb5ed5a8109e107b7bdf15f7587973 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Tue, 1 Feb 2022 19:11:55 +0100 Subject: [PATCH 107/473] Add basic tests Signed-off-by: Eoghan McIlwaine --- .../FileExplorer/FileExplorer.test.tsx | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/plugins/code-coverage/src/components/FileExplorer/FileExplorer.test.tsx b/plugins/code-coverage/src/components/FileExplorer/FileExplorer.test.tsx index 4163b22ac1..b59b3ad1fd 100644 --- a/plugins/code-coverage/src/components/FileExplorer/FileExplorer.test.tsx +++ b/plugins/code-coverage/src/components/FileExplorer/FileExplorer.test.tsx @@ -13,7 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { groupByPath, buildFileStructure } from './FileExplorer'; +import { + groupByPath, + buildFileStructure, + getObjectsAtPath, +} from './FileExplorer'; const dummyFiles = [ { @@ -207,6 +211,28 @@ const coverageTableRowResults = { path: '', }; +const pathTestLeaf = { + files: [], + coverage: 1, + missing: 3, + tracked: 2, + path: 'file5', +}; + +const dummyFilesPathTest = { + files: [ + ...dummyFiles, + { + ...pathTestLeaf, + filename: 'dir3/dir7/file5', + }, + ], + coverage: 1, + missing: 1, + tracked: 1, + path: '', +}; + describe('groupByPath function', () => { it('should group files by their root directory,as per their filename', () => { expect(groupByPath(dummyFiles)).toStrictEqual(dummyDataGroupedByPath); @@ -220,3 +246,19 @@ describe('buildFileStructure function', () => { ); }); }); + +describe('getObjectsAtPath function', () => { + const structure = buildFileStructure(dummyFilesPathTest); + + it('should return the the dirs/files at the given path', () => { + expect(getObjectsAtPath(structure, ['dir3', 'dir7'])).toStrictEqual([ + pathTestLeaf, + ]); + }); + + it('should return undefined for a nonexistent path', () => { + expect( + getObjectsAtPath(structure, ['dir3', 'doesnt-exist']), + ).toBeUndefined(); + }); +}); From 2ce5e4e0a7b5feb67ebd05b52922363bdf233af6 Mon Sep 17 00:00:00 2001 From: Eoghan McIlwaine Date: Tue, 1 Feb 2022 19:36:18 +0100 Subject: [PATCH 108/473] Add changeset for bugfix Signed-off-by: Eoghan McIlwaine --- .changeset/blue-ligers-allow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/blue-ligers-allow.md diff --git a/.changeset/blue-ligers-allow.md b/.changeset/blue-ligers-allow.md new file mode 100644 index 0000000000..923a5a31dc --- /dev/null +++ b/.changeset/blue-ligers-allow.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-code-coverage': patch +--- + +Fixed a bug in the FileExplorer component which made it impossible to navigate upwards to a containing folder by clicking on the folder breadcrumb. From 5f32f20a3446eb61df6d313face77f70c1ce2017 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Tue, 1 Feb 2022 22:44:44 +0000 Subject: [PATCH 109/473] fixes the comonent types Signed-off-by: Brian Fletcher --- plugins/scaffolder/api-report.md | 6 +----- plugins/scaffolder/src/components/Router.tsx | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index befafc766b..7f29d11073 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -21,10 +21,8 @@ import { FieldValidation } from '@rjsf/core'; import { IconButton } from '@material-ui/core'; import { JsonObject } from '@backstage/types'; import { JSONSchema } from '@backstage/catalog-model'; -import { JSXElementConstructor } from 'react'; import { Observable } from '@backstage/types'; import { default as React_2 } from 'react'; -import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -255,9 +253,7 @@ export const ScaffolderPage: ({ template: TemplateEntityV1beta2; }> | undefined; - TaskPageComponent?: - | ReactElement> - | undefined; + TaskPageComponent?: ComponentType<{}> | undefined; groups?: | { title?: string | undefined; diff --git a/plugins/scaffolder/src/components/Router.tsx b/plugins/scaffolder/src/components/Router.tsx index 17a1606bc9..f41ee853f8 100644 --- a/plugins/scaffolder/src/components/Router.tsx +++ b/plugins/scaffolder/src/components/Router.tsx @@ -34,7 +34,7 @@ type RouterProps = { TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta2 }> | undefined; - TaskPageComponent?: React.ReactElement | undefined; + TaskPageComponent?: ComponentType<{}> | undefined; groups?: Array<{ title?: string; titleComponent?: React.ReactNode; @@ -48,7 +48,7 @@ export const Router = ({ groups, }: RouterProps) => { const outlet = useOutlet(); - const TaskPageElement = TaskPageComponent || ; + const TaskPageElement = TaskPageComponent || TaskPage; const customFieldExtensions = useElementFilter(outlet, elements => elements @@ -85,7 +85,7 @@ export const Router = ({ path="/templates/:templateName" element={} /> - + } /> } /> ); From d0a3bdb263c8419c412131ddca8307eb1150afee Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Tue, 1 Feb 2022 22:59:53 +0000 Subject: [PATCH 110/473] also export task page props and document Signed-off-by: Brian Fletcher --- plugins/scaffolder/api-report.md | 10 ++++++---- .../src/components/TaskPage/TaskPage.tsx | 14 +++++++++++++- .../scaffolder/src/components/TaskPage/index.ts | 1 + plugins/scaffolder/src/index.ts | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 7f29d11073..12fed2326a 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -277,12 +277,14 @@ const scaffolderPlugin: BackstagePlugin< export { scaffolderPlugin as plugin }; export { scaffolderPlugin }; -// Warning: (ae-forgotten-export) The symbol "TaskPageProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "TaskPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export const TaskPage: ({ loadingText }: TaskPageProps) => JSX.Element; +// @public +export type TaskPageProps = { + loadingText?: string; +}; + // Warning: (ae-missing-release-tag) "TemplateList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx index 065c7b4478..d6933cd26b 100644 --- a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx +++ b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx @@ -218,10 +218,22 @@ export const TaskStatusStepper = memo( const hasLinks = ({ entityRef, remoteUrl, links = [] }: TaskOutput): boolean => !!(entityRef || remoteUrl || links.length > 0); -type TaskPageProps = { +/** + * TaskPageProps for constructing a TaskPage + * @param loadingText - Optional loading text shown before a task begins executing. + * + * @public + */ +export type TaskPageProps = { loadingText?: string; }; +/** + * TaskPage for showing the status of the taskId provided as a param + * @param loadingText - Optional loading text shown before a task begins executing. + * + * @public + */ export const TaskPage = ({ loadingText }: TaskPageProps) => { const classes = useStyles(); const navigate = useNavigate(); diff --git a/plugins/scaffolder/src/components/TaskPage/index.ts b/plugins/scaffolder/src/components/TaskPage/index.ts index 809b45101b..f7876888f9 100644 --- a/plugins/scaffolder/src/components/TaskPage/index.ts +++ b/plugins/scaffolder/src/components/TaskPage/index.ts @@ -14,3 +14,4 @@ * limitations under the License. */ export { TaskPage } from './TaskPage'; +export type { TaskPageProps } from './TaskPage'; diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index 893ab82025..8012f14f32 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -57,3 +57,4 @@ export { TemplateList } from './components/TemplateList'; export type { TemplateListProps } from './components/TemplateList'; export { TemplateTypePicker } from './components/TemplateTypePicker'; export { TaskPage } from './components/TaskPage'; +export type { TaskPageProps } from './components/TaskPage'; From 478eb69092d8c4645db5b4633110ab30d1d60fd2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 04:12:28 +0000 Subject: [PATCH 111/473] chore(deps-dev): bump @types/body-parser from 1.19.1 to 1.19.2 Bumps [@types/body-parser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/body-parser) from 1.19.1 to 1.19.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/body-parser) --- updated-dependencies: - dependency-name: "@types/body-parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 70a00d7cd6..612ea640cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5177,15 +5177,7 @@ dependencies: "@babel/types" "^7.3.0" -"@types/body-parser@*", "@types/body-parser@^1.19.0": - version "1.19.1" - resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz#0c0174c42a7d017b818303d4b5d969cb0b75929c" - integrity sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/body-parser@1.19.2": +"@types/body-parser@*", "@types/body-parser@1.19.2", "@types/body-parser@^1.19.0": version "1.19.2" resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== @@ -11642,6 +11634,7 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: "@backstage/plugin-azure-devops" "^0.1.13-next.0" "@backstage/plugin-badges" "^0.2.21-next.0" "@backstage/plugin-catalog" "^0.7.11-next.0" + "@backstage/plugin-catalog-common" "^0.1.1" "@backstage/plugin-catalog-graph" "^0.2.9-next.0" "@backstage/plugin-catalog-import" "^0.8.0-next.0" "@backstage/plugin-catalog-react" "^0.6.13-next.0" @@ -11663,6 +11656,7 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: "@backstage/plugin-newrelic-dashboard" "^0.1.5-next.0" "@backstage/plugin-org" "^0.4.1-next.0" "@backstage/plugin-pagerduty" "0.3.24-next.0" + "@backstage/plugin-permission-react" "^0.3.0" "@backstage/plugin-rollbar" "^0.3.25-next.0" "@backstage/plugin-scaffolder" "^0.12.1-next.0" "@backstage/plugin-search" "^0.6.1-next.0" From 50ef52a6409fe5559a8f5fd43ccfcba2effe01ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 08:07:47 +0000 Subject: [PATCH 112/473] chore(deps): bump replace-in-file from 6.1.0 to 6.3.2 Bumps [replace-in-file](https://github.com/adamreisnz/replace-in-file) from 6.1.0 to 6.3.2. - [Release notes](https://github.com/adamreisnz/replace-in-file/releases) - [Changelog](https://github.com/adamreisnz/replace-in-file/blob/main/CHANGELOG.md) - [Commits](https://github.com/adamreisnz/replace-in-file/compare/v6.1.0...v6.3.2) --- updated-dependencies: - dependency-name: replace-in-file dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 612ea640cc..51a69617f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21177,13 +21177,13 @@ replace-ext@^1.0.0: integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== replace-in-file@^6.0.0: - version "6.1.0" - resolved "https://registry.npmjs.org/replace-in-file/-/replace-in-file-6.1.0.tgz#9f9ddd7bb70d6ad231d2ad692e1b646e73d06647" - integrity sha512-URzjyF3nucvejuY13HFd7O+Q6tFJRLKGHLYVvSh+LiZj3gFXzSYGnIkQflnJJulCAI2/RTZaZkpOtdVdW0EhQA== + version "6.3.2" + resolved "https://registry.npmjs.org/replace-in-file/-/replace-in-file-6.3.2.tgz#0f19835137177c89932f45df319f3539a019484f" + integrity sha512-Dbt5pXKvFVPL3WAaEB3ZX+95yP0CeAtIPJDwYzHbPP5EAHn+0UoegH/Wg3HKflU9dYBH8UnBC2NvY3P+9EZtTg== dependencies: - chalk "^4.0.0" - glob "^7.1.6" - yargs "^15.3.1" + chalk "^4.1.2" + glob "^7.2.0" + yargs "^17.2.1" replaceall@^0.1.6: version "0.1.6" @@ -25201,10 +25201,10 @@ yargs@^16.1.1, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.0, yargs@^17.0.1, yargs@^17.1.1, yargs@^17.3.0: - version "17.3.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.3.0.tgz#295c4ffd0eef148ef3e48f7a2e0f58d0e4f26b1c" - integrity sha512-GQl1pWyDoGptFPJx9b9L6kmR33TGusZvXIZUT+BOz9f7X2L94oeAskFYLEg/FkhV06zZPBYLvLZRWeYId29lew== +yargs@^17.0.0, yargs@^17.0.1, yargs@^17.1.1, yargs@^17.2.1, yargs@^17.3.0: + version "17.3.1" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz#da56b28f32e2fd45aefb402ed9c26f42be4c07b9" + integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA== dependencies: cliui "^7.0.2" escalade "^3.1.1" From 5bd0ce9e626e13fdf397389c44e28d9ea9c6593a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 08:10:25 +0000 Subject: [PATCH 113/473] chore(deps): bump inquirer from 7.3.3 to 8.2.0 Bumps [inquirer](https://github.com/SBoudrias/Inquirer.js) from 7.3.3 to 8.2.0. - [Release notes](https://github.com/SBoudrias/Inquirer.js/releases) - [Commits](https://github.com/SBoudrias/Inquirer.js/compare/inquirer@7.3.3...inquirer@8.2.0) --- updated-dependencies: - dependency-name: inquirer dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .changeset/dependabot-4ce572f.md | 6 +++++ packages/cli/package.json | 2 +- packages/create-app/package.json | 2 +- yarn.lock | 44 +++----------------------------- 4 files changed, 12 insertions(+), 42 deletions(-) create mode 100644 .changeset/dependabot-4ce572f.md diff --git a/.changeset/dependabot-4ce572f.md b/.changeset/dependabot-4ce572f.md new file mode 100644 index 0000000000..5d02c2a007 --- /dev/null +++ b/.changeset/dependabot-4ce572f.md @@ -0,0 +1,6 @@ +--- +'@backstage/cli': patch +'@backstage/create-app': patch +--- + +chore(deps): bump `inquirer` from 7.3.3 to 8.2.0 diff --git a/packages/cli/package.json b/packages/cli/package.json index 824e8e5efc..5e44d3cc2d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -78,7 +78,7 @@ "glob": "^7.1.7", "handlebars": "^4.7.3", "html-webpack-plugin": "^5.3.1", - "inquirer": "^7.0.4", + "inquirer": "^8.2.0", "jest": "^26.0.1", "jest-css-modules": "^2.1.0", "json-schema": "^0.4.0", diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 2b35b5e289..00d745ab36 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -35,7 +35,7 @@ "commander": "^6.1.0", "fs-extra": "9.1.0", "handlebars": "^4.7.3", - "inquirer": "^7.0.4", + "inquirer": "^8.2.0", "ora": "^5.3.0", "recursive-readdir": "^2.2.2" }, diff --git a/yarn.lock b/yarn.lock index 612ea640cc..abcd72a29a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13913,7 +13913,7 @@ inline-style-prefixer@^6.0.0: dependencies: css-in-js-utils "^2.0.0" -inquirer@^7.0.4, inquirer@^7.3.3: +inquirer@^7.3.3: version "7.3.3" resolved "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== @@ -13932,27 +13932,7 @@ inquirer@^7.0.4, inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" -inquirer@^8.0.0: - version "8.1.5" - resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.1.5.tgz#2dc5159203c826d654915b5fe6990fd17f54a150" - integrity sha512-G6/9xUqmt/r+UvufSyrPpt84NYwhKZ9jLsgMbQzlx804XErNupor8WQdBnBRrXmBfTPpuwf1sV+ss2ovjgdXIg== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.2.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - -inquirer@^8.1.1, inquirer@^8.2.0: +inquirer@^8.0.0, inquirer@^8.1.1, inquirer@^8.2.0: version "8.2.0" resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz#f44f008dd344bbfc4b30031f45d984e034a3ac3a" integrity sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ== @@ -21552,14 +21532,7 @@ rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.3: dependencies: tslib "^1.9.0" -rxjs@^7.1.0, rxjs@^7.2.0: - version "7.3.0" - resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" - integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== - dependencies: - tslib "~2.1.0" - -rxjs@^7.5.1: +rxjs@^7.1.0, rxjs@^7.2.0, rxjs@^7.5.1: version "7.5.2" resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.5.2.tgz#11e4a3a1dfad85dbf7fb6e33cbba17668497490b" integrity sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w== @@ -22644,16 +22617,7 @@ string-width@^3.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string-width@^4.2.3: +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== From c4b38fc1a36294b0e92c25643a9f5b96c2fbea2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 08:16:38 +0000 Subject: [PATCH 114/473] chore(deps-dev): bump @changesets/cli from 2.17.0 to 2.20.0 Bumps [@changesets/cli](https://github.com/changesets/changesets) from 2.17.0 to 2.20.0. - [Release notes](https://github.com/changesets/changesets/releases) - [Changelog](https://github.com/changesets/changesets/blob/main/docs/modifying-changelog-format.md) - [Commits](https://github.com/changesets/changesets/compare/@changesets/cli@2.17.0...@changesets/cli@2.20.0) --- updated-dependencies: - dependency-name: "@changesets/cli" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 278 +++++++++++++++++++++--------------------------------- 1 file changed, 106 insertions(+), 172 deletions(-) diff --git a/yarn.lock b/yarn.lock index 612ea640cc..1d8aea30b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1498,17 +1498,17 @@ resolved "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-5.0.2.tgz#b23080fa35520e993a8a37a0f5bca26aa4650a48" integrity sha512-NBEJlHWrhQucLhZGHtSxM2loSaNUMajC7KOYJLyfcdW/6goVoff2HoYI3bz8YCDN0wKGbxtUL0gx2dvHpvnWlw== -"@changesets/apply-release-plan@^5.0.1": - version "5.0.1" - resolved "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-5.0.1.tgz#ed3e30550f787ef1b72f0a51e29a54d244123109" - integrity sha512-ltYLM/PPoL1Un9hnNCbUac25FWonJvIZ/9C3O4UyZ/k4rir9FGvH6KLtMOiPEAJWnXmaHeRDr06MzohuXOnmvw== +"@changesets/apply-release-plan@^5.0.4": + version "5.0.4" + resolved "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-5.0.4.tgz#fefffecf73b59dbee7ae905b3c6a2e64c489f0cb" + integrity sha512-czayDIrgC8qBnqwClvh9nxjCMem+XZG7xtfdYwq3dxpzA30qGppcI0i088VYug5RCFR+l1N+HUvkujSZuBK65w== dependencies: "@babel/runtime" "^7.10.4" - "@changesets/config" "^1.6.1" + "@changesets/config" "^1.6.4" "@changesets/get-version-range-type" "^0.3.2" - "@changesets/git" "^1.1.2" - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/git" "^1.3.0" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" detect-indent "^6.0.0" fs-extra "^7.0.1" lodash.startcase "^4.4.0" @@ -1517,45 +1517,45 @@ resolve-from "^5.0.0" semver "^5.4.1" -"@changesets/assemble-release-plan@^5.0.1": - version "5.0.1" - resolved "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-5.0.1.tgz#80e9b750705677eb2d6356c581ed9c2e97fd68e7" - integrity sha512-KQqafvScTFQ/4Q2LpLmDYhU47LWvIGcgVS8tzKU8fBvRdKuLGQXe42VYbwVM0cHIkFd/b6YFn+H2QMdKC2MjIQ== +"@changesets/assemble-release-plan@^5.0.5": + version "5.0.5" + resolved "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-5.0.5.tgz#60e4adc9bf458dd6ec38dee78d8f1bbeddfe3936" + integrity sha512-ejCVSM4I1jgaNi30we3/qltj2NQtS68w7C3H8Gvb6ZOvbIpAW/Tr0uMmPgRj4Vzkez5+fx0If02AvOdssz1btA== dependencies: "@babel/runtime" "^7.10.4" "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.2.2" - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/get-dependents-graph" "^1.3.0" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" semver "^5.4.1" "@changesets/cli@^2.14.0": - version "2.17.0" - resolved "https://registry.npmjs.org/@changesets/cli/-/cli-2.17.0.tgz#cc7ff4f64d029ddd6d87020a012c8cf8c7adde58" - integrity sha512-UyraYwYst1lTjef+8i80XQ6SqsLaGwi4Sgn9YuDf2xdHA9m+5qQXshHvHVjaTdPTA09rqMBk9yeO7vmAqF4+vQ== + version "2.20.0" + resolved "https://registry.npmjs.org/@changesets/cli/-/cli-2.20.0.tgz#f24dbd38bd4bc47bf083e59b6bb9cbf531465808" + integrity sha512-IUYSgZKtS+wXPD5hxfnCfZ1JWCbBI0CRrhxpkgVKcXDwpxiRU8stCwuSuVj14kiYlThuH2zL0/ZuGvhF4r28Gg== dependencies: "@babel/runtime" "^7.10.4" - "@changesets/apply-release-plan" "^5.0.1" - "@changesets/assemble-release-plan" "^5.0.1" - "@changesets/config" "^1.6.1" + "@changesets/apply-release-plan" "^5.0.4" + "@changesets/assemble-release-plan" "^5.0.5" + "@changesets/config" "^1.6.4" "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.2.2" - "@changesets/get-release-plan" "^3.0.1" - "@changesets/git" "^1.1.2" + "@changesets/get-dependents-graph" "^1.3.0" + "@changesets/get-release-plan" "^3.0.5" + "@changesets/git" "^1.3.0" "@changesets/logger" "^0.0.5" - "@changesets/pre" "^1.0.7" - "@changesets/read" "^0.5.0" - "@changesets/types" "^4.0.1" - "@changesets/write" "^0.1.5" - "@manypkg/get-packages" "^1.0.1" + "@changesets/pre" "^1.0.9" + "@changesets/read" "^0.5.3" + "@changesets/types" "^4.0.2" + "@changesets/write" "^0.1.6" + "@manypkg/get-packages" "^1.1.3" + "@types/is-ci" "^3.0.0" "@types/semver" "^6.0.0" - boxen "^1.3.0" chalk "^2.1.0" enquirer "^2.3.0" external-editor "^3.1.0" fs-extra "^7.0.1" human-id "^1.0.2" - is-ci "^2.0.0" + is-ci "^3.0.1" meow "^6.0.0" outdent "^0.5.0" p-limit "^2.2.0" @@ -1565,16 +1565,16 @@ term-size "^2.1.0" tty-table "^2.8.10" -"@changesets/config@^1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@changesets/config/-/config-1.6.1.tgz#e9b1636fd56a74411c493c924e6ffa07d7d26091" - integrity sha512-aQTo6ODvhsvnSFszMP1YbJyAi1DtE1Pes9rL+G+KYJiAOA6k5RzbiKOarjo+ZkKXpX0G3CBAbOO8jXOX4xG7cQ== +"@changesets/config@^1.6.4": + version "1.6.4" + resolved "https://registry.npmjs.org/@changesets/config/-/config-1.6.4.tgz#c904c84f067b49c09b378618b751089dd29ed0b7" + integrity sha512-WWa8eR8GzS/p2atLc/+5UEDn7fsRCZ+/sShLkB/3efVbTkSTB1PwoKwQRXLYXM1DY289T7UnJT4HLZA3Gcreww== dependencies: "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.2.2" + "@changesets/get-dependents-graph" "^1.3.0" "@changesets/logger" "^0.0.5" - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" fs-extra "^7.0.1" micromatch "^4.0.2" @@ -1585,44 +1585,44 @@ dependencies: extendable-error "^0.1.5" -"@changesets/get-dependents-graph@^1.2.2": - version "1.2.2" - resolved "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-1.2.2.tgz#7a2238f3d1a023de83d37b727a0da15826e88d73" - integrity sha512-3zJRw6TcexmOrmIZNOXpIRsZtqtrdmlzbqp4+V0VgnBvTxz16rqCS9VBsBqFYeJDWFj3soOlHUMeTwLghr18DA== +"@changesets/get-dependents-graph@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-1.3.0.tgz#892bbb63406911baac1f77a31303620492d466ec" + integrity sha512-4VHQWEluWySPgDdkL94YNxrEjDb9nwNFw515sWDmVrlfpQN5qaP1hdaotrp4mJm4ky85t4cTlrWSP+CTY7IDbw== dependencies: - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" chalk "^2.1.0" fs-extra "^7.0.1" semver "^5.4.1" -"@changesets/get-release-plan@^3.0.1": - version "3.0.1" - resolved "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-3.0.1.tgz#c98a34321eac9e4187098893ff8dadb6f90ad89c" - integrity sha512-HTZeEPvLlcWMWKxLrzQNLQWKDDN1lUKvaOV+hl/yBhgtyJECljJJzd3IRaKqCSWMrYKNaaEcmunTtZ4oaeoK9w== +"@changesets/get-release-plan@^3.0.5": + version "3.0.5" + resolved "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-3.0.5.tgz#c05cff031bba737c8dd236afe97e77b007ee44a3" + integrity sha512-67td3LA1RTJpY5Q+wJaTTRtAjZ2suAhDfj3VRjFv0gCgUPXs8rNx17n9UPbegPTQjeTS1r7hVRVifycmT0fQtA== dependencies: "@babel/runtime" "^7.10.4" - "@changesets/assemble-release-plan" "^5.0.1" - "@changesets/config" "^1.6.1" - "@changesets/pre" "^1.0.7" - "@changesets/read" "^0.5.0" - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/assemble-release-plan" "^5.0.5" + "@changesets/config" "^1.6.4" + "@changesets/pre" "^1.0.9" + "@changesets/read" "^0.5.3" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" "@changesets/get-version-range-type@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz#8131a99035edd11aa7a44c341cbb05e668618c67" integrity sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg== -"@changesets/git@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@changesets/git/-/git-1.1.2.tgz#248d4418bcb2d4f198852409cfcbd06a1fcb0424" - integrity sha512-dfza8elsIwcYVa4fFzLaPs4+AkoCFiW3sfzkkC7WR+rG9j+zZh7CelzVpnoiAbEI2QOzeCbZKMoLSvBPgHhB1g== +"@changesets/git@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@changesets/git/-/git-1.3.0.tgz#7f62e1983552efecb738054db5178eef77f41241" + integrity sha512-Ydj4lWX33d2PCDaTXOMSbyTjgk1go1V6EyXjKTmOV7nB/qvgKdDZLSt+AexKWKp3Ac2FTrtVnl9G5gMNVYNmuQ== dependencies: "@babel/runtime" "^7.10.4" "@changesets/errors" "^0.1.4" - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" is-subdir "^1.1.1" spawndamnit "^2.0.0" @@ -1633,51 +1633,51 @@ dependencies: chalk "^2.1.0" -"@changesets/parse@^0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@changesets/parse/-/parse-0.3.9.tgz#c518792b05f15ab418d58dc1cea81601556e845e" - integrity sha512-XoTEkMpvRRVxSlhvOaK4YSFM+RZhYFTksxRh7ieNkb6pMxkpq8MOYSi/07BuqkODn4dJEMOoSy3RzL99P6FyqA== +"@changesets/parse@^0.3.11": + version "0.3.11" + resolved "https://registry.npmjs.org/@changesets/parse/-/parse-0.3.11.tgz#b53485f36152e6e9a097b56fc46cafb6705ce2b5" + integrity sha512-w5/X8KijcCrvv5lHimXIBR9o35c78niiBoesBjBUlWeifwPz0DHc/lzVYJKRkA5w0BGqft6T/9hKI68GaYj5wA== dependencies: - "@changesets/types" "^4.0.1" + "@changesets/types" "^4.0.2" js-yaml "^3.13.1" -"@changesets/pre@^1.0.7": - version "1.0.7" - resolved "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.7.tgz#caf6430c90b8ac6d58c9cd90a19558ab06b19b88" - integrity sha512-oUU6EL4z0AIyCv/EscQFxxJsQfc9/AcSpqAGbdZrLXwshUWTXsJHMWlE3/+iSIyQ+I+/xtxbBxnqDUpUU3TOOg== +"@changesets/pre@^1.0.9": + version "1.0.9" + resolved "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.9.tgz#f1a0efea42733c25ef4a782377b2ac61023bd1b7" + integrity sha512-F3+qMun89KlynecBD15fEpwGT/KxbYb3WGeut6w1xhZb0u7V/jdcPy9b+kJ2xmBqFZLn1WteWIP96IjxS57H7A== dependencies: "@babel/runtime" "^7.10.4" "@changesets/errors" "^0.1.4" - "@changesets/types" "^4.0.1" - "@manypkg/get-packages" "^1.0.1" + "@changesets/types" "^4.0.2" + "@manypkg/get-packages" "^1.1.3" fs-extra "^7.0.1" -"@changesets/read@^0.5.0": - version "0.5.0" - resolved "https://registry.npmjs.org/@changesets/read/-/read-0.5.0.tgz#52f7a10f6baebf97172e62035ee8345652c5a1c0" - integrity sha512-A2OJ+vgfvbUaLx2yKyHH+tapa+DUd2NtpFpVuxjUqv0zirjqju20z1bziqaqpIQSf/rXPuoc09vp5w4VakraHg== +"@changesets/read@^0.5.3": + version "0.5.3" + resolved "https://registry.npmjs.org/@changesets/read/-/read-0.5.3.tgz#5afb14ee0e806751c255e94fe8742843a9b12487" + integrity sha512-zoj5NjNR4AhiGXz6aHTxsBLojChHgDOSbz6VfAVxMKX7tF7UhyNYptG2VEbSjxeamNKABx6k1pkM2IyVVlOcbQ== dependencies: "@babel/runtime" "^7.10.4" - "@changesets/git" "^1.1.2" + "@changesets/git" "^1.3.0" "@changesets/logger" "^0.0.5" - "@changesets/parse" "^0.3.9" - "@changesets/types" "^4.0.1" + "@changesets/parse" "^0.3.11" + "@changesets/types" "^4.0.2" chalk "^2.1.0" fs-extra "^7.0.1" p-filter "^2.1.0" -"@changesets/types@^4.0.1": - version "4.0.1" - resolved "https://registry.npmjs.org/@changesets/types/-/types-4.0.1.tgz#85cf3cc32baff0691112d9d15fc21fbe022c9f0a" - integrity sha512-zVfv752D8K2tjyFmxU/vnntQ+dPu+9NupOSguA/2Zuym4tVxRh0ylArgKZ1bOAi2eXfGlZMxJU/kj7uCSI15RQ== +"@changesets/types@^4.0.1", "@changesets/types@^4.0.2": + version "4.0.2" + resolved "https://registry.npmjs.org/@changesets/types/-/types-4.0.2.tgz#d20e1e45bdc96a97cc509c655e708b53a9292465" + integrity sha512-OeDaB7D+WVy/ErymPzFm58IeGvz4DOl+oedyZETfnkfMezF/Uhrm1Ub6MHrO5LcAaQTW+ptDmr0fmaVyoTxgHw== -"@changesets/write@^0.1.5": - version "0.1.5" - resolved "https://registry.npmjs.org/@changesets/write/-/write-0.1.5.tgz#97574d95c8e48c3bbb1173802672f9a64d1b7fef" - integrity sha512-AYVSCH7on/Cyzo/8lVfqlsXmyKl3JhbNu9yHApdLPhHAzv5wqoHiZlMDkmd+AA67SRqzK2lDs4BcIojK+uWeIA== +"@changesets/write@^0.1.6": + version "0.1.6" + resolved "https://registry.npmjs.org/@changesets/write/-/write-0.1.6.tgz#798d882bada93f391902a854a17965f3b80a5201" + integrity sha512-JWE2gJs9eHhorxqembkf43fllKlCz+sp1TJKSheaWfhWILMHPdfa/xQG4+sMZkISo1qZ+IlJyiBLha6iGGjXyA== dependencies: "@babel/runtime" "^7.10.4" - "@changesets/types" "^4.0.1" + "@changesets/types" "^4.0.2" fs-extra "^7.0.1" human-id "^1.0.2" prettier "^1.19.1" @@ -3583,17 +3583,6 @@ find-up "^4.1.0" fs-extra "^8.1.0" -"@manypkg/get-packages@^1.0.1": - version "1.1.1" - resolved "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.1.tgz#7c7e72d0061ab2e61d2ce4da58ce91290a60ac8d" - integrity sha512-J6VClfQSVgR6958eIDTGjfdCrELy1eT+SHeoSMomnvRQVktZMnEA5edIr5ovRFNw5y+Bk/jyoevPzGYod96mhw== - dependencies: - "@babel/runtime" "^7.5.5" - "@manypkg/find-root" "^1.1.0" - fs-extra "^8.1.0" - globby "^11.0.0" - read-yaml-file "^1.1.0" - "@manypkg/get-packages@^1.1.3": version "1.1.3" resolved "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz#e184db9bba792fa4693de4658cfb1463ac2c9c47" @@ -5631,6 +5620,13 @@ "@types/through" "*" rxjs "^7.2.0" +"@types/is-ci@^3.0.0": + version "3.0.0" + resolved "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz#7e8910af6857601315592436f030aaa3ed9783c3" + integrity sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ== + dependencies: + ci-info "^3.1.0" + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.1" resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -6928,13 +6924,6 @@ anafanafo@2.0.0: dependencies: char-width-table-consumer "^1.0.0" -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= - dependencies: - string-width "^2.0.0" - ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -7939,19 +7928,6 @@ bottleneck@^2.15.3: resolved "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91" integrity sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw== -boxen@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.0.0" - boxen@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" @@ -8344,11 +8320,6 @@ camelcase@^3.0.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= -camelcase@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -8421,7 +8392,7 @@ chainsaw@~0.1.0: dependencies: traverse ">=0.3.0 <0.4" -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -8593,10 +8564,10 @@ ci-info@^2.0.0: resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz#9a32fcefdf7bcdb6f0a7e1c0f8098ec57897b80a" - integrity sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ== +ci-info@^3.1.0, ci-info@^3.2.0: + version "3.3.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" + integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -8650,11 +8621,6 @@ clean-stack@^2.0.0: resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= - cli-boxes@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" @@ -9524,7 +9490,7 @@ cross-fetch@^3.0.4, cross-fetch@^3.0.6, cross-fetch@^3.1.3, cross-fetch@^3.1.4: dependencies: node-fetch "2.6.7" -cross-spawn@^5.0.1, cross-spawn@^5.1.0: +cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= @@ -11737,19 +11703,6 @@ execa@5.1.1, execa@^5.0.0, execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -12693,11 +12646,6 @@ get-stdin@^8.0.0: resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -14145,12 +14093,12 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-ci@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" - integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== +is-ci@^3.0.0, is-ci@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== dependencies: - ci-info "^3.1.1" + ci-info "^3.2.0" is-core-module@^2.1.0, is-core-module@^2.2.0: version "2.8.0" @@ -22627,7 +22575,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -23226,13 +23174,6 @@ temp@^0.8.4: dependencies: rimraf "~2.6.2" -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= - dependencies: - execa "^0.7.0" - term-size@^2.1.0: version "2.2.0" resolved "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" @@ -24836,13 +24777,6 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -widest-line@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" - integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== - dependencies: - string-width "^2.1.1" - widest-line@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" From f612ff7a817a0baa973341be291853e0bbfcc690 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 08:42:13 +0000 Subject: [PATCH 115/473] chore(deps): bump @roadiehq/backstage-plugin-travis-ci Bumps [@roadiehq/backstage-plugin-travis-ci](https://github.com/RoadieHQ/roadie-backstage-plugins/tree/HEAD/plugins/frontend/backstage-plugin-travis-ci) from 1.3.3 to 1.3.6. - [Release notes](https://github.com/RoadieHQ/roadie-backstage-plugins/releases) - [Changelog](https://github.com/RoadieHQ/roadie-backstage-plugins/blob/main/plugins/frontend/backstage-plugin-travis-ci/CHANGELOG.md) - [Commits](https://github.com/RoadieHQ/roadie-backstage-plugins/commits/HEAD/plugins/frontend/backstage-plugin-travis-ci) --- updated-dependencies: - dependency-name: "@roadiehq/backstage-plugin-travis-ci" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 612ea640cc..b35fb0b90c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4543,13 +4543,13 @@ react-use "^17.2.4" "@roadiehq/backstage-plugin-travis-ci@^1.3.2": - version "1.3.3" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-1.3.3.tgz#317c9280d8dd404794ad5aa057ce457bfd459706" - integrity sha512-f5RhuG681iwiRa9/WvwhV4pI0KHv6oAHlgOXG3/pbOcONN9w9RaQIITgTyc6hpm9MzAkFQWV8qc3yPFcojza+A== + version "1.3.6" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-1.3.6.tgz#6f45a42bdf39aa6baab56f0c4400990238df1625" + integrity sha512-th+2GaOjkPArDUbTBuhhCz/6WL4gcrVRVAsDHzuSrrJqNtsz6kXdBIHhR/58En16BZ2bnHhRzY87uiUDLjAntA== dependencies: "@backstage/catalog-model" "^0.9.7" "@backstage/core-components" "^0.8.0" - "@backstage/core-plugin-api" "^0.4.0" + "@backstage/core-plugin-api" "^0.6.0" "@backstage/plugin-catalog-react" "^0.6.5" "@backstage/theme" "^0.2.9" "@material-ui/core" "^4.11.3" From 9d75a939b63ad53f55677ea91be50b8d35530280 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 1 Feb 2022 18:40:51 +0100 Subject: [PATCH 116/473] auth-backend: fix OAuthAdapter scope store, only storing on success Signed-off-by: Patrik Oldsberg --- .changeset/chilled-papayas-wonder.md | 5 + plugins/auth-backend/api-report.md | 1 + .../src/lib/oauth/OAuthAdapter.test.ts | 98 ++++++++++++++++++- .../src/lib/oauth/OAuthAdapter.ts | 76 +++++++------- plugins/auth-backend/src/lib/oauth/types.ts | 1 + 5 files changed, 141 insertions(+), 40 deletions(-) create mode 100644 .changeset/chilled-papayas-wonder.md diff --git a/.changeset/chilled-papayas-wonder.md b/.changeset/chilled-papayas-wonder.md new file mode 100644 index 0000000000..4a3c2322e1 --- /dev/null +++ b/.changeset/chilled-papayas-wonder.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Fixed a bug where providers that tracked the granted scopes through a cookie would not take failed authentication attempts into account. diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 7cdc33f0e2..b6c484e066 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -592,6 +592,7 @@ export type OAuthState = { nonce: string; env: string; origin?: string; + scope?: string; }; // @public diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts index a85dd49fba..d1057b19a8 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts @@ -17,7 +17,7 @@ import express from 'express'; import { THOUSAND_DAYS_MS, TEN_MINUTES_MS, OAuthAdapter } from './OAuthAdapter'; import { encodeState } from './helpers'; -import { OAuthHandlers, OAuthResponse } from './types'; +import { OAuthHandlers, OAuthResponse, OAuthState } from './types'; const mockResponseData = { providerInfo: { @@ -148,6 +148,102 @@ describe('OAuthAdapter', () => { ); }); + it('persists scope through cookie if enabled', async () => { + const handlers = { + start: jest.fn(async (_req: { state: OAuthState }) => ({ + url: '/url', + status: 301, + })), + handler: jest.fn(async () => ({ response: mockResponseData })), + refresh: jest.fn(async () => ({ response: mockResponseData })), + }; + const oauthProvider = new OAuthAdapter(handlers, { + ...oAuthProviderOptions, + disableRefresh: false, + persistScopes: true, + }); + + // First we test the /start request, making sure state is set + const mockStartReq = { + query: { + scope: 'user', + env: 'development', + }, + } as unknown as express.Request; + const mockStartRes = { + cookie: jest.fn().mockReturnThis(), + end: jest.fn().mockReturnThis(), + setHeader: jest.fn().mockReturnThis(), + statusCode: jest.fn().mockReturnThis(), + } as unknown as express.Response; + + await oauthProvider.start(mockStartReq, mockStartRes); + + expect(handlers.start).toHaveBeenCalledTimes(1); + expect(handlers.start).toHaveBeenCalledWith({ + query: { + scope: 'user', + env: 'development', + }, + scope: 'user', + state: { + nonce: expect.any(String), + env: 'development', + origin: undefined, + scope: 'user', + }, + }); + + // Then test the /handler, making sure the granted scope cookie is set + const providedState = handlers.start.mock.calls[0][0].state; + const mockHandleReq = { + cookies: { + 'test-provider-nonce': providedState.nonce, + }, + query: { + state: encodeState(providedState), + }, + } as unknown as express.Request; + const mockHandleRes = { + cookie: jest.fn().mockReturnThis(), + setHeader: jest.fn().mockReturnThis(), + end: jest.fn().mockReturnThis(), + } as unknown as express.Response; + + await oauthProvider.frameHandler(mockHandleReq, mockHandleRes); + expect(mockHandleRes.cookie).toHaveBeenCalledTimes(1); + expect(mockHandleRes.cookie).toHaveBeenCalledWith( + 'test-provider-granted-scope', + 'user', + expect.objectContaining({ + path: '/auth/test-provider', + maxAge: THOUSAND_DAYS_MS, + }), + ); + + // Them make sure scopes are forwarded correctly during refresh + const mockRefreshReq = { + query: { scope: 'ignore-me' }, + cookies: { + 'test-provider-granted-scope': 'user', + 'test-provider-refresh-token': 'refresh-token', + }, + header: jest.fn().mockReturnValue('XMLHttpRequest'), + } as unknown as express.Request; + const mockRefreshRes = { + status: jest.fn().mockReturnThis(), + json: jest.fn().mockReturnThis(), + } as unknown as express.Response; + await oauthProvider.refresh(mockRefreshReq, mockRefreshRes); + expect(handlers.refresh).toHaveBeenCalledTimes(1); + expect(handlers.refresh).toHaveBeenCalledWith( + expect.objectContaining({ + scope: 'user', + refreshToken: 'refresh-token', + }), + ); + }); + it('does not set the refresh cookie if refresh is disabled', async () => { const oauthProvider = new OAuthAdapter(providerInstance, { ...oAuthProviderOptions, diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts index 564d5c20de..2e2d26db61 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import express from 'express'; +import express, { CookieOptions } from 'express'; import crypto from 'crypto'; import { URL } from 'url'; import { @@ -90,10 +90,20 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { }); } + private readonly baseCookieOptions: CookieOptions; + constructor( private readonly handlers: OAuthHandlers, private readonly options: Options, - ) {} + ) { + this.baseCookieOptions = { + httpOnly: true, + sameSite: 'lax', + secure: this.options.secure, + path: this.options.cookiePath, + domain: this.options.cookieDomain, + }; + } async start(req: express.Request, res: express.Response): Promise { // retrieve scopes from request @@ -105,15 +115,17 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { throw new InputError('No env provided in request query parameters'); } - if (this.options.persistScopes) { - this.setScopesCookie(res, scope); - } - const nonce = crypto.randomBytes(16).toString('base64'); // set a nonce cookie before redirecting to oauth provider this.setNonceCookie(res, nonce); - const state = { nonce, env, origin }; + const state: OAuthState = { nonce, env, origin }; + + // If scopes are persisted then we pass them through the state so that we + // can set the cookie on successful auth + if (this.options.persistScopes) { + state.scope = scope; + } const forwardReq = Object.assign(req, { scope, state }); const { url, status } = await this.handlers.start( @@ -151,12 +163,11 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { const { response, refreshToken } = await this.handlers.handler(req); - if (this.options.persistScopes) { - const grantedScopes = this.getScopesFromCookie( - req, - this.options.providerId, - ); - response.providerInfo.scope = grantedScopes; + // Store the scope that we have been granted for this session. This is useful if + // the provider does not return granted scopes on refresh or if they are normalized. + if (this.options.persistScopes && state.scope) { + this.setGrantedScopeCookie(res, state.scope); + response.providerInfo.scope = state.scope; } if (refreshToken && !this.options.disableRefresh) { @@ -214,8 +225,10 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { throw new InputError('Missing session cookie'); } - const scope = req.query.scope?.toString() ?? ''; - + let scope = req.query.scope?.toString() ?? ''; + if (this.options.persistScopes) { + scope = this.getGrantedScopeFromCookie(req); + } const forwardReq = Object.assign(req, { scope, refreshToken }); // get new access_token @@ -267,27 +280,20 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { private setNonceCookie = (res: express.Response, nonce: string) => { res.cookie(`${this.options.providerId}-nonce`, nonce, { maxAge: TEN_MINUTES_MS, - secure: this.options.secure, - sameSite: 'lax', - domain: this.options.cookieDomain, + ...this.baseCookieOptions, path: `${this.options.cookiePath}/handler`, - httpOnly: true, }); }; - private setScopesCookie = (res: express.Response, scope: string) => { - res.cookie(`${this.options.providerId}-scope`, scope, { - maxAge: TEN_MINUTES_MS, - secure: this.options.secure, - sameSite: 'lax', - domain: this.options.cookieDomain, - path: `${this.options.cookiePath}/handler`, - httpOnly: true, + private setGrantedScopeCookie = (res: express.Response, scope: string) => { + res.cookie(`${this.options.providerId}-granted-scope`, scope, { + maxAge: THOUSAND_DAYS_MS, + ...this.baseCookieOptions, }); }; - private getScopesFromCookie = (req: express.Request, providerId: string) => { - return req.cookies[`${providerId}-scope`]; + private getGrantedScopeFromCookie = (req: express.Request) => { + return req.cookies[`${this.options.providerId}-granted-scope`]; }; private setRefreshTokenCookie = ( @@ -296,22 +302,14 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { ) => { res.cookie(`${this.options.providerId}-refresh-token`, refreshToken, { maxAge: THOUSAND_DAYS_MS, - secure: this.options.secure, - sameSite: 'lax', - domain: this.options.cookieDomain, - path: this.options.cookiePath, - httpOnly: true, + ...this.baseCookieOptions, }); }; private removeRefreshTokenCookie = (res: express.Response) => { res.cookie(`${this.options.providerId}-refresh-token`, '', { maxAge: 0, - secure: this.options.secure, - sameSite: 'lax', - domain: this.options.cookieDomain, - path: this.options.cookiePath, - httpOnly: true, + ...this.baseCookieOptions, }); }; } diff --git a/plugins/auth-backend/src/lib/oauth/types.ts b/plugins/auth-backend/src/lib/oauth/types.ts index 9ddef007a7..6973e99569 100644 --- a/plugins/auth-backend/src/lib/oauth/types.ts +++ b/plugins/auth-backend/src/lib/oauth/types.ts @@ -87,6 +87,7 @@ export type OAuthState = { nonce: string; env: string; origin?: string; + scope?: string; }; export type OAuthStartRequest = express.Request<{}> & { From a15fc5a29834f98775d5735665446e84ab721312 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 09:24:00 +0000 Subject: [PATCH 117/473] chore(deps): bump ansi-regex from 5.0.1 to 6.0.1 Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.1 to 6.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.1...v6.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- packages/core-components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-components/package.json b/packages/core-components/package.json index ed4df67a89..b57bf53d83 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -39,7 +39,7 @@ "@material-ui/lab": "4.0.0-alpha.57", "@types/react-sparklines": "^1.7.0", "@types/react-text-truncate": "^0.14.0", - "ansi-regex": "^5.0.1", + "ansi-regex": "^6.0.1", "classnames": "^2.2.6", "d3-selection": "^3.0.0", "d3-shape": "^3.0.0", From 648606b3ac1c7172951a949e4b85894ef60353d1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 1 Feb 2022 22:09:37 +0100 Subject: [PATCH 118/473] auth-backend: store github oauth token in cookie and use for refresh Signed-off-by: Patrik Oldsberg --- .changeset/strong-taxis-refuse.md | 5 + plugins/auth-backend/api-report.md | 2 +- .../src/providers/github/provider.test.ts | 62 +++++++++- .../src/providers/github/provider.ts | 110 +++++++++++++----- 4 files changed, 149 insertions(+), 30 deletions(-) create mode 100644 .changeset/strong-taxis-refuse.md diff --git a/.changeset/strong-taxis-refuse.md b/.changeset/strong-taxis-refuse.md new file mode 100644 index 0000000000..f198dc4bab --- /dev/null +++ b/.changeset/strong-taxis-refuse.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Added support for storing static GitHub access tokens in cookies and using them to refresh the Backstage session. diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index b6c484e066..88b75d99b0 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -735,6 +735,6 @@ export type WebMessageResponse = // // src/identity/types.d.ts:31:9 - (ae-forgotten-export) The symbol "AnyJWK" needs to be exported by the entry point index.d.ts // src/providers/aws-alb/provider.d.ts:77:5 - (ae-forgotten-export) The symbol "AwsAlbResult" needs to be exported by the entry point index.d.ts -// src/providers/github/provider.d.ts:81:5 - (ae-forgotten-export) The symbol "StateEncoder" needs to be exported by the entry point index.d.ts +// src/providers/github/provider.d.ts:97:5 - (ae-forgotten-export) The symbol "StateEncoder" needs to be exported by the entry point index.d.ts // src/providers/types.d.ts:98:5 - (ae-forgotten-export) The symbol "AuthProviderConfig" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/auth-backend/src/providers/github/provider.test.ts b/plugins/auth-backend/src/providers/github/provider.test.ts index 15eeccc07c..206df52083 100644 --- a/plugins/auth-backend/src/providers/github/provider.test.ts +++ b/plugins/auth-backend/src/providers/github/provider.test.ts @@ -98,6 +98,7 @@ describe('GithubAuthProvider', () => { providerInfo: { accessToken: '19xasczxcm9n7gacn9jdgm19me', scope: 'read:scope', + expiresInSeconds: 3600, }, profile: { email: 'jimmymarkum@gmail.com', @@ -143,6 +144,7 @@ describe('GithubAuthProvider', () => { providerInfo: { accessToken: '19xasczxcm9n7gacn9jdgm19me', scope: 'read:scope', + expiresInSeconds: 3600, }, profile: { displayName: 'Jimmy Markum', @@ -186,6 +188,7 @@ describe('GithubAuthProvider', () => { providerInfo: { accessToken: '19xasczxcm9n7gacn9jdgm19me', scope: 'read:scope', + expiresInSeconds: 3600, }, profile: { displayName: 'jimmymarkum', @@ -230,6 +233,7 @@ describe('GithubAuthProvider', () => { accessToken: 'ajakljsdoiahoawxbrouawucmbawe.awkxjemaneasdxwe.sodijxqeqwexeqwxe', scope: 'read:user', + expiresInSeconds: 3600, }, profile: { displayName: 'Dave Boyle', @@ -316,7 +320,7 @@ describe('GithubAuthProvider', () => { ], }); - const result = await provider.refresh({} as any); + const result = await provider.refresh({ scope: 'actual-scope' } as any); expect(result).toEqual({ response: { @@ -332,11 +336,65 @@ describe('GithubAuthProvider', () => { providerInfo: { accessToken: 'a.b.c', expiresInSeconds: 123, - scope: 'read_user', + scope: 'actual-scope', }, }, refreshToken: 'dont-forget-to-send-refresh', }); + + mockRefreshToken.mockRestore(); + mockUserProfile.mockRestore(); + }); + + it('should use access token as refresh token', async () => { + const mockUserProfile = jest.spyOn( + helpers, + 'executeFetchUserProfileStrategy', + ) as unknown as jest.MockedFunction<() => Promise>; + + mockUserProfile.mockResolvedValueOnce({ + id: 'mockid', + username: 'mockuser', + provider: 'github', + displayName: 'Mocked User', + emails: [ + { + value: 'mockuser@gmail.com', + }, + ], + }); + + const result = await provider.refresh({ + refreshToken: 'access-token.le-token', + scope: 'the-scope', + } as any); + + expect(mockUserProfile).toHaveBeenCalledTimes(1); + expect(mockUserProfile).toHaveBeenCalledWith( + expect.anything(), + 'le-token', + ); + expect(result).toEqual({ + response: { + backstageIdentity: { + id: 'mockuser', + token: 'token-for-user:default/mockuser', + }, + profile: { + displayName: 'Mocked User', + email: 'mockuser@gmail.com', + picture: undefined, + }, + providerInfo: { + accessToken: 'le-token', + expiresInSeconds: 3600, + scope: 'the-scope', + }, + }, + refreshToken: 'access-token.le-token', + }); + + mockUserProfile.mockRestore(); }); }); }); diff --git a/plugins/auth-backend/src/providers/github/provider.ts b/plugins/auth-backend/src/providers/github/provider.ts index 9dc70cf60e..ec7f8cafa6 100644 --- a/plugins/auth-backend/src/providers/github/provider.ts +++ b/plugins/auth-backend/src/providers/github/provider.ts @@ -41,11 +41,15 @@ import { OAuthStartRequest, encodeState, OAuthRefreshRequest, - OAuthResponse, } from '../../lib/oauth'; import { CatalogIdentityClient } from '../../lib/catalog'; import { TokenIssuer } from '../../identity'; +const ACCESS_TOKEN_PREFIX = 'access-token.'; + +// TODO(Rugvip): Auth providers need a way to access this in a less hardcoded way +const BACKSTAGE_SESSION_EXPIRATION = 3600; + type PrivateInfo = { refreshToken?: string; }; @@ -123,31 +127,69 @@ export class GithubAuthProvider implements OAuthHandlers { PrivateInfo >(req, this._strategy); + let refreshToken = privateInfo.refreshToken; + + // If we do not have a real refresh token and we have a non-expiring + // access token, then we use that as our refresh token. + if (!refreshToken && !result.params.expires_in) { + refreshToken = ACCESS_TOKEN_PREFIX + result.accessToken; + } + return { response: await this.handleResult(result), - refreshToken: privateInfo.refreshToken, + refreshToken, }; } async refresh(req: OAuthRefreshRequest) { - const { accessToken, refreshToken, params } = - await executeRefreshTokenStrategy( - this._strategy, - req.refreshToken, - req.scope, - ); - const fullProfile = await executeFetchUserProfileStrategy( - this._strategy, - accessToken, - ); + // We've enable persisting scope in the OAuth provider, so scope here will + // be whatever was stored in the cookie + const { scope, refreshToken } = req; + // This is the OAuth App flow. A non-expiring access token is stored in the + // refresh token cookie. We use that token to fetch the user profile and + // refresh the Backstage session when needed. + if (refreshToken?.startsWith(ACCESS_TOKEN_PREFIX)) { + const accessToken = refreshToken.slice(ACCESS_TOKEN_PREFIX.length); + + const fullProfile = await executeFetchUserProfileStrategy( + this._strategy, + accessToken, + ).catch(error => { + if (error.oauthError?.statusCode === 401) { + throw new Error('Invalid access token'); + } + throw error; + }); + + return { + response: await this.handleResult({ + fullProfile, + params: { scope }, + accessToken, + }), + refreshToken, + }; + } + + // This is the App flow, which is close to a standard OAuth refresh flow. It has a + // pretty long session expiration, and it also ignores the requested scope, instead + // just allowing access to whatever is configured as part of the app installation. + const result = await executeRefreshTokenStrategy( + this._strategy, + refreshToken, + scope, + ); return { response: await this.handleResult({ - fullProfile, - params, - accessToken, + fullProfile: await executeFetchUserProfileStrategy( + this._strategy, + result.accessToken, + ), + params: { ...result.params, scope }, + accessToken: result.accessToken, }), - refreshToken, + refreshToken: result.refreshToken, }; } @@ -160,27 +202,41 @@ export class GithubAuthProvider implements OAuthHandlers { const { profile } = await this.authHandler(result, context); const expiresInStr = result.params.expires_in; - const response: OAuthResponse = { - providerInfo: { - accessToken: result.accessToken, - scope: result.params.scope, - expiresInSeconds: - expiresInStr === undefined ? undefined : Number(expiresInStr), - }, - profile, - }; + let expiresInSeconds = + expiresInStr === undefined ? undefined : Number(expiresInStr); + + let backstageIdentity = undefined; if (this.signInResolver) { - response.backstageIdentity = await this.signInResolver( + backstageIdentity = await this.signInResolver( { result, profile, }, context, ); + + // GitHub sessions last longer than Backstage sessions, so if we're using + // GitHub for sign-in, then we need to expire the sessions earlier + if (expiresInSeconds) { + expiresInSeconds = Math.min( + expiresInSeconds, + BACKSTAGE_SESSION_EXPIRATION, + ); + } else { + expiresInSeconds = BACKSTAGE_SESSION_EXPIRATION; + } } - return response; + return { + backstageIdentity, + providerInfo: { + accessToken: result.accessToken, + scope: result.params.scope, + expiresInSeconds, + }, + profile, + }; } } From 40775bd263ae55e69b2a9a9d2baa69d20d59b1df Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 1 Feb 2022 22:25:20 +0100 Subject: [PATCH 119/473] core-app-api: switch GithubAuth to use the common OAuth2 implementation Signed-off-by: Patrik Oldsberg --- .changeset/tasty-pandas-design.md | 7 + packages/core-app-api/api-report.md | 21 +-- .../auth/github/GithubAuth.test.ts | 33 +++-- .../implementations/auth/github/GithubAuth.ts | 126 ++---------------- 4 files changed, 47 insertions(+), 140 deletions(-) create mode 100644 .changeset/tasty-pandas-design.md diff --git a/.changeset/tasty-pandas-design.md b/.changeset/tasty-pandas-design.md new file mode 100644 index 0000000000..302631ee60 --- /dev/null +++ b/.changeset/tasty-pandas-design.md @@ -0,0 +1,7 @@ +--- +'@backstage/core-app-api': patch +--- + +Switched out the `GithubAuth` implementation to use the common `OAuth2` implementation. This relies on the simultaneous change in `@backstage/plugin-auth-backend` that enabled access token storage in cookies rather than the current solution that's based on `LocalStorage`. + +> **NOTE:** Make sure you upgrade the `auth-backend` deployment before or at the same time as you deploy this change. diff --git a/packages/core-app-api/api-report.md b/packages/core-app-api/api-report.md index ba2ed8cb62..3b53813615 100644 --- a/packages/core-app-api/api-report.md +++ b/packages/core-app-api/api-report.md @@ -35,6 +35,7 @@ import { FeatureFlag } from '@backstage/core-plugin-api'; import { FeatureFlagsApi } from '@backstage/core-plugin-api'; import { FeatureFlagsSaveOptions } from '@backstage/core-plugin-api'; import { FetchApi } from '@backstage/core-plugin-api'; +import { githubAuthApiRef } from '@backstage/core-plugin-api'; import { gitlabAuthApiRef } from '@backstage/core-plugin-api'; import { googleAuthApiRef } from '@backstage/core-plugin-api'; import { IconComponent } from '@backstage/core-plugin-api'; @@ -379,25 +380,11 @@ export type FlatRoutesProps = { }; // @public -export class GithubAuth implements OAuthApi, SessionApi { - // (undocumented) - static create(options: OAuthApiCreateOptions): GithubAuth; - // (undocumented) - getAccessToken(scope?: string, options?: AuthRequestOptions): Promise; - // (undocumented) - getBackstageIdentity( - options?: AuthRequestOptions, - ): Promise; - // (undocumented) - getProfile(options?: AuthRequestOptions): Promise; +export class GithubAuth { // (undocumented) + static create(options: OAuthApiCreateOptions): typeof githubAuthApiRef.T; + // @deprecated (undocumented) static normalizeScope(scope?: string): Set; - // (undocumented) - sessionState$(): Observable; - // (undocumented) - signIn(): Promise; - // (undocumented) - signOut(): Promise; } // @public @deprecated diff --git a/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.test.ts b/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.test.ts index 8bcd4cb7a5..ea7b4ac688 100644 --- a/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.test.ts +++ b/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.test.ts @@ -14,16 +14,33 @@ * limitations under the License. */ +import { UrlPatternDiscovery } from '../../DiscoveryApi'; +import MockOAuthApi from '../../OAuthRequestApi/MockOAuthApi'; import GithubAuth from './GithubAuth'; -describe('GithubAuth', () => { - it('should get access token', async () => { - const getSession = jest - .fn() - .mockResolvedValue({ providerInfo: { accessToken: 'access-token' } }); - const githubAuth = new (GithubAuth as any)({ getSession }) as GithubAuth; +const getSession = jest.fn(); - expect(await githubAuth.getAccessToken()).toBe('access-token'); - expect(getSession).toBeCalledTimes(1); +jest.mock('../../../../lib/AuthSessionManager', () => ({ + ...(jest.requireActual('../../../../lib/AuthSessionManager') as any), + RefreshingAuthSessionManager: class { + getSession = getSession; + }, +})); + +describe('GithubAuth', () => { + afterEach(() => { + jest.resetAllMocks(); + }); + + it('should forward access token request to session manager', async () => { + const githubAuth = GithubAuth.create({ + oauthRequestApi: new MockOAuthApi(), + discoveryApi: UrlPatternDiscovery.compile('http://example.com'), + }); + + githubAuth.getAccessToken('repo'); + expect(getSession).toHaveBeenCalledWith({ + scopes: new Set(['repo']), + }); }); }); diff --git a/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts b/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts index dc2c15bc16..b0af4c7ade 100644 --- a/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts +++ b/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts @@ -14,35 +14,9 @@ * limitations under the License. */ -import { - AuthRequestOptions, - BackstageIdentityResponse, - OAuthApi, - ProfileInfo, - SessionApi, - SessionState, -} from '@backstage/core-plugin-api'; -import { Observable } from '@backstage/types'; -import { DefaultAuthConnector } from '../../../../lib/AuthConnector'; -import { - AuthSessionStore, - RefreshingAuthSessionManager, - StaticAuthSessionManager, -} from '../../../../lib/AuthSessionManager'; -import { OptionalRefreshSessionManagerMux } from '../../../../lib/AuthSessionManager/OptionalRefreshSessionManagerMux'; -import { SessionManager } from '../../../../lib/AuthSessionManager/types'; +import { githubAuthApiRef } from '@backstage/core-plugin-api'; +import { OAuth2 } from '../oauth2'; import { OAuthApiCreateOptions } from '../types'; -import { GithubSession, githubSessionSchema } from './types'; - -export type GithubAuthResponse = { - providerInfo: { - accessToken: string; - scope: string; - expiresInSeconds?: number; - }; - profile: ProfileInfo; - backstageIdentity: BackstageIdentityResponse; -}; const DEFAULT_PROVIDER = { id: 'github', @@ -55,8 +29,8 @@ const DEFAULT_PROVIDER = { * * @public */ -export default class GithubAuth implements OAuthApi, SessionApi { - static create(options: OAuthApiCreateOptions) { +export default class GithubAuth { + static create(options: OAuthApiCreateOptions): typeof githubAuthApiRef.T { const { discoveryApi, environment = 'development', @@ -65,96 +39,18 @@ export default class GithubAuth implements OAuthApi, SessionApi { defaultScopes = ['read:user'], } = options; - const connector = new DefaultAuthConnector({ + return OAuth2.create({ discoveryApi, - environment, + oauthRequestApi, provider, - oauthRequestApi: oauthRequestApi, - sessionTransform(res: GithubAuthResponse): GithubSession { - return { - ...res, - providerInfo: { - accessToken: res.providerInfo.accessToken, - scopes: GithubAuth.normalizeScope(res.providerInfo.scope), - expiresAt: res.providerInfo.expiresInSeconds - ? new Date(Date.now() + res.providerInfo.expiresInSeconds * 1000) - : undefined, - }, - }; - }, + environment, + defaultScopes, }); - - const refreshingSessionManager = new RefreshingAuthSessionManager({ - connector, - defaultScopes: new Set(defaultScopes), - sessionScopes: (session: GithubSession) => session.providerInfo.scopes, - sessionShouldRefresh: (session: GithubSession) => { - const { expiresAt } = session.providerInfo; - if (!expiresAt) { - return false; - } - const expiresInSec = (expiresAt.getTime() - Date.now()) / 1000; - return expiresInSec < 60 * 5; - }, - }); - - const staticSessionManager = new AuthSessionStore({ - manager: new StaticAuthSessionManager({ - connector, - defaultScopes: new Set(defaultScopes), - sessionScopes: (session: GithubSession) => session.providerInfo.scopes, - }), - storageKey: `${provider.id}Session`, - schema: githubSessionSchema, - sessionScopes: (session: GithubSession) => session.providerInfo.scopes, - }); - - const sessionManagerMux = new OptionalRefreshSessionManagerMux({ - refreshingSessionManager, - staticSessionManager, - sessionCanRefresh: session => - session.providerInfo.expiresAt !== undefined, - }); - - return new GithubAuth(sessionManagerMux); - } - - private constructor( - private readonly sessionManager: SessionManager, - ) {} - - async signIn() { - await this.getAccessToken(); - } - - async signOut() { - await this.sessionManager.removeSession(); - } - - sessionState$(): Observable { - return this.sessionManager.sessionState$(); - } - - async getAccessToken(scope?: string, options?: AuthRequestOptions) { - const session = await this.sessionManager.getSession({ - ...options, - scopes: GithubAuth.normalizeScope(scope), - }); - return session?.providerInfo.accessToken ?? ''; - } - - async getBackstageIdentity( - options: AuthRequestOptions = {}, - ): Promise { - const session = await this.sessionManager.getSession(options); - return session?.backstageIdentity; - } - - async getProfile(options: AuthRequestOptions = {}) { - const session = await this.sessionManager.getSession(options); - return session?.profile; } + /** + * @deprecated This method is deprecated and will be removed in a future release. + */ static normalizeScope(scope?: string): Set { if (!scope) { return new Set(); From 6acc8f7db72b5cb760c3b6e4ef4834c71311c346 Mon Sep 17 00:00:00 2001 From: Joon Park Date: Wed, 2 Feb 2022 04:49:04 -0600 Subject: [PATCH 120/473] Add caching to the useEntityPermission hook (#9064) * Add caching to the useEntityPermission hook Signed-off-by: Joon Park * Remove useRef Signed-off-by: Joon Park * Use useSWR hook Signed-off-by: Joon Park --- .changeset/weak-oranges-drive.md | 7 +++ plugins/permission-react/package.json | 3 +- .../src/hooks/usePermission.test.tsx | 62 +++++++++---------- .../src/hooks/usePermission.ts | 34 +++++----- yarn.lock | 5 ++ 5 files changed, 62 insertions(+), 49 deletions(-) create mode 100644 .changeset/weak-oranges-drive.md diff --git a/.changeset/weak-oranges-drive.md b/.changeset/weak-oranges-drive.md new file mode 100644 index 0000000000..7d6828ef47 --- /dev/null +++ b/.changeset/weak-oranges-drive.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Add caching to the useEntityPermission hook + +The hook now caches the authorization decision based on the permission + the entity, and returns the cache match value as the default `allowed` value while loading. This helps avoid flicker in UI elements that would be conditionally rendered based on the `allowed` result of this hook. diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index e4ae819247..08de9d0b4e 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -32,7 +32,8 @@ "@backstage/plugin-permission-common": "^0.4.0", "cross-fetch": "^3.0.6", "react-router": "6.0.0-beta.0", - "react-use": "^17.2.4" + "react-use": "^17.2.4", + "swr": "^1.1.2" }, "peerDependencies": { "@types/react": "^16.13.1 || ^17.0.0", diff --git a/plugins/permission-react/src/hooks/usePermission.test.tsx b/plugins/permission-react/src/hooks/usePermission.test.tsx index 4cf0bc6530..d6c5b2ed33 100644 --- a/plugins/permission-react/src/hooks/usePermission.test.tsx +++ b/plugins/permission-react/src/hooks/usePermission.test.tsx @@ -19,9 +19,8 @@ import { render } from '@testing-library/react'; import { usePermission } from './usePermission'; import { AuthorizeResult } from '@backstage/plugin-permission-common'; import { TestApiProvider } from '@backstage/test-utils'; -import { permissionApiRef } from '../apis'; - -const mockAuthorize = jest.fn(); +import { PermissionApi, permissionApiRef } from '../apis'; +import { SWRConfig } from 'swr'; const permission = { name: 'access.something', @@ -39,49 +38,48 @@ const TestComponent: FC = () => { ); }; -describe('usePermission', () => { - it('Returns loading when permissionApi has not yet responded.', () => { - mockAuthorize.mockReturnValueOnce(new Promise(() => {})); - - const { getByText } = render( - +function renderComponent(mockApi: PermissionApi) { + return render( + new Map() }}> + - , - ); + + , + , + ); +} - expect(mockAuthorize).toHaveBeenCalledWith({ permission }); +describe('usePermission', () => { + const mockPermissionApi = { authorize: jest.fn() }; + + it('Returns loading when permissionApi has not yet responded.', () => { + mockPermissionApi.authorize.mockReturnValueOnce(new Promise(() => {})); + + const { getByText } = renderComponent(mockPermissionApi); + + expect(mockPermissionApi.authorize).toHaveBeenCalledWith({ permission }); expect(getByText('loading')).toBeTruthy(); }); it('Returns allowed when permissionApi allows authorization.', async () => { - mockAuthorize.mockResolvedValueOnce({ result: AuthorizeResult.ALLOW }); + mockPermissionApi.authorize.mockResolvedValueOnce({ + result: AuthorizeResult.ALLOW, + }); - const { findByText } = render( - - - , - ); + const { findByText } = renderComponent(mockPermissionApi); - expect(mockAuthorize).toHaveBeenCalledWith({ permission }); + expect(mockPermissionApi.authorize).toHaveBeenCalledWith({ permission }); expect(await findByText('content')).toBeTruthy(); }); it('Returns not allowed when permissionApi denies authorization.', async () => { - mockAuthorize.mockResolvedValueOnce({ result: AuthorizeResult.DENY }); + mockPermissionApi.authorize.mockResolvedValueOnce({ + result: AuthorizeResult.DENY, + }); - const { findByText } = render( - - - , - ); + const { findByText } = renderComponent(mockPermissionApi); - expect(mockAuthorize).toHaveBeenCalledWith({ permission }); + expect(mockPermissionApi.authorize).toHaveBeenCalledWith({ permission }); await expect(findByText('content')).rejects.toThrowError(); }); }); diff --git a/plugins/permission-react/src/hooks/usePermission.ts b/plugins/permission-react/src/hooks/usePermission.ts index 45136d6697..cc27f82c59 100644 --- a/plugins/permission-react/src/hooks/usePermission.ts +++ b/plugins/permission-react/src/hooks/usePermission.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { permissionApiRef } from '../apis'; import { AuthorizeResult, Permission, } from '@backstage/plugin-permission-common'; +import useSWR from 'swr'; /** @public */ export type AsyncPermissionResult = { @@ -30,9 +30,16 @@ export type AsyncPermissionResult = { }; /** - * React hook utlity for authorization. Given a {@link @backstage/plugin-permission-common#Permission} and an optional - * resourceRef, it will return whether or not access is allowed (for the given resource, if resourceRef is provided). See - * {@link @backstage/plugin-permission-common/PermissionClient#authorize} for more details. + * React hook utility for authorization. Given a + * {@link @backstage/plugin-permission-common#Permission} and an optional + * resourceRef, it will return whether or not access is allowed (for the given + * resource, if resourceRef is provided). See + * {@link @backstage/plugin-permission-common/PermissionClient#authorize} for + * more details. + * + * Note: This hook uses stale-while-revalidate to help avoid flicker in UI + * elements that would be conditionally rendered based on the `allowed` result + * of this hook. * @public */ export const usePermission = ( @@ -40,21 +47,16 @@ export const usePermission = ( resourceRef?: string, ): AsyncPermissionResult => { const permissionApi = useApi(permissionApiRef); - - const { loading, error, value } = useAsync(async () => { - const { result } = await permissionApi.authorize({ - permission, - resourceRef, - }); - + const { data, error } = useSWR({ permission, resourceRef }, async args => { + const { result } = await permissionApi.authorize(args); return result; - }, [permissionApi, permission, resourceRef]); + }); - if (loading) { - return { loading: true, allowed: false }; - } if (error) { return { error, loading: false, allowed: false }; } - return { loading: false, allowed: value === AuthorizeResult.ALLOW }; + if (data === undefined) { + return { loading: true, allowed: false }; + } + return { loading: false, allowed: data === AuthorizeResult.ALLOW }; }; diff --git a/yarn.lock b/yarn.lock index 65307c3d71..780c3539d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23027,6 +23027,11 @@ swap-case@^2.0.2: dependencies: tslib "^2.0.3" +swr@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/swr/-/swr-1.1.2.tgz#9f3de2541931fccf03c48f322f1fc935a7551612" + integrity sha512-UsM0eo5T+kRPyWFZtWRx2XR5qzohs/LS4lDC0GCyLpCYFmsfTk28UCVDbOE9+KtoXY4FnwHYiF+ZYEU3hnJ1lQ== + symbol-observable@1.2.0, symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" From ea30d0fd756c8ad8cf97785088f7a1ec7c6d58a9 Mon Sep 17 00:00:00 2001 From: Marcus Eide Date: Wed, 2 Feb 2022 13:32:57 +0100 Subject: [PATCH 121/473] Add support for custom callbackUrls to providers Signed-off-by: Marcus Eide --- plugins/auth-backend/src/providers/atlassian/provider.ts | 6 +++++- plugins/auth-backend/src/providers/auth0/provider.ts | 6 +++++- plugins/auth-backend/src/providers/bitbucket/provider.ts | 6 +++++- plugins/auth-backend/src/providers/gitlab/provider.ts | 6 +++++- plugins/auth-backend/src/providers/google/provider.ts | 6 +++++- plugins/auth-backend/src/providers/microsoft/provider.ts | 6 +++++- plugins/auth-backend/src/providers/oauth2/provider.ts | 6 +++++- plugins/auth-backend/src/providers/oidc/provider.ts | 6 +++++- plugins/auth-backend/src/providers/okta/provider.ts | 6 +++++- plugins/auth-backend/src/providers/onelogin/provider.ts | 6 +++++- 10 files changed, 50 insertions(+), 10 deletions(-) diff --git a/plugins/auth-backend/src/providers/atlassian/provider.ts b/plugins/auth-backend/src/providers/atlassian/provider.ts index 2696fd233f..79bcb5c909 100644 --- a/plugins/auth-backend/src/providers/atlassian/provider.ts +++ b/plugins/auth-backend/src/providers/atlassian/provider.ts @@ -205,7 +205,10 @@ export const createAtlassianProvider = ( const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); const scopes = envConfig.getString('scopes'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, @@ -231,6 +234,7 @@ export const createAtlassianProvider = ( disableRefresh: true, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/auth0/provider.ts b/plugins/auth-backend/src/providers/auth0/provider.ts index 15578117ea..fbd57c0b76 100644 --- a/plugins/auth-backend/src/providers/auth0/provider.ts +++ b/plugins/auth-backend/src/providers/auth0/provider.ts @@ -228,7 +228,10 @@ export const createAuth0Provider = ( const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); const domain = envConfig.getString('domain'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, @@ -259,6 +262,7 @@ export const createAuth0Provider = ( disableRefresh: true, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/bitbucket/provider.ts b/plugins/auth-backend/src/providers/bitbucket/provider.ts index 4d5bdcf6f6..1cc0e60bd8 100644 --- a/plugins/auth-backend/src/providers/bitbucket/provider.ts +++ b/plugins/auth-backend/src/providers/bitbucket/provider.ts @@ -280,7 +280,10 @@ export const createBitbucketProvider = ( OAuthEnvironmentHandler.mapConfig(config, envConfig => { const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, @@ -309,6 +312,7 @@ export const createBitbucketProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/gitlab/provider.ts b/plugins/auth-backend/src/providers/gitlab/provider.ts index da816f2fd2..6689aba884 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.ts @@ -236,7 +236,10 @@ export const createGitlabProvider = ( const clientSecret = envConfig.getString('clientSecret'); const audience = envConfig.getOptionalString('audience'); const baseUrl = audience || 'https://gitlab.com'; - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, @@ -272,6 +275,7 @@ export const createGitlabProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/google/provider.ts b/plugins/auth-backend/src/providers/google/provider.ts index 13c5093aa5..fbaf8c7462 100644 --- a/plugins/auth-backend/src/providers/google/provider.ts +++ b/plugins/auth-backend/src/providers/google/provider.ts @@ -266,7 +266,10 @@ export const createGoogleProvider = ( OAuthEnvironmentHandler.mapConfig(config, envConfig => { const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, @@ -304,6 +307,7 @@ export const createGoogleProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/microsoft/provider.ts b/plugins/auth-backend/src/providers/microsoft/provider.ts index 9249f643dc..25c940547b 100644 --- a/plugins/auth-backend/src/providers/microsoft/provider.ts +++ b/plugins/auth-backend/src/providers/microsoft/provider.ts @@ -276,7 +276,10 @@ export const createMicrosoftProvider = ( const clientSecret = envConfig.getString('clientSecret'); const tenantId = envConfig.getString('tenantId'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const authorizationUrl = `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/authorize`; const tokenUrl = `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token`; @@ -318,6 +321,7 @@ export const createMicrosoftProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/oauth2/provider.ts b/plugins/auth-backend/src/providers/oauth2/provider.ts index 8e69a3ee1d..0906005791 100644 --- a/plugins/auth-backend/src/providers/oauth2/provider.ts +++ b/plugins/auth-backend/src/providers/oauth2/provider.ts @@ -240,7 +240,10 @@ export const createOAuth2Provider = ( OAuthEnvironmentHandler.mapConfig(config, envConfig => { const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const authorizationUrl = envConfig.getString('authorizationUrl'); const tokenUrl = envConfig.getString('tokenUrl'); const scope = envConfig.getOptionalString('scope'); @@ -288,6 +291,7 @@ export const createOAuth2Provider = ( disableRefresh, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/oidc/provider.ts b/plugins/auth-backend/src/providers/oidc/provider.ts index fa46294784..e77812e750 100644 --- a/plugins/auth-backend/src/providers/oidc/provider.ts +++ b/plugins/auth-backend/src/providers/oidc/provider.ts @@ -264,7 +264,10 @@ export const createOidcProvider = ( OAuthEnvironmentHandler.mapConfig(config, envConfig => { const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const metadataUrl = envConfig.getString('metadataUrl'); const tokenSignedResponseAlg = envConfig.getOptionalString( 'tokenSignedResponseAlg', @@ -313,6 +316,7 @@ export const createOidcProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/okta/provider.ts b/plugins/auth-backend/src/providers/okta/provider.ts index def0da694e..0ba7d241d3 100644 --- a/plugins/auth-backend/src/providers/okta/provider.ts +++ b/plugins/auth-backend/src/providers/okta/provider.ts @@ -276,7 +276,10 @@ export const createOktaProvider = ( const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); const audience = envConfig.getString('audience'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; // This is a safe assumption as `passport-okta-oauth` uses the audience // as the base for building the authorization, token, and user info URLs. @@ -322,6 +325,7 @@ export const createOktaProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index a5ab4f658b..e14e8548a0 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -227,7 +227,10 @@ export const createOneLoginProvider = ( const clientId = envConfig.getString('clientId'); const clientSecret = envConfig.getString('clientSecret'); const issuer = envConfig.getString('issuer'); - const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const customCallbackUrl = envConfig.getOptionalString('callbackUrl'); + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, @@ -258,6 +261,7 @@ export const createOneLoginProvider = ( disableRefresh: false, providerId, tokenIssuer, + callbackUrl, }); }); }; From 5d09bdd1de8d3bd4d9c88af71ce0ef6a5275f896 Mon Sep 17 00:00:00 2001 From: Marcus Eide Date: Wed, 2 Feb 2022 13:48:04 +0100 Subject: [PATCH 122/473] Add changeset Signed-off-by: Marcus Eide --- .changeset/silver-waves-reflect.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/silver-waves-reflect.md diff --git a/.changeset/silver-waves-reflect.md b/.changeset/silver-waves-reflect.md new file mode 100644 index 0000000000..9d7322764b --- /dev/null +++ b/.changeset/silver-waves-reflect.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Added custom `callbackUrl` support for multiple providers. `v0.8.0` introduced this change for `github`, and now we're adding the same capability to the following providers: `atlassian, auth0, bitbucket, gitlab, google, microsoft, oauth2, oidc, okta, onelogin`. From c65f5b76d0cfbc77e0910e8d0d6a7175a8d2948b Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Wed, 2 Feb 2022 14:02:25 +0100 Subject: [PATCH 123/473] Updating GOVERNANCE.md with description of End User Sponsors and the path to become one. Signed-off-by: Lee Mills --- GOVERNANCE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 936c27c7cf..3bcef61021 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -36,6 +36,25 @@ To become a maintainer you need to demonstrate the following: If a maintainer is no longer interested or cannot perform the maintainer duties listed above, they should volunteer to be moved to emeritus status. In extreme cases this can also occur by a vote of the sponsors and maintainers per the voting process below. +# End User Sponsors + +## Role of a Backstage End User Sponsor + +- Provide support for Backstage by removing blockers, securing funding, providing advocacy, feedback, and ensuring project continuity and long term success. +- Assist Backstage maintainers in prioritizing upcoming roadmap items and planned work. +- Provide neutral mediation for any disputes that arise as part of the project. + +## Backstage End User Sponsor Membership + +The End User Sponsors group comprises at most 5 people. To be eligible for membership in the group, you or the company where you work you must: + +- Be responsible for and end user of a production Backstage deployment of non-trivial size +- Be active contributors to the open source project +- Be willing and able to attend regularly-scheduled End User Sponsor meetings +- Abide by [Backstage’s Code of Conduct](./CODE_OF_CONDUCT.md). + +Candidates for membership will be nominated by current Sponsor members or by Backstage maintainers. If there are more nominations than Sponsor seats remaining, existing sponsors shall vote on the candidates, and the candidates with the most votes will become Sponsors. Any ties will be broken by current Backstage sponsors. + # Reviewers The project also contains a team called [@backstage/reviewers](https://github.com/orgs/backstage/teams/reviewers). This is the team of people who are the fallback in [`CODEOWNERS`](./.github/CODEOWNERS). This team will typically contain the maintainers, and a small number of additional people who are permitted to approve and merge pull requests. The purpose of this group is to offload some of the review work from the maintainers, simplifying and speeding up the review process for contributors. From 64cbca78393b7cd5cda37c8cb8dd18f41f8cd56d Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Wed, 2 Feb 2022 07:07:44 -0600 Subject: [PATCH 124/473] Added description to UserProfileCard Signed-off-by: Andre Wanlin --- .changeset/ninety-brooms-lay.md | 5 +++++ .../User/UserProfileCard/UserProfileCard.stories.tsx | 2 ++ .../Cards/User/UserProfileCard/UserProfileCard.test.tsx | 2 ++ .../Cards/User/UserProfileCard/UserProfileCard.tsx | 8 ++++++-- 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/ninety-brooms-lay.md diff --git a/.changeset/ninety-brooms-lay.md b/.changeset/ninety-brooms-lay.md new file mode 100644 index 0000000000..4db03bcabc --- /dev/null +++ b/.changeset/ninety-brooms-lay.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-org': patch +--- + +The description from `metadata.description` will now show as the subheader on the UserProfileCard in the same way as the GroupProfileCard diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx index aecc401f52..0cb3987c77 100644 --- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx +++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx @@ -40,6 +40,7 @@ const defaultEntity: UserEntity = { kind: 'User', metadata: { name: 'guest', + description: 'Description for guest', }, spec: { profile: { @@ -70,6 +71,7 @@ const noImageEntity: UserEntity = { kind: 'User', metadata: { name: 'guest', + description: 'Description for guest', }, spec: { profile: { diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx index 743ed987fa..7b9904954f 100644 --- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx +++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx @@ -29,6 +29,7 @@ describe('UserSummary Test', () => { kind: 'User', metadata: { name: 'calum.leavy', + description: 'Super awesome human', }, spec: { profile: { @@ -73,5 +74,6 @@ describe('UserSummary Test', () => { 'href', '/catalog/default/group/ExampleGroup', ); + expect(rendered.getByText('Super awesome human')).toBeInTheDocument(); }); }); diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx index 298819ed09..0997e0a4d8 100644 --- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx +++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx @@ -61,7 +61,7 @@ export const UserProfileCard = ({ } const { - metadata: { name: metaName }, + metadata: { name: metaName, description }, spec: { profile }, } = user; const displayName = profile?.displayName ?? metaName; @@ -71,7 +71,11 @@ export const UserProfileCard = ({ }); return ( - } variant={variant}> + } + subheader={description} + variant={variant} + > From 8d785a0b1b2330e0b557c38d9d6ba5c873d98f77 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Wed, 2 Feb 2022 15:23:58 +0100 Subject: [PATCH 125/473] add changeset Signed-off-by: Johan Haals --- .changeset/curly-fireants-crash.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/curly-fireants-crash.md diff --git a/.changeset/curly-fireants-crash.md b/.changeset/curly-fireants-crash.md new file mode 100644 index 0000000000..db426a0fde --- /dev/null +++ b/.changeset/curly-fireants-crash.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +chore: bump `ansi-regex` from `5.0.1` to `6.0.1` From 51eecb3f0386df553b3cdd678616ca21edc71fa2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 2 Feb 2022 14:28:47 +0000 Subject: [PATCH 126/473] Version Packages (next) --- .changeset/pre.json | 13 ++++ package.json | 2 +- packages/app-defaults/CHANGELOG.md | 8 +++ packages/app-defaults/package.json | 10 +-- packages/app/CHANGELOG.md | 16 +++++ packages/app/package.json | 24 ++++---- packages/backend-common/CHANGELOG.md | 12 ++++ packages/backend-common/package.json | 6 +- packages/backend-tasks/CHANGELOG.md | 7 +++ packages/backend-tasks/package.json | 8 +-- packages/backend-test-utils/CHANGELOG.md | 8 +++ packages/backend-test-utils/package.json | 8 +-- packages/backend/CHANGELOG.md | 32 ++++++++++ packages/backend/package.json | 54 ++++++++-------- packages/cli/CHANGELOG.md | 6 ++ packages/cli/package.json | 12 ++-- packages/codemods/CHANGELOG.md | 8 +++ packages/codemods/package.json | 2 +- packages/config/package.json | 2 +- packages/core-app-api/CHANGELOG.md | 8 +++ packages/core-app-api/package.json | 6 +- packages/core-components/CHANGELOG.md | 6 ++ packages/core-components/package.json | 8 +-- packages/core-plugin-api/package.json | 6 +- packages/create-app/CHANGELOG.md | 27 ++++++++ packages/create-app/package.json | 2 +- packages/dev-utils/CHANGELOG.md | 11 ++++ packages/dev-utils/package.json | 14 ++--- packages/embedded-techdocs-app/CHANGELOG.md | 13 ++++ packages/embedded-techdocs-app/package.json | 18 +++--- packages/integration-react/package.json | 8 +-- packages/integration/package.json | 4 +- packages/techdocs-cli/CHANGELOG.md | 8 +++ packages/techdocs-cli/package.json | 8 +-- packages/techdocs-common/CHANGELOG.md | 7 +++ packages/techdocs-common/package.json | 6 +- packages/test-utils/CHANGELOG.md | 7 +++ packages/test-utils/package.json | 6 +- plugins/airbrake/package.json | 12 ++-- plugins/allure/package.json | 12 ++-- plugins/analytics-module-ga/package.json | 10 +-- plugins/apache-airflow/package.json | 10 +-- plugins/api-docs/package.json | 14 ++--- plugins/app-backend/CHANGELOG.md | 7 +++ plugins/app-backend/package.json | 8 +-- plugins/auth-backend/CHANGELOG.md | 9 +++ plugins/auth-backend/package.json | 8 +-- plugins/azure-devops-backend/CHANGELOG.md | 7 +++ plugins/azure-devops-backend/package.json | 6 +- plugins/azure-devops/package.json | 12 ++-- plugins/badges-backend/CHANGELOG.md | 7 +++ plugins/badges-backend/package.json | 6 +- plugins/badges/package.json | 12 ++-- plugins/bazaar-backend/CHANGELOG.md | 8 +++ plugins/bazaar-backend/package.json | 8 +-- plugins/bazaar/package.json | 6 +- plugins/bitrise/package.json | 12 ++-- .../package.json | 8 +-- plugins/catalog-backend/CHANGELOG.md | 9 +++ plugins/catalog-backend/package.json | 14 ++--- plugins/catalog-common/CHANGELOG.md | 6 ++ plugins/catalog-common/package.json | 4 +- plugins/catalog-graph/package.json | 12 ++-- plugins/catalog-graphql/package.json | 4 +- plugins/catalog-import/package.json | 12 ++-- plugins/catalog-react/CHANGELOG.md | 18 ++++++ plugins/catalog-react/package.json | 12 ++-- plugins/catalog/CHANGELOG.md | 9 +++ plugins/catalog/package.json | 16 ++--- plugins/circleci/package.json | 12 ++-- plugins/cloudbuild/package.json | 12 ++-- plugins/code-coverage-backend/CHANGELOG.md | 7 +++ plugins/code-coverage-backend/package.json | 6 +- plugins/code-coverage/CHANGELOG.md | 9 +++ plugins/code-coverage/package.json | 14 ++--- plugins/config-schema/package.json | 10 +-- plugins/cost-insights/package.json | 10 +-- plugins/explore-react/package.json | 6 +- plugins/explore/package.json | 12 ++-- plugins/firehydrant/package.json | 12 ++-- plugins/fossa/package.json | 12 ++-- plugins/gcp-projects/package.json | 10 +-- plugins/git-release-manager/package.json | 10 +-- plugins/github-actions/package.json | 12 ++-- plugins/github-deployments/package.json | 12 ++-- plugins/gitops-profiles/package.json | 10 +-- plugins/gocd/package.json | 12 ++-- plugins/graphiql/package.json | 10 +-- plugins/graphql-backend/CHANGELOG.md | 7 +++ plugins/graphql-backend/package.json | 6 +- plugins/home/package.json | 10 +-- plugins/ilert/package.json | 12 ++-- plugins/jenkins-backend/CHANGELOG.md | 7 +++ plugins/jenkins-backend/package.json | 6 +- plugins/jenkins/package.json | 12 ++-- plugins/kafka-backend/CHANGELOG.md | 7 +++ plugins/kafka-backend/package.json | 6 +- plugins/kafka/package.json | 12 ++-- plugins/kubernetes-backend/CHANGELOG.md | 7 +++ plugins/kubernetes-backend/package.json | 6 +- plugins/kubernetes/package.json | 12 ++-- plugins/lighthouse/package.json | 12 ++-- plugins/newrelic-dashboard/package.json | 6 +- plugins/newrelic/package.json | 10 +-- plugins/org/package.json | 12 ++-- plugins/pagerduty/package.json | 12 ++-- plugins/permission-backend/CHANGELOG.md | 9 +++ plugins/permission-backend/package.json | 10 +-- plugins/permission-node/CHANGELOG.md | 8 +++ plugins/permission-node/package.json | 8 +-- plugins/permission-react/package.json | 4 +- plugins/proxy-backend/CHANGELOG.md | 7 +++ plugins/proxy-backend/package.json | 6 +- plugins/rollbar-backend/CHANGELOG.md | 7 +++ plugins/rollbar-backend/package.json | 8 +-- plugins/rollbar/package.json | 12 ++-- .../CHANGELOG.md | 8 +++ .../package.json | 8 +-- .../CHANGELOG.md | 8 +++ .../package.json | 8 +-- .../package.json | 4 +- plugins/scaffolder-backend/CHANGELOG.md | 9 +++ plugins/scaffolder-backend/package.json | 12 ++-- plugins/scaffolder/CHANGELOG.md | 10 +++ plugins/scaffolder/package.json | 18 +++--- .../package.json | 4 +- plugins/search-backend-module-pg/CHANGELOG.md | 7 +++ plugins/search-backend-module-pg/package.json | 8 +-- plugins/search-backend-node/package.json | 4 +- plugins/search-backend/CHANGELOG.md | 9 +++ plugins/search-backend/package.json | 10 +-- plugins/search/package.json | 12 ++-- plugins/sentry/package.json | 12 ++-- plugins/shortcuts/package.json | 10 +-- plugins/sonarqube/package.json | 12 ++-- plugins/splunk-on-call/package.json | 12 ++-- .../CHANGELOG.md | 8 +++ .../package.json | 8 +-- plugins/tech-insights-backend/CHANGELOG.md | 8 +++ plugins/tech-insights-backend/package.json | 10 +-- plugins/tech-insights-node/CHANGELOG.md | 7 +++ plugins/tech-insights-node/package.json | 6 +- plugins/tech-insights/package.json | 12 ++-- plugins/tech-radar/package.json | 10 +-- plugins/techdocs-backend/CHANGELOG.md | 9 +++ plugins/techdocs-backend/package.json | 12 ++-- plugins/techdocs/CHANGELOG.md | 10 +++ plugins/techdocs/package.json | 16 ++--- plugins/todo-backend/CHANGELOG.md | 7 +++ plugins/todo-backend/package.json | 6 +- plugins/todo/package.json | 12 ++-- plugins/user-settings/package.json | 10 +-- plugins/xcmetrics/package.json | 10 +-- yarn.lock | 61 +++++++++++++------ 154 files changed, 1015 insertions(+), 540 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index f1f3832fce..ab07e0ac65 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -124,26 +124,39 @@ "@backstage/plugin-xcmetrics": "0.2.16" }, "changesets": [ + "analytics-det-tyckte-inte-jag", "analytics-station-eleven", + "blue-ligers-allow", "bright-buttons-rescue", + "chilled-papayas-wonder", + "cyan-turtles-relax", "dependabot-2f11dff", + "dependabot-4ce572f", "dependabot-9ec400d", "dependabot-f969614", "early-cooks-brake", "flat-cars-begin", + "fresh-insects-attack", "gold-queens-clap", "grumpy-teachers-remain", + "itchy-bulldogs-dance", "nasty-pets-glow", "neat-mangos-study", "purple-steaks-design", "quick-jars-wait", + "rare-comics-tan", "sharp-dragons-divide", + "silver-eagles-reply", "sour-chairs-double", + "strong-taxis-refuse", "tall-rats-lie", "tame-ads-exercise", + "tasty-pandas-design", + "techdocs-funkar-varje-gang", "techdocs-lets-call-the-whole-thing-off", "thirty-houses-juggle", "tiny-buses-compete", + "weak-oranges-drive", "witty-lamps-laugh", "witty-lizards-nail" ] diff --git a/package.json b/package.json index 997e87035b..8f04624b3f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "**/@roadiehq/**/@backstage/plugin-catalog": "*", "**/@roadiehq/**/@backstage/catalog-model": "*" }, - "version": "0.66.0-next.0", + "version": "0.66.0-next.1", "dependencies": { "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.15.0", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 588b674cfc..831a427ba7 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/app-defaults +## 0.1.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/core-app-api@0.5.2-next.0 + ## 0.1.6-next.0 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 37f6061fd5..3116b76956 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "0.1.6-next.0", + "version": "0.1.6-next.1", "private": false, "publishConfig": { "access": "public", @@ -29,8 +29,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", - "@backstage/core-app-api": "^0.5.1", + "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/plugin-permission-react": "^0.3.0", "@backstage/theme": "^0.2.14", @@ -42,8 +42,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@types/jest": "^26.0.7", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index eefdd6f016..864bb1e555 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,21 @@ # example-app +## 0.2.63-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/plugin-catalog-react@0.6.13-next.1 + - @backstage/plugin-code-coverage@0.1.24-next.1 + - @backstage/plugin-catalog-common@0.1.2-next.0 + - @backstage/cli@0.13.1-next.1 + - @backstage/plugin-scaffolder@0.12.1-next.1 + - @backstage/core-app-api@0.5.2-next.0 + - @backstage/plugin-techdocs@0.13.2-next.1 + - @backstage/plugin-catalog@0.7.11-next.1 + - @backstage/app-defaults@0.1.6-next.1 + ## 0.2.63-next.0 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index c6e7be8c5d..e5bd3a4180 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,14 +1,14 @@ { "name": "example-app", - "version": "0.2.63-next.0", + "version": "0.2.63-next.1", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.6-next.0", + "@backstage/app-defaults": "^0.1.6-next.1", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration-react": "^0.1.20-next.0", "@backstage/plugin-airbrake": "^0.1.2-next.0", @@ -16,14 +16,14 @@ "@backstage/plugin-azure-devops": "^0.1.13-next.0", "@backstage/plugin-apache-airflow": "^0.1.5-next.0", "@backstage/plugin-badges": "^0.2.21-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.0", - "@backstage/plugin-catalog-common": "^0.1.1", + "@backstage/plugin-catalog": "^0.7.11-next.1", + "@backstage/plugin-catalog-common": "^0.1.2-next.0", "@backstage/plugin-catalog-graph": "^0.2.9-next.0", "@backstage/plugin-catalog-import": "^0.8.0-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/plugin-circleci": "^0.2.36-next.0", "@backstage/plugin-cloudbuild": "^0.2.34-next.0", - "@backstage/plugin-code-coverage": "^0.1.24-next.0", + "@backstage/plugin-code-coverage": "^0.1.24-next.1", "@backstage/plugin-cost-insights": "^0.11.19-next.0", "@backstage/plugin-explore": "^0.3.28-next.0", "@backstage/plugin-gcp-projects": "^0.3.16-next.0", @@ -41,12 +41,12 @@ "@backstage/plugin-pagerduty": "0.3.24-next.0", "@backstage/plugin-permission-react": "^0.3.0", "@backstage/plugin-rollbar": "^0.3.25-next.0", - "@backstage/plugin-scaffolder": "^0.12.1-next.0", + "@backstage/plugin-scaffolder": "^0.12.1-next.1", "@backstage/plugin-search": "^0.6.1-next.0", "@backstage/plugin-sentry": "^0.3.35-next.0", "@backstage/plugin-shortcuts": "^0.1.21-next.0", "@backstage/plugin-tech-radar": "^0.5.4-next.0", - "@backstage/plugin-techdocs": "^0.13.2-next.0", + "@backstage/plugin-techdocs": "^0.13.2-next.1", "@backstage/plugin-todo": "^0.1.21-next.0", "@backstage/plugin-user-settings": "^0.3.18-next.0", "@backstage/search-common": "^0.2.2", @@ -72,7 +72,7 @@ }, "devDependencies": { "@backstage/plugin-permission-react": "^0.3.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/test-utils": "^0.2.4-next.0", "@rjsf/core": "^3.2.1", "@testing-library/cypress": "^8.0.2", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 80e5b8f1a6..787689a6a9 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/backend-common +## 0.10.6-next.0 + +### Patch Changes + +- 50d039577a: Added a `Context` type for the backend, that can propagate an abort signal, a + deadline, and contextual values through the call stack. The main entrypoint is + the `Contexts` utility class that provides a root context creator and commonly + used decorators. + + These are marked as `@alpha` for now, and are therefore only accessible via + `@backstage/backend-common/alpha`. + ## 0.10.5 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index f8e445465e..1110e16bc3 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.10.5", + "version": "0.10.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -84,8 +84,8 @@ } }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@types/archiver": "^5.1.0", "@types/compression": "^1.7.0", "@types/concat-stream": "^1.6.0", diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index cfaf40a6d6..2aa85eddb4 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/backend-tasks +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.4 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index 838f38dbd2..a34b78585c 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", @@ -43,8 +43,8 @@ "zod": "^3.9.5" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.0", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/backend-test-utils": "^0.1.16-next.1", + "@backstage/cli": "^0.13.1-next.1", "jest": "^26.0.1", "wait-for-expect": "^3.0.2" }, diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 006ea6d634..47279aa2f6 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/backend-test-utils +## 0.1.16-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.13.1-next.1 + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.16-next.0 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 7aabe3e08d..f56bf303a3 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.16-next.0", + "version": "0.1.16-next.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -30,8 +30,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/cli": "^0.13.1-next.1", "@backstage/config": "^0.1.13", "knex": "^0.95.1", "mysql2": "^2.2.5", @@ -41,7 +41,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "jest": "^26.0.1" }, "files": [ diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 8882a9203e..adb2e7669f 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,37 @@ # example-backend +## 0.2.63-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.1 + - @backstage/backend-common@0.10.6-next.0 + - example-app@0.2.63-next.1 + - @backstage/plugin-catalog-backend@0.21.2-next.1 + - @backstage/plugin-techdocs-backend@0.13.2-next.0 + - @backstage/backend-tasks@0.1.5-next.0 + - @backstage/plugin-app-backend@0.3.23-next.0 + - @backstage/plugin-azure-devops-backend@0.3.2-next.0 + - @backstage/plugin-badges-backend@0.1.17-next.0 + - @backstage/plugin-code-coverage-backend@0.1.21-next.0 + - @backstage/plugin-graphql-backend@0.1.13-next.0 + - @backstage/plugin-jenkins-backend@0.1.12-next.0 + - @backstage/plugin-kafka-backend@0.2.16-next.0 + - @backstage/plugin-kubernetes-backend@0.4.6-next.0 + - @backstage/plugin-permission-backend@0.4.2-next.1 + - @backstage/plugin-permission-node@0.4.2-next.1 + - @backstage/plugin-proxy-backend@0.2.17-next.1 + - @backstage/plugin-rollbar-backend@0.1.20-next.1 + - @backstage/plugin-scaffolder-backend@0.15.23-next.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.2.5-next.1 + - @backstage/plugin-search-backend@0.4.1-next.1 + - @backstage/plugin-search-backend-module-pg@0.2.5-next.0 + - @backstage/plugin-tech-insights-backend@0.2.3-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.7-next.0 + - @backstage/plugin-tech-insights-node@0.2.1-next.0 + - @backstage/plugin-todo-backend@0.1.20-next.0 + ## 0.2.63-next.0 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index c9e1c9d7c3..bebe2d3674 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.63-next.0", + "version": "0.2.63-next.1", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,38 +24,38 @@ "migrate:create": "knex migrate:make -x ts" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/backend-tasks": "^0.1.4", + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-tasks": "^0.1.5-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/integration": "^0.7.2", - "@backstage/plugin-app-backend": "^0.3.22", - "@backstage/plugin-auth-backend": "^0.9.0-next.0", - "@backstage/plugin-azure-devops-backend": "^0.3.1", - "@backstage/plugin-badges-backend": "^0.1.16", - "@backstage/plugin-catalog-backend": "^0.21.2-next.0", - "@backstage/plugin-code-coverage-backend": "^0.1.20", - "@backstage/plugin-graphql-backend": "^0.1.12", - "@backstage/plugin-jenkins-backend": "^0.1.11", - "@backstage/plugin-kubernetes-backend": "^0.4.5", - "@backstage/plugin-kafka-backend": "^0.2.15", - "@backstage/plugin-permission-backend": "^0.4.2-next.0", + "@backstage/plugin-app-backend": "^0.3.23-next.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.1", + "@backstage/plugin-azure-devops-backend": "^0.3.2-next.0", + "@backstage/plugin-badges-backend": "^0.1.17-next.0", + "@backstage/plugin-catalog-backend": "^0.21.2-next.1", + "@backstage/plugin-code-coverage-backend": "^0.1.21-next.0", + "@backstage/plugin-graphql-backend": "^0.1.13-next.0", + "@backstage/plugin-jenkins-backend": "^0.1.12-next.0", + "@backstage/plugin-kubernetes-backend": "^0.4.6-next.0", + "@backstage/plugin-kafka-backend": "^0.2.16-next.0", + "@backstage/plugin-permission-backend": "^0.4.2-next.1", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.2-next.0", - "@backstage/plugin-proxy-backend": "^0.2.17-next.0", - "@backstage/plugin-rollbar-backend": "^0.1.20-next.0", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.5-next.0", - "@backstage/plugin-search-backend": "^0.4.1-next.0", + "@backstage/plugin-permission-node": "^0.4.2-next.1", + "@backstage/plugin-proxy-backend": "^0.2.17-next.1", + "@backstage/plugin-rollbar-backend": "^0.1.20-next.1", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.5-next.1", + "@backstage/plugin-search-backend": "^0.4.1-next.1", "@backstage/plugin-search-backend-node": "^0.4.5", "@backstage/plugin-search-backend-module-elasticsearch": "^0.0.8", - "@backstage/plugin-search-backend-module-pg": "^0.2.4", - "@backstage/plugin-techdocs-backend": "^0.13.1", - "@backstage/plugin-tech-insights-backend": "^0.2.2", - "@backstage/plugin-tech-insights-node": "^0.2.0", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.6", - "@backstage/plugin-todo-backend": "^0.1.19", + "@backstage/plugin-search-backend-module-pg": "^0.2.5-next.0", + "@backstage/plugin-techdocs-backend": "^0.13.2-next.0", + "@backstage/plugin-tech-insights-backend": "^0.2.3-next.0", + "@backstage/plugin-tech-insights-node": "^0.2.1-next.0", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.7-next.0", + "@backstage/plugin-todo-backend": "^0.1.20-next.0", "@gitbeaker/node": "^35.1.0", "@octokit/rest": "^18.5.3", "azure-devops-node-api": "^11.0.1", @@ -72,7 +72,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index bcea1a68ee..6d8f93cf0a 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/cli +## 0.13.1-next.1 + +### Patch Changes + +- 5bd0ce9e62: chore(deps): bump `inquirer` from 7.3.3 to 8.2.0 + ## 0.13.1-next.0 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 5e44d3cc2d..57699ef788 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.13.1-next.0", + "version": "0.13.1-next.1", "private": false, "publishConfig": { "access": "public" @@ -115,13 +115,13 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@backstage/theme": "^0.2.14", "@types/diff": "^5.0.0", "@types/express": "^4.17.6", diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index ec2fbfee4e..9a8c7c4174 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/codemods +## 0.1.32-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/core-app-api@0.5.2-next.0 + ## 0.1.32-next.0 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index 9cd2cb8567..049c1ebce9 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/codemods", "description": "A collection of codemods for Backstage projects", - "version": "0.1.32-next.0", + "version": "0.1.32-next.1", "private": false, "publishConfig": { "access": "public", diff --git a/packages/config/package.json b/packages/config/package.json index 44fb7ab286..02c63af2b5 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -34,7 +34,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/test-utils": "^0.2.3", + "@backstage/test-utils": "^0.2.4-next.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index 06692a0b46..ab647cfda2 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/core-app-api +## 0.5.2-next.0 + +### Patch Changes + +- 40775bd263: Switched out the `GithubAuth` implementation to use the common `OAuth2` implementation. This relies on the simultaneous change in `@backstage/plugin-auth-backend` that enabled access token storage in cookies rather than the current solution that's based on `LocalStorage`. + + > **NOTE:** Make sure you upgrade the `auth-backend` deployment before or at the same time as you deploy this change. + ## 0.5.1 ### Patch Changes diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index b60008a1a8..75adf79108 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-app-api", "description": "Core app API used by Backstage apps", - "version": "0.5.1", + "version": "0.5.2-next.0", "private": false, "publishConfig": { "access": "public", @@ -45,8 +45,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index a22b029abd..81206f5cc6 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/core-components +## 0.8.7-next.1 + +### Patch Changes + +- f7257dff6f: The `` component now accepts a `noTrack` prop, which prevents the `click` event from being captured by the Analytics API. This can be used if tracking is explicitly not warranted, or in order to use custom link tracking in specific situations. + ## 0.8.7-next.0 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index ed4df67a89..c6e810bd23 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.8.7-next.0", + "version": "0.8.7-next.1", "private": false, "publishConfig": { "access": "public", @@ -73,9 +73,9 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/core-app-api": "^0.5.1", - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 2de6170d73..5186fca4dd 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -43,9 +43,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index d4eb6f1a96..6c14171b23 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/create-app +## 0.4.18-next.1 + +### Patch Changes + +- 5bd0ce9e62: chore(deps): bump `inquirer` from 7.3.3 to 8.2.0 +- ba59832aed: Permission the `catalog-import` route + + The following changes are **required** if you intend to add permissions to your existing app. + + Use the `PermissionedRoute` for `CatalogImportPage` instead of the normal `Route`: + + ```diff + // packages/app/src/App.tsx + ... + + import { PermissionedRoute } from '@backstage/plugin-permission-react'; + + import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; + + ... + + - } /> + + } + + /> + ``` + ## 0.4.18-next.0 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 00d745ab36..dc943ded7b 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.18-next.0", + "version": "0.4.18-next.1", "private": false, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index f424bce947..40f54190e6 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/dev-utils +## 0.2.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/plugin-catalog-react@0.6.13-next.1 + - @backstage/core-app-api@0.5.2-next.0 + - @backstage/app-defaults@0.1.6-next.1 + - @backstage/test-utils@0.2.4-next.0 + ## 0.2.20-next.0 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 585ff0f83d..3e21a8c78c 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "0.2.20-next.0", + "version": "0.2.20-next.1", "private": false, "publishConfig": { "access": "public", @@ -29,14 +29,14 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/app-defaults": "^0.1.6-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/app-defaults": "^0.1.6-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/catalog-model": "^0.9.10", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -55,7 +55,7 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/embedded-techdocs-app/CHANGELOG.md b/packages/embedded-techdocs-app/CHANGELOG.md index 299423dd1d..893d6cd6ac 100644 --- a/packages/embedded-techdocs-app/CHANGELOG.md +++ b/packages/embedded-techdocs-app/CHANGELOG.md @@ -1,5 +1,18 @@ # embedded-techdocs-app +## 0.2.62-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/cli@0.13.1-next.1 + - @backstage/core-app-api@0.5.2-next.0 + - @backstage/plugin-techdocs@0.13.2-next.1 + - @backstage/plugin-catalog@0.7.11-next.1 + - @backstage/app-defaults@0.1.6-next.1 + - @backstage/test-utils@0.2.4-next.0 + ## 0.2.62-next.0 ### Patch Changes diff --git a/packages/embedded-techdocs-app/package.json b/packages/embedded-techdocs-app/package.json index bfda40905b..f5e03d41ff 100644 --- a/packages/embedded-techdocs-app/package.json +++ b/packages/embedded-techdocs-app/package.json @@ -1,20 +1,20 @@ { "name": "embedded-techdocs-app", - "version": "0.2.62-next.0", + "version": "0.2.62-next.1", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.6-next.0", + "@backstage/app-defaults": "^0.1.6-next.1", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@backstage/config": "^0.1.13", - "@backstage/core-app-api": "^0.5.1", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.0", - "@backstage/plugin-techdocs": "^0.13.2-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/plugin-catalog": "^0.7.11-next.1", + "@backstage/plugin-techdocs": "^0.13.2-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -26,7 +26,7 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index ae028d39c2..7e46d80e57 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", "@backstage/theme": "^0.2.14", @@ -35,9 +35,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/integration/package.json b/packages/integration/package.json index c4e0b003f2..41ed3f08c3 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -39,9 +39,9 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@backstage/config-loader": "^0.9.3", - "@backstage/test-utils": "^0.2.3", + "@backstage/test-utils": "^0.2.4-next.0", "@types/jest": "^26.0.7", "@types/luxon": "^2.0.4", "msw": "^0.35.0" diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 05e621ce62..6c4a606707 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @techdocs/cli +## 0.8.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/techdocs-common@0.11.6-next.0 + ## 0.8.12-next.0 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index d8a46ed261..c9f08d2d2e 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "0.8.12-next.0", + "version": "0.8.12-next.1", "private": false, "publishConfig": { "access": "public" @@ -32,7 +32,7 @@ "techdocs-cli": "bin/techdocs-cli" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/commander": "^2.12.2", "@types/fs-extra": "^9.0.6", "@types/http-proxy": "^1.17.4", @@ -55,10 +55,10 @@ "ext": "ts" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/techdocs-common": "^0.11.5", + "@backstage/techdocs-common": "^0.11.6-next.0", "@types/dockerode": "^3.3.0", "commander": "^6.1.0", "dockerode": "^3.3.1", diff --git a/packages/techdocs-common/CHANGELOG.md b/packages/techdocs-common/CHANGELOG.md index 9a3fa5051b..962cbee77c 100644 --- a/packages/techdocs-common/CHANGELOG.md +++ b/packages/techdocs-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/techdocs-common +## 0.11.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.11.5 ### Patch Changes diff --git a/packages/techdocs-common/package.json b/packages/techdocs-common/package.json index 5e4d423036..be5c29d539 100644 --- a/packages/techdocs-common/package.json +++ b/packages/techdocs-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/techdocs-common", "description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "0.11.5", + "version": "0.11.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -38,7 +38,7 @@ "dependencies": { "@azure/identity": "^2.0.1", "@azure/storage-blob": "^12.5.0", - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", @@ -60,7 +60,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/fs-extra": "^9.0.5", "@types/js-yaml": "^4.0.0", "@types/mime-types": "^2.1.0", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index 1867b52265..b560526a31 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/test-utils +## 0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-app-api@0.5.2-next.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 318db4e0ed..9f46682d1f 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "0.2.3", + "version": "0.2.4-next.0", "private": false, "publishConfig": { "access": "public", @@ -30,7 +30,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-app-api": "^0.5.1", + "@backstage/core-app-api": "^0.5.2-next.0", "@backstage/core-plugin-api": "^0.6.0", "@backstage/plugin-permission-common": "^0.4.0", "@backstage/plugin-permission-react": "^0.3.0", @@ -51,7 +51,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "msw": "^0.35.0" diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index b0bc63d17d..91217a41b1 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -34,11 +34,11 @@ }, "devDependencies": { "@types/object-hash": "^2.2.1", - "@backstage/app-defaults": "^0.1.6-next.0", - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/app-defaults": "^0.1.6-next.1", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/allure/package.json b/plugins/allure/package.json index cfabf4e57a..01c3080393 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -23,9 +23,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index e3f0ec00e8..8124aa2a0f 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -35,10 +35,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index a39dce2910..7ea91fca99 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -33,10 +33,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index dd149f3133..0823f2b67d 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -32,10 +32,10 @@ "dependencies": { "@asyncapi/react-component": "1.0.0-next.32", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog": "^0.7.11-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog": "^0.7.11-next.1", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 68a38461fe..3e895149b2 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-app-backend +## 0.3.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.3.22 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index f65f23a420..435037f07d 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.22", + "version": "0.3.23-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config-loader": "^0.9.3", "@backstage/config": "^0.1.13", "@backstage/types": "^0.1.1", @@ -47,8 +47,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.0", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/backend-test-utils": "^0.1.16-next.1", + "@backstage/cli": "^0.13.1-next.1", "@backstage/types": "^0.1.1", "@types/supertest": "^2.0.8", "mock-fs": "^5.1.0", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 05836979fd..c1a93a50e1 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend +## 0.9.0-next.1 + +### Patch Changes + +- 9d75a939b6: Fixed a bug where providers that tracked the granted scopes through a cookie would not take failed authentication attempts into account. +- 648606b3ac: Added support for storing static GitHub access tokens in cookies and using them to refresh the Backstage session. +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.9.0-next.0 ### Minor Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 80ec297ea5..5e18d9f9ef 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.9.0-next.0", + "version": "0.9.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -73,8 +73,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 16b4a0d182..d2353d9625 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-azure-devops-backend +## 0.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.3.1 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index 638857fabb..6b5794d850 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.3.1", + "version": "0.3.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/plugin-azure-devops-common": "^0.2.0", "@types/express": "^4.17.6", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.35.0" diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 45d5e46cee..f9830dc5ab 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -28,11 +28,11 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/plugin-azure-devops-common": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index 4f54700697..24ed3f035f 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-badges-backend +## 0.1.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.16 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index 01c6d4b1fc..06d73ddc11 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges-backend", "description": "A Backstage backend plugin that generates README badges for your entities", - "version": "0.1.16", + "version": "0.1.17-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -45,7 +45,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges/package.json b/plugins/badges/package.json index b46f4450bb..55e8d736da 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -28,10 +28,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index ab73c8ab04..3427a7bb0e 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bazaar-backend +## 0.1.8-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/backend-test-utils@0.1.16-next.1 + ## 0.1.8-next.0 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index d3c6cab9cf..55a50c9575 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.1.8-next.0", + "version": "0.1.8-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/backend-test-utils": "^0.1.16-next.0", + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-test-utils": "^0.1.16-next.1", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -31,7 +31,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0" + "@backstage/cli": "^0.13.1-next.1" }, "files": [ "dist", diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 9dd3bf5125..2e4967f814 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -24,7 +24,7 @@ "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/plugin-catalog": "^0.7.11-next.0", "@backstage/plugin-catalog-react": "^0.6.13-next.0", @@ -44,8 +44,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/dev-utils": "^0.2.20-next.0", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/dev-utils": "^0.2.20-next.1", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.0.6" }, diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index ee1a91ba23..6affc70775 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index dd387fb05d..8d102bb35f 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -32,7 +32,7 @@ "@azure/msal-node": "^1.1.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/plugin-catalog-backend": "^0.21.2-next.0", + "@backstage/plugin-catalog-backend": "^0.21.2-next.1", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -42,9 +42,9 @@ "qs": "^6.9.4" }, "devDependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@types/lodash": "^4.14.151", "msw": "^0.35.0" }, diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index 94097a6745..3558b8a804 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-backend +## 0.21.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@0.1.2-next.0 + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-permission-node@0.4.2-next.1 + ## 0.21.2-next.0 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 95bdb2fcf2..17dc876d99 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "0.21.2-next.0", + "version": "0.21.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,15 +30,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-common": "^0.1.1", + "@backstage/plugin-catalog-common": "^0.1.2-next.0", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.2-next.0", + "@backstage/plugin-permission-node": "^0.4.2-next.1", "@backstage/search-common": "^0.2.2", "@backstage/types": "^0.1.1", "@octokit/graphql": "^4.5.8", @@ -65,10 +65,10 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.0", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/backend-test-utils": "^0.1.16-next.1", + "@backstage/cli": "^0.13.1-next.1", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/test-utils": "^0.2.4-next.0", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/lodash": "^4.14.151", diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index 77bc30964c..0d39a00c39 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-catalog-common +## 0.1.2-next.0 + +### Patch Changes + +- ba59832aed: Adds new `catalogEntityCreatePermission` which can be imported and used when authoring a permission policy to restrict/grant a user's access to the catalog import plugin. (And the "Register Existing Component" button which navigates there). + ## 0.1.1 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 340a4baa8a..91dda05159 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-common", "description": "Common functionalities for the catalog plugin", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/plugin-permission-common": "^0.4.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0" + "@backstage/cli": "^0.13.1-next.1" }, "files": [ "dist" diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 49cce2ae51..b3c4103be3 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -23,9 +23,9 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 4e4f61b103..affc3e0ee6 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -43,8 +43,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@graphql-codegen/cli": "^2.3.1", "@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript-resolvers": "^2.4.3", diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index cd3323a6b4..7e997e1ea8 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -33,13 +33,13 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/config": "^0.1.13", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 48cc93e7b1..fdae107b88 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog-react +## 0.6.13-next.1 + +### Patch Changes + +- f7257dff6f: The `` component now accepts a `noTrack` prop, which prevents the `click` event from being captured by the Analytics API. This can be used if tracking is explicitly not warranted, or in order to use custom link tracking in specific situations. +- 300f8cdaee: Fix bug: previously the filter would be set to "all" on page load, even if the + `initiallySelectedFilter` on the `DefaultCatalogPage` was set to something else, + or a different query parameter was supplied. Now, the prop and query parameters + control the filter as expected. Additionally, after this change any filters + which match 0 items will be disabled, and the filter will be reverted to 'all' + if they're set on page load. +- 6acc8f7db7: Add caching to the useEntityPermission hook + + The hook now caches the authorization decision based on the permission + the entity, and returns the cache match value as the default `allowed` value while loading. This helps avoid flicker in UI elements that would be conditionally rendered based on the `allowed` result of this hook. + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + ## 0.6.13-next.0 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 282ddc02ed..ae3fd076e8 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "0.6.13-next.0", + "version": "0.6.13-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", @@ -54,10 +54,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/plugin-catalog-common": "^0.1.1", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/plugin-catalog-common": "^0.1.2-next.0", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 4cf5533dbf..7810e39f7d 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog +## 0.7.11-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/plugin-catalog-react@0.6.13-next.1 + - @backstage/plugin-catalog-common@0.1.2-next.0 + ## 0.7.11-next.0 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 8d06e50b09..d0b0ee972e 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "0.7.11-next.0", + "version": "0.7.11-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,12 +33,12 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-common": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-common": "^0.1.2-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -54,11 +54,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", "@backstage/plugin-permission-react": "^0.3.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index cb11885fb4..4f03aad0de 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 808faac15b..35955049e7 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 8faa0d789d..9a98e96f6f 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-code-coverage-backend +## 0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.20 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index aa60df0893..2dc5afb070 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.1.20", + "version": "0.1.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -36,7 +36,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index eb1a926900..bd44921180 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-code-coverage +## 0.1.24-next.1 + +### Patch Changes + +- 2ce5e4e0a7: Fixed a bug in the FileExplorer component which made it impossible to navigate upwards to a containing folder by clicking on the folder breadcrumb. +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/plugin-catalog-react@0.6.13-next.1 + ## 0.1.24-next.0 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index 47837e09ba..a453916301 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.1.24-next.0", + "version": "0.1.24-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 51705222d2..05cfff2cb0 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", @@ -38,10 +38,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 48c4916beb..31c89f6625 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -33,7 +33,7 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 902933b7d3..7bd9edd854 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -32,9 +32,9 @@ "@backstage/core-plugin-api": "^0.6.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/explore/package.json b/plugins/explore/package.json index d9c87d1826..97a96b3589 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/plugin-explore-react": "^0.0.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index d9e93dd983..16a58a7c7a 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -22,9 +22,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,10 +36,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index 05157e9ed7..f315464d2c 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -33,10 +33,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index d5632e0a13..dc60461c96 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 016a66cd29..2af492439b 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", "@backstage/theme": "^0.2.14", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index ac573db408..f14d6f039a 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -34,10 +34,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index b67ca5de3d..6bf18d2b9c 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -22,12 +22,12 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 5d85351024..b939115648 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 35bc70858d..1896a07bc9 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -29,10 +29,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 30fb37c3b9..a1f8e99e42 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/graphql-backend/CHANGELOG.md b/plugins/graphql-backend/CHANGELOG.md index aa112abae8..a1f348ee41 100644 --- a/plugins/graphql-backend/CHANGELOG.md +++ b/plugins/graphql-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-graphql-backend +## 0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.12 ### Patch Changes diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index db4cfe077a..0f59b3f9c6 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphql-backend", "description": "An experimental Backstage backend plugin for GraphQL", - "version": "0.1.12", + "version": "0.1.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/plugin-catalog-graphql": "^0.3.1", "@graphql-tools/schema": "^8.3.1", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "eslint-plugin-graphql": "^4.0.0", "msw": "^0.35.0", diff --git a/plugins/home/package.json b/plugins/home/package.json index 0f3b53c78c..cb3d385a65 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@backstage/plugin-search": "^0.6.1-next.0", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index c762d6606b..e7c2e81cb7 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -22,10 +22,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index 70d5782ae3..e75825b505 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-jenkins-backend +## 0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.11 ### Patch Changes diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index a595f1b0ce..305e620a99 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins-backend", "description": "A Backstage backend plugin that integrates towards Jenkins", - "version": "0.1.11", + "version": "0.1.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/jenkins": "^0.23.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 66d0073df3..9c68873168 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -33,10 +33,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index 112ea94498..cb5fb18660 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kafka-backend +## 0.2.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.2.15 ### Patch Changes diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index f8270b0b1d..28b801f6d6 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.15", + "version": "0.2.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", @@ -44,7 +44,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/jest-when": "^2.7.2", "@types/lodash": "^4.14.151", "jest-when": "^3.1.0", diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 3eb131df06..47441e2007 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,10 +36,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index 8e306e762e..61cf451961 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kubernetes-backend +## 0.4.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.4.5 ### Patch Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 95cd3c0217..00ee830047 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.4.5", + "version": "0.4.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", @@ -55,7 +55,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/aws4": "^1.5.1", "supertest": "^6.1.3", "aws-sdk-mock": "^5.2.1", diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index c29475f66d..a2c0c4c9bd 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -33,9 +33,9 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/plugin-kubernetes-common": "^0.2.2", "@kubernetes/client-node": "^0.16.0", "@backstage/theme": "^0.2.14", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index bd2df0e95e..386e651770 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -34,9 +34,9 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 7f710cbdf2..9833593766 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/plugin-catalog-react": "^0.6.13-next.0", @@ -31,8 +31,8 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/dev-utils": "^0.2.20-next.0", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/dev-utils": "^0.2.20-next.1", "@testing-library/jest-dom": "^5.10.1", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.0.6" diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index fecb36805d..b9f681976e 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/org/package.json b/plugins/org/package.json index 5975d66246..57f4778993 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ }, "devDependencies": { "@backstage/catalog-client": "^0.5.5", - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 2a57f5b0d5..ee7ee4cbc7 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 629a7d5f96..17cb7d5303 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-permission-backend +## 0.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.1 + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-permission-node@0.4.2-next.1 + ## 0.4.2-next.0 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index aeba1577bf..23755a23d3 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.4.2-next.0", + "version": "0.4.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,12 +19,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-auth-backend": "^0.9.0-next.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.1", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.2-next.0", + "@backstage/plugin-permission-node": "^0.4.2-next.1", "@types/express": "*", "dataloader": "^2.0.0", "express": "^4.17.1", @@ -36,7 +36,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index e1f62551e3..84a6ad7baa 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-permission-node +## 0.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.1 + - @backstage/backend-common@0.10.6-next.0 + ## 0.4.2-next.0 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 5a0213ef63..78d2d9397a 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.4.2-next.0", + "version": "0.4.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-auth-backend": "^0.9.0-next.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.1", "@backstage/plugin-permission-common": "^0.4.0", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -40,7 +40,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index 08de9d0b4e..b1e0350dcc 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -40,8 +40,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@types/jest": "^26.0.7" diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index 7e8cd6803f..ec7668300b 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-proxy-backend +## 0.2.17-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.2.17-next.0 ### Patch Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 031f8e5665..66a3750d32 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-proxy-backend", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", - "version": "0.2.17-next.0", + "version": "0.2.17-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -43,7 +43,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index d14c5644a8..14bdf74a34 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-rollbar-backend +## 0.1.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.20-next.0 ### Patch Changes diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 8972572f1f..c3490e5a38 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar-backend", "description": "A Backstage backend plugin that integrates towards Rollbar", - "version": "0.1.20-next.0", + "version": "0.1.20-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "camelcase-keys": "^7.0.1", @@ -48,8 +48,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@types/supertest": "^2.0.8", "msw": "^0.36.3", "supertest": "^6.1.3" diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 2a4a18979c..37f7ac54f6 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index cbc1119062..646546b743 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.1.10-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-scaffolder-backend@0.15.23-next.1 + ## 0.1.10-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index ed267e2846..1f13fd8f2e 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.1.10-next.0", + "version": "0.1.10-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,10 +20,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", "@backstage/config": "^0.1.13", "@backstage/types": "^0.1.1", "command-exists": "^1.2.9", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/fs-extra": "^9.0.1", "@types/mock-fs": "^4.13.0", "@types/jest": "^26.0.7", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 94e0c5b411..cd3b32419b 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.2.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-scaffolder-backend@0.15.23-next.1 + ## 0.2.5-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 3e73840fed..ecfc057bcc 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.2.5-next.0", + "version": "0.2.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", @@ -31,7 +31,7 @@ "fs-extra": "^9.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index 30fcbdc8e5..747254181b 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -21,13 +21,13 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.0", + "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", "@backstage/types": "^0.1.1", "winston": "^3.2.1", "yeoman-environment": "^3.6.0" }, "devDependencies": { - "@backstage/backend-common": "^0.10.4", + "@backstage/backend-common": "^0.10.6-next.0", "@types/jest": "^26.0.7" }, "files": [ diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 41582a5f4e..cf6a4e56e0 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend +## 0.15.23-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-catalog-backend@0.21.2-next.1 + - @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.10-next.1 + ## 0.15.23-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 790d6ed273..acec0ec854 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "0.15.23-next.0", + "version": "0.15.23-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,15 +31,15 @@ "build:assets": "node scripts/build-nunjucks.js" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-backend": "^0.21.2-next.0", + "@backstage/plugin-catalog-backend": "^0.21.2-next.1", "@backstage/plugin-scaffolder-common": "^0.1.3", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.10-next.0", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.10-next.1", "@backstage/types": "^0.1.1", "@gitbeaker/core": "^34.6.0", "@gitbeaker/node": "^35.1.0", @@ -73,8 +73,8 @@ "vm2": "^3.9.5" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index eb46870e2b..dd850ffe51 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder +## 0.12.1-next.1 + +### Patch Changes + +- ba59832aed: Permission the Register Existing Component button +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/plugin-catalog-react@0.6.13-next.1 + - @backstage/plugin-catalog-common@0.1.2-next.0 + ## 0.12.1-next.0 ### Patch Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index a85d13f56e..62485bd8de 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "0.12.1-next.0", + "version": "0.12.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,13 +34,13 @@ "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-common": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-common": "^0.1.2-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/plugin-permission-react": "^0.3.0", "@backstage/plugin-scaffolder-common": "^0.1.3", "@backstage/theme": "^0.2.14", @@ -69,11 +69,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/plugin-catalog": "^0.7.11-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 714235c947..79408a2e69 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -30,8 +30,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/cli": "^0.13.1-next.1", "@elastic/elasticsearch-mock": "^0.3.0" }, "files": [ diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index 8abeaa10e8..2a40ca41ca 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-search-backend-module-pg +## 0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.2.4 ### Patch Changes diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 0fa4ca3f8d..3c156be5f8 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-pg", "description": "A module for the search backend that implements search using PostgreSQL", - "version": "0.2.4", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,15 +20,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/search-common": "^0.2.2", "@backstage/plugin-search-backend-node": "^0.4.5", "lodash": "^4.17.21", "knex": "^0.95.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.0", - "@backstage/cli": "^0.13.1-next.0" + "@backstage/backend-test-utils": "^0.1.16-next.1", + "@backstage/cli": "^0.13.1-next.1" }, "files": [ "dist", diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index ee65c5528e..fb72994de5 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -26,8 +26,8 @@ "@types/lunr": "^2.3.3" }, "devDependencies": { - "@backstage/backend-common": "^0.10.5", - "@backstage/cli": "^0.13.1-next.0" + "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/cli": "^0.13.1-next.1" }, "files": [ "dist" diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index 342d56af32..eee72f6a56 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend +## 0.4.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0-next.1 + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-permission-node@0.4.2-next.1 + ## 0.4.1-next.0 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index 02093f07d6..ea897c4a9f 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend", "description": "The Backstage backend plugin that provides your backstage app with search", - "version": "0.4.1-next.0", + "version": "0.4.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,13 +20,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/search-common": "^0.2.2", - "@backstage/plugin-auth-backend": "^0.9.0-next.0", + "@backstage/plugin-auth-backend": "^0.9.0-next.1", "@backstage/plugin-permission-common": "^0.4.0-next.0", - "@backstage/plugin-permission-node": "^0.4.2-next.0", + "@backstage/plugin-permission-node": "^0.4.2-next.1", "@backstage/plugin-search-backend-node": "^0.4.5", "@backstage/types": "^0.1.1", "@types/express": "^4.17.6", @@ -40,7 +40,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search/package.json b/plugins/search/package.json index 5c66dab402..adb2ad64fd 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -32,10 +32,10 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/search-common": "^0.2.2", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 8f7e487f1c..e7e0b56654 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index 0ea2c6d367..b6df61596a 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index d249074eb1..4f7f04aaec 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -34,9 +34,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index 557d486ab2..cb69f28c30 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index 9346b5c402..69a4b41c07 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-tech-insights-node@0.2.1-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index d9ca5449f5..bccf36c4d4 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/plugin-tech-insights-common": "^0.2.1", - "@backstage/plugin-tech-insights-node": "^0.2.0", + "@backstage/plugin-tech-insights-node": "^0.2.1-next.0", "ajv": "^7.0.3", "json-rules-engine": "^6.1.2", "lodash": "^4.17.21", @@ -43,7 +43,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/node-cron": "^3.0.1" }, "files": [ diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index 7cf31f5b61..0a042bd267 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-backend +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + - @backstage/plugin-tech-insights-node@0.2.1-next.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index 80620bd016..ab92fc0dfd 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,13 +31,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/plugin-tech-insights-common": "^0.2.1", - "@backstage/plugin-tech-insights-node": "^0.2.0", + "@backstage/plugin-tech-insights-node": "^0.2.1-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -51,8 +51,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.0", - "@backstage/cli": "^0.13.1-next.0", + "@backstage/backend-test-utils": "^0.1.16-next.1", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "@types/node-cron": "^3.0.0", "@types/semver": "^7.3.8", diff --git a/plugins/tech-insights-node/CHANGELOG.md b/plugins/tech-insights-node/CHANGELOG.md index 502cfdaa9b..799c10d435 100644 --- a/plugins/tech-insights-node/CHANGELOG.md +++ b/plugins/tech-insights-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-tech-insights-node +## 0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.2.0 ### Minor Changes diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 405c3cfe03..ae35d32201 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-node", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/config": "^0.1.13", "@backstage/plugin-tech-insights-common": "^0.2.1", "@types/luxon": "^2.0.5", @@ -38,7 +38,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0" + "@backstage/cli": "^0.13.1-next.1" }, "files": [ "dist" diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index dafbd52ffb..de6f05bf04 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -21,10 +21,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/plugin-tech-insights-common": "^0.2.1", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index af6390083d..06153adffb 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -31,7 +31,7 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 246d612833..dd5df76d42 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-techdocs-backend +## 0.13.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@0.1.2-next.0 + - @backstage/backend-common@0.10.6-next.0 + - @backstage/techdocs-common@0.11.6-next.0 + ## 0.13.1 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 7e5fb16472..6189d2bcac 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-backend", "description": "The Backstage backend plugin that renders technical documentation for your components", - "version": "0.13.1", + "version": "0.13.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,15 +31,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-common": "^0.1.1-next.0", + "@backstage/plugin-catalog-common": "^0.1.2-next.0", "@backstage/search-common": "^0.2.2", - "@backstage/techdocs-common": "^0.11.5", + "@backstage/techdocs-common": "^0.11.6-next.0", "@types/express": "^4.17.6", "cross-fetch": "^3.0.6", "dockerode": "^3.3.1", @@ -53,8 +53,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@types/dockerode": "^3.3.0", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index 677746ec49..f70af118ed 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-techdocs +## 0.13.2-next.1 + +### Patch Changes + +- 742434a6ba: Fixed a bug where links to files within a TechDocs site that use the `download` attribute would result in a 404 in cases where the TechDocs backend and Backstage frontend application are on the same host. +- Updated dependencies + - @backstage/core-components@0.8.7-next.1 + - @backstage/plugin-catalog-react@0.6.13-next.1 + - @backstage/plugin-catalog@0.7.11-next.1 + ## 0.13.2-next.0 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 3585dd4ced..830adb1aa9 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "0.13.2-next.0", + "version": "0.13.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,13 +34,13 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog": "^0.7.11-next.1", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/plugin-search": "^0.6.1-next.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -62,10 +62,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/todo-backend/CHANGELOG.md b/plugins/todo-backend/CHANGELOG.md index ddbc5d215a..9d1dde0c7f 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-todo-backend +## 0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6-next.0 + ## 0.1.19 ### Patch Changes diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index d90ebb2f08..95b8b0dc2e 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo-backend", "description": "A Backstage backend plugin that lets you browse TODO comments in your source code", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,7 +25,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.5", + "@backstage/backend-common": "^0.10.6-next.0", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -39,7 +39,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1-next.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 254aa4fdb4..b95f69716d 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -28,10 +28,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13-next.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index a4d0e4d46f..5b11d3c7b8 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index 8e77220dc7..f3e30f9c04 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.0", + "@backstage/core-components": "^0.8.7-next.1", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-app-api": "^0.5.1", - "@backstage/dev-utils": "^0.2.20-next.0", - "@backstage/test-utils": "^0.2.3", + "@backstage/cli": "^0.13.1-next.1", + "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/test-utils": "^0.2.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/yarn.lock b/yarn.lock index 4ce8322dfa..63df6569f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1366,6 +1366,22 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@backstage/core-app-api@*": + version "0.5.1" + resolved "https://registry.npmjs.org/@backstage/core-app-api/-/core-app-api-0.5.1.tgz#b58474add43d3f2ed7f941287170c1147da48fb1" + integrity sha512-2t0T2uPLf2rFrQ0l4DkuRVrz1EKKswTC5yBo/O+uyvmbJC1aMSh6oqUZOFLZ/BuLKVctIKA88Rnuy+QbxnZPvQ== + dependencies: + "@backstage/config" "^0.1.13" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/types" "^0.1.1" + "@backstage/version-bridge" "^0.1.1" + "@types/prop-types" "^15.7.3" + prop-types "^15.7.2" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + zen-observable "^0.8.15" + zod "^3.11.6" + "@backstage/core-components@*", "@backstage/core-components@^0.8.0", "@backstage/core-components@^0.8.5", "@backstage/core-components@^0.8.6": version "0.8.6" resolved "https://registry.npmjs.org/@backstage/core-components/-/core-components-0.8.6.tgz#ad365c2d8ee99ec1280c1212b7de14a922dd6f34" @@ -1440,6 +1456,13 @@ "@material-ui/lab" "4.0.0-alpha.57" react-use "^17.2.4" +"@backstage/plugin-catalog-common@^0.1.1": + version "0.1.1" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog-common/-/plugin-catalog-common-0.1.1.tgz#ca9ae389f0c131abfe85fb036917088afab38399" + integrity sha512-GYGKMD7ZJuCmxpqhrIS3zZSQGg7rLbza21v2UQF1dvoTdc+cCPFPiOYly0WgCArmaj771X0qB4Yb5Z05kU1DMg== + dependencies: + "@backstage/plugin-permission-common" "^0.4.0" + "@backstage/plugin-catalog-react@^0.6.12", "@backstage/plugin-catalog-react@^0.6.5": version "0.6.12" resolved "https://registry.npmjs.org/@backstage/plugin-catalog-react/-/plugin-catalog-react-0.6.12.tgz#df6e9017ff6ad2e87395af11a277aadd95aef58b" @@ -10788,19 +10811,19 @@ elliptic@^6.0.0: minimalistic-crypto-utils "^1.0.1" "embedded-techdocs-app@file:packages/embedded-techdocs-app": - version "0.2.62-next.0" + version "0.2.62-next.1" dependencies: - "@backstage/app-defaults" "^0.1.6-next.0" + "@backstage/app-defaults" "^0.1.6-next.1" "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1-next.0" + "@backstage/cli" "^0.13.1-next.1" "@backstage/config" "^0.1.13" - "@backstage/core-app-api" "^0.5.1" - "@backstage/core-components" "^0.8.7-next.0" + "@backstage/core-app-api" "^0.5.2-next.0" + "@backstage/core-components" "^0.8.7-next.1" "@backstage/core-plugin-api" "^0.6.0" "@backstage/integration-react" "^0.1.20-next.0" - "@backstage/plugin-catalog" "^0.7.11-next.0" - "@backstage/plugin-techdocs" "^0.13.2-next.0" - "@backstage/test-utils" "^0.2.3" + "@backstage/plugin-catalog" "^0.7.11-next.1" + "@backstage/plugin-techdocs" "^0.13.2-next.1" + "@backstage/test-utils" "^0.2.4-next.0" "@backstage/theme" "^0.2.14" "@material-ui/core" "^4.11.0" "@material-ui/icons" "^4.9.1" @@ -11585,13 +11608,13 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" "example-app@file:packages/app": - version "0.2.63-next.0" + version "0.2.63-next.1" dependencies: - "@backstage/app-defaults" "^0.1.6-next.0" + "@backstage/app-defaults" "^0.1.6-next.1" "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1-next.0" - "@backstage/core-app-api" "^0.5.1" - "@backstage/core-components" "^0.8.7-next.0" + "@backstage/cli" "^0.13.1-next.1" + "@backstage/core-app-api" "^0.5.2-next.0" + "@backstage/core-components" "^0.8.7-next.1" "@backstage/core-plugin-api" "^0.6.0" "@backstage/integration-react" "^0.1.20-next.0" "@backstage/plugin-airbrake" "^0.1.2-next.0" @@ -11599,14 +11622,14 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: "@backstage/plugin-api-docs" "^0.7.1-next.0" "@backstage/plugin-azure-devops" "^0.1.13-next.0" "@backstage/plugin-badges" "^0.2.21-next.0" - "@backstage/plugin-catalog" "^0.7.11-next.0" - "@backstage/plugin-catalog-common" "^0.1.1" + "@backstage/plugin-catalog" "^0.7.11-next.1" + "@backstage/plugin-catalog-common" "^0.1.2-next.0" "@backstage/plugin-catalog-graph" "^0.2.9-next.0" "@backstage/plugin-catalog-import" "^0.8.0-next.0" - "@backstage/plugin-catalog-react" "^0.6.13-next.0" + "@backstage/plugin-catalog-react" "^0.6.13-next.1" "@backstage/plugin-circleci" "^0.2.36-next.0" "@backstage/plugin-cloudbuild" "^0.2.34-next.0" - "@backstage/plugin-code-coverage" "^0.1.24-next.0" + "@backstage/plugin-code-coverage" "^0.1.24-next.1" "@backstage/plugin-cost-insights" "^0.11.19-next.0" "@backstage/plugin-explore" "^0.3.28-next.0" "@backstage/plugin-gcp-projects" "^0.3.16-next.0" @@ -11624,13 +11647,13 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: "@backstage/plugin-pagerduty" "0.3.24-next.0" "@backstage/plugin-permission-react" "^0.3.0" "@backstage/plugin-rollbar" "^0.3.25-next.0" - "@backstage/plugin-scaffolder" "^0.12.1-next.0" + "@backstage/plugin-scaffolder" "^0.12.1-next.1" "@backstage/plugin-search" "^0.6.1-next.0" "@backstage/plugin-sentry" "^0.3.35-next.0" "@backstage/plugin-shortcuts" "^0.1.21-next.0" "@backstage/plugin-tech-insights" "^0.1.7-next.0" "@backstage/plugin-tech-radar" "^0.5.4-next.0" - "@backstage/plugin-techdocs" "^0.13.2-next.0" + "@backstage/plugin-techdocs" "^0.13.2-next.1" "@backstage/plugin-todo" "^0.1.21-next.0" "@backstage/plugin-user-settings" "^0.3.18-next.0" "@backstage/search-common" "^0.2.2" From 34224a0b704469428696cdff754555f60b1b4802 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 2 Feb 2022 16:47:31 +0100 Subject: [PATCH 127/473] scripts/create-release-tag: dispatch release workflows Signed-off-by: Patrik Oldsberg --- .github/workflows/deploy_packages.yml | 2 +- scripts/create-release-tag.js | 76 ++++++++++++++++++++------- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 459f48336e..ed02a313fe 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -205,7 +205,7 @@ jobs: # Grabs the version in the root package.json and creates a tag on GitHub - name: Create a release tag id: create_tag - run: node scripts/create-release-tag.js + run: node scripts/create-release-tag.js --dispatch-workflows env: GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} diff --git a/scripts/create-release-tag.js b/scripts/create-release-tag.js index 042b00866a..f898705ce5 100755 --- a/scripts/create-release-tag.js +++ b/scripts/create-release-tag.js @@ -25,31 +25,17 @@ const baseOptions = { repo: 'backstage', }; -async function main() { - const { GITHUB_SHA, GITHUB_TOKEN } = process.env; - if (!GITHUB_SHA) { - throw new Error('GITHUB_SHA is not set'); - } - if (!GITHUB_TOKEN) { - throw new Error('GITHUB_TOKEN is not set'); - } - - const octokit = new Octokit({ auth: GITHUB_TOKEN }); - - const rootPath = path.resolve(__dirname, '..'); - const { version: currentVersion } = await fs.readJson( - path.join(rootPath, 'package.json'), - ); - - const tagName = `v${currentVersion}`; - - console.log(`Creating release tag ${tagName}`); +async function getCurrentReleaseTag() { + const rootPath = path.resolve(__dirname, '../package.json'); + return fs.readJson(rootPath).then(_ => _.version); +} +async function createGitTag(octokit, commitSha, tagName) { const annotatedTag = await octokit.git.createTag({ ...baseOptions, tag: tagName, message: tagName, - object: GITHUB_SHA, + object: commitSha, type: 'commit', }); @@ -69,8 +55,58 @@ async function main() { console.error(`Tag creation for ${tagName} failed`); throw ex; } +} + +async function dispatchReleaseWorkflows(octokit, releaseVersion) { + console.log('Dispatching release manifest sync'); + await octokit.actions.createWorkflowDispatch({ + owner: 'backstage', + repo: 'backstage', + workflow_id: 'sync_release-manifest.yml', + ref: 'master', + inputs: { + version: releaseVersion, + }, + }); + + console.log('Dispatching upgrade helper sync'); + await octokit.actions.createWorkflowDispatch({ + owner: 'backstage', + repo: 'upgrade-helper-diff', + workflow_id: 'release.yml', + ref: 'master', + inputs: { + // TODO(Rugvip): Switch this over to use the release version once it's ready + version: require('../packages/create-app/package.json').version, + }, + }); +} + +async function main() { + const shouldDispatch = process.argv.includes('--dispatch-workflows'); + + if (!process.env.GITHUB_SHA) { + throw new Error('GITHUB_SHA is not set'); + } + if (!process.env.GITHUB_TOKEN) { + throw new Error('GITHUB_TOKEN is not set'); + } + + const commitSha = process.env.GITHUB_SHA; + const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); + + const releaseVersion = await getCurrentReleaseTag(); + const tagName = `v${releaseVersion}`; + + console.log(`Creating release tag ${tagName} at ${commitSha}`); + await createGitTag(octokit, commitSha, tagName); console.log(`::set-output name=tag_name::${tagName}`); + + if (shouldDispatch) { + console.log(`Dispatching release workflows for ${tagName}`); + await dispatchReleaseWorkflows(octokit, releaseVersion); + } } main().catch(error => { From 17182f82aeac47bec96ec2da6a310465efa81bb6 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Wed, 2 Feb 2022 15:49:31 +0000 Subject: [PATCH 128/473] remove undefined option for optional param Signed-off-by: Brian Fletcher --- plugins/scaffolder/src/components/Router.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder/src/components/Router.tsx b/plugins/scaffolder/src/components/Router.tsx index f41ee853f8..e7c93cebbb 100644 --- a/plugins/scaffolder/src/components/Router.tsx +++ b/plugins/scaffolder/src/components/Router.tsx @@ -34,7 +34,7 @@ type RouterProps = { TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta2 }> | undefined; - TaskPageComponent?: ComponentType<{}> | undefined; + TaskPageComponent?: ComponentType<{}>; groups?: Array<{ title?: string; titleComponent?: React.ReactNode; From 18317a08db865ad88285e747d8ca002b38ae633e Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Wed, 2 Feb 2022 19:00:32 +0100 Subject: [PATCH 129/473] Do not add 'copy to clipboard' buttons to plain-old code instances. (#9314) --- .changeset/techdocs-not-that-many-copies.md | 5 ++++ .../transformers/copyToClipboard.test.ts | 23 ++++++++++++++++++- .../reader/transformers/copyToClipboard.ts | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .changeset/techdocs-not-that-many-copies.md diff --git a/.changeset/techdocs-not-that-many-copies.md b/.changeset/techdocs-not-that-many-copies.md new file mode 100644 index 0000000000..f0507a8157 --- /dev/null +++ b/.changeset/techdocs-not-that-many-copies.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Fixed a bug where copy-to-clipboard buttons were appended to unintended elements. diff --git a/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts b/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts index 679121d9bd..daa074f6e4 100644 --- a/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts +++ b/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts @@ -32,7 +32,7 @@ describe('copyToClipboard', () => { - ${expectedClipboard} +
${expectedClipboard}
`, @@ -46,4 +46,25 @@ describe('copyToClipboard', () => { expect(clipboardSpy).toHaveBeenCalledWith(expectedClipboard); }); + + it('only gets applied to code blocks', async () => { + const expectedClipboard = 'function foo() {return "bar";}'; + const shadowDom = await createTestShadowDom( + ` + + + + ${expectedClipboard} + + + `, + { + preTransformers: [], + postTransformers: [copyToClipboard()], + }, + ); + + const copyButton = shadowDom.querySelector('button'); + expect(copyButton).toBe(null); + }); }); diff --git a/plugins/techdocs/src/reader/transformers/copyToClipboard.ts b/plugins/techdocs/src/reader/transformers/copyToClipboard.ts index 24b46c0b85..d0569c0fd9 100644 --- a/plugins/techdocs/src/reader/transformers/copyToClipboard.ts +++ b/plugins/techdocs/src/reader/transformers/copyToClipboard.ts @@ -22,7 +22,7 @@ import type { Transformer } from './transformer'; */ export const copyToClipboard = (): Transformer => { return dom => { - Array.from(dom.querySelectorAll('code')).forEach(codeElem => { + Array.from(dom.querySelectorAll('pre > code')).forEach(codeElem => { const button = document.createElement('button'); const toBeCopied = codeElem.textContent || ''; button.className = 'md-clipboard md-icon'; From e1d0e228a2d7d900eb417f5e563523f65114d356 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Wed, 2 Feb 2022 15:22:08 -0600 Subject: [PATCH 130/473] Minor change for Vale Signed-off-by: Andre Wanlin --- .changeset/ninety-brooms-lay.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/ninety-brooms-lay.md b/.changeset/ninety-brooms-lay.md index 4db03bcabc..6b85fd4fcb 100644 --- a/.changeset/ninety-brooms-lay.md +++ b/.changeset/ninety-brooms-lay.md @@ -2,4 +2,4 @@ '@backstage/plugin-org': patch --- -The description from `metadata.description` will now show as the subheader on the UserProfileCard in the same way as the GroupProfileCard +The description from `metadata.description` will now show as the `subheader` on the UserProfileCard in the same way as the GroupProfileCard From 22d05f1ca72621def9a5f21c579efc7e4cb480f7 Mon Sep 17 00:00:00 2001 From: Damon Kaswell Date: Wed, 2 Feb 2022 14:07:54 -0800 Subject: [PATCH 131/473] Add HP Inc to list of adopters Signed-off-by: Damon Kaswell --- ADOPTERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ADOPTERS.md b/ADOPTERS.md index 566b614af3..d9ede06365 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -86,3 +86,4 @@ | [Hopin](https://hopin.com) | [Vladimir Glafirov](https://github.com/vglafirov), [Chloe Lee](https://github.com/msfuko) | Developer portal to streamline the development practices. Integrated with service catalog, software templates, application monitoring, tech docs and plugins. | | [HBO Max](https://hbomax.com) | [@mdb](https://github.com/mdb), [@nesta219](https://github.com/nesta219), [@nmische](https://github.com/nmische), [@hbomark](https://github.com/hbomark) | Developer portal hosting service catalog and API documentation, as well as cloud infrastructure details, operational visibility tools, and a custom plugin for browsing notable platform change events, such as deployments and configuration updates. | | [RCHLO](https://www.riachuelo.com.br) & [MIDWAY](https://www.midway.com.br) | [@marcosborges](https://github.com/marcosborges), [@defaultbr](https://github.com/defaultbr) | Self-Service Platform | +| [HP Inc](https://www.hp.com) | [Damon Kaswell](https://github.com/dekoding) | DevEx engagement hub (dev portal: docs, standards, Q&A) and extensive assets catalog (APIs, services, code, data, etc.) for the pan-HP internal developer community. From 36cf0bf6e0bb5133146ccd0a6ed842ce59a32d4d Mon Sep 17 00:00:00 2001 From: Gabriel Dantas Date: Wed, 2 Feb 2022 20:43:37 -0300 Subject: [PATCH 132/473] update document Signed-off-by: Gabriel Dantas --- docs/deployment/heroku.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/deployment/heroku.md b/docs/deployment/heroku.md index 42ab817b30..0226719a12 100644 --- a/docs/deployment/heroku.md +++ b/docs/deployment/heroku.md @@ -18,11 +18,10 @@ First, install the $ heroku login ``` -Heroku runs a container registry on `registry.heroku.com`. To push Backstage -Docker images, log in to the container registry also: +If you have not yet created a project through the Heroku interface, you can create it through the CLI. ```shell -$ heroku container:login +$ heroku create ``` You _might_ also need to set your Heroku app's stack to `container`: @@ -31,13 +30,44 @@ You _might_ also need to set your Heroku app's stack to `container`: $ heroku stack:set container -a ``` +Configuring your app-config.yaml: + +```yaml +app: + # Should be the same as backend.baseUrl when using the `app-backend` plugin + baseUrl: https://.herokuapp.com + + +backend: + baseUrl: https://.herokuapp.com + listen: + port: + $env: PORT + # The $PORT environment variable is a feature of Heroku + # https://devcenter.heroku.com/articles/dynos#web-dynos +``` + +> Make sure your file is being copied into your container in the Dockerfile. + +Before building the Docker image, run the [backstage host build commands](https://backstage.io/docs/deployment/docker#host-build). They must be run whenever you are going to publish a new image. + +Heroku runs a container registry on `registry.heroku.com`. To push Backstage +Docker images, log in to the container registry also: + +```shell +$ heroku container:login +``` + ## Push and deploy a Docker image Now we can push a Backstage [Docker image](docker.md) to Heroku's container registry and release it to the `web` worker: ```bash -$ heroku container:push web -a +$ docker image build . -f packages/backend/Dockerfile --tag registry.heroku.com//web + +$ docker push registry.heroku.com//web + $ heroku container:release web -a ``` From 5b7b5da05962123c30d8c3a216f6cb09393558e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 04:05:45 +0000 Subject: [PATCH 133/473] chore(deps): bump graphql-tag from 2.12.4 to 2.12.6 Bumps [graphql-tag](https://github.com/apollographql/graphql-tag) from 2.12.4 to 2.12.6. - [Release notes](https://github.com/apollographql/graphql-tag/releases) - [Changelog](https://github.com/apollographql/graphql-tag/blob/main/CHANGELOG.md) - [Commits](https://github.com/apollographql/graphql-tag/commits) --- updated-dependencies: - dependency-name: graphql-tag dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63df6569f0..b7b7f9a6a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13114,9 +13114,9 @@ graphql-sse@^1.0.1: integrity sha512-y2mVBN2KwNrzxX2KBncQ6kzc6JWvecxuBernrl0j65hsr6MAS3+Yn8PTFSOgRmtolxugepxveyZVQEuaNEbw3w== graphql-tag@^2.11.0: - version "2.12.4" - resolved "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.4.tgz#d34066688a4f09e72d6f4663c74211e9b4b7c4bf" - integrity sha512-VV1U4O+9x99EkNpNmCUV5RZwq6MnK4+pGbRYWG+lA/m3uo7TSqJF81OkcOP148gFP6fzdl7JWYBrwWVTS9jXww== + version "2.12.6" + resolved "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1" + integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg== dependencies: tslib "^2.1.0" @@ -23620,12 +23620,7 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@~2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" - integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== - -tslib@^2.3.0: +tslib@^2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@~2.3.0: version "2.3.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== From e2b970573d1efc3fca1aed9bebc010dc2c2987d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 04:16:52 +0000 Subject: [PATCH 134/473] chore(deps): bump immer from 9.0.7 to 9.0.12 Bumps [immer](https://github.com/immerjs/immer) from 9.0.7 to 9.0.12. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](https://github.com/immerjs/immer/compare/v9.0.7...v9.0.12) --- updated-dependencies: - dependency-name: immer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63df6569f0..c8ef07bbcf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13727,9 +13727,9 @@ ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0: integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== immer@^9.0.1, immer@^9.0.7: - version "9.0.7" - resolved "https://registry.npmjs.org/immer/-/immer-9.0.7.tgz#b6156bd7db55db7abc73fd2fdadf4e579a701075" - integrity sha512-KGllzpbamZDvOIxnmJ0jI840g7Oikx58lBPWV0hUh7dtAyZpFqqrBZdKka5GlTwMTZ1Tjc/bKKW4VSFAt6BqMA== + version "9.0.12" + resolved "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20" + integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== immutable@^3.x.x: version "3.8.2" From 7a38eb86429273c0818795cb5804dd59cd3991e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 04:18:28 +0000 Subject: [PATCH 135/473] chore(deps-dev): bump @types/passport-google-oauth20 Bumps [@types/passport-google-oauth20](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/passport-google-oauth20) from 2.0.7 to 2.0.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/passport-google-oauth20) --- updated-dependencies: - dependency-name: "@types/passport-google-oauth20" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63df6569f0..b4d8d2f864 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5505,17 +5505,7 @@ "@types/express" "*" "@types/xml2js" "*" -"@types/express@*", "@types/express@^4.17.6": - version "4.17.12" - resolved "https://registry.npmjs.org/@types/express/-/express-4.17.12.tgz#4bc1bf3cd0cfe6d3f6f2853648b40db7d54de350" - integrity sha512-pTYas6FrP15B1Oa0bkN5tQMNqOcVXa9j4FTFtO8DWI9kppKib+6NJtfTOOLcwxuuYvcX2+dVG6et1SxW/Kc17Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.18" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/express@4.17.13": +"@types/express@*", "@types/express@4.17.13", "@types/express@^4.17.6": version "4.17.13" resolved "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz#a76e2995728999bab51a33fabce1d705a3709034" integrity sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA== @@ -5939,9 +5929,9 @@ "@types/passport-oauth2" "*" "@types/passport-google-oauth20@^2.0.3": - version "2.0.7" - resolved "https://registry.npmjs.org/@types/passport-google-oauth20/-/passport-google-oauth20-2.0.7.tgz#0d97b7a886a0c0d2158682145cd949b29f8efe86" - integrity sha512-0HPVSqDmOWk5fRLb+bqGal+6iWsERiEco/Mli77yy5NEy22IfkoRoqZTSZ8UtXDWY9DCZlpS1Jqq56iWx2torw== + version "2.0.11" + resolved "https://registry.npmjs.org/@types/passport-google-oauth20/-/passport-google-oauth20-2.0.11.tgz#271ec71de3030a3e1c004b24e633e4b298ccba97" + integrity sha512-9XMT1GfwhZL7UQEiCepLef55RNPHkbrCtsU7rsWPTEOsmu5qVIW8nSemtB4p+P24CuOhA+IKkv8LsPThYghGww== dependencies: "@types/express" "*" "@types/passport" "*" From c9505f1cf4bfc355a7ae7fdfb7c8597008e52f65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 04:19:53 +0000 Subject: [PATCH 136/473] chore(deps): bump keyv from 4.0.5 to 4.1.0 Bumps [keyv](https://github.com/jaredwray/keyv) from 4.0.5 to 4.1.0. - [Release notes](https://github.com/jaredwray/keyv/releases) - [Commits](https://github.com/jaredwray/keyv/commits) --- updated-dependencies: - dependency-name: keyv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63df6569f0..bef62d6e69 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15756,9 +15756,9 @@ keyv@^3.0.0: json-buffer "3.0.0" keyv@^4.0.0, keyv@^4.0.3: - version "4.0.5" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.0.5.tgz#bb12b467aba372fab2a44d4420c00d3c4ebd484c" - integrity sha512-531pkGLqV3BMg0eDqqJFI0R1mkK1Nm5xIP2mM6keP5P8WfFtCkg2IOwplTUmlGoTgIg9yQYZ/kdihhz89XH3vA== + version "4.1.0" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.1.0.tgz#8ab5ca4ae6a34e05c629531d9a7f871575af0d5b" + integrity sha512-YsY3wr6HabE11/sscee+3nZ03XjvkrPWGouAmJFBdZoK92wiOlJCzI5/sDEIKdJhdhHO144ei45U9gXfbu14Uw== dependencies: json-buffer "3.0.1" From 38ddee40b4a4bf02e9ca97f6ce4e63d78aa8c006 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 04:35:16 +0000 Subject: [PATCH 137/473] chore(deps-dev): bump @storybook/react in /storybook Bumps [@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/app/react) from 6.4.17 to 6.4.18. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.18/app/react) --- updated-dependencies: - dependency-name: "@storybook/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 397 +++++++++++++++++++++++++++-------------- 2 files changed, 264 insertions(+), 135 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 13c3c310df..30b1c52f10 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -20,7 +20,7 @@ "@storybook/addon-links": "^6.4.17", "@storybook/addon-storysource": "^6.4.17", "@storybook/addons": "^6.4.14", - "@storybook/react": "^6.4.17", + "@storybook/react": "^6.4.18", "storybook-dark-mode": "^1.0.8" }, "peerDependencies": { diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 17c00cb3a7..86b7f739f6 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1394,7 +1394,7 @@ react-syntax-highlighter "^13.5.3" regenerator-runtime "^0.13.7" -"@storybook/addons@6.4.17", "@storybook/addons@^6.4.14": +"@storybook/addons@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.17.tgz#d040db3ddcf72fd9e7df8b8fce2a6dc88578c87e" integrity sha512-C/hji0Bc7+tssGqaD0JYd/Pz0GM46xbRpdgHSVLInYdhJrb5a9IG6INCbcB8CXeReDKWJCLAaj2+z79Wa96bFQ== @@ -1411,6 +1411,23 @@ global "^4.4.0" regenerator-runtime "^0.13.7" +"@storybook/addons@6.4.18", "@storybook/addons@^6.4.14": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.18.tgz#fc92a4a608680f2e182a5e896ed382792f6b774e" + integrity sha512-fd3S79P4jJCYZNA2JxA1Xnkj0UlHGQ4Vg72aroWy4OQFlgGQor1LgPfM6RaJ9rh/4k4BXYPXsS7wzI0UWKG3Lw== + dependencies: + "@storybook/api" "6.4.18" + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" + "@storybook/csf" "0.0.2--canary.87bc651.0" + "@storybook/router" "6.4.18" + "@storybook/theming" "6.4.18" + "@types/webpack-env" "^1.16.0" + core-js "^3.8.2" + global "^4.4.0" + regenerator-runtime "^0.13.7" + "@storybook/api@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.17.tgz#82c3d756c85a65ecd8a3c3d9ce890e581175003a" @@ -1434,10 +1451,33 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/builder-webpack4@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/builder-webpack4/-/builder-webpack4-6.4.17.tgz#ad71aaa0a271941e2efe114d5bf7bc8feaa13dcf" - integrity sha512-jE1JehWj5gjLwafGuvV1OyBFVVhBCvv6ESc3QPm+jrsf4ZyB9xliTsnPt3bDggQhWpTEbxgGw7IkVc83ss4AOw== +"@storybook/api@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.18.tgz#92da2b69aeec712419bec9bab5c8434ff1776e97" + integrity sha512-tSbsHKklBysuSmw4T+cKzMj6mQh/42m9F8+2iJns2XG/IUKpMAzFg/9dlgCTW+ay6dJwsR79JGIc9ccIe4SMgQ== + dependencies: + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" + "@storybook/csf" "0.0.2--canary.87bc651.0" + "@storybook/router" "6.4.18" + "@storybook/semver" "^7.3.2" + "@storybook/theming" "6.4.18" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + store2 "^2.12.0" + telejson "^5.3.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/builder-webpack4@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/builder-webpack4/-/builder-webpack4-6.4.18.tgz#8bae72b9e982d35a5a9f2b7f9af9d85a9c2dc966" + integrity sha512-N/OGjTnc7CpVoDnfoI49uMjAIpGqh2lWHFYNIWaUoG1DNnTt1nCc49hw9awjFc5KgaYOwJmVg1SYYE8Afssu+Q== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -1460,22 +1500,22 @@ "@babel/preset-env" "^7.12.11" "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" - "@storybook/addons" "6.4.17" - "@storybook/api" "6.4.17" - "@storybook/channel-postmessage" "6.4.17" - "@storybook/channels" "6.4.17" - "@storybook/client-api" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/components" "6.4.17" - "@storybook/core-common" "6.4.17" - "@storybook/core-events" "6.4.17" - "@storybook/node-logger" "6.4.17" - "@storybook/preview-web" "6.4.17" - "@storybook/router" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/api" "6.4.18" + "@storybook/channel-postmessage" "6.4.18" + "@storybook/channels" "6.4.18" + "@storybook/client-api" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/components" "6.4.18" + "@storybook/core-common" "6.4.18" + "@storybook/core-events" "6.4.18" + "@storybook/node-logger" "6.4.18" + "@storybook/preview-web" "6.4.18" + "@storybook/router" "6.4.18" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.4.17" - "@storybook/theming" "6.4.17" - "@storybook/ui" "6.4.17" + "@storybook/store" "6.4.18" + "@storybook/theming" "6.4.18" + "@storybook/ui" "6.4.18" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" autoprefixer "^9.8.6" @@ -1509,26 +1549,26 @@ webpack-hot-middleware "^2.25.1" webpack-virtual-modules "^0.2.2" -"@storybook/channel-postmessage@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.4.17.tgz#9f439bee440479bfe8f86092701b3b63afc5195a" - integrity sha512-IaVkO/w7bn95Psm1iROlSsc/DHh9RiA7F151VLFD9VTh55qiIfeRssfBXIg3ueGUWm0K+Y9J1jQbcqJoEniMtw== +"@storybook/channel-postmessage@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.4.18.tgz#24547fe7cee599969fd62df22142ba7046099a8e" + integrity sha512-SKapUREPkqzKoBMpOJrZddE9PCR8CJkPTcDpjDqcRsTvToRWsux3pvzmuW4iGYnHNh+GQml7Rz9x85WfMIpfyQ== dependencies: - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" core-js "^3.8.2" global "^4.4.0" qs "^6.10.0" telejson "^5.3.2" -"@storybook/channel-websocket@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/channel-websocket/-/channel-websocket-6.4.17.tgz#780cc68bb3a31069196b35a232013764cc2320a3" - integrity sha512-HtApo/3upDvxSl6VU04F/JznMIltUHeyEqaQNlkqJbQ1VQEHky/M/XJZWT4I/b+nGMXCt0+z0P0ikZ6VZKzFsw== +"@storybook/channel-websocket@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/channel-websocket/-/channel-websocket-6.4.18.tgz#cf3a03e88b983c2953cb76a40a964806790567c4" + integrity sha512-ROqNZAFB1gP9u8dmlM4KxykXHsd1ifunBgFY3ncQKeRi2Oh30OMVB2ZhNdoIF8i8X5ZBwSpId1o6nQhL2e/EJA== dependencies: - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" core-js "^3.8.2" global "^4.4.0" telejson "^5.3.2" @@ -1542,18 +1582,27 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-api@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.4.17.tgz#34476732eb4a698e7dcc774a21feca4529581889" - integrity sha512-qK8Bvsr2KzndAu8RxbBrieNUCltO/ynwtAohJ/29hAg/duf94CZjN0HkuTpQmd4lDip11d9o4Fz5UBWC0zMyOw== +"@storybook/channels@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.4.18.tgz#2907aca0039b5eb9ae305112f14c488c2621c2f6" + integrity sha512-Bh4l7VKKR2ImLbZ9XgL/DzT3lFv9+SLiCu1ozfpBZGHUCOLyHRnkG/h8wYvRkF9s3tpNwOtaCaqD1vkkZfr3uw== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/channel-postmessage" "6.4.17" - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" + core-js "^3.8.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/client-api@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.4.18.tgz#61c7c90f3f099e4d3bcc36576d2adbe2e5ef6eee" + integrity sha512-ua2Q692Fz2b3q5M/Qzjixg2LArwrcHGBmht06bNw/jrRfyFeTUHOhh5BT7LxSEetUgHATH/Y1GW40xza9rXFNw== + dependencies: + "@storybook/addons" "6.4.18" + "@storybook/channel-postmessage" "6.4.18" + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/store" "6.4.17" + "@storybook/store" "6.4.18" "@types/qs" "^6.9.5" "@types/webpack-env" "^1.16.0" core-js "^3.8.2" @@ -1576,6 +1625,14 @@ core-js "^3.8.2" global "^4.4.0" +"@storybook/client-logger@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.4.18.tgz#4ad8ea7d67b17e5db8f15cffcc2f984df3479462" + integrity sha512-ciBaASMaB2ZPksbuyDbp3++5SZxbhcihEpl+RQcAVV8g+TUyBZKIcHt8HNHicTczz5my1EydZovMh1IkSBMICA== + dependencies: + core-js "^3.8.2" + global "^4.4.0" + "@storybook/components@6.4.17": version "6.4.17" resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.17.tgz#5be383682d9538c35c96463723cb17740f105fb6" @@ -1606,21 +1663,51 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/core-client@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/core-client/-/core-client-6.4.17.tgz#baff9629a0723f9485d608c00357d45921a78a0d" - integrity sha512-uXO+DW5XI6fWLtQIBIBlBFeYGsy2qZEe3lxxXwBHwIjsDq53/1CmhEPuzC3jAsy5ddeKC2yEEHUdy3d3wkusIQ== +"@storybook/components@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.18.tgz#1f3eba9ab69a09b9468af0126d6e7ab040655ca4" + integrity sha512-LAPKYWgB6S10Vzt0IWa1Ihf9EAuQOGxlqehTuxYLOwMOKbto8iEbGRse/XaQfxdZf/RbmOL4u+7nVRROWgOEjg== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/channel-postmessage" "6.4.17" - "@storybook/channel-websocket" "6.4.17" - "@storybook/client-api" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" + "@popperjs/core" "^2.6.0" + "@storybook/client-logger" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/preview-web" "6.4.17" - "@storybook/store" "6.4.17" - "@storybook/ui" "6.4.17" + "@storybook/theming" "6.4.18" + "@types/color-convert" "^2.0.0" + "@types/overlayscrollbars" "^1.12.0" + "@types/react-syntax-highlighter" "11.0.5" + color-convert "^2.0.1" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + markdown-to-jsx "^7.1.3" + memoizerific "^1.11.3" + overlayscrollbars "^1.13.1" + polished "^4.0.5" + prop-types "^15.7.2" + react-colorful "^5.1.2" + react-popper-tooltip "^3.1.1" + react-syntax-highlighter "^13.5.3" + react-textarea-autosize "^8.3.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/core-client@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/core-client/-/core-client-6.4.18.tgz#7f2feb961864dcf6de501a94a41900fd36b43657" + integrity sha512-F9CqW31Mr9Qde90uqPorpkiS+P7UteKYmdHlV0o0czeWaL+MEhpY+3pRJuRIIjX5C7Vc89TvljMqs37Khakmdg== + dependencies: + "@storybook/addons" "6.4.18" + "@storybook/channel-postmessage" "6.4.18" + "@storybook/channel-websocket" "6.4.18" + "@storybook/client-api" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" + "@storybook/csf" "0.0.2--canary.87bc651.0" + "@storybook/preview-web" "6.4.18" + "@storybook/store" "6.4.18" + "@storybook/ui" "6.4.18" airbnb-js-shims "^2.2.1" ansi-to-html "^0.6.11" core-js "^3.8.2" @@ -1632,10 +1719,10 @@ unfetch "^4.2.0" util-deprecate "^1.0.2" -"@storybook/core-common@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/core-common/-/core-common-6.4.17.tgz#bd2b14cfd1473f5f31f40c747afb62ea4a4ada6e" - integrity sha512-aOSG5Yvd8eoZsjvVlk7sS8iRXWT/dleHoHPXtKmHJnGcIZ1dcgr4wZqoOvL8dGhNNoU4Wx9dkJepqHD0+E/UgA== +"@storybook/core-common@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/core-common/-/core-common-6.4.18.tgz#0688a0a4a80cdbc161966c5a7ff49e755d64bbab" + integrity sha512-y4e43trNyQ3/v0Wpi240on7yVooUQvJBhJxOGEfcxAMRtcDa0ZCxHO4vAFX3k3voQOSmiXItXfJ1eGo/K+u0Fw== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -1658,7 +1745,7 @@ "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" "@babel/register" "^7.12.1" - "@storybook/node-logger" "6.4.17" + "@storybook/node-logger" "6.4.18" "@storybook/semver" "^7.3.2" "@types/node" "^14.0.10" "@types/pretty-hrtime" "^1.0.0" @@ -1694,22 +1781,29 @@ dependencies: core-js "^3.8.2" -"@storybook/core-server@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/core-server/-/core-server-6.4.17.tgz#16f31635565c19248a45a793a7c2150597f3a4cc" - integrity sha512-wXYF4VD2EJ/6uFK+wAo/TgUyfD/lfMzzbAw2gBZAjYp7y7Zwj3svGqUfkFuPQG0/E9gmQfEmlyhTPPZImBFeBg== +"@storybook/core-events@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.4.18.tgz#630a19425eb387c6134f29b967c30458c65f7ea8" + integrity sha512-lCT3l0rFs6CuVpD8+mwmj1lUTomGErySTxi0KmVd2AWQj8kJL90EfS0jHSU5JIXScDvuwXDXLLmvMfqNU+zHdg== + dependencies: + core-js "^3.8.2" + +"@storybook/core-server@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/core-server/-/core-server-6.4.18.tgz#520935f7f330a734488e733ad4cf15a9556679b5" + integrity sha512-7e2QUtD8/TE14P9X/xsBDMBbNVi/etTtMKKhsG2TG25daRz+6qadbM9tNP0YwvIDk452cNYJkjflV48mf5+ZEA== dependencies: "@discoveryjs/json-ext" "^0.5.3" - "@storybook/builder-webpack4" "6.4.17" - "@storybook/core-client" "6.4.17" - "@storybook/core-common" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/builder-webpack4" "6.4.18" + "@storybook/core-client" "6.4.18" + "@storybook/core-common" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/csf-tools" "6.4.17" - "@storybook/manager-webpack4" "6.4.17" - "@storybook/node-logger" "6.4.17" + "@storybook/csf-tools" "6.4.18" + "@storybook/manager-webpack4" "6.4.18" + "@storybook/node-logger" "6.4.18" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.4.17" + "@storybook/store" "6.4.18" "@types/node" "^14.0.10" "@types/node-fetch" "^2.5.7" "@types/pretty-hrtime" "^1.0.0" @@ -1742,18 +1836,18 @@ webpack "4" ws "^8.2.3" -"@storybook/core@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/core/-/core-6.4.17.tgz#61892e2eb484a44fc9d69515c3068b1f64173327" - integrity sha512-wquJcEebw9kXJ7pThcmEsDNK0ykd3ir0uL5tkBzPGNIj7dozpzy24Fo9JSr0rNWHNtE7JczdIAQTcumowLTDig== +"@storybook/core@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/core/-/core-6.4.18.tgz#56f7bb0f20dbcfa205d860022b7bf30bf42fd472" + integrity sha512-7DTMAEXiBIwd1jgalbsZiXCiS2Be9MKKsr6GQdf3WaBm0WYV067oN9jcUY5IgNtJX06arT4Ykp+CGG/TR+sLlw== dependencies: - "@storybook/core-client" "6.4.17" - "@storybook/core-server" "6.4.17" + "@storybook/core-client" "6.4.18" + "@storybook/core-server" "6.4.18" -"@storybook/csf-tools@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/csf-tools/-/csf-tools-6.4.17.tgz#e7d2b9de95317d706657c294d7beee1d7b307ec4" - integrity sha512-GnaO1dX4wTvMKBthbbHLHcrDTXwZ7PooZmT1fTCeokzaobZzyv1cUtF1hlPQa3zA75kRE5AznJ0jmBVhHe0/9Q== +"@storybook/csf-tools@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/csf-tools/-/csf-tools-6.4.18.tgz#cdd40b543f9bea79c1481c236868b8ea04af6bd7" + integrity sha512-KtwxKrkndEyvyAiBliI6m4yMFMvnyI4fOjU8t1qCit/0gjutOF5JxmmZ+H8FSI5dIyibEOzQmzHe0MyStAjCEQ== dependencies: "@babel/core" "^7.12.10" "@babel/generator" "^7.12.11" @@ -1780,20 +1874,20 @@ dependencies: lodash "^4.17.15" -"@storybook/manager-webpack4@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/manager-webpack4/-/manager-webpack4-6.4.17.tgz#8fc6d5dba0587446defe78ced67b7033886c4c47" - integrity sha512-ekHudBR8FVSE475YQZZs9sqwou7YqFv03hNVOcvIJ36cZBgMbSkG8q50cK4uru2xCOedTK15SKIoFZQQ77cmQQ== +"@storybook/manager-webpack4@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/manager-webpack4/-/manager-webpack4-6.4.18.tgz#5317c917dbdaf4cf8721647551a785eb13c04146" + integrity sha512-6oX1KrIJBoY4vdZiMftJNusv+Bm8pegVjdJ+aZcbr/41x7ufP3tu5UKebEXDH0UURXtLw0ffl+OgojewGdpC1Q== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-template-literals" "^7.12.1" "@babel/preset-react" "^7.12.10" - "@storybook/addons" "6.4.17" - "@storybook/core-client" "6.4.17" - "@storybook/core-common" "6.4.17" - "@storybook/node-logger" "6.4.17" - "@storybook/theming" "6.4.17" - "@storybook/ui" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/core-client" "6.4.18" + "@storybook/core-common" "6.4.18" + "@storybook/node-logger" "6.4.18" + "@storybook/theming" "6.4.18" + "@storybook/ui" "6.4.18" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" babel-loader "^8.0.0" @@ -1822,10 +1916,10 @@ webpack-dev-middleware "^3.7.3" webpack-virtual-modules "^0.2.2" -"@storybook/node-logger@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.4.17.tgz#14fe3091b2030413c2f43f0de3e9408b27591d9c" - integrity sha512-gymFKjmOdi9fAJCaM4C8I/5Go4hPsOAcVNixpjAQYsvNQQZ1Yjm2zcSdD+QOuLJ36NTxgOFxT4ESbC2AfSjyqA== +"@storybook/node-logger@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.4.18.tgz#8759761ba7526b2fa03a1a08fe82d6d892d7a072" + integrity sha512-wY1qt4XOXtJJdQ+DrO3RijtiwVFqWuWetvCY4RV4lge5yk0FP5Q+MTpmjazYodAvGPUIP0LK9bvEDLwXa0JUfw== dependencies: "@types/npmlog" "^4.1.2" chalk "^4.1.0" @@ -1833,17 +1927,17 @@ npmlog "^5.0.1" pretty-hrtime "^1.0.3" -"@storybook/preview-web@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/preview-web/-/preview-web-6.4.17.tgz#d29bbfa8f66428ef5e2202c4c364c1892d8cbf7b" - integrity sha512-fJIE/LO7I09w334AH71ojRpIiHLQrBUidkZlIQbjEmHn/GZBTePlf3CevrERA12FbCLoUbeS5nadk2dEg6YnUw== +"@storybook/preview-web@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/preview-web/-/preview-web-6.4.18.tgz#47c908bf27d2089ccf3296c376a6f5b1e8674b5a" + integrity sha512-0x64uLdGhIOk9hIuRKTHFdP7+iEHyjAOi5U4jtwqFfDtG4n4zxEGSsUWij7pTR2rAYf7g2NWIbAM7qb1AqqcLQ== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/channel-postmessage" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/channel-postmessage" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/store" "6.4.17" + "@storybook/store" "6.4.18" ansi-to-html "^0.6.11" core-js "^3.8.2" global "^4.4.0" @@ -1868,22 +1962,22 @@ react-docgen-typescript "^2.0.0" tslib "^2.0.0" -"@storybook/react@^6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/react/-/react-6.4.17.tgz#c12f22c3365d4213c662bf1e26520e72c68b0c33" - integrity sha512-hAMEyMcWC5fEdzXOYr0S9/QHclXbbJpl7Vl9dd56wxbHx4FFwcJ7R5hroLntPsHXU+rGTF9/EqehmEa/Jd0l4w== +"@storybook/react@^6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/react/-/react-6.4.18.tgz#22624af56a9873c6616b5dc6a1e30c968bac95d2" + integrity sha512-dKxwsvJEGTm/aNIJSJMI4MImsI4EhmBa42FtwVvtFkrokuMf2CsmTJsaaAh+1or9SKGTiFuGsYDGhX5joE3XUQ== dependencies: "@babel/preset-flow" "^7.12.1" "@babel/preset-react" "^7.12.10" "@pmmmwh/react-refresh-webpack-plugin" "^0.5.1" - "@storybook/addons" "6.4.17" - "@storybook/core" "6.4.17" - "@storybook/core-common" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/core" "6.4.18" + "@storybook/core-common" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/node-logger" "6.4.17" + "@storybook/node-logger" "6.4.18" "@storybook/react-docgen-typescript-plugin" "1.0.2-canary.253f8c1.0" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.4.17" + "@storybook/store" "6.4.18" "@types/webpack-env" "^1.16.0" babel-plugin-add-react-displayname "^0.0.5" babel-plugin-named-asset-import "^0.3.1" @@ -1915,6 +2009,23 @@ react-router-dom "^6.0.0" ts-dedent "^2.0.0" +"@storybook/router@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/router/-/router-6.4.18.tgz#8803dd78277f8602d6c11dae56f6229474dfa54c" + integrity sha512-itvSWHhG1X/NV1sMlwP1qKtF0HfiIaAHImr0LwQ2K2F6/CI11W68dJAs4WBUdwzA0+H0Joyu/2a/6mCQHcee1A== + dependencies: + "@storybook/client-logger" "6.4.18" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + history "5.0.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + qs "^6.10.0" + react-router "^6.0.0" + react-router-dom "^6.0.0" + ts-dedent "^2.0.0" + "@storybook/semver@^7.3.2": version "7.3.2" resolved "https://registry.npmjs.org/@storybook/semver/-/semver-7.3.2.tgz#f3b9c44a1c9a0b933c04e66d0048fcf2fa10dac0" @@ -1939,14 +2050,14 @@ prettier ">=2.2.1 <=2.3.0" regenerator-runtime "^0.13.7" -"@storybook/store@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/store/-/store-6.4.17.tgz#a68b687628b82f8ca0ef2c74f5d65f5a30e94f86" - integrity sha512-0rWk8u7gtzBOp5NvuIrL6abBHaDxax7e+yBPvU9tR0GZ7X0ALhOhJFRIo+lW9sZTUrcuSinOJ8Acyb0ZvnYCkg== +"@storybook/store@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/store/-/store-6.4.18.tgz#3b693c9d5555d5cfc04e2318e104746d9d55ad66" + integrity sha512-Vl5oCs/9fP1gUgfgMHTBsnYbwAAoaR93/bzDBeOHI3eo5x9uzzJtA4zcRmEiKahR/wgwGacpWy90JrIX469PDQ== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" core-js "^3.8.2" fast-deep-equal "^3.1.3" @@ -1978,21 +2089,39 @@ resolve-from "^5.0.0" ts-dedent "^2.0.0" -"@storybook/ui@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/ui/-/ui-6.4.17.tgz#926aa1dbb4d3f9a28afe6edd6a0e5cb667be8e19" - integrity sha512-vBYV8PmvhYgMjjTRLtOHIisGqr1nfajAgOC+wfYvGLbF0npVEt5PfDieG1LTRc1OaItWLpKKJcByqSfL/y9Qow== +"@storybook/theming@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.4.18.tgz#05365cc1d3dab5d71b80a82928fc5188106a0ed6" + integrity sha512-1o0w2eP+8sXUesdtXpZR4Yvayp1h3xvK7l9+wuHh+1uCy+EvD5UI9d1HvU5kt5fw7XAJJcInaVAmyAbpwct0TQ== dependencies: "@emotion/core" "^10.1.1" - "@storybook/addons" "6.4.17" - "@storybook/api" "6.4.17" - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/components" "6.4.17" - "@storybook/core-events" "6.4.17" - "@storybook/router" "6.4.17" + "@emotion/is-prop-valid" "^0.8.6" + "@emotion/styled" "^10.0.27" + "@storybook/client-logger" "6.4.18" + core-js "^3.8.2" + deep-object-diff "^1.1.0" + emotion-theming "^10.0.27" + global "^4.4.0" + memoizerific "^1.11.3" + polished "^4.0.5" + resolve-from "^5.0.0" + ts-dedent "^2.0.0" + +"@storybook/ui@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/ui/-/ui-6.4.18.tgz#3ceaf6b317f8f2c1d7d1cdc49daaac7eaf10af6b" + integrity sha512-f2ckcLvEyA9CRcu6W2I2CyEbUnU4j3h5Nz0N40YZ2uRMVNQY2xPywAFZVySZIJAaum/5phDfnOD0Feap/Q6zVQ== + dependencies: + "@emotion/core" "^10.1.1" + "@storybook/addons" "6.4.18" + "@storybook/api" "6.4.18" + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/components" "6.4.18" + "@storybook/core-events" "6.4.18" + "@storybook/router" "6.4.18" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.4.17" + "@storybook/theming" "6.4.18" copy-to-clipboard "^3.3.1" core-js "^3.8.2" core-js-pure "^3.8.2" From 7e1d0114b797e8934372b0fd187577428f63bde2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 07:39:59 +0000 Subject: [PATCH 138/473] chore(deps-dev): bump @storybook/addon-actions in /storybook Bumps [@storybook/addon-actions](https://github.com/storybookjs/storybook/tree/HEAD/addons/actions) from 6.4.17 to 6.4.18. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.18/addons/actions) --- updated-dependencies: - dependency-name: "@storybook/addon-actions" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 30b1c52f10..44b07a13d1 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@storybook/addon-a11y": "^6.4.17", - "@storybook/addon-actions": "^6.4.17", + "@storybook/addon-actions": "^6.4.18", "@storybook/addon-links": "^6.4.17", "@storybook/addon-storysource": "^6.4.17", "@storybook/addons": "^6.4.14", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 86b7f739f6..64f1eb395b 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1332,17 +1332,17 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-actions@^6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.4.17.tgz#93a8190b07f776ba4670cb7021adc81ff7a094ad" - integrity sha512-8TYdgzJMMKvfHvSp8N3Bsj78xGw9lNHTYkh0IE0TGGwRVOEU6xNBkao6ktXzM3gTB+6U6OZn8Y//NCzLsoTUHg== +"@storybook/addon-actions@^6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.4.18.tgz#e997060e1b0af62f9f831301a56a3addfc1f1365" + integrity sha512-qPw5qfbWPmyOdaXxAVAbdVLVVE31gRrkH0ESUps+FXVNypRz1/0lJ6M2VrtOHMrFbGBl94SALdqsHOx6OYZKwg== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/api" "6.4.17" - "@storybook/components" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/api" "6.4.18" + "@storybook/components" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/theming" "6.4.17" + "@storybook/theming" "6.4.18" core-js "^3.8.2" fast-deep-equal "^3.1.3" global "^4.4.0" From 45fadf1277c2feffd4fb556bab00d8ec55a79859 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Thu, 3 Feb 2022 09:05:54 +0100 Subject: [PATCH 139/473] Changeset: exit prerelease mode Signed-off-by: Johan Haals --- .changeset/pre.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index ab07e0ac65..ece2a49661 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,5 +1,5 @@ { - "mode": "pre", + "mode": "exit", "tag": "next", "initialVersions": { "example-app": "0.2.62", From 548813230188fec9b225eabf1e2e4ea17dab2205 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 08:16:37 +0000 Subject: [PATCH 140/473] chore(deps-dev): bump @storybook/addon-links in /storybook Bumps [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/addons/links) from 6.4.17 to 6.4.18. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.18/addons/links) --- updated-dependencies: - dependency-name: "@storybook/addon-links" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 44b07a13d1..9567eeeea8 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@storybook/addon-a11y": "^6.4.17", "@storybook/addon-actions": "^6.4.18", - "@storybook/addon-links": "^6.4.17", + "@storybook/addon-links": "^6.4.18", "@storybook/addon-storysource": "^6.4.17", "@storybook/addons": "^6.4.14", "@storybook/react": "^6.4.18", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 64f1eb395b..b6c774eedf 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1356,16 +1356,16 @@ util-deprecate "^1.0.2" uuid-browser "^3.1.0" -"@storybook/addon-links@^6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-6.4.17.tgz#83675642669c239c8d3ddaacd75348366e280426" - integrity sha512-ytGEe7sfOW10wwc0NIWSGtNgGM8ql8EOg7ZhrgXiRgQE0vD5NXRJi8FWzBdb06/G3cURYwveKR4Ea9mABZEaUw== +"@storybook/addon-links@^6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-6.4.18.tgz#edb61db6c291056f7d3c64566aea436a6796c50a" + integrity sha512-yIbL57+tV1Ei2b7zTGU/T7muBFByTPm/8IN5SA5tSFYRTR9VtFuvBXco6I9Wz9GLN/REyVa4+AoDahokk7+vPQ== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/router" "6.4.17" + "@storybook/router" "6.4.18" "@types/qs" "^6.9.5" core-js "^3.8.2" global "^4.4.0" From 261decab663f0193aab90be8f414cde9485c1a33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 08:46:36 +0000 Subject: [PATCH 141/473] chore(deps-dev): bump @storybook/addon-a11y in /storybook Bumps [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/addons/a11y) from 6.4.17 to 6.4.18. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.18/addons/a11y) --- updated-dependencies: - dependency-name: "@storybook/addon-a11y" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 9567eeeea8..9f10b9a972 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -15,7 +15,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@storybook/addon-a11y": "^6.4.17", + "@storybook/addon-a11y": "^6.4.18", "@storybook/addon-actions": "^6.4.18", "@storybook/addon-links": "^6.4.18", "@storybook/addon-storysource": "^6.4.17", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index b6c774eedf..d25fdeeead 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1310,19 +1310,19 @@ resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz#830beaec4b4091a9e9398ac50f865ddea52186b9" integrity sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA== -"@storybook/addon-a11y@^6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-6.4.17.tgz#b7efe7f7a52c81392e06efafc34044db784fd3ce" - integrity sha512-uIgl9vJwY4//7i+JEu47Lgi1wOGOskHQ0+H/S8DPGcEMF2xqK/w3BjgSEWa8NPYfYyxkf/yHvCIsa99b/3phUg== +"@storybook/addon-a11y@^6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-6.4.18.tgz#c61f71cd7b17aff408835ee35e29bf4a0716ece7" + integrity sha512-sqsA5pXXKKDsquSXu5KC8WxQ1gg5ZoNIltWRgmJCEt4a0bkGUzn2iz+uW/gbt4NOVWGPXKvmMBLT/q4Q9gb+og== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/api" "6.4.17" - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/components" "6.4.17" - "@storybook/core-events" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/api" "6.4.18" + "@storybook/channels" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/components" "6.4.18" + "@storybook/core-events" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/theming" "6.4.17" + "@storybook/theming" "6.4.18" axe-core "^4.2.0" core-js "^3.8.2" global "^4.4.0" From c8acc4ae4030eaa57a028984350d2afd657bc22c Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Thu, 3 Feb 2022 09:54:07 +0100 Subject: [PATCH 142/473] chore: fix test Signed-off-by: Johan Haals --- plugins/git-release-manager/src/features/Features.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git-release-manager/src/features/Features.test.tsx b/plugins/git-release-manager/src/features/Features.test.tsx index 28bd9b6310..8f9e3544f2 100644 --- a/plugins/git-release-manager/src/features/Features.test.tsx +++ b/plugins/git-release-manager/src/features/Features.test.tsx @@ -55,7 +55,7 @@ describe('Features', () => { expect(getByTestId(TEST_IDS.info.info)).toMatchInlineSnapshot(`
Date: Wed, 2 Feb 2022 18:47:48 -0800 Subject: [PATCH 143/473] Adding VMware to the list of Adopters --- ADOPTERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ADOPTERS.md b/ADOPTERS.md index d9ede06365..8772c27a88 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -87,3 +87,4 @@ | [HBO Max](https://hbomax.com) | [@mdb](https://github.com/mdb), [@nesta219](https://github.com/nesta219), [@nmische](https://github.com/nmische), [@hbomark](https://github.com/hbomark) | Developer portal hosting service catalog and API documentation, as well as cloud infrastructure details, operational visibility tools, and a custom plugin for browsing notable platform change events, such as deployments and configuration updates. | | [RCHLO](https://www.riachuelo.com.br) & [MIDWAY](https://www.midway.com.br) | [@marcosborges](https://github.com/marcosborges), [@defaultbr](https://github.com/defaultbr) | Self-Service Platform | | [HP Inc](https://www.hp.com) | [Damon Kaswell](https://github.com/dekoding) | DevEx engagement hub (dev portal: docs, standards, Q&A) and extensive assets catalog (APIs, services, code, data, etc.) for the pan-HP internal developer community. +| [VMware](https://www.vmware.com) | [@mpriamo](https://github.com/mpriamo), [@krisapplegate](https://github.com/krisapplegate) | Part of [Tanzu Application Platform](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/index.html) offering; internal developer portal | From a12bb7b06520addb638aeb1d47236597f1de216b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 3 Feb 2022 09:42:25 +0000 Subject: [PATCH 144/473] Version Packages --- .changeset/analytics-det-tyckte-inte-jag.md | 6 - .changeset/analytics-station-eleven.md | 6 - .changeset/blue-ligers-allow.md | 5 - .changeset/bright-buttons-rescue.md | 27 -- .changeset/chilled-papayas-wonder.md | 5 - .changeset/cyan-turtles-relax.md | 5 - .changeset/dependabot-2f11dff.md | 5 - .changeset/dependabot-4ce572f.md | 6 - .changeset/dependabot-9ec400d.md | 5 - .changeset/dependabot-f969614.md | 5 - .changeset/early-cooks-brake.md | 5 - .changeset/flat-cars-begin.md | 5 - .changeset/fresh-insects-attack.md | 5 - .changeset/gold-queens-clap.md | 5 - .changeset/grumpy-teachers-remain.md | 5 - .changeset/itchy-bulldogs-dance.md | 10 - .changeset/lemon-jars-teach.md | 6 - .changeset/nasty-pets-glow.md | 5 - .changeset/neat-mangos-study.md | 5 - .changeset/ninety-brooms-lay.md | 5 - .changeset/pre.json | 163 ------------ .changeset/purple-steaks-design.md | 18 -- .changeset/quick-jars-wait.md | 26 -- .changeset/rare-comics-tan.md | 11 - .changeset/sharp-dragons-divide.md | 5 - .changeset/silver-eagles-reply.md | 25 -- .changeset/silver-waves-reflect.md | 5 - .changeset/sour-chairs-double.md | 25 -- .changeset/strong-taxis-refuse.md | 5 - .changeset/swift-carpets-yawn.md | 5 - .changeset/tall-rats-lie.md | 5 - .changeset/tame-ads-exercise.md | 34 --- .changeset/tasty-pandas-design.md | 7 - .changeset/techdocs-funkar-varje-gang.md | 5 - .../techdocs-lets-call-the-whole-thing-off.md | 5 - .changeset/techdocs-not-that-many-copies.md | 5 - .changeset/thirty-houses-juggle.md | 5 - .changeset/tiny-buses-compete.md | 6 - .changeset/twenty-queens-scream.md | 6 - .changeset/weak-oranges-drive.md | 7 - .changeset/witty-lamps-laugh.md | 13 - .changeset/witty-lizards-nail.md | 5 - package.json | 2 +- packages/app-defaults/CHANGELOG.md | 8 + packages/app-defaults/package.json | 10 +- packages/app/CHANGELOG.md | 49 ++++ packages/app/package.json | 90 +++---- packages/backend-common/CHANGELOG.md | 12 + packages/backend-common/package.json | 6 +- packages/backend-tasks/CHANGELOG.md | 7 + packages/backend-tasks/package.json | 8 +- packages/backend-test-utils/CHANGELOG.md | 8 + packages/backend-test-utils/package.json | 8 +- packages/backend/CHANGELOG.md | 32 +++ packages/backend/package.json | 54 ++-- packages/cli/CHANGELOG.md | 7 + packages/cli/package.json | 12 +- packages/codemods/CHANGELOG.md | 8 + packages/codemods/package.json | 2 +- packages/core-app-api/CHANGELOG.md | 8 + packages/core-app-api/package.json | 6 +- packages/core-components/CHANGELOG.md | 10 + packages/core-components/package.json | 8 +- packages/create-app/CHANGELOG.md | 76 ++++++ packages/create-app/package.json | 2 +- packages/dev-utils/CHANGELOG.md | 12 + packages/dev-utils/package.json | 16 +- packages/embedded-techdocs-app/CHANGELOG.md | 14 ++ packages/embedded-techdocs-app/package.json | 20 +- packages/integration-react/CHANGELOG.md | 8 + packages/integration-react/package.json | 10 +- packages/techdocs-cli/CHANGELOG.md | 9 + packages/techdocs-cli/package.json | 8 +- packages/techdocs-common/CHANGELOG.md | 7 + packages/techdocs-common/package.json | 6 +- packages/test-utils/CHANGELOG.md | 7 + packages/test-utils/package.json | 6 +- plugins/airbrake/CHANGELOG.md | 7 + plugins/airbrake/package.json | 14 +- plugins/allure/CHANGELOG.md | 8 + plugins/allure/package.json | 14 +- plugins/analytics-module-ga/CHANGELOG.md | 9 + plugins/analytics-module-ga/package.json | 12 +- plugins/apache-airflow/CHANGELOG.md | 7 + plugins/apache-airflow/package.json | 12 +- plugins/api-docs/CHANGELOG.md | 9 + plugins/api-docs/package.json | 16 +- plugins/app-backend/CHANGELOG.md | 7 + plugins/app-backend/package.json | 8 +- plugins/auth-backend/CHANGELOG.md | 37 +++ plugins/auth-backend/package.json | 8 +- plugins/azure-devops-backend/CHANGELOG.md | 7 + plugins/azure-devops-backend/package.json | 6 +- plugins/azure-devops/CHANGELOG.md | 8 + plugins/azure-devops/package.json | 14 +- plugins/badges-backend/CHANGELOG.md | 7 + plugins/badges-backend/package.json | 6 +- plugins/badges/CHANGELOG.md | 8 + plugins/badges/package.json | 14 +- plugins/bazaar-backend/CHANGELOG.md | 8 + plugins/bazaar-backend/package.json | 8 +- plugins/bazaar/CHANGELOG.md | 10 + plugins/bazaar/package.json | 14 +- plugins/bitrise/CHANGELOG.md | 8 + plugins/bitrise/package.json | 14 +- .../catalog-backend-module-ldap/CHANGELOG.md | 7 + .../catalog-backend-module-ldap/package.json | 6 +- .../CHANGELOG.md | 7 + .../package.json | 10 +- plugins/catalog-backend/CHANGELOG.md | 11 + plugins/catalog-backend/package.json | 14 +- plugins/catalog-common/CHANGELOG.md | 6 + plugins/catalog-common/package.json | 4 +- plugins/catalog-graph/CHANGELOG.md | 8 + plugins/catalog-graph/package.json | 14 +- plugins/catalog-import/CHANGELOG.md | 42 ++++ plugins/catalog-import/package.json | 16 +- plugins/catalog-react/CHANGELOG.md | 18 ++ plugins/catalog-react/package.json | 12 +- plugins/catalog/CHANGELOG.md | 10 + plugins/catalog/package.json | 18 +- plugins/circleci/CHANGELOG.md | 8 + plugins/circleci/package.json | 14 +- plugins/cloudbuild/CHANGELOG.md | 8 + plugins/cloudbuild/package.json | 14 +- plugins/code-coverage-backend/CHANGELOG.md | 7 + plugins/code-coverage-backend/package.json | 6 +- plugins/code-coverage/CHANGELOG.md | 9 + plugins/code-coverage/package.json | 14 +- plugins/config-schema/CHANGELOG.md | 7 + plugins/config-schema/package.json | 12 +- plugins/cost-insights/CHANGELOG.md | 7 + plugins/cost-insights/package.json | 12 +- plugins/explore/CHANGELOG.md | 8 + plugins/explore/package.json | 14 +- plugins/firehydrant/CHANGELOG.md | 8 + plugins/firehydrant/package.json | 14 +- plugins/fossa/CHANGELOG.md | 8 + plugins/fossa/package.json | 14 +- plugins/gcp-projects/CHANGELOG.md | 7 + plugins/gcp-projects/package.json | 12 +- plugins/git-release-manager/CHANGELOG.md | 7 + plugins/git-release-manager/package.json | 12 +- plugins/github-actions/CHANGELOG.md | 8 + plugins/github-actions/package.json | 14 +- plugins/github-deployments/CHANGELOG.md | 9 + plugins/github-deployments/package.json | 16 +- plugins/gitops-profiles/CHANGELOG.md | 7 + plugins/gitops-profiles/package.json | 12 +- plugins/gocd/CHANGELOG.md | 8 + plugins/gocd/package.json | 14 +- plugins/graphiql/CHANGELOG.md | 7 + plugins/graphiql/package.json | 12 +- plugins/graphql-backend/CHANGELOG.md | 7 + plugins/graphql-backend/package.json | 6 +- plugins/home/CHANGELOG.md | 8 + plugins/home/package.json | 14 +- plugins/ilert/CHANGELOG.md | 8 + plugins/ilert/package.json | 14 +- plugins/jenkins-backend/CHANGELOG.md | 7 + plugins/jenkins-backend/package.json | 6 +- plugins/jenkins/CHANGELOG.md | 8 + plugins/jenkins/package.json | 14 +- plugins/kafka-backend/CHANGELOG.md | 7 + plugins/kafka-backend/package.json | 6 +- plugins/kafka/CHANGELOG.md | 8 + plugins/kafka/package.json | 14 +- plugins/kubernetes-backend/CHANGELOG.md | 7 + plugins/kubernetes-backend/package.json | 6 +- plugins/kubernetes/CHANGELOG.md | 8 + plugins/kubernetes/package.json | 14 +- plugins/lighthouse/CHANGELOG.md | 8 + plugins/lighthouse/package.json | 14 +- plugins/newrelic-dashboard/CHANGELOG.md | 8 + plugins/newrelic-dashboard/package.json | 10 +- plugins/newrelic/CHANGELOG.md | 7 + plugins/newrelic/package.json | 12 +- plugins/org/CHANGELOG.md | 10 + plugins/org/package.json | 14 +- plugins/pagerduty/CHANGELOG.md | 9 + plugins/pagerduty/package.json | 14 +- plugins/permission-backend/CHANGELOG.md | 9 + plugins/permission-backend/package.json | 10 +- plugins/permission-node/CHANGELOG.md | 8 + plugins/permission-node/package.json | 8 +- plugins/proxy-backend/CHANGELOG.md | 30 +++ plugins/proxy-backend/package.json | 6 +- plugins/rollbar-backend/CHANGELOG.md | 8 + plugins/rollbar-backend/package.json | 8 +- plugins/rollbar/CHANGELOG.md | 8 + plugins/rollbar/package.json | 14 +- .../CHANGELOG.md | 8 + .../package.json | 8 +- .../CHANGELOG.md | 8 + .../package.json | 8 +- .../CHANGELOG.md | 7 + .../package.json | 6 +- plugins/scaffolder-backend/CHANGELOG.md | 12 + plugins/scaffolder-backend/package.json | 12 +- plugins/scaffolder/CHANGELOG.md | 13 + plugins/scaffolder/package.json | 20 +- plugins/search-backend-module-pg/CHANGELOG.md | 7 + plugins/search-backend-module-pg/package.json | 8 +- plugins/search-backend/CHANGELOG.md | 9 + plugins/search-backend/package.json | 10 +- plugins/search/CHANGELOG.md | 8 + plugins/search/package.json | 14 +- plugins/sentry/CHANGELOG.md | 8 + plugins/sentry/package.json | 14 +- plugins/shortcuts/CHANGELOG.md | 7 + plugins/shortcuts/package.json | 12 +- plugins/sonarqube/CHANGELOG.md | 8 + plugins/sonarqube/package.json | 14 +- plugins/splunk-on-call/CHANGELOG.md | 8 + plugins/splunk-on-call/package.json | 14 +- .../CHANGELOG.md | 8 + .../package.json | 8 +- plugins/tech-insights-backend/CHANGELOG.md | 8 + plugins/tech-insights-backend/package.json | 10 +- plugins/tech-insights-node/CHANGELOG.md | 7 + plugins/tech-insights-node/package.json | 6 +- plugins/tech-insights/CHANGELOG.md | 8 + plugins/tech-insights/package.json | 14 +- plugins/tech-radar/CHANGELOG.md | 7 + plugins/tech-radar/package.json | 12 +- plugins/techdocs-backend/CHANGELOG.md | 9 + plugins/techdocs-backend/package.json | 12 +- plugins/techdocs/CHANGELOG.md | 14 ++ plugins/techdocs/package.json | 20 +- plugins/todo-backend/CHANGELOG.md | 7 + plugins/todo-backend/package.json | 6 +- plugins/todo/CHANGELOG.md | 8 + plugins/todo/package.json | 14 +- plugins/user-settings/CHANGELOG.md | 7 + plugins/user-settings/package.json | 12 +- plugins/xcmetrics/CHANGELOG.md | 7 + plugins/xcmetrics/package.json | 12 +- yarn.lock | 235 ++++-------------- 238 files changed, 1675 insertions(+), 1306 deletions(-) delete mode 100644 .changeset/analytics-det-tyckte-inte-jag.md delete mode 100644 .changeset/analytics-station-eleven.md delete mode 100644 .changeset/blue-ligers-allow.md delete mode 100644 .changeset/bright-buttons-rescue.md delete mode 100644 .changeset/chilled-papayas-wonder.md delete mode 100644 .changeset/cyan-turtles-relax.md delete mode 100644 .changeset/dependabot-2f11dff.md delete mode 100644 .changeset/dependabot-4ce572f.md delete mode 100644 .changeset/dependabot-9ec400d.md delete mode 100644 .changeset/dependabot-f969614.md delete mode 100644 .changeset/early-cooks-brake.md delete mode 100644 .changeset/flat-cars-begin.md delete mode 100644 .changeset/fresh-insects-attack.md delete mode 100644 .changeset/gold-queens-clap.md delete mode 100644 .changeset/grumpy-teachers-remain.md delete mode 100644 .changeset/itchy-bulldogs-dance.md delete mode 100644 .changeset/lemon-jars-teach.md delete mode 100644 .changeset/nasty-pets-glow.md delete mode 100644 .changeset/neat-mangos-study.md delete mode 100644 .changeset/ninety-brooms-lay.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/purple-steaks-design.md delete mode 100644 .changeset/quick-jars-wait.md delete mode 100644 .changeset/rare-comics-tan.md delete mode 100644 .changeset/sharp-dragons-divide.md delete mode 100644 .changeset/silver-eagles-reply.md delete mode 100644 .changeset/silver-waves-reflect.md delete mode 100644 .changeset/sour-chairs-double.md delete mode 100644 .changeset/strong-taxis-refuse.md delete mode 100644 .changeset/swift-carpets-yawn.md delete mode 100644 .changeset/tall-rats-lie.md delete mode 100644 .changeset/tame-ads-exercise.md delete mode 100644 .changeset/tasty-pandas-design.md delete mode 100644 .changeset/techdocs-funkar-varje-gang.md delete mode 100644 .changeset/techdocs-lets-call-the-whole-thing-off.md delete mode 100644 .changeset/techdocs-not-that-many-copies.md delete mode 100644 .changeset/thirty-houses-juggle.md delete mode 100644 .changeset/tiny-buses-compete.md delete mode 100644 .changeset/twenty-queens-scream.md delete mode 100644 .changeset/weak-oranges-drive.md delete mode 100644 .changeset/witty-lamps-laugh.md delete mode 100644 .changeset/witty-lizards-nail.md diff --git a/.changeset/analytics-det-tyckte-inte-jag.md b/.changeset/analytics-det-tyckte-inte-jag.md deleted file mode 100644 index bc486e64c4..0000000000 --- a/.changeset/analytics-det-tyckte-inte-jag.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/plugin-catalog-react': patch ---- - -The `` component now accepts a `noTrack` prop, which prevents the `click` event from being captured by the Analytics API. This can be used if tracking is explicitly not warranted, or in order to use custom link tracking in specific situations. diff --git a/.changeset/analytics-station-eleven.md b/.changeset/analytics-station-eleven.md deleted file mode 100644 index e1a2366cbe..0000000000 --- a/.changeset/analytics-station-eleven.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-analytics-module-ga': patch ---- - -Added the ability to capture and set user IDs from Backstage's `identityApi`. For full instructions on how to -set this up, see [the User ID section of its README](https://github.com/backstage/backstage/tree/master/plugins/analytics-module-ga#user-ids) diff --git a/.changeset/blue-ligers-allow.md b/.changeset/blue-ligers-allow.md deleted file mode 100644 index 923a5a31dc..0000000000 --- a/.changeset/blue-ligers-allow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-code-coverage': patch ---- - -Fixed a bug in the FileExplorer component which made it impossible to navigate upwards to a containing folder by clicking on the folder breadcrumb. diff --git a/.changeset/bright-buttons-rescue.md b/.changeset/bright-buttons-rescue.md deleted file mode 100644 index 71a6b76fa2..0000000000 --- a/.changeset/bright-buttons-rescue.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'@backstage/plugin-auth-backend': minor ---- - -**BREAKING** Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication. - -These changes are **required** to `packages/backend/src/plugins/auth.ts`: - -```diff -export default async function createPlugin({ - logger, - database, - config, - discovery, -+ tokenManager, -}: PluginEnvironment): Promise { - return await createRouter({ - logger, - config, - database, - discovery, -+ tokenManager, - }); -} -``` - -**BREAKING** The `CatalogIdentityClient` constructor now expects a `TokenManager` instead of a `TokenIssuer`. The `TokenManager` interface is used to generate a server token when [resolving a user's identity and membership through the catalog](https://backstage.io/docs/auth/identity-resolver). Using server tokens for these requests allows the auth-backend to bypass authorization checks when permissions are enabled for Backstage. This change will break apps that rely on the user tokens that were previously used by the client. Refer to the ["Backend-to-backend Authentication" tutorial](https://backstage.io/docs/tutorials/backend-to-backend-auth) for more information on server token usage. diff --git a/.changeset/chilled-papayas-wonder.md b/.changeset/chilled-papayas-wonder.md deleted file mode 100644 index 4a3c2322e1..0000000000 --- a/.changeset/chilled-papayas-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Fixed a bug where providers that tracked the granted scopes through a cookie would not take failed authentication attempts into account. diff --git a/.changeset/cyan-turtles-relax.md b/.changeset/cyan-turtles-relax.md deleted file mode 100644 index 4f7857c30c..0000000000 --- a/.changeset/cyan-turtles-relax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-common': patch ---- - -Adds new `catalogEntityCreatePermission` which can be imported and used when authoring a permission policy to restrict/grant a user's access to the catalog import plugin. (And the "Register Existing Component" button which navigates there). diff --git a/.changeset/dependabot-2f11dff.md b/.changeset/dependabot-2f11dff.md deleted file mode 100644 index f3397cad0c..0000000000 --- a/.changeset/dependabot-2f11dff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-rollbar-backend': patch ---- - -chore(deps): bump `camelcase-keys` from 6.2.2 to 7.0.1 diff --git a/.changeset/dependabot-4ce572f.md b/.changeset/dependabot-4ce572f.md deleted file mode 100644 index 5d02c2a007..0000000000 --- a/.changeset/dependabot-4ce572f.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/cli': patch -'@backstage/create-app': patch ---- - -chore(deps): bump `inquirer` from 7.3.3 to 8.2.0 diff --git a/.changeset/dependabot-9ec400d.md b/.changeset/dependabot-9ec400d.md deleted file mode 100644 index 1fd5a85477..0000000000 --- a/.changeset/dependabot-9ec400d.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -chore(deps): bump `passport` from 0.4.1 to 0.5.2 diff --git a/.changeset/dependabot-f969614.md b/.changeset/dependabot-f969614.md deleted file mode 100644 index c3c8890ec9..0000000000 --- a/.changeset/dependabot-f969614.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -chore(deps): bump `prom-client` from 13.2.0 to 14.0.1 diff --git a/.changeset/early-cooks-brake.md b/.changeset/early-cooks-brake.md deleted file mode 100644 index 3037d71ff4..0000000000 --- a/.changeset/early-cooks-brake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Apply the fix from `0.4.16`, which is part of the `v0.65.1` release of Backstage. diff --git a/.changeset/flat-cars-begin.md b/.changeset/flat-cars-begin.md deleted file mode 100644 index 3a8837dc0e..0000000000 --- a/.changeset/flat-cars-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Change subtitle of Header style to use palette.bursts.fontColor diff --git a/.changeset/fresh-insects-attack.md b/.changeset/fresh-insects-attack.md deleted file mode 100644 index 3c22df67c0..0000000000 --- a/.changeset/fresh-insects-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Permission the Register Existing Component button diff --git a/.changeset/gold-queens-clap.md b/.changeset/gold-queens-clap.md deleted file mode 100644 index 252fbb1626..0000000000 --- a/.changeset/gold-queens-clap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Fix an issue where changes related to the `MobileSidebar` prevented scrolling pages. Additionally improve the menu of the `MobileSidebar` to not overlay the `BottomNavigation`. diff --git a/.changeset/grumpy-teachers-remain.md b/.changeset/grumpy-teachers-remain.md deleted file mode 100644 index 60653b084f..0000000000 --- a/.changeset/grumpy-teachers-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Migrate from deprecated package @octokit/rest to octokit diff --git a/.changeset/itchy-bulldogs-dance.md b/.changeset/itchy-bulldogs-dance.md deleted file mode 100644 index a2acad4d34..0000000000 --- a/.changeset/itchy-bulldogs-dance.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-catalog-react': patch ---- - -Fix bug: previously the filter would be set to "all" on page load, even if the -`initiallySelectedFilter` on the `DefaultCatalogPage` was set to something else, -or a different query parameter was supplied. Now, the prop and query parameters -control the filter as expected. Additionally, after this change any filters -which match 0 items will be disabled, and the filter will be reverted to 'all' -if they're set on page load. diff --git a/.changeset/lemon-jars-teach.md b/.changeset/lemon-jars-teach.md deleted file mode 100644 index d8392d3a92..0000000000 --- a/.changeset/lemon-jars-teach.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/integration-react': patch -'@backstage/plugin-scaffolder': patch ---- - -Added the ability to collect users `oauth` token from the `RepoUrlPicker` for use in the template manifest diff --git a/.changeset/nasty-pets-glow.md b/.changeset/nasty-pets-glow.md deleted file mode 100644 index e630736261..0000000000 --- a/.changeset/nasty-pets-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-org': patch ---- - -Added `relations.memberof` filter to the catalog api call in `MemberListCard` to avoid fetching all the User entity kinds from catalog-backend. diff --git a/.changeset/neat-mangos-study.md b/.changeset/neat-mangos-study.md deleted file mode 100644 index 7daefcadac..0000000000 --- a/.changeset/neat-mangos-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Update backend-to-backend auth link in configuration file comment diff --git a/.changeset/ninety-brooms-lay.md b/.changeset/ninety-brooms-lay.md deleted file mode 100644 index 6b85fd4fcb..0000000000 --- a/.changeset/ninety-brooms-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-org': patch ---- - -The description from `metadata.description` will now show as the `subheader` on the UserProfileCard in the same way as the GroupProfileCard diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index ece2a49661..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "mode": "exit", - "tag": "next", - "initialVersions": { - "example-app": "0.2.62", - "@backstage/app-defaults": "0.1.5", - "example-backend": "0.2.62", - "@backstage/backend-common": "0.10.5", - "@backstage/backend-tasks": "0.1.4", - "@backstage/backend-test-utils": "0.1.15", - "@backstage/catalog-client": "0.5.5", - "@backstage/catalog-model": "0.9.10", - "@backstage/cli": "0.13.0", - "@backstage/cli-common": "0.1.6", - "@backstage/codemods": "0.1.31", - "@backstage/config": "0.1.13", - "@backstage/config-loader": "0.9.3", - "@backstage/core-app-api": "0.5.1", - "@backstage/core-components": "0.8.6", - "@backstage/core-plugin-api": "0.6.0", - "@backstage/create-app": "0.4.15", - "@backstage/dev-utils": "0.2.19", - "e2e-test": "0.2.0", - "embedded-techdocs-app": "0.2.61", - "@backstage/errors": "0.2.0", - "@backstage/integration": "0.7.2", - "@backstage/integration-react": "0.1.19", - "@backstage/search-common": "0.2.2", - "@techdocs/cli": "0.8.11", - "@backstage/techdocs-common": "0.11.5", - "@backstage/test-utils": "0.2.3", - "@backstage/theme": "0.2.14", - "@backstage/types": "0.1.1", - "@backstage/version-bridge": "0.1.1", - "@backstage/plugin-airbrake": "0.1.1", - "@backstage/plugin-allure": "0.1.12", - "@backstage/plugin-analytics-module-ga": "0.1.7", - "@backstage/plugin-apache-airflow": "0.1.4", - "@backstage/plugin-api-docs": "0.7.0", - "@backstage/plugin-app-backend": "0.3.22", - "@backstage/plugin-auth-backend": "0.8.0", - "@backstage/plugin-azure-devops": "0.1.12", - "@backstage/plugin-azure-devops-backend": "0.3.1", - "@backstage/plugin-azure-devops-common": "0.2.0", - "@backstage/plugin-badges": "0.2.20", - "@backstage/plugin-badges-backend": "0.1.16", - "@backstage/plugin-bazaar": "0.1.11", - "@backstage/plugin-bazaar-backend": "0.1.7", - "@backstage/plugin-bitrise": "0.1.23", - "@backstage/plugin-catalog": "0.7.10", - "@backstage/plugin-catalog-backend": "0.21.1", - "@backstage/plugin-catalog-backend-module-ldap": "0.3.10", - "@backstage/plugin-catalog-backend-module-msgraph": "0.2.13", - "@backstage/plugin-catalog-common": "0.1.1", - "@backstage/plugin-catalog-graph": "0.2.8", - "@backstage/plugin-catalog-graphql": "0.3.1", - "@backstage/plugin-catalog-import": "0.7.10", - "@backstage/plugin-catalog-react": "0.6.12", - "@backstage/plugin-circleci": "0.2.35", - "@backstage/plugin-cloudbuild": "0.2.33", - "@backstage/plugin-code-coverage": "0.1.23", - "@backstage/plugin-code-coverage-backend": "0.1.20", - "@backstage/plugin-config-schema": "0.1.19", - "@backstage/plugin-cost-insights": "0.11.18", - "@backstage/plugin-explore": "0.3.27", - "@backstage/plugin-explore-react": "0.0.11", - "@backstage/plugin-firehydrant": "0.1.13", - "@backstage/plugin-fossa": "0.2.28", - "@backstage/plugin-gcp-projects": "0.3.15", - "@backstage/plugin-git-release-manager": "0.3.9", - "@backstage/plugin-github-actions": "0.4.33", - "@backstage/plugin-github-deployments": "0.1.27", - "@backstage/plugin-gitops-profiles": "0.3.14", - "@backstage/plugin-gocd": "0.1.2", - "@backstage/plugin-graphiql": "0.2.28", - "@backstage/plugin-graphql-backend": "0.1.12", - "@backstage/plugin-home": "0.4.12", - "@backstage/plugin-ilert": "0.1.22", - "@backstage/plugin-jenkins": "0.5.18", - "@backstage/plugin-jenkins-backend": "0.1.11", - "@backstage/plugin-kafka": "0.2.26", - "@backstage/plugin-kafka-backend": "0.2.15", - "@backstage/plugin-kubernetes": "0.5.5", - "@backstage/plugin-kubernetes-backend": "0.4.5", - "@backstage/plugin-kubernetes-common": "0.2.2", - "@backstage/plugin-lighthouse": "0.2.35", - "@backstage/plugin-newrelic": "0.3.14", - "@backstage/plugin-newrelic-dashboard": "0.1.4", - "@backstage/plugin-org": "0.4.0", - "@backstage/plugin-pagerduty": "0.3.23", - "@backstage/plugin-permission-backend": "0.4.1", - "@backstage/plugin-permission-common": "0.4.0", - "@backstage/plugin-permission-node": "0.4.1", - "@backstage/plugin-permission-react": "0.3.0", - "@backstage/plugin-proxy-backend": "0.2.16", - "@backstage/plugin-rollbar": "0.3.24", - "@backstage/plugin-rollbar-backend": "0.1.19", - "@backstage/plugin-scaffolder": "0.12.0", - "@backstage/plugin-scaffolder-backend": "0.15.22", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "0.1.9", - "@backstage/plugin-scaffolder-backend-module-rails": "0.2.4", - "@backstage/plugin-scaffolder-backend-module-yeoman": "0.1.3", - "@backstage/plugin-scaffolder-common": "0.1.3", - "@backstage/plugin-search": "0.6.0", - "@backstage/plugin-search-backend": "0.4.0", - "@backstage/plugin-search-backend-module-elasticsearch": "0.0.8", - "@backstage/plugin-search-backend-module-pg": "0.2.4", - "@backstage/plugin-search-backend-node": "0.4.5", - "@backstage/plugin-sentry": "0.3.34", - "@backstage/plugin-shortcuts": "0.1.20", - "@backstage/plugin-sonarqube": "0.2.14", - "@backstage/plugin-splunk-on-call": "0.3.20", - "@backstage/plugin-tech-insights": "0.1.6", - "@backstage/plugin-tech-insights-backend": "0.2.2", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "0.1.6", - "@backstage/plugin-tech-insights-common": "0.2.1", - "@backstage/plugin-tech-insights-node": "0.2.0", - "@backstage/plugin-tech-radar": "0.5.3", - "@backstage/plugin-techdocs": "0.13.1", - "@backstage/plugin-techdocs-backend": "0.13.1", - "@backstage/plugin-todo": "0.1.20", - "@backstage/plugin-todo-backend": "0.1.19", - "@backstage/plugin-user-settings": "0.3.17", - "@backstage/plugin-xcmetrics": "0.2.16" - }, - "changesets": [ - "analytics-det-tyckte-inte-jag", - "analytics-station-eleven", - "blue-ligers-allow", - "bright-buttons-rescue", - "chilled-papayas-wonder", - "cyan-turtles-relax", - "dependabot-2f11dff", - "dependabot-4ce572f", - "dependabot-9ec400d", - "dependabot-f969614", - "early-cooks-brake", - "flat-cars-begin", - "fresh-insects-attack", - "gold-queens-clap", - "grumpy-teachers-remain", - "itchy-bulldogs-dance", - "nasty-pets-glow", - "neat-mangos-study", - "purple-steaks-design", - "quick-jars-wait", - "rare-comics-tan", - "sharp-dragons-divide", - "silver-eagles-reply", - "sour-chairs-double", - "strong-taxis-refuse", - "tall-rats-lie", - "tame-ads-exercise", - "tasty-pandas-design", - "techdocs-funkar-varje-gang", - "techdocs-lets-call-the-whole-thing-off", - "thirty-houses-juggle", - "tiny-buses-compete", - "weak-oranges-drive", - "witty-lamps-laugh", - "witty-lizards-nail" - ] -} diff --git a/.changeset/purple-steaks-design.md b/.changeset/purple-steaks-design.md deleted file mode 100644 index 4857c39c73..0000000000 --- a/.changeset/purple-steaks-design.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Adds missing `/catalog-graph` route to ``. - -To fix this problem for a recently created app please update your `app/src/App.tsx` - -```diff -+ import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; - - ... omitted ... - - - } /> -+ } /> - -``` diff --git a/.changeset/quick-jars-wait.md b/.changeset/quick-jars-wait.md deleted file mode 100644 index bbf6b42a89..0000000000 --- a/.changeset/quick-jars-wait.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'@backstage/plugin-proxy-backend': patch ---- - -Adds a new option `skipInvalidTargets` for the proxy `createRouter` which allows the proxy backend to be started with an invalid proxy configuration. If configured, it will simply skip the failed proxy and mount the other valid proxies. - -To configure it to pass by failing proxies: - -``` -const router = await createRouter({ - config, - logger, - discovery, - skipInvalidProxies: true, -}); -``` - -If you would like it to fail if a proxy is configured badly: - -``` -const router = await createRouter({ - config, - logger, - discovery, -}); -``` diff --git a/.changeset/rare-comics-tan.md b/.changeset/rare-comics-tan.md deleted file mode 100644 index 338dfba7c2..0000000000 --- a/.changeset/rare-comics-tan.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Added a `Context` type for the backend, that can propagate an abort signal, a -deadline, and contextual values through the call stack. The main entrypoint is -the `Contexts` utility class that provides a root context creator and commonly -used decorators. - -These are marked as `@alpha` for now, and are therefore only accessible via -`@backstage/backend-common/alpha`. diff --git a/.changeset/sharp-dragons-divide.md b/.changeset/sharp-dragons-divide.md deleted file mode 100644 index 398d7fb38a..0000000000 --- a/.changeset/sharp-dragons-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@techdocs/cli': patch ---- - -Use a local file dependency for embedded-techdocs-app, to ensure that it's always pulled out of the workspace diff --git a/.changeset/silver-eagles-reply.md b/.changeset/silver-eagles-reply.md deleted file mode 100644 index db69525768..0000000000 --- a/.changeset/silver-eagles-reply.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Permission the `catalog-import` route - -The following changes are **required** if you intend to add permissions to your existing app. - -Use the `PermissionedRoute` for `CatalogImportPage` instead of the normal `Route`: - -```diff -// packages/app/src/App.tsx -... -+ import { PermissionedRoute } from '@backstage/plugin-permission-react'; -+ import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; - -... - -- } /> -+ } -+ /> -``` diff --git a/.changeset/silver-waves-reflect.md b/.changeset/silver-waves-reflect.md deleted file mode 100644 index 9d7322764b..0000000000 --- a/.changeset/silver-waves-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Added custom `callbackUrl` support for multiple providers. `v0.8.0` introduced this change for `github`, and now we're adding the same capability to the following providers: `atlassian, auth0, bitbucket, gitlab, google, microsoft, oauth2, oidc, okta, onelogin`. diff --git a/.changeset/sour-chairs-double.md b/.changeset/sour-chairs-double.md deleted file mode 100644 index 4f481e20e7..0000000000 --- a/.changeset/sour-chairs-double.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication. - -These changes are **required** to `packages/backend/src/plugins/auth.ts`: - -```diff -export default async function createPlugin({ - logger, - database, - config, - discovery, -+ tokenManager, -}: PluginEnvironment): Promise { - return await createRouter({ - logger, - config, - database, - discovery, -+ tokenManager, - }); -} -``` diff --git a/.changeset/strong-taxis-refuse.md b/.changeset/strong-taxis-refuse.md deleted file mode 100644 index f198dc4bab..0000000000 --- a/.changeset/strong-taxis-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Added support for storing static GitHub access tokens in cookies and using them to refresh the Backstage session. diff --git a/.changeset/swift-carpets-yawn.md b/.changeset/swift-carpets-yawn.md deleted file mode 100644 index d242b3cf81..0000000000 --- a/.changeset/swift-carpets-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Adding hover message to the Gauge and an info icon to the GaugeCard. diff --git a/.changeset/tall-rats-lie.md b/.changeset/tall-rats-lie.md deleted file mode 100644 index ed76970df4..0000000000 --- a/.changeset/tall-rats-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-pagerduty': patch ---- - -Fix change events tab error when change events exist diff --git a/.changeset/tame-ads-exercise.md b/.changeset/tame-ads-exercise.md deleted file mode 100644 index a2e11393a6..0000000000 --- a/.changeset/tame-ads-exercise.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -'@backstage/plugin-catalog-import': minor ---- - -Make filename, branch name and examples URLs used in catalog import customizable. - -Catalog backend ingestion loop can be already configured to fetch targets with custom catalog filename (other than `catalog-info.yaml`). It's now possible to customize said filename and branch name used in pull requests created by catalog import flow too. This allows organizations to further customize Backstage experience and to better reflect their branding. - -Filename (default: `catalog-info.yaml`) and branch name (default: `backstage-integration`) used in pull requests can be configured in `app-config.yaml` as follows: - -```yaml -// app-config.yaml - -catalog: - import: - entityFilename: anvil.yaml - pullRequestBranchName: anvil-integration -``` - -Following React components have also been updated to accept optional props for providing example entity and repository paths: - -```tsx - -``` - -```tsx - -``` diff --git a/.changeset/tasty-pandas-design.md b/.changeset/tasty-pandas-design.md deleted file mode 100644 index 302631ee60..0000000000 --- a/.changeset/tasty-pandas-design.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Switched out the `GithubAuth` implementation to use the common `OAuth2` implementation. This relies on the simultaneous change in `@backstage/plugin-auth-backend` that enabled access token storage in cookies rather than the current solution that's based on `LocalStorage`. - -> **NOTE:** Make sure you upgrade the `auth-backend` deployment before or at the same time as you deploy this change. diff --git a/.changeset/techdocs-funkar-varje-gang.md b/.changeset/techdocs-funkar-varje-gang.md deleted file mode 100644 index 727820e5f8..0000000000 --- a/.changeset/techdocs-funkar-varje-gang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -Fixed a bug where links to files within a TechDocs site that use the `download` attribute would result in a 404 in cases where the TechDocs backend and Backstage frontend application are on the same host. diff --git a/.changeset/techdocs-lets-call-the-whole-thing-off.md b/.changeset/techdocs-lets-call-the-whole-thing-off.md deleted file mode 100644 index 60cf25d65b..0000000000 --- a/.changeset/techdocs-lets-call-the-whole-thing-off.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -Added support for documentation using the raw `` tag to point to relative resources like audio or video files. diff --git a/.changeset/techdocs-not-that-many-copies.md b/.changeset/techdocs-not-that-many-copies.md deleted file mode 100644 index f0507a8157..0000000000 --- a/.changeset/techdocs-not-that-many-copies.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -Fixed a bug where copy-to-clipboard buttons were appended to unintended elements. diff --git a/.changeset/thirty-houses-juggle.md b/.changeset/thirty-houses-juggle.md deleted file mode 100644 index c54ab5526f..0000000000 --- a/.changeset/thirty-houses-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Pass authorization token to location service inside location api routes diff --git a/.changeset/tiny-buses-compete.md b/.changeset/tiny-buses-compete.md deleted file mode 100644 index 2cb8d1a87f..0000000000 --- a/.changeset/tiny-buses-compete.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/plugin-scaffolder': patch ---- - -Make linkTarget configurable for MarkdownContent component diff --git a/.changeset/twenty-queens-scream.md b/.changeset/twenty-queens-scream.md deleted file mode 100644 index 92626ed12c..0000000000 --- a/.changeset/twenty-queens-scream.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Added support for templating secrets into actions input, and also added an extra `token` input argument to all publishers to provide a token that would override the `integrations.config`. -You can find more information over at [Writing Templates](https://backstage.io/docs/features/software-templates/writing-templates#using-the-users-oauth-token) diff --git a/.changeset/weak-oranges-drive.md b/.changeset/weak-oranges-drive.md deleted file mode 100644 index 7d6828ef47..0000000000 --- a/.changeset/weak-oranges-drive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-catalog-react': patch ---- - -Add caching to the useEntityPermission hook - -The hook now caches the authorization decision based on the permission + the entity, and returns the cache match value as the default `allowed` value while loading. This helps avoid flicker in UI elements that would be conditionally rendered based on the `allowed` result of this hook. diff --git a/.changeset/witty-lamps-laugh.md b/.changeset/witty-lamps-laugh.md deleted file mode 100644 index 1ca4f4e4dc..0000000000 --- a/.changeset/witty-lamps-laugh.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Switched the `app` dependency in the backend to use a file target rather than version. - -To apply this change to an existing app, make the following change to `packages/backend/package.json`: - -```diff - "dependencies": { -- "app": "0.0.0", -+ "app": "file:../app", -``` diff --git a/.changeset/witty-lizards-nail.md b/.changeset/witty-lizards-nail.md deleted file mode 100644 index 2ce3faa3f7..0000000000 --- a/.changeset/witty-lizards-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Log warning if unable to parse yarn.lock diff --git a/package.json b/package.json index 8f04624b3f..5c60cc41c6 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "**/@roadiehq/**/@backstage/plugin-catalog": "*", "**/@roadiehq/**/@backstage/catalog-model": "*" }, - "version": "0.66.0-next.1", + "version": "0.66.0", "dependencies": { "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.15.0", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 831a427ba7..b58d61fcca 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/app-defaults +## 0.1.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/core-app-api@0.5.2 + ## 0.1.6-next.1 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 3116b76956..6a509a22f5 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "0.1.6-next.1", + "version": "0.1.6", "private": false, "publishConfig": { "access": "public", @@ -29,8 +29,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/core-components": "^0.8.7", + "@backstage/core-app-api": "^0.5.2", "@backstage/core-plugin-api": "^0.6.0", "@backstage/plugin-permission-react": "^0.3.0", "@backstage/theme": "^0.2.14", @@ -42,8 +42,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@types/jest": "^26.0.7", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 864bb1e555..eb9d3cda99 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,54 @@ # example-app +## 0.2.63 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/plugin-code-coverage@0.1.24 + - @backstage/plugin-catalog-common@0.1.2 + - @backstage/cli@0.13.1 + - @backstage/plugin-scaffolder@0.12.1 + - @backstage/integration-react@0.1.20 + - @backstage/plugin-org@0.4.1 + - @backstage/plugin-pagerduty@0.3.24 + - @backstage/plugin-catalog-import@0.8.0 + - @backstage/core-app-api@0.5.2 + - @backstage/plugin-techdocs@0.13.2 + - @backstage/app-defaults@0.1.6 + - @backstage/plugin-airbrake@0.1.2 + - @backstage/plugin-apache-airflow@0.1.5 + - @backstage/plugin-api-docs@0.7.1 + - @backstage/plugin-azure-devops@0.1.13 + - @backstage/plugin-badges@0.2.21 + - @backstage/plugin-catalog@0.7.11 + - @backstage/plugin-catalog-graph@0.2.9 + - @backstage/plugin-circleci@0.2.36 + - @backstage/plugin-cloudbuild@0.2.34 + - @backstage/plugin-cost-insights@0.11.19 + - @backstage/plugin-explore@0.3.28 + - @backstage/plugin-gcp-projects@0.3.16 + - @backstage/plugin-github-actions@0.4.34 + - @backstage/plugin-gocd@0.1.3 + - @backstage/plugin-graphiql@0.2.29 + - @backstage/plugin-home@0.4.13 + - @backstage/plugin-jenkins@0.5.19 + - @backstage/plugin-kafka@0.2.27 + - @backstage/plugin-kubernetes@0.5.6 + - @backstage/plugin-lighthouse@0.2.36 + - @backstage/plugin-newrelic@0.3.15 + - @backstage/plugin-newrelic-dashboard@0.1.5 + - @backstage/plugin-rollbar@0.3.25 + - @backstage/plugin-search@0.6.1 + - @backstage/plugin-sentry@0.3.35 + - @backstage/plugin-shortcuts@0.1.21 + - @backstage/plugin-tech-insights@0.1.7 + - @backstage/plugin-tech-radar@0.5.4 + - @backstage/plugin-todo@0.1.21 + - @backstage/plugin-user-settings@0.3.18 + ## 0.2.63-next.1 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index e5bd3a4180..3447c07059 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,56 +1,56 @@ { "name": "example-app", - "version": "0.2.63-next.1", + "version": "0.2.63", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.6-next.1", + "@backstage/app-defaults": "^0.1.6", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-airbrake": "^0.1.2-next.0", - "@backstage/plugin-api-docs": "^0.7.1-next.0", - "@backstage/plugin-azure-devops": "^0.1.13-next.0", - "@backstage/plugin-apache-airflow": "^0.1.5-next.0", - "@backstage/plugin-badges": "^0.2.21-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.1", - "@backstage/plugin-catalog-common": "^0.1.2-next.0", - "@backstage/plugin-catalog-graph": "^0.2.9-next.0", - "@backstage/plugin-catalog-import": "^0.8.0-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", - "@backstage/plugin-circleci": "^0.2.36-next.0", - "@backstage/plugin-cloudbuild": "^0.2.34-next.0", - "@backstage/plugin-code-coverage": "^0.1.24-next.1", - "@backstage/plugin-cost-insights": "^0.11.19-next.0", - "@backstage/plugin-explore": "^0.3.28-next.0", - "@backstage/plugin-gcp-projects": "^0.3.16-next.0", - "@backstage/plugin-github-actions": "^0.4.34-next.0", - "@backstage/plugin-gocd": "^0.1.3-next.0", - "@backstage/plugin-graphiql": "^0.2.29-next.0", - "@backstage/plugin-home": "^0.4.13-next.0", - "@backstage/plugin-jenkins": "^0.5.19-next.0", - "@backstage/plugin-kafka": "^0.2.27-next.0", - "@backstage/plugin-kubernetes": "^0.5.6-next.0", - "@backstage/plugin-lighthouse": "^0.2.36-next.0", - "@backstage/plugin-newrelic": "^0.3.15-next.0", - "@backstage/plugin-newrelic-dashboard": "^0.1.5-next.0", - "@backstage/plugin-org": "^0.4.1-next.0", - "@backstage/plugin-pagerduty": "0.3.24-next.0", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-airbrake": "^0.1.2", + "@backstage/plugin-api-docs": "^0.7.1", + "@backstage/plugin-azure-devops": "^0.1.13", + "@backstage/plugin-apache-airflow": "^0.1.5", + "@backstage/plugin-badges": "^0.2.21", + "@backstage/plugin-catalog": "^0.7.11", + "@backstage/plugin-catalog-common": "^0.1.2", + "@backstage/plugin-catalog-graph": "^0.2.9", + "@backstage/plugin-catalog-import": "^0.8.0", + "@backstage/plugin-catalog-react": "^0.6.13", + "@backstage/plugin-circleci": "^0.2.36", + "@backstage/plugin-cloudbuild": "^0.2.34", + "@backstage/plugin-code-coverage": "^0.1.24", + "@backstage/plugin-cost-insights": "^0.11.19", + "@backstage/plugin-explore": "^0.3.28", + "@backstage/plugin-gcp-projects": "^0.3.16", + "@backstage/plugin-github-actions": "^0.4.34", + "@backstage/plugin-gocd": "^0.1.3", + "@backstage/plugin-graphiql": "^0.2.29", + "@backstage/plugin-home": "^0.4.13", + "@backstage/plugin-jenkins": "^0.5.19", + "@backstage/plugin-kafka": "^0.2.27", + "@backstage/plugin-kubernetes": "^0.5.6", + "@backstage/plugin-lighthouse": "^0.2.36", + "@backstage/plugin-newrelic": "^0.3.15", + "@backstage/plugin-newrelic-dashboard": "^0.1.5", + "@backstage/plugin-org": "^0.4.1", + "@backstage/plugin-pagerduty": "0.3.24", "@backstage/plugin-permission-react": "^0.3.0", - "@backstage/plugin-rollbar": "^0.3.25-next.0", - "@backstage/plugin-scaffolder": "^0.12.1-next.1", - "@backstage/plugin-search": "^0.6.1-next.0", - "@backstage/plugin-sentry": "^0.3.35-next.0", - "@backstage/plugin-shortcuts": "^0.1.21-next.0", - "@backstage/plugin-tech-radar": "^0.5.4-next.0", - "@backstage/plugin-techdocs": "^0.13.2-next.1", - "@backstage/plugin-todo": "^0.1.21-next.0", - "@backstage/plugin-user-settings": "^0.3.18-next.0", + "@backstage/plugin-rollbar": "^0.3.25", + "@backstage/plugin-scaffolder": "^0.12.1", + "@backstage/plugin-search": "^0.6.1", + "@backstage/plugin-sentry": "^0.3.35", + "@backstage/plugin-shortcuts": "^0.1.21", + "@backstage/plugin-tech-radar": "^0.5.4", + "@backstage/plugin-techdocs": "^0.13.2", + "@backstage/plugin-todo": "^0.1.21", + "@backstage/plugin-user-settings": "^0.3.18", "@backstage/search-common": "^0.2.2", - "@backstage/plugin-tech-insights": "^0.1.7-next.0", + "@backstage/plugin-tech-insights": "^0.1.7", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -72,7 +72,7 @@ }, "devDependencies": { "@backstage/plugin-permission-react": "^0.3.0", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/test-utils": "^0.2.4", "@rjsf/core": "^3.2.1", "@testing-library/cypress": "^8.0.2", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 787689a6a9..da731fa441 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/backend-common +## 0.10.6 + +### Patch Changes + +- 50d039577a: Added a `Context` type for the backend, that can propagate an abort signal, a + deadline, and contextual values through the call stack. The main entrypoint is + the `Contexts` utility class that provides a root context creator and commonly + used decorators. + + These are marked as `@alpha` for now, and are therefore only accessible via + `@backstage/backend-common/alpha`. + ## 0.10.6-next.0 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 1110e16bc3..fdff7ca414 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.10.6-next.0", + "version": "0.10.6", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -84,8 +84,8 @@ } }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@types/archiver": "^5.1.0", "@types/compression": "^1.7.0", "@types/concat-stream": "^1.6.0", diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index 2aa85eddb4..b13142a7cf 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/backend-tasks +## 0.1.5 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.5-next.0 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index a34b78585c..a060e5e99c 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.1.5-next.0", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", @@ -43,8 +43,8 @@ "zod": "^3.9.5" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.1", - "@backstage/cli": "^0.13.1-next.1", + "@backstage/backend-test-utils": "^0.1.16", + "@backstage/cli": "^0.13.1", "jest": "^26.0.1", "wait-for-expect": "^3.0.2" }, diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 47279aa2f6..0ecc9afb4f 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/backend-test-utils +## 0.1.16 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.13.1 + - @backstage/backend-common@0.10.6 + ## 0.1.16-next.1 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index f56bf303a3..b6db1694c3 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.16-next.1", + "version": "0.1.16", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -30,8 +30,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", - "@backstage/cli": "^0.13.1-next.1", + "@backstage/backend-common": "^0.10.6", + "@backstage/cli": "^0.13.1", "@backstage/config": "^0.1.13", "knex": "^0.95.1", "mysql2": "^2.2.5", @@ -41,7 +41,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "jest": "^26.0.1" }, "files": [ diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index adb2e7669f..40bfad7ddf 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,37 @@ # example-backend +## 0.2.63 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0 + - @backstage/plugin-rollbar-backend@0.1.20 + - @backstage/plugin-catalog-backend@0.21.2 + - @backstage/plugin-scaffolder-backend@0.15.23 + - @backstage/plugin-proxy-backend@0.2.17 + - @backstage/backend-common@0.10.6 + - example-app@0.2.63 + - @backstage/backend-tasks@0.1.5 + - @backstage/plugin-app-backend@0.3.23 + - @backstage/plugin-azure-devops-backend@0.3.2 + - @backstage/plugin-badges-backend@0.1.17 + - @backstage/plugin-code-coverage-backend@0.1.21 + - @backstage/plugin-graphql-backend@0.1.13 + - @backstage/plugin-jenkins-backend@0.1.12 + - @backstage/plugin-kafka-backend@0.2.16 + - @backstage/plugin-kubernetes-backend@0.4.6 + - @backstage/plugin-permission-backend@0.4.2 + - @backstage/plugin-permission-node@0.4.2 + - @backstage/plugin-scaffolder-backend-module-rails@0.2.5 + - @backstage/plugin-search-backend@0.4.1 + - @backstage/plugin-search-backend-module-pg@0.2.5 + - @backstage/plugin-tech-insights-backend@0.2.3 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.7 + - @backstage/plugin-tech-insights-node@0.2.1 + - @backstage/plugin-techdocs-backend@0.13.2 + - @backstage/plugin-todo-backend@0.1.20 + ## 0.2.63-next.1 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index bebe2d3674..67c959376c 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.63-next.1", + "version": "0.2.63", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,38 +24,38 @@ "migrate:create": "knex migrate:make -x ts" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", - "@backstage/backend-tasks": "^0.1.5-next.0", + "@backstage/backend-common": "^0.10.6", + "@backstage/backend-tasks": "^0.1.5", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/integration": "^0.7.2", - "@backstage/plugin-app-backend": "^0.3.23-next.0", - "@backstage/plugin-auth-backend": "^0.9.0-next.1", - "@backstage/plugin-azure-devops-backend": "^0.3.2-next.0", - "@backstage/plugin-badges-backend": "^0.1.17-next.0", - "@backstage/plugin-catalog-backend": "^0.21.2-next.1", - "@backstage/plugin-code-coverage-backend": "^0.1.21-next.0", - "@backstage/plugin-graphql-backend": "^0.1.13-next.0", - "@backstage/plugin-jenkins-backend": "^0.1.12-next.0", - "@backstage/plugin-kubernetes-backend": "^0.4.6-next.0", - "@backstage/plugin-kafka-backend": "^0.2.16-next.0", - "@backstage/plugin-permission-backend": "^0.4.2-next.1", + "@backstage/plugin-app-backend": "^0.3.23", + "@backstage/plugin-auth-backend": "^0.9.0", + "@backstage/plugin-azure-devops-backend": "^0.3.2", + "@backstage/plugin-badges-backend": "^0.1.17", + "@backstage/plugin-catalog-backend": "^0.21.2", + "@backstage/plugin-code-coverage-backend": "^0.1.21", + "@backstage/plugin-graphql-backend": "^0.1.13", + "@backstage/plugin-jenkins-backend": "^0.1.12", + "@backstage/plugin-kubernetes-backend": "^0.4.6", + "@backstage/plugin-kafka-backend": "^0.2.16", + "@backstage/plugin-permission-backend": "^0.4.2", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.2-next.1", - "@backstage/plugin-proxy-backend": "^0.2.17-next.1", - "@backstage/plugin-rollbar-backend": "^0.1.20-next.1", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.5-next.1", - "@backstage/plugin-search-backend": "^0.4.1-next.1", + "@backstage/plugin-permission-node": "^0.4.2", + "@backstage/plugin-proxy-backend": "^0.2.17", + "@backstage/plugin-rollbar-backend": "^0.1.20", + "@backstage/plugin-scaffolder-backend": "^0.15.23", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.5", + "@backstage/plugin-search-backend": "^0.4.1", "@backstage/plugin-search-backend-node": "^0.4.5", "@backstage/plugin-search-backend-module-elasticsearch": "^0.0.8", - "@backstage/plugin-search-backend-module-pg": "^0.2.5-next.0", - "@backstage/plugin-techdocs-backend": "^0.13.2-next.0", - "@backstage/plugin-tech-insights-backend": "^0.2.3-next.0", - "@backstage/plugin-tech-insights-node": "^0.2.1-next.0", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.7-next.0", - "@backstage/plugin-todo-backend": "^0.1.20-next.0", + "@backstage/plugin-search-backend-module-pg": "^0.2.5", + "@backstage/plugin-techdocs-backend": "^0.13.2", + "@backstage/plugin-tech-insights-backend": "^0.2.3", + "@backstage/plugin-tech-insights-node": "^0.2.1", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.7", + "@backstage/plugin-todo-backend": "^0.1.20", "@gitbeaker/node": "^35.1.0", "@octokit/rest": "^18.5.3", "azure-devops-node-api": "^11.0.1", @@ -72,7 +72,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 6d8f93cf0a..a74e3ba0a7 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/cli +## 0.13.1 + +### Patch Changes + +- 5bd0ce9e62: chore(deps): bump `inquirer` from 7.3.3 to 8.2.0 +- 80f510caee: Log warning if unable to parse yarn.lock + ## 0.13.1-next.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 57699ef788..aad08a21eb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.13.1-next.1", + "version": "0.13.1", "private": false, "publishConfig": { "access": "public" @@ -115,13 +115,13 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@backstage/theme": "^0.2.14", "@types/diff": "^5.0.0", "@types/express": "^4.17.6", diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index 9a8c7c4174..d14d46efd8 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/codemods +## 0.1.32 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/core-app-api@0.5.2 + ## 0.1.32-next.1 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index 049c1ebce9..4ce5d9700d 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/codemods", "description": "A collection of codemods for Backstage projects", - "version": "0.1.32-next.1", + "version": "0.1.32", "private": false, "publishConfig": { "access": "public", diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index ab647cfda2..cc115a7da2 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/core-app-api +## 0.5.2 + +### Patch Changes + +- 40775bd263: Switched out the `GithubAuth` implementation to use the common `OAuth2` implementation. This relies on the simultaneous change in `@backstage/plugin-auth-backend` that enabled access token storage in cookies rather than the current solution that's based on `LocalStorage`. + + > **NOTE:** Make sure you upgrade the `auth-backend` deployment before or at the same time as you deploy this change. + ## 0.5.2-next.0 ### Patch Changes diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index 75adf79108..a546e29134 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-app-api", "description": "Core app API used by Backstage apps", - "version": "0.5.2-next.0", + "version": "0.5.2", "private": false, "publishConfig": { "access": "public", @@ -45,8 +45,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index 81206f5cc6..27cf543205 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/core-components +## 0.8.7 + +### Patch Changes + +- f7257dff6f: The `` component now accepts a `noTrack` prop, which prevents the `click` event from being captured by the Analytics API. This can be used if tracking is explicitly not warranted, or in order to use custom link tracking in specific situations. +- 4c773ed25c: Change subtitle of Header style to use palette.bursts.fontColor +- f465b63b7f: Fix an issue where changes related to the `MobileSidebar` prevented scrolling pages. Additionally improve the menu of the `MobileSidebar` to not overlay the `BottomNavigation`. +- 064e750a50: Adding hover message to the Gauge and an info icon to the GaugeCard. +- a681cb9c2f: Make linkTarget configurable for MarkdownContent component + ## 0.8.7-next.1 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index c6e810bd23..54ab87f63d 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.8.7-next.1", + "version": "0.8.7", "private": false, "publishConfig": { "access": "public", @@ -73,9 +73,9 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/core-app-api": "^0.5.2", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 6c14171b23..6cb892905b 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,81 @@ # @backstage/create-app +## 0.4.18 + +### Patch Changes + +- 5bd0ce9e62: chore(deps): bump `inquirer` from 7.3.3 to 8.2.0 +- f27f5197e2: Apply the fix from `0.4.16`, which is part of the `v0.65.1` release of Backstage. +- 2687029a67: Update backend-to-backend auth link in configuration file comment +- 24ef62048c: Adds missing `/catalog-graph` route to ``. + + To fix this problem for a recently created app please update your `app/src/App.tsx` + + ```diff + + import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; + + ... omitted ... + + + } /> + + } /> + + ``` + +- ba59832aed: Permission the `catalog-import` route + + The following changes are **required** if you intend to add permissions to your existing app. + + Use the `PermissionedRoute` for `CatalogImportPage` instead of the normal `Route`: + + ```diff + // packages/app/src/App.tsx + ... + + import { PermissionedRoute } from '@backstage/plugin-permission-react'; + + import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; + + ... + + - } /> + + } + + /> + ``` + +- cef64b1561: Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication. + + These changes are **required** to `packages/backend/src/plugins/auth.ts`: + + ```diff + export default async function createPlugin({ + logger, + database, + config, + discovery, + + tokenManager, + }: PluginEnvironment): Promise { + return await createRouter({ + logger, + config, + database, + discovery, + + tokenManager, + }); + } + ``` + +- e39d88bd84: Switched the `app` dependency in the backend to use a file target rather than version. + + To apply this change to an existing app, make the following change to `packages/backend/package.json`: + + ```diff + "dependencies": { + - "app": "0.0.0", + + "app": "file:../app", + ``` + ## 0.4.18-next.1 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index dc943ded7b..a679942a53 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.18-next.1", + "version": "0.4.18", "private": false, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 40f54190e6..2e34bcaefa 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/dev-utils +## 0.2.20 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/integration-react@0.1.20 + - @backstage/core-app-api@0.5.2 + - @backstage/app-defaults@0.1.6 + - @backstage/test-utils@0.2.4 + ## 0.2.20-next.1 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 3e21a8c78c..1f59a143e1 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "0.2.20-next.1", + "version": "0.2.20", "private": false, "publishConfig": { "access": "public", @@ -29,14 +29,14 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/app-defaults": "^0.1.6-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/app-defaults": "^0.1.6", + "@backstage/core-app-api": "^0.5.2", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/catalog-model": "^0.9.10", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog-react": "^0.6.13", + "@backstage/test-utils": "^0.2.4", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -55,7 +55,7 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/embedded-techdocs-app/CHANGELOG.md b/packages/embedded-techdocs-app/CHANGELOG.md index 893d6cd6ac..915f65c4cc 100644 --- a/packages/embedded-techdocs-app/CHANGELOG.md +++ b/packages/embedded-techdocs-app/CHANGELOG.md @@ -1,5 +1,19 @@ # embedded-techdocs-app +## 0.2.62 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/cli@0.13.1 + - @backstage/integration-react@0.1.20 + - @backstage/core-app-api@0.5.2 + - @backstage/plugin-techdocs@0.13.2 + - @backstage/app-defaults@0.1.6 + - @backstage/test-utils@0.2.4 + - @backstage/plugin-catalog@0.7.11 + ## 0.2.62-next.1 ### Patch Changes diff --git a/packages/embedded-techdocs-app/package.json b/packages/embedded-techdocs-app/package.json index f5e03d41ff..ca824ffa20 100644 --- a/packages/embedded-techdocs-app/package.json +++ b/packages/embedded-techdocs-app/package.json @@ -1,20 +1,20 @@ { "name": "embedded-techdocs-app", - "version": "0.2.62-next.1", + "version": "0.2.62", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.6-next.1", + "@backstage/app-defaults": "^0.1.6", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@backstage/config": "^0.1.13", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.1", - "@backstage/plugin-techdocs": "^0.13.2-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog": "^0.7.11", + "@backstage/plugin-techdocs": "^0.13.2", + "@backstage/test-utils": "^0.2.4", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -26,7 +26,7 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index 35c60a86f1..4e191866b4 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/integration-react +## 0.1.20 + +### Patch Changes + +- cee44ad289: Added the ability to collect users `oauth` token from the `RepoUrlPicker` for use in the template manifest +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.1.20-next.0 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index 7e46d80e57..255565fafa 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "0.1.20-next.0", + "version": "0.1.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", "@backstage/theme": "^0.2.14", @@ -35,9 +35,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 6c4a606707..2bf2cafa48 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,14 @@ # @techdocs/cli +## 0.8.12 + +### Patch Changes + +- 14472509a3: Use a local file dependency for embedded-techdocs-app, to ensure that it's always pulled out of the workspace +- Updated dependencies + - @backstage/backend-common@0.10.6 + - @backstage/techdocs-common@0.11.6 + ## 0.8.12-next.1 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index c9f08d2d2e..47cf14e550 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "0.8.12-next.1", + "version": "0.8.12", "private": false, "publishConfig": { "access": "public" @@ -32,7 +32,7 @@ "techdocs-cli": "bin/techdocs-cli" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/commander": "^2.12.2", "@types/fs-extra": "^9.0.6", "@types/http-proxy": "^1.17.4", @@ -55,10 +55,10 @@ "ext": "ts" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/techdocs-common": "^0.11.6-next.0", + "@backstage/techdocs-common": "^0.11.6", "@types/dockerode": "^3.3.0", "commander": "^6.1.0", "dockerode": "^3.3.1", diff --git a/packages/techdocs-common/CHANGELOG.md b/packages/techdocs-common/CHANGELOG.md index 962cbee77c..d03ddb6101 100644 --- a/packages/techdocs-common/CHANGELOG.md +++ b/packages/techdocs-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/techdocs-common +## 0.11.6 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.11.6-next.0 ### Patch Changes diff --git a/packages/techdocs-common/package.json b/packages/techdocs-common/package.json index be5c29d539..94a87a41e8 100644 --- a/packages/techdocs-common/package.json +++ b/packages/techdocs-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/techdocs-common", "description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "0.11.6-next.0", + "version": "0.11.6", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -38,7 +38,7 @@ "dependencies": { "@azure/identity": "^2.0.1", "@azure/storage-blob": "^12.5.0", - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", @@ -60,7 +60,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/fs-extra": "^9.0.5", "@types/js-yaml": "^4.0.0", "@types/mime-types": "^2.1.0", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index b560526a31..35c9ebfb35 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/test-utils +## 0.2.4 + +### Patch Changes + +- Updated dependencies + - @backstage/core-app-api@0.5.2 + ## 0.2.4-next.0 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 9f46682d1f..c5fe18d7f7 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "0.2.4-next.0", + "version": "0.2.4", "private": false, "publishConfig": { "access": "public", @@ -30,7 +30,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-app-api": "^0.5.2-next.0", + "@backstage/core-app-api": "^0.5.2", "@backstage/core-plugin-api": "^0.6.0", "@backstage/plugin-permission-common": "^0.4.0", "@backstage/plugin-permission-react": "^0.3.0", @@ -51,7 +51,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "msw": "^0.35.0" diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index 357e32bb05..489559c023 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-airbrake +## 0.1.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 91217a41b1..dcd60e3687 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.1.2-next.0", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -34,11 +34,11 @@ }, "devDependencies": { "@types/object-hash": "^2.2.1", - "@backstage/app-defaults": "^0.1.6-next.1", - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/app-defaults": "^0.1.6", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index 5641aec797..f0fa792278 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-allure +## 0.1.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.13-next.0 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 01c3080393..4b497bd56e 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.13-next.0", + "version": "0.1.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,9 +23,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index 27a5ce04e7..81c61769fb 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-analytics-module-ga +## 0.1.8 + +### Patch Changes + +- b40a0ccc4d: Added the ability to capture and set user IDs from Backstage's `identityApi`. For full instructions on how to + set this up, see [the User ID section of its README](https://github.com/backstage/backstage/tree/master/plugins/analytics-module-ga#user-ids) +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.1.8-next.0 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 8124aa2a0f..bbc9ffcd2e 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.8-next.0", + "version": "0.1.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -35,10 +35,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index 9bca4cfdb7..7407a9f0c9 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-apache-airflow +## 0.1.5 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 7ea91fca99..7b760070ec 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.1.5-next.0", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -33,10 +33,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index d8af0d3798..cd477a6152 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-api-docs +## 0.7.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/plugin-catalog@0.7.11 + ## 0.7.1-next.0 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 0823f2b67d..26f28ae40b 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.7.1-next.0", + "version": "0.7.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "dependencies": { "@asyncapi/react-component": "1.0.0-next.32", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog": "^0.7.11-next.1", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog": "^0.7.11", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 3e895149b2..b2a8d38636 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-app-backend +## 0.3.23 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.3.23-next.0 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 435037f07d..361dc07b2c 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.23-next.0", + "version": "0.3.23", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config-loader": "^0.9.3", "@backstage/config": "^0.1.13", "@backstage/types": "^0.1.1", @@ -47,8 +47,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.1", - "@backstage/cli": "^0.13.1-next.1", + "@backstage/backend-test-utils": "^0.1.16", + "@backstage/cli": "^0.13.1", "@backstage/types": "^0.1.1", "@types/supertest": "^2.0.8", "mock-fs": "^5.1.0", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index c1a93a50e1..52c1f3caa3 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,42 @@ # @backstage/plugin-auth-backend +## 0.9.0 + +### Minor Changes + +- cef64b1561: **BREAKING** Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication. + + These changes are **required** to `packages/backend/src/plugins/auth.ts`: + + ```diff + export default async function createPlugin({ + logger, + database, + config, + discovery, + + tokenManager, + }: PluginEnvironment): Promise { + return await createRouter({ + logger, + config, + database, + discovery, + + tokenManager, + }); + } + ``` + + **BREAKING** The `CatalogIdentityClient` constructor now expects a `TokenManager` instead of a `TokenIssuer`. The `TokenManager` interface is used to generate a server token when [resolving a user's identity and membership through the catalog](https://backstage.io/docs/auth/identity-resolver). Using server tokens for these requests allows the auth-backend to bypass authorization checks when permissions are enabled for Backstage. This change will break apps that rely on the user tokens that were previously used by the client. Refer to the ["Backend-to-backend Authentication" tutorial](https://backstage.io/docs/tutorials/backend-to-backend-auth) for more information on server token usage. + +### Patch Changes + +- 9d75a939b6: Fixed a bug where providers that tracked the granted scopes through a cookie would not take failed authentication attempts into account. +- 28a5f9d0b1: chore(deps): bump `passport` from 0.4.1 to 0.5.2 +- 5d09bdd1de: Added custom `callbackUrl` support for multiple providers. `v0.8.0` introduced this change for `github`, and now we're adding the same capability to the following providers: `atlassian, auth0, bitbucket, gitlab, google, microsoft, oauth2, oidc, okta, onelogin`. +- 648606b3ac: Added support for storing static GitHub access tokens in cookies and using them to refresh the Backstage session. +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.9.0-next.1 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 5e18d9f9ef..e077444292 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.9.0-next.1", + "version": "0.9.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -73,8 +73,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index d2353d9625..e2aad374b3 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-azure-devops-backend +## 0.3.2 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.3.2-next.0 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index 6b5794d850..4125e9be24 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.3.2-next.0", + "version": "0.3.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/plugin-azure-devops-common": "^0.2.0", "@types/express": "^4.17.6", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.35.0" diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 042dad9a9d..8e300e9699 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-azure-devops +## 0.1.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.13-next.0 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index f9830dc5ab..7052dee6d5 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.1.13-next.0", + "version": "0.1.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,11 +28,11 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/plugin-azure-devops-common": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index 24ed3f035f..54c46a6f3e 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-badges-backend +## 0.1.17 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.17-next.0 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index 06d73ddc11..f5d533522e 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges-backend", "description": "A Backstage backend plugin that generates README badges for your entities", - "version": "0.1.17-next.0", + "version": "0.1.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -45,7 +45,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index fa3b72c00d..e49dc620ee 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-badges +## 0.2.21 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.21-next.0 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 55e8d736da..c27375b995 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges", "description": "A Backstage plugin that generates README badges for your entities", - "version": "0.2.21-next.0", + "version": "0.2.21", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,10 +28,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index 3427a7bb0e..4262b3fe11 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bazaar-backend +## 0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + - @backstage/backend-test-utils@0.1.16 + ## 0.1.8-next.1 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 55a50c9575..a713e61503 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.1.8-next.1", + "version": "0.1.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", - "@backstage/backend-test-utils": "^0.1.16-next.1", + "@backstage/backend-common": "^0.10.6", + "@backstage/backend-test-utils": "^0.1.16", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -31,7 +31,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1" + "@backstage/cli": "^0.13.1" }, "files": [ "dist", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index 949910ae40..8fd907c6bd 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bazaar +## 0.1.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/cli@0.13.1 + - @backstage/plugin-catalog@0.7.11 + ## 0.1.12-next.0 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 2e4967f814..111bccced6 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.12-next.0", + "version": "0.1.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,11 +23,11 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/cli": "^0.13.1-next.0", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/cli": "^0.13.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog": "^0.7.11-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog": "^0.7.11", + "@backstage/plugin-catalog-react": "^0.6.13", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -44,8 +44,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/cli": "^0.13.1", + "@backstage/dev-utils": "^0.2.20", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.0.6" }, diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index f91dbbd5b3..e37e17882c 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitrise +## 0.1.24 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.24-next.0 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 6affc70775..6c8dea09b4 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitrise", "description": "A Backstage plugin that integrates towards Bitrise", - "version": "0.1.24-next.0", + "version": "0.1.24", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index c6e97d4906..67e8aeade2 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.3.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@0.21.2 + ## 0.3.11-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 79dbf3335c..cb57a8fbed 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", "description": "A Backstage catalog backend modules that helps integrate towards LDAP", - "version": "0.3.11-next.0", + "version": "0.3.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-backend": "^0.21.2-next.0", + "@backstage/plugin-catalog-backend": "^0.21.2", "@backstage/types": "^0.1.1", "@types/ldapjs": "^2.2.0", "ldapjs": "^2.2.0", @@ -40,7 +40,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.0", + "@backstage/cli": "^0.13.1", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index 4a36db457b..6d8771b609 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.2.14 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@0.21.2 + ## 0.2.14-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 8d102bb35f..795a113144 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", "description": "A Backstage catalog backend modules that helps integrate towards Microsoft Graph", - "version": "0.2.14-next.0", + "version": "0.2.14", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "@azure/msal-node": "^1.1.0", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/plugin-catalog-backend": "^0.21.2-next.1", + "@backstage/plugin-catalog-backend": "^0.21.2", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -42,9 +42,9 @@ "qs": "^6.9.4" }, "devDependencies": { - "@backstage/backend-common": "^0.10.6-next.0", - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/backend-common": "^0.10.6", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@types/lodash": "^4.14.151", "msw": "^0.35.0" }, diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index 3558b8a804..e46d30350f 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend +## 0.21.2 + +### Patch Changes + +- fac5f112b4: chore(deps): bump `prom-client` from 13.2.0 to 14.0.1 +- 5bbffa60be: Pass authorization token to location service inside location api routes +- Updated dependencies + - @backstage/plugin-catalog-common@0.1.2 + - @backstage/backend-common@0.10.6 + - @backstage/plugin-permission-node@0.4.2 + ## 0.21.2-next.1 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 17dc876d99..f2f9d91b1b 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "0.21.2-next.1", + "version": "0.21.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,15 +30,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-common": "^0.1.2-next.0", + "@backstage/plugin-catalog-common": "^0.1.2", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.2-next.1", + "@backstage/plugin-permission-node": "^0.4.2", "@backstage/search-common": "^0.2.2", "@backstage/types": "^0.1.1", "@octokit/graphql": "^4.5.8", @@ -65,10 +65,10 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.1", - "@backstage/cli": "^0.13.1-next.1", + "@backstage/backend-test-utils": "^0.1.16", + "@backstage/cli": "^0.13.1", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/test-utils": "^0.2.4", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/lodash": "^4.14.151", diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index 0d39a00c39..a236e55857 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-catalog-common +## 0.1.2 + +### Patch Changes + +- ba59832aed: Adds new `catalogEntityCreatePermission` which can be imported and used when authoring a permission policy to restrict/grant a user's access to the catalog import plugin. (And the "Register Existing Component" button which navigates there). + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 91dda05159..b9cf9a20dd 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-common", "description": "Common functionalities for the catalog plugin", - "version": "0.1.2-next.0", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/plugin-permission-common": "^0.4.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1" + "@backstage/cli": "^0.13.1" }, "files": [ "dist" diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 0da33cddf9..56446575da 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-graph +## 0.2.9 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.9-next.0 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index b3c4103be3..10dafe8daa 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.2.9-next.0", + "version": "0.2.9", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,9 +23,9 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index 652f39ed61..f3aae8182e 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,47 @@ # @backstage/plugin-catalog-import +## 0.8.0 + +### Minor Changes + +- 2e8764b95f: Make filename, branch name and examples URLs used in catalog import customizable. + + Catalog backend ingestion loop can be already configured to fetch targets with custom catalog filename (other than `catalog-info.yaml`). It's now possible to customize said filename and branch name used in pull requests created by catalog import flow too. This allows organizations to further customize Backstage experience and to better reflect their branding. + + Filename (default: `catalog-info.yaml`) and branch name (default: `backstage-integration`) used in pull requests can be configured in `app-config.yaml` as follows: + + ```yaml + // app-config.yaml + + catalog: + import: + entityFilename: anvil.yaml + pullRequestBranchName: anvil-integration + ``` + + Following React components have also been updated to accept optional props for providing example entity and repository paths: + + ```tsx + + ``` + + ```tsx + + ``` + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/integration-react@0.1.20 + ## 0.8.0-next.0 ### Minor Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 7e997e1ea8..0b452aa239 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-import", "description": "A Backstage plugin the helps you import entities into your catalog", - "version": "0.8.0-next.0", + "version": "0.8.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/config": "^0.1.13", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog-react": "^0.6.13", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index fdae107b88..e38f17b37d 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog-react +## 0.6.13 + +### Patch Changes + +- f7257dff6f: The `` component now accepts a `noTrack` prop, which prevents the `click` event from being captured by the Analytics API. This can be used if tracking is explicitly not warranted, or in order to use custom link tracking in specific situations. +- 300f8cdaee: Fix bug: previously the filter would be set to "all" on page load, even if the + `initiallySelectedFilter` on the `DefaultCatalogPage` was set to something else, + or a different query parameter was supplied. Now, the prop and query parameters + control the filter as expected. Additionally, after this change any filters + which match 0 items will be disabled, and the filter will be reverted to 'all' + if they're set on page load. +- 6acc8f7db7: Add caching to the useEntityPermission hook + + The hook now caches the authorization decision based on the permission + the entity, and returns the cache match value as the default `allowed` value while loading. This helps avoid flicker in UI elements that would be conditionally rendered based on the `allowed` result of this hook. + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.6.13-next.1 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index ae3fd076e8..9018ea75d7 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "0.6.13-next.1", + "version": "0.6.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", @@ -54,10 +54,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/plugin-catalog-common": "^0.1.2-next.0", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/plugin-catalog-common": "^0.1.2", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 7810e39f7d..8ccca07609 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog +## 0.7.11 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/plugin-catalog-common@0.1.2 + - @backstage/integration-react@0.1.20 + ## 0.7.11-next.1 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index d0b0ee972e..0a3211fcaf 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "0.7.11-next.1", + "version": "0.7.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,12 +33,12 @@ "dependencies": { "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-common": "^0.1.2-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog-common": "^0.1.2", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -54,11 +54,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", "@backstage/plugin-permission-react": "^0.3.0", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index 303114a79c..5ad74a75c4 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-circleci +## 0.2.36 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.36-next.0 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 4f03aad0de..8fffeffc37 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-circleci", "description": "A Backstage plugin that integrates towards Circle CI", - "version": "0.2.36-next.0", + "version": "0.2.36", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 6f7e0f7562..08c66d50dd 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-cloudbuild +## 0.2.34 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.34-next.0 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 35955049e7..6bb299418b 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cloudbuild", "description": "A Backstage plugin that integrates towards Google Cloud Build", - "version": "0.2.34-next.0", + "version": "0.2.34", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 9a98e96f6f..def8cca7f0 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-code-coverage-backend +## 0.1.21 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.21-next.0 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 2dc5afb070..e01619671f 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.1.21-next.0", + "version": "0.1.21", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -36,7 +36,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index bd44921180..7aef422166 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-code-coverage +## 0.1.24 + +### Patch Changes + +- 2ce5e4e0a7: Fixed a bug in the FileExplorer component which made it impossible to navigate upwards to a containing folder by clicking on the folder breadcrumb. +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.24-next.1 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index a453916301..44e970d54a 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.1.24-next.1", + "version": "0.1.24", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index 05e694f3eb..9c6ff062a7 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-config-schema +## 0.1.20 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.1.20-next.0 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 05cfff2cb0..26a583fa95 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-config-schema", "description": "A Backstage plugin that lets you browse the configuration schema of your app", - "version": "0.1.20-next.0", + "version": "0.1.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", @@ -38,10 +38,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 4a068b20d6..93a9bbdb19 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-cost-insights +## 0.11.19 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.11.19-next.0 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 31c89f6625..288464129d 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights", "description": "A Backstage plugin that helps you keep track of your cloud spend", - "version": "0.11.19-next.0", + "version": "0.11.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 0dc472d3f0..03c200c5e8 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-explore +## 0.3.28 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.3.28-next.0 ### Patch Changes diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 97a96b3589..424f6abf2f 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore", "description": "A Backstage plugin for building an exploration page of your software ecosystem", - "version": "0.3.28-next.0", + "version": "0.3.28", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/plugin-explore-react": "^0.0.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index 7af43b2697..c441693df6 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-firehydrant +## 0.1.14 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.14-next.0 ### Patch Changes diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 16a58a7c7a..4d1cc6ba44 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-firehydrant", "description": "A Backstage plugin that integrates towards FireHydrant", - "version": "0.1.14-next.0", + "version": "0.1.14", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,10 +36,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index a65d8a223a..d01d581db8 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-fossa +## 0.2.29 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.29-next.0 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index f315464d2c..9ce1008659 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-fossa", "description": "A Backstage plugin that integrates towards FOSSA", - "version": "0.2.29-next.0", + "version": "0.2.29", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,10 +33,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index 7df85f2a37..77b57867c5 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-gcp-projects +## 0.3.16 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.3.16-next.0 ### Patch Changes diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index dc60461c96..0df05ae7b1 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.16-next.0", + "version": "0.3.16", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index 5ba514faa9..605f27322e 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-git-release-manager +## 0.3.10 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.3.10-next.0 ### Patch Changes diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 2af492439b..b2acf96ccf 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.10-next.0", + "version": "0.3.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", "@backstage/theme": "^0.2.14", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index a36f91f452..ac669c1add 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-github-actions +## 0.4.34 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.4.34-next.0 ### Patch Changes diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index f14d6f039a..6174e9658a 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.4.34-next.0", + "version": "0.4.34", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,10 +34,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 913b4b16bd..26c0fed02f 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-github-deployments +## 0.1.28 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/integration-react@0.1.20 + ## 0.1.28-next.0 ### Patch Changes diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index 6bf18d2b9c..ace3b9aa75 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.28-next.0", + "version": "0.1.28", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,12 +22,12 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 99ccf963de..e62a316be9 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-gitops-profiles +## 0.3.15 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.3.15-next.0 ### Patch Changes diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index b939115648..d7efcf9020 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.15-next.0", + "version": "0.3.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index bf1553c234..711aba22b9 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-gocd +## 0.1.3 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.3-next.0 ### Patch Changes diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 1896a07bc9..7ec9d4c1d6 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.3-next.0", + "version": "0.1.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,10 +29,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index 02af5cb5f2..6bf1ea63d2 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-graphiql +## 0.2.29 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.2.29-next.0 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index a1f8e99e42..ef872e526b 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.29-next.0", + "version": "0.2.29", "private": false, "publishConfig": { "access": "public", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/graphql-backend/CHANGELOG.md b/plugins/graphql-backend/CHANGELOG.md index a1f348ee41..822fb4f10b 100644 --- a/plugins/graphql-backend/CHANGELOG.md +++ b/plugins/graphql-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-graphql-backend +## 0.1.13 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.13-next.0 ### Patch Changes diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 0f59b3f9c6..424591f6fe 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphql-backend", "description": "An experimental Backstage backend plugin for GraphQL", - "version": "0.1.13-next.0", + "version": "0.1.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/plugin-catalog-graphql": "^0.3.1", "@graphql-tools/schema": "^8.3.1", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "eslint-plugin-graphql": "^4.0.0", "msw": "^0.35.0", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index 31d2f7b725..4bbf3fa645 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-home +## 0.4.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-search@0.6.1 + ## 0.4.13-next.0 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index cb3d385a65..a1a09329f8 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.13-next.0", + "version": "0.4.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", - "@backstage/plugin-search": "^0.6.1-next.0", + "@backstage/plugin-search": "^0.6.1", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index e2d19592e8..9b17c74c28 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-ilert +## 0.1.23 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.23-next.0 ### Patch Changes diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index e7c2e81cb7..b9eb06a1a0 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.1.23-next.0", + "version": "0.1.23", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,10 +22,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index e75825b505..f05f051d9a 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-jenkins-backend +## 0.1.12 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.12-next.0 ### Patch Changes diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index 305e620a99..a5df566878 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins-backend", "description": "A Backstage backend plugin that integrates towards Jenkins", - "version": "0.1.12-next.0", + "version": "0.1.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/jenkins": "^0.23.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 3e2291dbf5..882277af93 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-jenkins +## 0.5.19 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.5.19-next.0 ### Patch Changes diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 9c68873168..fc611036e2 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.5.19-next.0", + "version": "0.5.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,10 +33,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index cb5fb18660..62e802441a 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kafka-backend +## 0.2.16 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.2.16-next.0 ### Patch Changes diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index 28b801f6d6..6d9ad69cd2 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.16-next.0", + "version": "0.2.16", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", @@ -44,7 +44,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/jest-when": "^2.7.2", "@types/lodash": "^4.14.151", "jest-when": "^3.1.0", diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index 48d7cfcbbb..8452fd77d6 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kafka +## 0.2.27 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.27-next.0 ### Patch Changes diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 47441e2007..34188ba547 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.2.27-next.0", + "version": "0.2.27", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,10 +36,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index 61cf451961..768bccf657 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kubernetes-backend +## 0.4.6 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.4.6-next.0 ### Patch Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 00ee830047..b30737f9f7 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.4.6-next.0", + "version": "0.4.6", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", @@ -55,7 +55,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/aws4": "^1.5.1", "supertest": "^6.1.3", "aws-sdk-mock": "^5.2.1", diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index d3aef232e8..aba46a682c 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kubernetes +## 0.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.5.6-next.0 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index a2c0c4c9bd..487f1164f3 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.5.6-next.0", + "version": "0.5.6", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/plugin-kubernetes-common": "^0.2.2", "@kubernetes/client-node": "^0.16.0", "@backstage/theme": "^0.2.14", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index c420bc2549..eee6a97e3f 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-lighthouse +## 0.2.36 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.36-next.0 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 386e651770..081ee6eb41 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.2.36-next.0", + "version": "0.2.36", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index 24f20b3ac1..e61ab4900d 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-newrelic-dashboard +## 0.1.5 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 9833593766..af2c6c64e4 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.1.5-next.0", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,18 +21,18 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.0", + "@backstage/plugin-catalog-react": "^0.6.13", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/dev-utils": "^0.2.20-next.1", + "@backstage/cli": "^0.13.1", + "@backstage/dev-utils": "^0.2.20", "@testing-library/jest-dom": "^5.10.1", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.0.6" diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index a42c8cf3de..fa5b252db2 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-newrelic +## 0.3.15 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.3.15-next.0 ### Patch Changes diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index b9f681976e..286e967e8a 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.15-next.0", + "version": "0.3.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index 397bcb7b82..1e2f0118d3 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-org +## 0.4.1 + +### Patch Changes + +- ef86143c16: Added `relations.memberof` filter to the catalog api call in `MemberListCard` to avoid fetching all the User entity kinds from catalog-backend. +- 64cbca7839: The description from `metadata.description` will now show as the `subheader` on the UserProfileCard in the same way as the GroupProfileCard +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.4.1-next.0 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index 57f4778993..f08c8d37ff 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.4.1-next.0", + "version": "0.4.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ }, "devDependencies": { "@backstage/catalog-client": "^0.5.5", - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index fe22454657..4de0112481 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-pagerduty +## 0.3.24 + +### Patch Changes + +- 5a459626bc: Fix change events tab error when change events exist +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.3.24-next.0 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index ee7ee4cbc7..96b1c6738b 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.3.24-next.0", + "version": "0.3.24", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 17cb7d5303..5a2aaa72bf 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-permission-backend +## 0.4.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0 + - @backstage/backend-common@0.10.6 + - @backstage/plugin-permission-node@0.4.2 + ## 0.4.2-next.1 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 23755a23d3..8c0bdb93c4 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.4.2-next.1", + "version": "0.4.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,12 +19,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-auth-backend": "^0.9.0-next.1", + "@backstage/plugin-auth-backend": "^0.9.0", "@backstage/plugin-permission-common": "^0.4.0", - "@backstage/plugin-permission-node": "^0.4.2-next.1", + "@backstage/plugin-permission-node": "^0.4.2", "@types/express": "*", "dataloader": "^2.0.0", "express": "^4.17.1", @@ -36,7 +36,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 84a6ad7baa..c4690777f6 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-permission-node +## 0.4.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0 + - @backstage/backend-common@0.10.6 + ## 0.4.2-next.1 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 78d2d9397a..a5b6adabc2 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.4.2-next.1", + "version": "0.4.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", - "@backstage/plugin-auth-backend": "^0.9.0-next.1", + "@backstage/plugin-auth-backend": "^0.9.0", "@backstage/plugin-permission-common": "^0.4.0", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -40,7 +40,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index ec7668300b..4fb4328974 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,35 @@ # @backstage/plugin-proxy-backend +## 0.2.17 + +### Patch Changes + +- 332d3decb2: Adds a new option `skipInvalidTargets` for the proxy `createRouter` which allows the proxy backend to be started with an invalid proxy configuration. If configured, it will simply skip the failed proxy and mount the other valid proxies. + + To configure it to pass by failing proxies: + + ``` + const router = await createRouter({ + config, + logger, + discovery, + skipInvalidProxies: true, + }); + ``` + + If you would like it to fail if a proxy is configured badly: + + ``` + const router = await createRouter({ + config, + logger, + discovery, + }); + ``` + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.2.17-next.1 ### Patch Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 66a3750d32..3d7d03794b 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-proxy-backend", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", - "version": "0.2.17-next.1", + "version": "0.2.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -43,7 +43,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index 14bdf74a34..9f6c657935 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar-backend +## 0.1.20 + +### Patch Changes + +- 91faf87aaf: chore(deps): bump `camelcase-keys` from 6.2.2 to 7.0.1 +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.20-next.1 ### Patch Changes diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index c3490e5a38..81f288c9e8 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar-backend", "description": "A Backstage backend plugin that integrates towards Rollbar", - "version": "0.1.20-next.1", + "version": "0.1.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@types/express": "^4.17.6", "camelcase-keys": "^7.0.1", @@ -48,8 +48,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@types/supertest": "^2.0.8", "msw": "^0.36.3", "supertest": "^6.1.3" diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index 5fc59c3efd..fdb3feb3ea 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar +## 0.3.25 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.3.25-next.0 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 37f7ac54f6..35e660a650 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.3.25-next.0", + "version": "0.3.25", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index 646546b743..231538cbc1 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.1.10 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@0.15.23 + - @backstage/backend-common@0.10.6 + ## 0.1.10-next.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index 1f13fd8f2e..e7e2d7b469 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.1.10-next.1", + "version": "0.1.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,10 +20,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", + "@backstage/plugin-scaffolder-backend": "^0.15.23", "@backstage/config": "^0.1.13", "@backstage/types": "^0.1.1", "command-exists": "^1.2.9", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/fs-extra": "^9.0.1", "@types/mock-fs": "^4.13.0", "@types/jest": "^26.0.7", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index cd3b32419b..bb78b9e5fd 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.2.5 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@0.15.23 + - @backstage/backend-common@0.10.6 + ## 0.2.5-next.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index ecfc057bcc..36d68bf46d 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.2.5-next.1", + "version": "0.2.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", + "@backstage/backend-common": "^0.10.6", + "@backstage/plugin-scaffolder-backend": "^0.15.23", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", @@ -31,7 +31,7 @@ "fs-extra": "^9.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index fb6c0bdab8..517cd20ca0 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.1.4 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@0.15.23 + ## 0.1.4-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index 747254181b..b43d0c50bb 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.1.4-next.0", + "version": "0.1.4", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,13 +21,13 @@ }, "dependencies": { "@backstage/config": "^0.1.13", - "@backstage/plugin-scaffolder-backend": "^0.15.23-next.1", + "@backstage/plugin-scaffolder-backend": "^0.15.23", "@backstage/types": "^0.1.1", "winston": "^3.2.1", "yeoman-environment": "^3.6.0" }, "devDependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@types/jest": "^26.0.7" }, "files": [ diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index cf6a4e56e0..b6061e8a38 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend +## 0.15.23 + +### Patch Changes + +- 2e0dbb0e50: Migrate from deprecated package @octokit/rest to octokit +- c95df1631e: Added support for templating secrets into actions input, and also added an extra `token` input argument to all publishers to provide a token that would override the `integrations.config`. + You can find more information over at [Writing Templates](https://backstage.io/docs/features/software-templates/writing-templates#using-the-users-oauth-token) +- Updated dependencies + - @backstage/plugin-catalog-backend@0.21.2 + - @backstage/backend-common@0.10.6 + - @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.10 + ## 0.15.23-next.1 ### Patch Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index acec0ec854..335d85327a 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "0.15.23-next.1", + "version": "0.15.23", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,15 +31,15 @@ "build:assets": "node scripts/build-nunjucks.js" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-backend": "^0.21.2-next.1", + "@backstage/plugin-catalog-backend": "^0.21.2", "@backstage/plugin-scaffolder-common": "^0.1.3", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.10-next.1", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.10", "@backstage/types": "^0.1.1", "@gitbeaker/core": "^34.6.0", "@gitbeaker/node": "^35.1.0", @@ -73,8 +73,8 @@ "vm2": "^3.9.5" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index dd850ffe51..dfbe114f82 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder +## 0.12.1 + +### Patch Changes + +- ba59832aed: Permission the Register Existing Component button +- cee44ad289: Added the ability to collect users `oauth` token from the `RepoUrlPicker` for use in the template manifest +- a681cb9c2f: Make linkTarget configurable for MarkdownContent component +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/plugin-catalog-common@0.1.2 + - @backstage/integration-react@0.1.20 + ## 0.12.1-next.1 ### Patch Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 62485bd8de..60852e3b93 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "0.12.1-next.1", + "version": "0.12.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,13 +34,13 @@ "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog-common": "^0.1.2-next.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog-common": "^0.1.2", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/plugin-permission-react": "^0.3.0", "@backstage/plugin-scaffolder-common": "^0.1.3", "@backstage/theme": "^0.2.14", @@ -69,11 +69,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/plugin-catalog": "^0.7.11-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/plugin-catalog": "^0.7.11", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index 2a40ca41ca..245a4ded3f 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-search-backend-module-pg +## 0.2.5 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.2.5-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 3c156be5f8..51a7933ae3 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-pg", "description": "A module for the search backend that implements search using PostgreSQL", - "version": "0.2.5-next.0", + "version": "0.2.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,15 +20,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/search-common": "^0.2.2", "@backstage/plugin-search-backend-node": "^0.4.5", "lodash": "^4.17.21", "knex": "^0.95.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.1", - "@backstage/cli": "^0.13.1-next.1" + "@backstage/backend-test-utils": "^0.1.16", + "@backstage/cli": "^0.13.1" }, "files": [ "dist", diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index eee72f6a56..46daea6df6 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend +## 0.4.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.9.0 + - @backstage/backend-common@0.10.6 + - @backstage/plugin-permission-node@0.4.2 + ## 0.4.1-next.1 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index ea897c4a9f..3329115650 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend", "description": "The Backstage backend plugin that provides your backstage app with search", - "version": "0.4.1-next.1", + "version": "0.4.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,13 +20,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/search-common": "^0.2.2", - "@backstage/plugin-auth-backend": "^0.9.0-next.1", + "@backstage/plugin-auth-backend": "^0.9.0", "@backstage/plugin-permission-common": "^0.4.0-next.0", - "@backstage/plugin-permission-node": "^0.4.2-next.1", + "@backstage/plugin-permission-node": "^0.4.2", "@backstage/plugin-search-backend-node": "^0.4.5", "@backstage/types": "^0.1.1", "@types/express": "^4.17.6", @@ -40,7 +40,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 5abfb45f0b..f6692413b4 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search +## 0.6.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.6.1-next.0 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index adb2ad64fd..6536c9c386 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search", "description": "The Backstage plugin that provides your backstage app with search", - "version": "0.6.1-next.0", + "version": "0.6.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/search-common": "^0.2.2", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index ae94faaa19..acccd2dc4c 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-sentry +## 0.3.35 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.3.35-next.0 ### Patch Changes diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index e7e0b56654..274cc6e1e2 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sentry", "description": "A Backstage plugin that integrates towards Sentry", - "version": "0.3.35-next.0", + "version": "0.3.35", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/shortcuts/CHANGELOG.md b/plugins/shortcuts/CHANGELOG.md index 0d382afeb3..60c0b9fe84 100644 --- a/plugins/shortcuts/CHANGELOG.md +++ b/plugins/shortcuts/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-shortcuts +## 0.1.21 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.1.21-next.0 ### Patch Changes diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index b6df61596a..23e61cda42 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-shortcuts", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", - "version": "0.1.21-next.0", + "version": "0.1.21", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 116c26a30e..7cbabeda41 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-sonarqube +## 0.2.15 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.2.15-next.0 ### Patch Changes diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 4f7f04aaec..4d6d83a67a 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.2.15-next.0", + "version": "0.2.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index dfde9b7013..90ff0a5bd1 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-splunk-on-call +## 0.3.21 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.3.21-next.0 ### Patch Changes diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index cb69f28c30..f3de0d3602 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-splunk-on-call", "description": "A Backstage plugin that integrates towards Splunk On-Call", - "version": "0.3.21-next.0", + "version": "0.3.21", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,9 +32,9 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index 69a4b41c07..d136927b9b 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.7 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + - @backstage/plugin-tech-insights-node@0.2.1 + ## 0.1.7-next.0 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index bccf36c4d4..77ce4b3268 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.7-next.0", + "version": "0.1.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/plugin-tech-insights-common": "^0.2.1", - "@backstage/plugin-tech-insights-node": "^0.2.1-next.0", + "@backstage/plugin-tech-insights-node": "^0.2.1", "ajv": "^7.0.3", "json-rules-engine": "^6.1.2", "lodash": "^4.17.21", @@ -43,7 +43,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/node-cron": "^3.0.1" }, "files": [ diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index 0a042bd267..a9032f9c98 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-backend +## 0.2.3 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + - @backstage/plugin-tech-insights-node@0.2.1 + ## 0.2.3-next.0 ### Patch Changes diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index ab92fc0dfd..d63bb60499 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.2.3-next.0", + "version": "0.2.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,13 +31,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/plugin-tech-insights-common": "^0.2.1", - "@backstage/plugin-tech-insights-node": "^0.2.1-next.0", + "@backstage/plugin-tech-insights-node": "^0.2.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -51,8 +51,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.16-next.1", - "@backstage/cli": "^0.13.1-next.1", + "@backstage/backend-test-utils": "^0.1.16", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "@types/node-cron": "^3.0.0", "@types/semver": "^7.3.8", diff --git a/plugins/tech-insights-node/CHANGELOG.md b/plugins/tech-insights-node/CHANGELOG.md index 799c10d435..4f3ed0d13e 100644 --- a/plugins/tech-insights-node/CHANGELOG.md +++ b/plugins/tech-insights-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-tech-insights-node +## 0.2.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.2.1-next.0 ### Patch Changes diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index ae35d32201..7ed74ab76d 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-node", - "version": "0.2.1-next.0", + "version": "0.2.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/config": "^0.1.13", "@backstage/plugin-tech-insights-common": "^0.2.1", "@types/luxon": "^2.0.5", @@ -38,7 +38,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1" + "@backstage/cli": "^0.13.1" }, "files": [ "dist" diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index 78147429bb..a63a1a8f80 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights +## 0.1.7 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.7-next.0 ### Patch Changes diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index de6f05bf04..2f0d2f3638 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.1.7-next.0", + "version": "0.1.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/plugin-tech-insights-common": "^0.2.1", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index c224d374f9..b7952b6f12 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-tech-radar +## 0.5.4 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.5.4-next.0 ### Patch Changes diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index 06153adffb..4da9252c6a 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", - "version": "0.5.4-next.0", + "version": "0.5.4", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index dd5df76d42..4593b8db5b 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-techdocs-backend +## 0.13.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@0.1.2 + - @backstage/backend-common@0.10.6 + - @backstage/techdocs-common@0.11.6 + ## 0.13.2-next.0 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 6189d2bcac..292b70a61d 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-backend", "description": "The Backstage backend plugin that renders technical documentation for your components", - "version": "0.13.2-next.0", + "version": "0.13.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,15 +31,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/plugin-catalog-common": "^0.1.2-next.0", + "@backstage/plugin-catalog-common": "^0.1.2", "@backstage/search-common": "^0.2.2", - "@backstage/techdocs-common": "^0.11.6-next.0", + "@backstage/techdocs-common": "^0.11.6", "@types/express": "^4.17.6", "cross-fetch": "^3.0.6", "dockerode": "^3.3.1", @@ -53,8 +53,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/test-utils": "^0.2.4", "@types/dockerode": "^3.3.0", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index f70af118ed..e0547de64e 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-techdocs +## 0.13.2 + +### Patch Changes + +- 742434a6ba: Fixed a bug where links to files within a TechDocs site that use the `download` attribute would result in a 404 in cases where the TechDocs backend and Backstage frontend application are on the same host. +- 359c31e31d: Added support for documentation using the raw `` tag to point to relative resources like audio or video files. +- 18317a08db: Fixed a bug where copy-to-clipboard buttons were appended to unintended elements. +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + - @backstage/integration-react@0.1.20 + - @backstage/plugin-catalog@0.7.11 + - @backstage/plugin-search@0.6.1 + ## 0.13.2-next.1 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 830adb1aa9..6e571ec5ac 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "0.13.2-next.1", + "version": "0.13.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,14 +34,14 @@ "dependencies": { "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/integration": "^0.7.2", - "@backstage/integration-react": "^0.1.20-next.0", - "@backstage/plugin-catalog": "^0.7.11-next.1", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", - "@backstage/plugin-search": "^0.6.1-next.0", + "@backstage/integration-react": "^0.1.20", + "@backstage/plugin-catalog": "^0.7.11", + "@backstage/plugin-catalog-react": "^0.6.13", + "@backstage/plugin-search": "^0.6.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -62,10 +62,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/todo-backend/CHANGELOG.md b/plugins/todo-backend/CHANGELOG.md index 9d1dde0c7f..9e2275dc7b 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-todo-backend +## 0.1.20 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.10.6 + ## 0.1.20-next.0 ### Patch Changes diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index 95b8b0dc2e..456600e0be 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo-backend", "description": "A Backstage backend plugin that lets you browse TODO comments in your source code", - "version": "0.1.20-next.0", + "version": "0.1.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,7 +25,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.6-next.0", + "@backstage/backend-common": "^0.10.6", "@backstage/catalog-client": "^0.5.5", "@backstage/catalog-model": "^0.9.10", "@backstage/config": "^0.1.13", @@ -39,7 +39,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", + "@backstage/cli": "^0.13.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index 1d5a7b42cc..e659da3131 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-todo +## 0.1.21 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + - @backstage/plugin-catalog-react@0.6.13 + ## 0.1.21-next.0 ### Patch Changes diff --git a/plugins/todo/package.json b/plugins/todo/package.json index b95f69716d..fc9893fcd9 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo", "description": "A Backstage plugin that lets you browse TODO comments in your source code", - "version": "0.1.21-next.0", + "version": "0.1.21", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,10 +28,10 @@ }, "dependencies": { "@backstage/catalog-model": "^0.9.10", - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", - "@backstage/plugin-catalog-react": "^0.6.13-next.1", + "@backstage/plugin-catalog-react": "^0.6.13", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index 8abf24f743..b4438be6ce 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-user-settings +## 0.3.18 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.3.18-next.0 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 5b11d3c7b8..4506cdfb75 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings", "description": "A Backstage plugin that provides a settings page", - "version": "0.3.18-next.0", + "version": "0.3.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index f2b15f69dd..652dcca6b9 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-xcmetrics +## 0.2.17 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.7 + ## 0.2.17-next.0 ### Patch Changes diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index f3e30f9c04..7680c787d5 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-xcmetrics", "description": "A Backstage plugin that shows XCode build metrics for your components", - "version": "0.2.17-next.0", + "version": "0.2.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,7 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.7-next.1", + "@backstage/core-components": "^0.8.7", "@backstage/core-plugin-api": "^0.6.0", "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.1-next.1", - "@backstage/core-app-api": "^0.5.2-next.0", - "@backstage/dev-utils": "^0.2.20-next.1", - "@backstage/test-utils": "^0.2.4-next.0", + "@backstage/cli": "^0.13.1", + "@backstage/core-app-api": "^0.5.2", + "@backstage/dev-utils": "^0.2.20", + "@backstage/test-utils": "^0.2.4", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/yarn.lock b/yarn.lock index 7f773989e3..77894f7fe2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1366,65 +1366,6 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@backstage/core-app-api@*": - version "0.5.1" - resolved "https://registry.npmjs.org/@backstage/core-app-api/-/core-app-api-0.5.1.tgz#b58474add43d3f2ed7f941287170c1147da48fb1" - integrity sha512-2t0T2uPLf2rFrQ0l4DkuRVrz1EKKswTC5yBo/O+uyvmbJC1aMSh6oqUZOFLZ/BuLKVctIKA88Rnuy+QbxnZPvQ== - dependencies: - "@backstage/config" "^0.1.13" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/types" "^0.1.1" - "@backstage/version-bridge" "^0.1.1" - "@types/prop-types" "^15.7.3" - prop-types "^15.7.2" - react-router-dom "6.0.0-beta.0" - react-use "^17.2.4" - zen-observable "^0.8.15" - zod "^3.11.6" - -"@backstage/core-components@*", "@backstage/core-components@^0.8.0", "@backstage/core-components@^0.8.5", "@backstage/core-components@^0.8.6": - version "0.8.6" - resolved "https://registry.npmjs.org/@backstage/core-components/-/core-components-0.8.6.tgz#ad365c2d8ee99ec1280c1212b7de14a922dd6f34" - integrity sha512-dPbsENsqd6NBqg1ZcwZdOBdK4XxjkDP78ANE5Opcx1Kas+LpvFEPSSrK9AYkbZS4SK71vbreAmk/ovCLpj5Odg== - dependencies: - "@backstage/config" "^0.1.13" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/errors" "^0.2.0" - "@backstage/theme" "^0.2.14" - "@material-table/core" "^3.1.0" - "@material-ui/core" "^4.12.2" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.57" - "@types/react-sparklines" "^1.7.0" - "@types/react-text-truncate" "^0.14.0" - ansi-regex "^5.0.1" - classnames "^2.2.6" - d3-selection "^3.0.0" - d3-shape "^3.0.0" - d3-zoom "^3.0.0" - dagre "^0.8.5" - history "^5.0.0" - immer "^9.0.1" - lodash "^4.17.21" - pluralize "^8.0.0" - prop-types "^15.7.2" - qs "^6.9.4" - rc-progress "3.2.4" - react-helmet "6.1.0" - react-hook-form "^7.12.2" - react-markdown "^8.0.0" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-sparklines "^1.7.0" - react-syntax-highlighter "^15.4.5" - react-text-truncate "^0.17.0" - react-use "^17.2.4" - react-virtualized-auto-sizer "^1.0.6" - react-window "^1.8.6" - remark-gfm "^3.0.1" - zen-observable "^0.8.15" - zod "^3.11.6" - "@backstage/core-plugin-api@^0.4.0": version "0.4.1" resolved "https://registry.npmjs.org/@backstage/core-plugin-api/-/core-plugin-api-0.4.1.tgz#c0a13504bdfa61ae3d0db96934cd6c32a7574446" @@ -1441,76 +1382,6 @@ react-use "^17.2.4" zen-observable "^0.8.15" -"@backstage/integration-react@^0.1.10", "@backstage/integration-react@^0.1.19": - version "0.1.19" - resolved "https://registry.npmjs.org/@backstage/integration-react/-/integration-react-0.1.19.tgz#99ac8bfb3f2bd0758fab04157660d7d34f4231a4" - integrity sha512-sYPERl63XJwmlsQ981BeCnqZjD1WsTU39x1lNIdO+EAOpy3LHe9qO5T4wSNLZgJvaliK1KuKf3w4ClU+qcDYvg== - dependencies: - "@backstage/config" "^0.1.13" - "@backstage/core-components" "^0.8.5" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration" "^0.7.2" - "@backstage/theme" "^0.2.14" - "@material-ui/core" "^4.12.2" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.57" - react-use "^17.2.4" - -"@backstage/plugin-catalog-common@^0.1.1": - version "0.1.1" - resolved "https://registry.npmjs.org/@backstage/plugin-catalog-common/-/plugin-catalog-common-0.1.1.tgz#ca9ae389f0c131abfe85fb036917088afab38399" - integrity sha512-GYGKMD7ZJuCmxpqhrIS3zZSQGg7rLbza21v2UQF1dvoTdc+cCPFPiOYly0WgCArmaj771X0qB4Yb5Z05kU1DMg== - dependencies: - "@backstage/plugin-permission-common" "^0.4.0" - -"@backstage/plugin-catalog-react@^0.6.12", "@backstage/plugin-catalog-react@^0.6.5": - version "0.6.12" - resolved "https://registry.npmjs.org/@backstage/plugin-catalog-react/-/plugin-catalog-react-0.6.12.tgz#df6e9017ff6ad2e87395af11a277aadd95aef58b" - integrity sha512-0ezerRaR5dbYfoXvsxguUDqAhBxlblPl3uvzHhRDfUcV1r9L+UjKIlRB2tjC8rVtzAh7ob486viKAe6wKnbB5g== - dependencies: - "@backstage/catalog-client" "^0.5.5" - "@backstage/catalog-model" "^0.9.10" - "@backstage/core-components" "^0.8.5" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/errors" "^0.2.0" - "@backstage/integration" "^0.7.2" - "@backstage/plugin-permission-common" "^0.4.0" - "@backstage/plugin-permission-react" "^0.3.0" - "@backstage/types" "^0.1.1" - "@backstage/version-bridge" "^0.1.1" - "@material-ui/core" "^4.12.2" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.57" - jwt-decode "^3.1.0" - lodash "^4.17.21" - qs "^6.9.4" - react-router "6.0.0-beta.0" - react-use "^17.2.4" - zen-observable "^0.8.15" - -"@backstage/plugin-catalog@*": - version "0.7.10" - resolved "https://registry.npmjs.org/@backstage/plugin-catalog/-/plugin-catalog-0.7.10.tgz#0d434a91b61ed98d143a42d472c2ffdfff0fd64f" - integrity sha512-lNvoDL3GGoXtnfFCFnCrvtX7c13LHPuzpS7FWroKcg/3K/AoshUTr8OXQJht56djszzE02ne9r91VIBlYJ1DaQ== - dependencies: - "@backstage/catalog-client" "^0.5.5" - "@backstage/catalog-model" "^0.9.10" - "@backstage/core-components" "^0.8.6" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/errors" "^0.2.0" - "@backstage/integration-react" "^0.1.19" - "@backstage/plugin-catalog-common" "^0.1.1" - "@backstage/plugin-catalog-react" "^0.6.12" - "@backstage/theme" "^0.2.14" - "@material-ui/core" "^4.12.2" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.57" - history "^5.0.0" - lodash "^4.17.21" - react-helmet "6.1.0" - react-router "6.0.0-beta.0" - react-use "^17.2.4" - "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -10801,19 +10672,19 @@ elliptic@^6.0.0: minimalistic-crypto-utils "^1.0.1" "embedded-techdocs-app@file:packages/embedded-techdocs-app": - version "0.2.62-next.1" + version "0.2.62" dependencies: - "@backstage/app-defaults" "^0.1.6-next.1" + "@backstage/app-defaults" "^0.1.6" "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1-next.1" + "@backstage/cli" "^0.13.1" "@backstage/config" "^0.1.13" - "@backstage/core-app-api" "^0.5.2-next.0" - "@backstage/core-components" "^0.8.7-next.1" + "@backstage/core-app-api" "^0.5.2" + "@backstage/core-components" "^0.8.7" "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.20-next.0" - "@backstage/plugin-catalog" "^0.7.11-next.1" - "@backstage/plugin-techdocs" "^0.13.2-next.1" - "@backstage/test-utils" "^0.2.4-next.0" + "@backstage/integration-react" "^0.1.20" + "@backstage/plugin-catalog" "^0.7.11" + "@backstage/plugin-techdocs" "^0.13.2" + "@backstage/test-utils" "^0.2.4" "@backstage/theme" "^0.2.14" "@material-ui/core" "^4.11.0" "@material-ui/icons" "^4.9.1" @@ -11598,54 +11469,54 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" "example-app@file:packages/app": - version "0.2.63-next.1" + version "0.2.63" dependencies: - "@backstage/app-defaults" "^0.1.6-next.1" + "@backstage/app-defaults" "^0.1.6" "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1-next.1" - "@backstage/core-app-api" "^0.5.2-next.0" - "@backstage/core-components" "^0.8.7-next.1" + "@backstage/cli" "^0.13.1" + "@backstage/core-app-api" "^0.5.2" + "@backstage/core-components" "^0.8.7" "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.20-next.0" - "@backstage/plugin-airbrake" "^0.1.2-next.0" - "@backstage/plugin-apache-airflow" "^0.1.5-next.0" - "@backstage/plugin-api-docs" "^0.7.1-next.0" - "@backstage/plugin-azure-devops" "^0.1.13-next.0" - "@backstage/plugin-badges" "^0.2.21-next.0" - "@backstage/plugin-catalog" "^0.7.11-next.1" - "@backstage/plugin-catalog-common" "^0.1.2-next.0" - "@backstage/plugin-catalog-graph" "^0.2.9-next.0" - "@backstage/plugin-catalog-import" "^0.8.0-next.0" - "@backstage/plugin-catalog-react" "^0.6.13-next.1" - "@backstage/plugin-circleci" "^0.2.36-next.0" - "@backstage/plugin-cloudbuild" "^0.2.34-next.0" - "@backstage/plugin-code-coverage" "^0.1.24-next.1" - "@backstage/plugin-cost-insights" "^0.11.19-next.0" - "@backstage/plugin-explore" "^0.3.28-next.0" - "@backstage/plugin-gcp-projects" "^0.3.16-next.0" - "@backstage/plugin-github-actions" "^0.4.34-next.0" - "@backstage/plugin-gocd" "^0.1.3-next.0" - "@backstage/plugin-graphiql" "^0.2.29-next.0" - "@backstage/plugin-home" "^0.4.13-next.0" - "@backstage/plugin-jenkins" "^0.5.19-next.0" - "@backstage/plugin-kafka" "^0.2.27-next.0" - "@backstage/plugin-kubernetes" "^0.5.6-next.0" - "@backstage/plugin-lighthouse" "^0.2.36-next.0" - "@backstage/plugin-newrelic" "^0.3.15-next.0" - "@backstage/plugin-newrelic-dashboard" "^0.1.5-next.0" - "@backstage/plugin-org" "^0.4.1-next.0" - "@backstage/plugin-pagerduty" "0.3.24-next.0" + "@backstage/integration-react" "^0.1.20" + "@backstage/plugin-airbrake" "^0.1.2" + "@backstage/plugin-apache-airflow" "^0.1.5" + "@backstage/plugin-api-docs" "^0.7.1" + "@backstage/plugin-azure-devops" "^0.1.13" + "@backstage/plugin-badges" "^0.2.21" + "@backstage/plugin-catalog" "^0.7.11" + "@backstage/plugin-catalog-common" "^0.1.2" + "@backstage/plugin-catalog-graph" "^0.2.9" + "@backstage/plugin-catalog-import" "^0.8.0" + "@backstage/plugin-catalog-react" "^0.6.13" + "@backstage/plugin-circleci" "^0.2.36" + "@backstage/plugin-cloudbuild" "^0.2.34" + "@backstage/plugin-code-coverage" "^0.1.24" + "@backstage/plugin-cost-insights" "^0.11.19" + "@backstage/plugin-explore" "^0.3.28" + "@backstage/plugin-gcp-projects" "^0.3.16" + "@backstage/plugin-github-actions" "^0.4.34" + "@backstage/plugin-gocd" "^0.1.3" + "@backstage/plugin-graphiql" "^0.2.29" + "@backstage/plugin-home" "^0.4.13" + "@backstage/plugin-jenkins" "^0.5.19" + "@backstage/plugin-kafka" "^0.2.27" + "@backstage/plugin-kubernetes" "^0.5.6" + "@backstage/plugin-lighthouse" "^0.2.36" + "@backstage/plugin-newrelic" "^0.3.15" + "@backstage/plugin-newrelic-dashboard" "^0.1.5" + "@backstage/plugin-org" "^0.4.1" + "@backstage/plugin-pagerduty" "0.3.24" "@backstage/plugin-permission-react" "^0.3.0" - "@backstage/plugin-rollbar" "^0.3.25-next.0" - "@backstage/plugin-scaffolder" "^0.12.1-next.1" - "@backstage/plugin-search" "^0.6.1-next.0" - "@backstage/plugin-sentry" "^0.3.35-next.0" - "@backstage/plugin-shortcuts" "^0.1.21-next.0" - "@backstage/plugin-tech-insights" "^0.1.7-next.0" - "@backstage/plugin-tech-radar" "^0.5.4-next.0" - "@backstage/plugin-techdocs" "^0.13.2-next.1" - "@backstage/plugin-todo" "^0.1.21-next.0" - "@backstage/plugin-user-settings" "^0.3.18-next.0" + "@backstage/plugin-rollbar" "^0.3.25" + "@backstage/plugin-scaffolder" "^0.12.1" + "@backstage/plugin-search" "^0.6.1" + "@backstage/plugin-sentry" "^0.3.35" + "@backstage/plugin-shortcuts" "^0.1.21" + "@backstage/plugin-tech-insights" "^0.1.7" + "@backstage/plugin-tech-radar" "^0.5.4" + "@backstage/plugin-techdocs" "^0.13.2" + "@backstage/plugin-todo" "^0.1.21" + "@backstage/plugin-user-settings" "^0.3.18" "@backstage/search-common" "^0.2.2" "@backstage/theme" "^0.2.14" "@material-ui/core" "^4.12.2" From 07eccc027df84103785e390c4fa329330a0e571c Mon Sep 17 00:00:00 2001 From: Santiago Bernal <46529144+sabernal@users.noreply.github.com> Date: Thu, 3 Feb 2022 11:50:51 +0100 Subject: [PATCH 145/473] Adding Uala to list of Adopters --- ADOPTERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ADOPTERS.md b/ADOPTERS.md index 8772c27a88..39007ab1c1 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -88,3 +88,4 @@ | [RCHLO](https://www.riachuelo.com.br) & [MIDWAY](https://www.midway.com.br) | [@marcosborges](https://github.com/marcosborges), [@defaultbr](https://github.com/defaultbr) | Self-Service Platform | | [HP Inc](https://www.hp.com) | [Damon Kaswell](https://github.com/dekoding) | DevEx engagement hub (dev portal: docs, standards, Q&A) and extensive assets catalog (APIs, services, code, data, etc.) for the pan-HP internal developer community. | [VMware](https://www.vmware.com) | [@mpriamo](https://github.com/mpriamo), [@krisapplegate](https://github.com/krisapplegate) | Part of [Tanzu Application Platform](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/index.html) offering; internal developer portal | +| [Ualá](https://www.uala.com.ar/) | [Santiago Bernal](https://github.com/sabernal) | Initial work being done to centralize documentation for all our microservices and APIs, as well as scaffolding new services and tracking code quality | From a532ac2e102aeb9031c102f8c488be93566280e6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 3 Feb 2022 10:01:29 +0100 Subject: [PATCH 146/473] embedded-techdocs-app -> techdocs-cli-embedded-app Signed-off-by: Patrik Oldsberg --- .github/CODEOWNERS | 2 +- .../.eslintrc.js | 0 .../CHANGELOG.md | 2 +- .../app-config.dev.yaml | 0 .../app-config.yaml | 0 .../cypress.json | 0 .../cypress/.eslintrc.json | 0 .../cypress/integration/app.js | 0 .../package.json | 2 +- .../public/android-chrome-192x192.png | Bin .../public/apple-touch-icon.png | Bin .../public/favicon-16x16.png | Bin .../public/favicon-32x32.png | Bin .../public/favicon.ico | Bin .../public/index.html | 0 .../public/manifest.json | 0 .../public/robots.txt | 0 .../public/safari-pinned-tab.svg | 0 .../src/App.test.tsx | 0 .../src/App.tsx | 0 .../src/apis.ts | 0 .../src/components/Root/LogoFull.tsx | 0 .../src/components/Root/LogoIcon.tsx | 0 .../src/components/Root/Root.tsx | 0 .../src/components/Root/index.ts | 0 .../src/components/TechDocsPage/TechDocsPage.tsx | 0 .../src/components/TechDocsPage/index.ts | 0 .../src/index.tsx | 0 .../src/plugins.ts | 0 .../src/setupTests.ts | 0 packages/techdocs-cli/CHANGELOG.md | 12 ++++++------ packages/techdocs-cli/README.md | 12 ++++++------ packages/techdocs-cli/package.json | 2 +- packages/techdocs-cli/scripts/build.sh | 6 +++--- scripts/api-extractor.ts | 2 +- scripts/verify-changesets.js | 2 +- yarn.lock | 2 +- 37 files changed, 22 insertions(+), 22 deletions(-) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/.eslintrc.js (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/CHANGELOG.md (99%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/app-config.dev.yaml (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/app-config.yaml (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/cypress.json (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/cypress/.eslintrc.json (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/cypress/integration/app.js (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/package.json (98%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/android-chrome-192x192.png (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/apple-touch-icon.png (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/favicon-16x16.png (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/favicon-32x32.png (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/favicon.ico (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/index.html (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/manifest.json (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/robots.txt (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/public/safari-pinned-tab.svg (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/App.test.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/App.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/apis.ts (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/components/Root/LogoFull.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/components/Root/LogoIcon.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/components/Root/Root.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/components/Root/index.ts (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/components/TechDocsPage/TechDocsPage.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/components/TechDocsPage/index.ts (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/index.tsx (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/plugins.ts (100%) rename packages/{embedded-techdocs-app => techdocs-cli-embedded-app}/src/setupTests.ts (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a587419d50..08057d5af6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -34,9 +34,9 @@ /tech-insights-backend-module-jsonfc @backstage/reviewers @xantier @iain-b /tech-insights-tech-insights-common @backstage/reviewers @xantier @iain-b /tech-insights-tech-insights-node @backstage/reviewers @xantier @iain-b -/packages/embedded-techdocs-app @backstage/techdocs-core /packages/search-common @backstage/techdocs-core /packages/techdocs-cli @backstage/techdocs-core +/packages/techdocs-cli-embedded-app @backstage/techdocs-core /packages/techdocs-common @backstage/techdocs-core /.changeset/cost-insights-* @backstage/reviewers @backstage/silver-lining /.changeset/search-* @backstage/techdocs-core diff --git a/packages/embedded-techdocs-app/.eslintrc.js b/packages/techdocs-cli-embedded-app/.eslintrc.js similarity index 100% rename from packages/embedded-techdocs-app/.eslintrc.js rename to packages/techdocs-cli-embedded-app/.eslintrc.js diff --git a/packages/embedded-techdocs-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md similarity index 99% rename from packages/embedded-techdocs-app/CHANGELOG.md rename to packages/techdocs-cli-embedded-app/CHANGELOG.md index 915f65c4cc..27c4719686 100644 --- a/packages/embedded-techdocs-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,4 +1,4 @@ -# embedded-techdocs-app +# techdocs-cli-embedded-app ## 0.2.62 diff --git a/packages/embedded-techdocs-app/app-config.dev.yaml b/packages/techdocs-cli-embedded-app/app-config.dev.yaml similarity index 100% rename from packages/embedded-techdocs-app/app-config.dev.yaml rename to packages/techdocs-cli-embedded-app/app-config.dev.yaml diff --git a/packages/embedded-techdocs-app/app-config.yaml b/packages/techdocs-cli-embedded-app/app-config.yaml similarity index 100% rename from packages/embedded-techdocs-app/app-config.yaml rename to packages/techdocs-cli-embedded-app/app-config.yaml diff --git a/packages/embedded-techdocs-app/cypress.json b/packages/techdocs-cli-embedded-app/cypress.json similarity index 100% rename from packages/embedded-techdocs-app/cypress.json rename to packages/techdocs-cli-embedded-app/cypress.json diff --git a/packages/embedded-techdocs-app/cypress/.eslintrc.json b/packages/techdocs-cli-embedded-app/cypress/.eslintrc.json similarity index 100% rename from packages/embedded-techdocs-app/cypress/.eslintrc.json rename to packages/techdocs-cli-embedded-app/cypress/.eslintrc.json diff --git a/packages/embedded-techdocs-app/cypress/integration/app.js b/packages/techdocs-cli-embedded-app/cypress/integration/app.js similarity index 100% rename from packages/embedded-techdocs-app/cypress/integration/app.js rename to packages/techdocs-cli-embedded-app/cypress/integration/app.js diff --git a/packages/embedded-techdocs-app/package.json b/packages/techdocs-cli-embedded-app/package.json similarity index 98% rename from packages/embedded-techdocs-app/package.json rename to packages/techdocs-cli-embedded-app/package.json index ca824ffa20..6eb3119b06 100644 --- a/packages/embedded-techdocs-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,5 +1,5 @@ { - "name": "embedded-techdocs-app", + "name": "techdocs-cli-embedded-app", "version": "0.2.62", "private": true, "bundled": true, diff --git a/packages/embedded-techdocs-app/public/android-chrome-192x192.png b/packages/techdocs-cli-embedded-app/public/android-chrome-192x192.png similarity index 100% rename from packages/embedded-techdocs-app/public/android-chrome-192x192.png rename to packages/techdocs-cli-embedded-app/public/android-chrome-192x192.png diff --git a/packages/embedded-techdocs-app/public/apple-touch-icon.png b/packages/techdocs-cli-embedded-app/public/apple-touch-icon.png similarity index 100% rename from packages/embedded-techdocs-app/public/apple-touch-icon.png rename to packages/techdocs-cli-embedded-app/public/apple-touch-icon.png diff --git a/packages/embedded-techdocs-app/public/favicon-16x16.png b/packages/techdocs-cli-embedded-app/public/favicon-16x16.png similarity index 100% rename from packages/embedded-techdocs-app/public/favicon-16x16.png rename to packages/techdocs-cli-embedded-app/public/favicon-16x16.png diff --git a/packages/embedded-techdocs-app/public/favicon-32x32.png b/packages/techdocs-cli-embedded-app/public/favicon-32x32.png similarity index 100% rename from packages/embedded-techdocs-app/public/favicon-32x32.png rename to packages/techdocs-cli-embedded-app/public/favicon-32x32.png diff --git a/packages/embedded-techdocs-app/public/favicon.ico b/packages/techdocs-cli-embedded-app/public/favicon.ico similarity index 100% rename from packages/embedded-techdocs-app/public/favicon.ico rename to packages/techdocs-cli-embedded-app/public/favicon.ico diff --git a/packages/embedded-techdocs-app/public/index.html b/packages/techdocs-cli-embedded-app/public/index.html similarity index 100% rename from packages/embedded-techdocs-app/public/index.html rename to packages/techdocs-cli-embedded-app/public/index.html diff --git a/packages/embedded-techdocs-app/public/manifest.json b/packages/techdocs-cli-embedded-app/public/manifest.json similarity index 100% rename from packages/embedded-techdocs-app/public/manifest.json rename to packages/techdocs-cli-embedded-app/public/manifest.json diff --git a/packages/embedded-techdocs-app/public/robots.txt b/packages/techdocs-cli-embedded-app/public/robots.txt similarity index 100% rename from packages/embedded-techdocs-app/public/robots.txt rename to packages/techdocs-cli-embedded-app/public/robots.txt diff --git a/packages/embedded-techdocs-app/public/safari-pinned-tab.svg b/packages/techdocs-cli-embedded-app/public/safari-pinned-tab.svg similarity index 100% rename from packages/embedded-techdocs-app/public/safari-pinned-tab.svg rename to packages/techdocs-cli-embedded-app/public/safari-pinned-tab.svg diff --git a/packages/embedded-techdocs-app/src/App.test.tsx b/packages/techdocs-cli-embedded-app/src/App.test.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/App.test.tsx rename to packages/techdocs-cli-embedded-app/src/App.test.tsx diff --git a/packages/embedded-techdocs-app/src/App.tsx b/packages/techdocs-cli-embedded-app/src/App.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/App.tsx rename to packages/techdocs-cli-embedded-app/src/App.tsx diff --git a/packages/embedded-techdocs-app/src/apis.ts b/packages/techdocs-cli-embedded-app/src/apis.ts similarity index 100% rename from packages/embedded-techdocs-app/src/apis.ts rename to packages/techdocs-cli-embedded-app/src/apis.ts diff --git a/packages/embedded-techdocs-app/src/components/Root/LogoFull.tsx b/packages/techdocs-cli-embedded-app/src/components/Root/LogoFull.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/components/Root/LogoFull.tsx rename to packages/techdocs-cli-embedded-app/src/components/Root/LogoFull.tsx diff --git a/packages/embedded-techdocs-app/src/components/Root/LogoIcon.tsx b/packages/techdocs-cli-embedded-app/src/components/Root/LogoIcon.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/components/Root/LogoIcon.tsx rename to packages/techdocs-cli-embedded-app/src/components/Root/LogoIcon.tsx diff --git a/packages/embedded-techdocs-app/src/components/Root/Root.tsx b/packages/techdocs-cli-embedded-app/src/components/Root/Root.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/components/Root/Root.tsx rename to packages/techdocs-cli-embedded-app/src/components/Root/Root.tsx diff --git a/packages/embedded-techdocs-app/src/components/Root/index.ts b/packages/techdocs-cli-embedded-app/src/components/Root/index.ts similarity index 100% rename from packages/embedded-techdocs-app/src/components/Root/index.ts rename to packages/techdocs-cli-embedded-app/src/components/Root/index.ts diff --git a/packages/embedded-techdocs-app/src/components/TechDocsPage/TechDocsPage.tsx b/packages/techdocs-cli-embedded-app/src/components/TechDocsPage/TechDocsPage.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/components/TechDocsPage/TechDocsPage.tsx rename to packages/techdocs-cli-embedded-app/src/components/TechDocsPage/TechDocsPage.tsx diff --git a/packages/embedded-techdocs-app/src/components/TechDocsPage/index.ts b/packages/techdocs-cli-embedded-app/src/components/TechDocsPage/index.ts similarity index 100% rename from packages/embedded-techdocs-app/src/components/TechDocsPage/index.ts rename to packages/techdocs-cli-embedded-app/src/components/TechDocsPage/index.ts diff --git a/packages/embedded-techdocs-app/src/index.tsx b/packages/techdocs-cli-embedded-app/src/index.tsx similarity index 100% rename from packages/embedded-techdocs-app/src/index.tsx rename to packages/techdocs-cli-embedded-app/src/index.tsx diff --git a/packages/embedded-techdocs-app/src/plugins.ts b/packages/techdocs-cli-embedded-app/src/plugins.ts similarity index 100% rename from packages/embedded-techdocs-app/src/plugins.ts rename to packages/techdocs-cli-embedded-app/src/plugins.ts diff --git a/packages/embedded-techdocs-app/src/setupTests.ts b/packages/techdocs-cli-embedded-app/src/setupTests.ts similarity index 100% rename from packages/embedded-techdocs-app/src/setupTests.ts rename to packages/techdocs-cli-embedded-app/src/setupTests.ts diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 2bf2cafa48..f68fc44101 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- 14472509a3: Use a local file dependency for embedded-techdocs-app, to ensure that it's always pulled out of the workspace +- 14472509a3: Use a local file dependency for techdocs-cli-embedded-app, to ensure that it's always pulled out of the workspace - Updated dependencies - @backstage/backend-common@0.10.6 - @backstage/techdocs-common@0.11.6 @@ -21,7 +21,7 @@ ### Patch Changes -- 14472509a3: Use a local file dependency for embedded-techdocs-app, to ensure that it's always pulled out of the workspace +- 14472509a3: Use a local file dependency for techdocs-cli-embedded-app, to ensure that it's always pulled out of the workspace ## 0.8.11 @@ -161,10 +161,10 @@ #### :house: Internal - - `embedded-techdocs-app` - - [#122](https://github.com/backstage/techdocs-cli/pull/122) chore(deps-dev): bump @types/node from 12.20.20 to 16.7.1 in /packages/embedded-techdocs-app ([@dependabot[bot]](https://github.com/apps/dependabot)) - - [#120](https://github.com/backstage/techdocs-cli/pull/120) chore(deps-dev): bump @types/react-dom from 16.9.14 to 17.0.9 in /packages/embedded-techdocs-app ([@dependabot[bot]](https://github.com/apps/dependabot)) - - [#119](https://github.com/backstage/techdocs-cli/pull/119) chore(deps-dev): bump @testing-library/user-event from 12.8.3 to 13.2.1 in /packages/embedded-techdocs-app ([@dependabot[bot]](https://github.com/apps/dependabot)) + - `techdocs-cli-embedded-app` + - [#122](https://github.com/backstage/techdocs-cli/pull/122) chore(deps-dev): bump @types/node from 12.20.20 to 16.7.1 in /packages/techdocs-cli-embedded-app ([@dependabot[bot]](https://github.com/apps/dependabot)) + - [#120](https://github.com/backstage/techdocs-cli/pull/120) chore(deps-dev): bump @types/react-dom from 16.9.14 to 17.0.9 in /packages/techdocs-cli-embedded-app ([@dependabot[bot]](https://github.com/apps/dependabot)) + - [#119](https://github.com/backstage/techdocs-cli/pull/119) chore(deps-dev): bump @testing-library/user-event from 12.8.3 to 13.2.1 in /packages/techdocs-cli-embedded-app ([@dependabot[bot]](https://github.com/apps/dependabot)) - [#118](https://github.com/backstage/techdocs-cli/pull/118) chore(deps-dev): bump @testing-library/react from 10.4.9 to 12.0.0 ([@dependabot[bot]](https://github.com/apps/dependabot)) - Other - [#117](https://github.com/backstage/techdocs-cli/pull/117) chore(deps): bump @backstage/plugin-catalog from 0.6.11 to 0.6.12 ([@dependabot[bot]](https://github.com/apps/dependabot)) diff --git a/packages/techdocs-cli/README.md b/packages/techdocs-cli/README.md index 6f070147eb..3ac423cb38 100644 --- a/packages/techdocs-cli/README.md +++ b/packages/techdocs-cli/README.md @@ -8,7 +8,7 @@ See [techdocs-cli usage docs](https://backstage.io/docs/features/techdocs/cli). ## Development -NOTE: When we build `techdocs-cli` it copies the output `embedded-techdocs-app` +NOTE: When we build `techdocs-cli` it copies the output `techdocs-cli-embedded-app` bundle into the `packages/techdocs-cli/dist` which is then published with the `@techdocs/cli` npm package. @@ -16,7 +16,7 @@ bundle into the `packages/techdocs-cli/dist` which is then published with the ```sh # From the root of this repository run -# NOTE: This will build the embedded-techdocs-app and copy the output into the cli dist directory +# NOTE: This will build the techdocs-cli-embedded-app and copy the output into the cli dist directory yarn build --scope @techdocs/cli # Now execute the binary @@ -26,14 +26,14 @@ packages/techdocs-cli/bin/techdocs-cli export PATH=/path/to/backstage/packages/techdocs-cli/bin:$PATH ``` -If you want to test live test changes to the `packages/embedded-techdocs-app` +If you want to test live test changes to the `packages/techdocs-cli-embedded-app` you can serve the app and run the CLI using the following commands: ```sh -# Open a shell to the embedded-techdocs-app directory -cd packages/embedded-techdocs-app +# Open a shell to the techdocs-cli-embedded-app directory +cd packages/techdocs-cli-embedded-app -# Run the embedded-techdocs-app using dev mode +# Run the techdocs-cli-embedded-app using dev mode yarn start # In another shell use the techdocs-cli from the root of this repo diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 47cf14e550..a8dab88c55 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -40,7 +40,7 @@ "@types/node": "^14.14.32", "@types/serve-handler": "^6.1.0", "@types/webpack-env": "^1.15.3", - "embedded-techdocs-app": "file:../embedded-techdocs-app", + "techdocs-cli-embedded-app": "file:../techdocs-cli-embedded-app", "find-process": "^1.4.5", "nodemon": "^2.0.2", "ts-node": "^10.0.0" diff --git a/packages/techdocs-cli/scripts/build.sh b/packages/techdocs-cli/scripts/build.sh index 630fef42f0..31c2eae6c3 100755 --- a/packages/techdocs-cli/scripts/build.sh +++ b/packages/techdocs-cli/scripts/build.sh @@ -18,7 +18,7 @@ set -e SCRIPT_DIR=$(dirname $0) TECHDOCS_CLI_DIR="$SCRIPT_DIR"/.. -TECHDOCS_CLI_EMBEDDED_APP_DIR="$TECHDOCS_CLI_DIR"/../embedded-techdocs-app +TECHDOCS_CLI_EMBEDDED_APP_DIR="$TECHDOCS_CLI_DIR"/../techdocs-cli-embedded-app compile_and_build_cli() { echo "📄 Compiling..." @@ -32,9 +32,9 @@ compile_and_build_cli() { build_and_embed_app() { echo "🚚 Embedding app..." if [ "$TECHDOCS_CLI_DEV_MODE" = "true" ] ; then - yarn workspace embedded-techdocs-app build:dev > /dev/null + yarn workspace techdocs-cli-embedded-app build:dev > /dev/null else - yarn workspace embedded-techdocs-app build > /dev/null + yarn workspace techdocs-cli-embedded-app build > /dev/null fi cp -r "$TECHDOCS_CLI_EMBEDDED_APP_DIR"/dist "$TECHDOCS_CLI_DIR"/dist/techdocs-preview-bundle > /dev/null } diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index bfb8b525fc..dfbd91f76b 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -193,7 +193,7 @@ const SKIPPED_PACKAGES = [ join('packages', 'codemods'), join('packages', 'create-app'), join('packages', 'e2e-test'), - join('packages', 'embedded-techdocs-app'), + join('packages', 'techdocs-cli-embedded-app'), join('packages', 'storybook'), join('packages', 'techdocs-cli'), ]; diff --git a/scripts/verify-changesets.js b/scripts/verify-changesets.js index 8d828ee058..9e3064eeac 100755 --- a/scripts/verify-changesets.js +++ b/scripts/verify-changesets.js @@ -26,7 +26,7 @@ const privatePackages = new Set([ 'example-backend', 'e2e-test', 'storybook', - 'embedded-techdocs-app', + 'techdocs-cli-embedded-app', ]); async function main() { diff --git a/yarn.lock b/yarn.lock index 77894f7fe2..9f41538dd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10671,7 +10671,7 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -"embedded-techdocs-app@file:packages/embedded-techdocs-app": +"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": version "0.2.62" dependencies: "@backstage/app-defaults" "^0.1.6" From 811c710a21d65eef0ec0b10eba61b21edf8b8722 Mon Sep 17 00:00:00 2001 From: Jussi Hallila Date: Thu, 3 Feb 2022 12:15:12 +0100 Subject: [PATCH 147/473] Fix tech docs inline search on Postgres Fix bug where tech docs collator stores search indices with wrong entity ref casing. Make the collator to conform legacyPathCasing configuration option. Signed-off-by: Jussi Hallila --- .changeset/hip-carrots-suffer.md | 5 +++++ .../techdocs-backend/src/search/DefaultTechDocsCollator.ts | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/hip-carrots-suffer.md diff --git a/.changeset/hip-carrots-suffer.md b/.changeset/hip-carrots-suffer.md new file mode 100644 index 0000000000..3823cf982f --- /dev/null +++ b/.changeset/hip-carrots-suffer.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-backend': patch +--- + +Fix bug where tech docs collator stores search indices with wrong entity ref casing. Make the collator to conform legacyPathCasing configuration option. diff --git a/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.ts b/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.ts index 5149fe6c09..987e8c6b15 100644 --- a/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.ts +++ b/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.ts @@ -145,9 +145,7 @@ export class DefaultTechDocsCollator implements DocumentCollator { path: doc.location, }), path: doc.location, - kind: entity.kind, - namespace: entity.metadata.namespace || 'default', - name: entity.metadata.name, + ...entityInfo, entityTitle: entity.metadata.title, componentType: entity.spec?.type?.toString() || 'other', lifecycle: (entity.spec?.lifecycle as string) || '', From d1eff621051b27472d0cecf3ae9a93f2829b4be5 Mon Sep 17 00:00:00 2001 From: Jussi Hallila Date: Thu, 3 Feb 2022 12:21:54 +0100 Subject: [PATCH 148/473] Fix tests. Signed-off-by: Jussi Hallila --- .../src/search/DefaultTechDocsCollator.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.test.ts b/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.test.ts index 7e7545ea1f..e81fc1e7a9 100644 --- a/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.test.ts +++ b/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.test.ts @@ -198,8 +198,8 @@ describe('DefaultTechDocsCollator', () => { componentType: entity!.spec!.type, lifecycle: entity!.spec!.lifecycle, owner: '', - kind: entity.kind, - name: entity.metadata.name, + kind: entity.kind.toLocaleLowerCase('en-US'), + name: entity.metadata.name.toLocaleLowerCase('en-US'), authorization: { resourceRef: `component:default/${entity.metadata.name}`, }, From 85e5bdfe5109737c34b9a743eef0790198661386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 3 Feb 2022 13:33:54 +0100 Subject: [PATCH 149/473] more entity docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .github/styles/vocab.txt | 4 +- docs/features/software-catalog/api.md | 2 +- .../software-catalog/life-of-an-entity.md | 130 +++++++++++++++--- 3 files changed, 117 insertions(+), 19 deletions(-) diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index 3abe840368..8303510e77 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -28,6 +28,7 @@ Blackbox bool boolean builtins +callout Chai changeset changesets @@ -315,6 +316,7 @@ unbreak Unconference unmanaged unregister +unregistering unregistration untracked upsert @@ -338,4 +340,4 @@ Zalando Zhou zoomable zsh -Alef \ No newline at end of file +Alef diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index 71e229651a..3221b9e46a 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -21,7 +21,7 @@ section below is `/entities`, and the catalog is located at `http://localhost:7007/api/catalog` during local development, the full URL would be `http://localhost:7007/api/catalog/entities`. The actual URL may vary from one organization to the other, especially in production, but is commonly your -`backend.baseUrl` in your app config, plus `/catalog` at the end. +`backend.baseUrl` in your app config, plus `/api/catalog` at the end. Some or all of the endpoints may accept or require an `Authorization` header with a `Bearer` token, which should then be the Backstage token returned by the diff --git a/docs/features/software-catalog/life-of-an-entity.md b/docs/features/software-catalog/life-of-an-entity.md index 9e8a3f0563..618923289e 100644 --- a/docs/features/software-catalog/life-of-an-entity.md +++ b/docs/features/software-catalog/life-of-an-entity.md @@ -48,9 +48,9 @@ The details of these processes are described below. ## Ingestion -Each catalog deployment has a number of entity providers installed. They are +Each catalog deployment has a number of _entity providers_ installed. They are responsible for fetching data from external authoritative sources in any way -that they see fit, to translate those into entity objects, and to notify the +that they see fit, translating those into entity objects, and notifying the database when those entities are added or removed. These are the _unprocessed entities_ that will be subject to later processing (see below), and they form the very basis of existence for entities. If there were no entity providers, no @@ -108,7 +108,7 @@ the processing loop should next try to process it. When the entity first appears, this timestamp is set to "now" - asking for it to be picked up as soon as possible. -Each catalog deployment has a number of processors installed. They are +Each catalog deployment has a number of _processors_ installed. They are responsible for receiving unprocessed entities that the catalog decided are due for processing, and then running that data through a number of processing stages, mutating the entity and emitting auxiliary data about it. When all of @@ -185,7 +185,28 @@ happen during ingestion or processing. ## Errors -> TODO: Describe how errors are exposed through entities +Errors during the ingestion and processing of entities can happen in a variety +of ways, and they may happen at a far later point in time than when they were +registered. For example, a registered file may get deleted in the remote system, +or the user may accidentally change the file contents in such a way that they +cannot be parsed successfully, etc. + +There are two main ways that these errors are surfaced. + +First, the catalog backend will produce detailed logs that should contain +sufficient information for a reader to find the causes for errors. Since these +logs are typically not easily found by end users, this can mainly be a useful +tool for Backstage operators who want to debug problems either with statically +registered entities that are under their control, or to help end users find +problems. + +Second, for most classes of errors, the entity itself will contain a status +field that describes the problem. The contents of this field is shown at the top +of your entity page in Backstage, if you have placed the corresponding error +callout component (`EntityProcessingErrorsPanel`) there. + +We are still working to improve the surfacing and observability around +processing loop errors. ## Orphaning @@ -206,17 +227,22 @@ either, it becomes _orphaned_. The end result is as follows: - The catalog page in Backstage for the child entity detects the new annotation and informs users about the orphan status. -Orphaning can occur in several different scenarios. One common cause is that the -end user edited a corresponding catalog catalog-info YAML file removing the -entity's entry. In the case of a `Location` parent entity, orphaning can happen -if removing the target line pointing to the file containing the child entity. -Another common cause is large batch processors such as the ones that crawl -through remote systems looking for entities, no longer finding something that it -used to find before. Maybe the data was moved, or deleted, in the remote system. -So for example when a person leaves the company an LDAP org discovery processor -might leave an orphaned `User` entity behind. Note that this only applies to -processors - ingestion that happens using entity providers work differently, -described below. +Orphaning can occur in several different scenarios. + +- If a catalog-info YAML file is moved from one place to another in the version + control system without updating the registration in the catalog, it will + effectively become orphaned "by" that registered location +- If the user edits a corresponding parent catalog-info YAML file removing the + entity's entry - for example in the case of a `Location` parent entity, + orphaning can happen if editing or removing the `target`/`targets` lines + pointing to the file containing the child entity. +- Another common cause is large batch processors such as the ones that crawl + through remote systems looking for entities, no longer finding something that + it used to find before. Maybe the data was moved, or deleted, in the remote + system. So for example when a person leaves the company an LDAP org discovery + processor might leave an orphaned `User` entity behind. Note that this only + applies to processors - ingestion that happens using entity providers work + differently, described below. > Note that removing a file, or accidentally corrupting a file so that it cannot > be read successfully, does _not_ lead to orphaning. Hard errors, including the @@ -239,8 +265,78 @@ provided out of the box. ## Implicit Deletion -> TODO: Describe the process of entity providers eagerly deleting entities +Entity providers - not processors - are subject to _eager_ deletion of entities, +which may trigger the implicit deletion of more than just the entity you thought +you were deleting. This concept is explained here. + +Recall that all entity providers manage a private "bucket" of entities, as +described in the [External integrations](external-integrations.md) article. They +can perform some operations on those entities, including additions, updates, and +deletions. Entity additions/updates are subject to the regular processing loops, +which means that bucket entities may end up forming roots of an entire graph of +entities that are emitted by those processors as they recursively work they way +through the bucket contents and its descendants. + +When a provider issues a deletion of an entity in its bucket, that entity as +well as _the entire tree of entities processed out of it_, if any, are +considered for immediate deletion. Note "considered" - they are deleted if and +only if they would otherwise have become orphaned (no other parent entities +emitting them). Since the graph of entities is not strictly a tree, multiple +roots may actually end up indirectly referencing a node farther down in the +graph. If that's the case, that node won't go away until all such roots go away. + +URLs to yaml files that you register using either the Create button or add to +your app-config, are both handled by entity providers. That means that this +implicit deletion mechanism comes into play in some everyday circumstances. +Let's illustrate. + +Imagine that you have a monorepo, with a single `Location` entity in a +catalog-info file at the root, and that entity points to three other +catalog-info files in the repo with a `Component` entity in each one. + +```text +/ + feature_one/ + catalog-info.yaml <- kind: Component + feature_two/ + catalog-info.yaml <- kind: Component + feature_three/ + catalog-info.yaml <- kind: Component + catalog-info.yaml <- kind: Location +``` + +If you register the root `Location` entity, the actual effect is that _five_ +entities appear in the catalog. First, one that is named `generated-`-something, +which corresponds to the registered URL itself. That's the one that the provider +has put in its "bucket". Then, as processing loops chug along, the `Location` +entity you pointed to appears as a child of that, and then the three `Component` +entities appear in turn as children of the `Location`. + +As an end user of the Backstage interface, you may now want to delete one of the +three `Component` entities. You do that by visiting the three-dots menu in the +top right of an entity view. The popup dialog that appears will inform you that +actually this entity belongs to a certain root, and that you may want to remove +that root instead (which corresponds to unregistering the originally registered +URL). If you choose to do so, _all_ of the aforementioned five entities will +actually be deleted in the same operation. + +If you did not want to perform this aggressive pruning, you might have instead +chosen to remove one of the `target` rows of your `Location` catalog-info file, +and then deleted the catalog-info file that contained the `Component` you wanted +to get rid of. Now the catalog would be left with an orphaned component, and you +would instead be able to use the explicit deletion (see below) to delete that +single component. ## Explicit Deletion -> TODO: Describe direct deletion via the catalog API +The catalog and its REST API also permits direct deletion of individual +entities. This makes sense to do on orphaned entities; entities that aren't +being actively kept up to date by any parent entities. The popup interface under +the three-dots menu option of entity views does offer this option, and the +orphaned status can be seen in an info box at the top of the entity's overview +page. + +However, if you were to try to do an explicit depletion on an entity that's +being kept actively updated by a parent entity, it would just reappear again +shortly thereafter when the processing loops reconsider the parent entity that's +still in there. From b72347b090ac12f602f3fd8b4582d6a0a3507786 Mon Sep 17 00:00:00 2001 From: Gabriel Dantas Date: Thu, 3 Feb 2022 10:15:54 -0300 Subject: [PATCH 150/473] lint: docs style Signed-off-by: Gabriel Dantas --- docs/deployment/heroku.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/deployment/heroku.md b/docs/deployment/heroku.md index 0226719a12..1545c34733 100644 --- a/docs/deployment/heroku.md +++ b/docs/deployment/heroku.md @@ -30,24 +30,23 @@ You _might_ also need to set your Heroku app's stack to `container`: $ heroku stack:set container -a ``` -Configuring your app-config.yaml: +Configuring your `app-config.yaml`: ```yaml app: # Should be the same as backend.baseUrl when using the `app-backend` plugin baseUrl: https://.herokuapp.com - backend: baseUrl: https://.herokuapp.com listen: - port: - $env: PORT + port: + $env: PORT # The $PORT environment variable is a feature of Heroku # https://devcenter.heroku.com/articles/dynos#web-dynos ``` -> Make sure your file is being copied into your container in the Dockerfile. +> Make sure your file is being copied into your container in the `Dockerfile`. Before building the Docker image, run the [backstage host build commands](https://backstage.io/docs/deployment/docker#host-build). They must be run whenever you are going to publish a new image. From dffe939b80cedb8a50514fd6ee20de6ecdec3cc8 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Thu, 3 Feb 2022 13:21:32 +0000 Subject: [PATCH 151/473] docs: add link to upgrade helper in keeping backstage updated page Signed-off-by: MT Lewis --- docs/getting-started/keeping-backstage-updated.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/keeping-backstage-updated.md b/docs/getting-started/keeping-backstage-updated.md index 107119aace..f16c62e28a 100644 --- a/docs/getting-started/keeping-backstage-updated.md +++ b/docs/getting-started/keeping-backstage-updated.md @@ -41,7 +41,10 @@ For this reason, any changes made to the template are documented along with upgrade instructions in the [changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md) of the `@backstage/create-app` package. We recommend peeking at this changelog -for any applicable updates when upgrading packages. +-for any applicable updates when upgrading packages. As an alternative, the +[Backstage Upgrade Helper](https://backstage.github.io/upgrade-helper/) provides +a consolidated view of all the changes between two versions of Backstage. You +can find the current version of your Backstage installation in `backstage.json`. ## More information on dependency mismatches From 63e0e3a70d06b9ac3fbd0485b595b317dacb0933 Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Thu, 3 Feb 2022 08:36:26 -0500 Subject: [PATCH 152/473] correct spelling of 'Acknowledge' in tooltip Correct the spelling of 'Acknowledge' in the Splunk On Call plugin tooltip title. Signed-off-by: Mike Ball --- .../splunk-on-call/src/components/Incident/IncidentListItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx b/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx index 570b47483f..4c9975bd06 100644 --- a/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx +++ b/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx @@ -106,7 +106,7 @@ const IncidentAction = ({ switch (currentPhase) { case 'UNACKED': return ( - + acknowledgeAction({ incidentId, incidentType: 'ACKNOWLEDGEMENT' }) From 6c6d1c6439e8072821b66f3619c168fbd2fbced7 Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Thu, 3 Feb 2022 08:45:20 -0500 Subject: [PATCH 153/473] add changeset explaining 'Acknowledge' spelling correction Signed-off-by: Mike Ball --- .changeset/shaggy-buckets-confess.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shaggy-buckets-confess.md diff --git a/.changeset/shaggy-buckets-confess.md b/.changeset/shaggy-buckets-confess.md new file mode 100644 index 0000000000..186d911b77 --- /dev/null +++ b/.changeset/shaggy-buckets-confess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-splunk-on-call': patch +--- + +Correct spelling of 'Acknowledge' in tooltip. From 7bb1bde7f63354a6edd2448ec020e54d13d4c10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 3 Feb 2022 15:53:26 +0100 Subject: [PATCH 154/473] Bunch of random api cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/wise-peaches-flow.md | 8 + .../api-report.md | 10 +- .../src/microsoftGraph/index.ts | 3 +- plugins/catalog-graph/api-report.md | 4 - .../components/EntityRelationsGraph/types.ts | 7 +- plugins/catalog-import/api-report.md | 368 ++++++++++++------ .../src/api/CatalogImportApi.ts | 17 +- .../src/api/CatalogImportClient.ts | 49 ++- .../DefaultImportPage/DefaultImportPage.tsx | 5 + .../EntityListComponent.tsx | 32 +- .../components/EntityListComponent/index.ts | 1 + .../ImportInfoCard/ImportInfoCard.tsx | 24 +- .../src/components/ImportInfoCard/index.ts | 1 + .../src/components/ImportPage/ImportPage.tsx | 5 + .../ImportStepper/ImportStepper.tsx | 26 +- .../src/components/ImportStepper/defaults.tsx | 10 +- .../src/components/ImportStepper/index.ts | 1 + .../StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx | 24 +- .../components/StepInitAnalyzeUrl/index.ts | 1 + .../AutocompleteTextField.tsx | 42 +- .../PreparePullRequestForm.tsx | 23 +- .../PreviewCatalogInfoComponent.tsx | 23 +- .../PreviewPullRequestComponent.tsx | 23 +- .../StepPrepareCreatePullRequest.tsx | 25 +- .../StepPrepareCreatePullRequest/index.ts | 5 + .../catalog-import/src/components/index.ts | 1 + .../src/components/useImportState.ts | 12 +- plugins/catalog-import/src/plugin.ts | 11 + plugins/catalog-react/api-report.md | 124 +++--- .../EntityKindPicker/EntityKindPicker.tsx | 17 +- .../src/components/EntityKindPicker/index.ts | 1 + .../EntityLifecyclePicker.tsx | 1 + .../EntityOwnerPicker/EntityOwnerPicker.tsx | 1 + .../EntityRefLink/EntityRefLink.tsx | 11 + .../EntityRefLink/EntityRefLinks.tsx | 11 + .../src/components/EntityRefLink/index.ts | 3 + .../EntitySearchBar/EntitySearchBar.tsx | 1 + .../components/EntityTable/EntityTable.tsx | 31 +- .../src/components/EntityTable/columns.tsx | 15 +- .../src/components/EntityTable/index.ts | 2 + .../EntityTagPicker/EntityTagPicker.tsx | 1 + .../EntityTypePicker/EntityTypePicker.tsx | 12 +- .../src/components/EntityTypePicker/index.ts | 2 +- plugins/catalog-react/src/components/index.ts | 1 + scripts/api-extractor.ts | 2 + 45 files changed, 670 insertions(+), 327 deletions(-) create mode 100644 .changeset/wise-peaches-flow.md diff --git a/.changeset/wise-peaches-flow.md b/.changeset/wise-peaches-flow.md new file mode 100644 index 0000000000..68e89cf841 --- /dev/null +++ b/.changeset/wise-peaches-flow.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-catalog-backend-module-msgraph': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-catalog-react': patch +--- + +Minor API cleanups diff --git a/plugins/catalog-backend-module-msgraph/api-report.md b/plugins/catalog-backend-module-msgraph/api-report.md index 662056eff1..c00930d2ce 100644 --- a/plugins/catalog-backend-module-msgraph/api-report.md +++ b/plugins/catalog-backend-module-msgraph/api-report.md @@ -33,6 +33,15 @@ export function defaultUserTransformer( userPhoto?: string, ): Promise; +// @public +export type GroupMember = + | (MicrosoftGraph.Group & { + '@odata.type': '#microsoft.graph.user'; + }) + | (MicrosoftGraph.User & { + '@odata.type': '#microsoft.graph.group'; + }); + // @public export type GroupTransformer = ( group: MicrosoftGraph.Group, @@ -54,7 +63,6 @@ export const MICROSOFT_GRAPH_USER_ID_ANNOTATION = 'graph.microsoft.com/user-id'; export class MicrosoftGraphClient { constructor(baseUrl: string, pca: msal.ConfidentialClientApplication); static create(config: MicrosoftGraphProviderConfig): MicrosoftGraphClient; - // Warning: (ae-forgotten-export) The symbol "GroupMember" needs to be exported by the entry point index.d.ts getGroupMembers(groupId: string): AsyncIterable; // (undocumented) getGroupPhoto(groupId: string, sizeId?: string): Promise; diff --git a/plugins/catalog-backend-module-msgraph/src/microsoftGraph/index.ts b/plugins/catalog-backend-module-msgraph/src/microsoftGraph/index.ts index b0d53b43a2..61e62f5803 100644 --- a/plugins/catalog-backend-module-msgraph/src/microsoftGraph/index.ts +++ b/plugins/catalog-backend-module-msgraph/src/microsoftGraph/index.ts @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { MicrosoftGraphClient } from './client'; -export type { ODataQuery } from './client'; +export type { GroupMember, ODataQuery } from './client'; export { readMicrosoftGraphConfig } from './config'; export type { MicrosoftGraphProviderConfig } from './config'; export { diff --git a/plugins/catalog-graph/api-report.md b/plugins/catalog-graph/api-report.md index e39982d2b5..515a578d3c 100644 --- a/plugins/catalog-graph/api-report.md +++ b/plugins/catalog-graph/api-report.md @@ -95,8 +95,6 @@ export const EntityCatalogGraphCard: ({ // @public export type EntityEdge = DependencyGraphTypes.DependencyEdge; -// Warning: (ae-missing-release-tag) "EntityEdgeData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type EntityEdgeData = { relations: string[]; @@ -106,8 +104,6 @@ export type EntityEdgeData = { // @public export type EntityNode = DependencyGraphTypes.DependencyNode; -// Warning: (ae-missing-release-tag) "EntityNodeData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type EntityNodeData = { name: string; diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts index 830032d527..caf6c8c501 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts @@ -13,11 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DependencyGraphTypes } from '@backstage/core-components'; import { MouseEventHandler } from 'react'; /** - * Additional Data for entities + * Additional Data for entities. + * + * @public */ export type EntityEdgeData = { /** @@ -40,6 +43,8 @@ export type EntityEdge = DependencyGraphTypes.DependencyEdge; /** * Additional data for Entity Node + * + * @public */ export type EntityNodeData = { /** diff --git a/plugins/catalog-import/api-report.md b/plugins/catalog-import/api-report.md index a85777c563..164d831c96 100644 --- a/plugins/catalog-import/api-report.md +++ b/plugins/catalog-import/api-report.md @@ -26,9 +26,7 @@ import { UnpackNestedValue } from 'react-hook-form'; import { UseFormProps } from 'react-hook-form'; import { UseFormReturn } from 'react-hook-form'; -// Warning: (ae-missing-release-tag) "AnalyzeResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export type AnalyzeResult = | { type: 'locations'; @@ -45,26 +43,36 @@ export type AnalyzeResult = generatedEntities: PartialEntity[]; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "AutocompleteTextField" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const AutocompleteTextField: ({ - name, - options, - required, - errors, - rules, - loading, - loadingText, - helperText, - errorHelperText, - textFieldProps, -}: Props_5) => JSX.Element; +// @public +export const AutocompleteTextField: ( + props: AutocompleteTextFieldProps, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "CatalogImportApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public +export interface AutocompleteTextFieldProps { + // (undocumented) + errorHelperText?: string; + // (undocumented) + errors?: FieldErrors; + // (undocumented) + helperText?: React_2.ReactNode; + // (undocumented) + loading?: boolean; + // (undocumented) + loadingText?: string; + // (undocumented) + name: TFieldValue; + // (undocumented) + options: string[]; + // (undocumented) + required?: boolean; + // (undocumented) + rules?: React_2.ComponentProps['rules']; + // (undocumented) + textFieldProps?: Omit; +} + +// @public export interface CatalogImportApi { // (undocumented) analyzeUrl(url: string): Promise; @@ -85,14 +93,10 @@ export interface CatalogImportApi { }>; } -// Warning: (ae-missing-release-tag) "catalogImportApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export const catalogImportApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CatalogImportClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export class CatalogImportClient implements CatalogImportApi { constructor(options: { discoveryApi: DiscoveryApi; @@ -110,12 +114,7 @@ export class CatalogImportClient implements CatalogImportApi { body: string; }>; // (undocumented) - submitPullRequest({ - repositoryUrl, - fileContent, - title, - body, - }: { + submitPullRequest(options: { repositoryUrl: string; fileContent: string; title: string; @@ -126,14 +125,10 @@ export class CatalogImportClient implements CatalogImportApi { }>; } -// Warning: (ae-missing-release-tag) "CatalogImportPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export const CatalogImportPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "catalogImportPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public const catalogImportPlugin: BackstagePlugin< { importPage: RouteRef; @@ -143,9 +138,7 @@ const catalogImportPlugin: BackstagePlugin< export { catalogImportPlugin }; export { catalogImportPlugin as plugin }; -// Warning: (ae-forgotten-export) The symbol "ImportFlows" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "StepperProvider" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "defaultGenerateStepper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export function defaultGenerateStepper( @@ -153,98 +146,221 @@ export function defaultGenerateStepper( defaults: StepperProvider, ): StepperProvider; -// Warning: (ae-missing-release-tag) "DefaultImportPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export const DefaultImportPage: () => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityListComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const EntityListComponent: ({ - locations, - collapsed, - locationListItemIcon, - onItemClick, - firstListItem, - withLinks, -}: Props) => JSX.Element; - -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ImportInfoCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const ImportInfoCard: ({ - exampleLocationUrl, - exampleRepositoryUrl, -}: Props_2) => JSX.Element; - -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ImportStepper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const ImportStepper: ({ - initialUrl, - generateStepper, - variant, -}: Props_3) => JSX.Element; - -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "PreparePullRequestForm" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public -export const PreparePullRequestForm: < +export const EntityListComponent: ( + props: EntityListComponentProps, +) => JSX.Element; + +// @public +export interface EntityListComponentProps { + // (undocumented) + collapsed?: boolean; + // (undocumented) + firstListItem?: React_2.ReactElement; + // (undocumented) + locationListItemIcon: (target: string) => React_2.ReactElement; + // (undocumented) + locations: Array<{ + target: string; + entities: (Entity | EntityName)[]; + }>; + // (undocumented) + onItemClick?: (target: string) => void; + // (undocumented) + withLinks?: boolean; +} + +// @public +export type ImportFlows = + | 'unknown' + | 'single-location' + | 'multiple-locations' + | 'no-location'; + +// @public +export const ImportInfoCard: (props: ImportInfoCardProps) => JSX.Element; + +// @public +export interface ImportInfoCardProps { + // (undocumented) + exampleLocationUrl?: string; + // (undocumented) + exampleRepositoryUrl?: string; +} + +// Warning: (ae-forgotten-export) The symbol "State" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ImportState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ImportState = State & { + activeFlow: ImportFlows; + activeStepNumber: number; + analysisUrl?: string; + onGoBack?: () => void; + onReset: () => void; +}; + +// @public +export const ImportStepper: (props: ImportStepperProps) => JSX.Element; + +// @public +export interface ImportStepperProps { + // (undocumented) + generateStepper?: ( + flow: ImportFlows, + defaults: StepperProvider, + ) => StepperProvider; + // (undocumented) + initialUrl?: string; + // (undocumented) + variant?: InfoCardVariants; +} + +// @public +export const PreparePullRequestForm: >( + props: PreparePullRequestFormProps, +) => JSX.Element; + +// @public +export type PreparePullRequestFormProps< TFieldValues extends Record, ->({ - defaultValues, - onSubmit, - render, -}: Props_6) => JSX.Element; +> = Pick, 'defaultValues'> & { + onSubmit: SubmitHandler; + render: ( + props: Pick< + UseFormReturn, + 'formState' | 'register' | 'control' | 'setValue' + > & { + values: UnpackNestedValue; + }, + ) => React_2.ReactNode; +}; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "PreviewCatalogInfoComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const PreviewCatalogInfoComponent: ({ - repositoryUrl, - entities, - classes, -}: Props_7) => JSX.Element; - -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "PreviewPullRequestComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const PreviewPullRequestComponent: ({ - title, - description, - classes, -}: Props_8) => JSX.Element; - -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "StepInitAnalyzeUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public -export const StepInitAnalyzeUrl: ({ - onAnalysis, - analysisUrl, - disablePullRequest, - exampleLocationUrl, -}: Props_4) => JSX.Element; +export type PrepareResult = + | { + type: 'locations'; + locations: Array<{ + exists?: boolean; + target: string; + entities: EntityName[]; + }>; + } + | { + type: 'repository'; + url: string; + integrationType: string; + pullRequest: { + url: string; + }; + locations: Array<{ + target: string; + entities: EntityName[]; + }>; + }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "StepPrepareCreatePullRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const StepPrepareCreatePullRequest: ({ - analyzeResult, - onPrepare, - onGoBack, - renderFormFields, -}: Props_9) => JSX.Element; +// @public +export const PreviewCatalogInfoComponent: ( + props: PreviewCatalogInfoComponentProps, +) => JSX.Element; + +// @public +export interface PreviewCatalogInfoComponentProps { + // (undocumented) + classes?: { + card?: string; + cardContent?: string; + }; + // (undocumented) + entities: Entity[]; + // (undocumented) + repositoryUrl: string; +} + +// @public +export const PreviewPullRequestComponent: ( + props: PreviewPullRequestComponentProps, +) => JSX.Element; + +// @public +export interface PreviewPullRequestComponentProps { + // (undocumented) + classes?: { + card?: string; + cardContent?: string; + }; + // (undocumented) + description: string; + // (undocumented) + title: string; +} + +// @public +export const StepInitAnalyzeUrl: ( + props: StepInitAnalyzeUrlProps, +) => JSX.Element; + +// @public +export interface StepInitAnalyzeUrlProps { + // (undocumented) + analysisUrl?: string; + // (undocumented) + disablePullRequest?: boolean; + // (undocumented) + exampleLocationUrl?: string; + // (undocumented) + onAnalysis: ( + flow: ImportFlows, + url: string, + result: AnalyzeResult, + opts?: { + prepareResult?: PrepareResult; + }, + ) => void; +} + +// @public +export const StepPrepareCreatePullRequest: ( + props: StepPrepareCreatePullRequestProps, +) => JSX.Element; + +// @public +export interface StepPrepareCreatePullRequestProps { + // (undocumented) + analyzeResult: Extract< + AnalyzeResult, + { + type: 'repository'; + } + >; + // (undocumented) + onGoBack?: () => void; + // (undocumented) + onPrepare: ( + result: PrepareResult, + opts?: { + notRepeatable?: boolean; + }, + ) => void; + // Warning: (ae-forgotten-export) The symbol "FormData" needs to be exported by the entry point index.d.ts + // + // (undocumented) + renderFormFields: ( + props: Pick< + UseFormReturn, + 'register' | 'setValue' | 'formState' + > & { + values: UnpackNestedValue; + groups: string[]; + groupsLoading: boolean; + }, + ) => React_2.ReactNode; +} // Warnings were encountered during analysis: // -// src/api/CatalogImportApi.d.ts:15:5 - (ae-forgotten-export) The symbol "PartialEntity" needs to be exported by the entry point index.d.ts +// src/api/CatalogImportApi.d.ts:25:5 - (ae-forgotten-export) The symbol "PartialEntity" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/catalog-import/src/api/CatalogImportApi.ts b/plugins/catalog-import/src/api/CatalogImportApi.ts index 5fae076479..0923f4ac98 100644 --- a/plugins/catalog-import/src/api/CatalogImportApi.ts +++ b/plugins/catalog-import/src/api/CatalogImportApi.ts @@ -18,11 +18,20 @@ import { EntityName } from '@backstage/catalog-model'; import { createApiRef } from '@backstage/core-plugin-api'; import { PartialEntity } from '../types'; +/** + * Utility API reference for the {@link CatalogImportApi}. + * + * @public + */ export const catalogImportApiRef = createApiRef({ id: 'plugin.catalog-import.service', }); -// result of the analyze state +/** + * Result of the analysis. + * + * @public + */ export type AnalyzeResult = | { type: 'locations'; @@ -39,6 +48,11 @@ export type AnalyzeResult = generatedEntities: PartialEntity[]; }; +/** + * API for driving catalog imports. + * + * @public + */ export interface CatalogImportApi { analyzeUrl(url: string): Promise; @@ -46,6 +60,7 @@ export interface CatalogImportApi { title: string; body: string; }>; + submitPullRequest(options: { repositoryUrl: string; fileContent: string; diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index 60745923b4..b856a4e359 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -34,6 +34,11 @@ import { getGithubIntegrationConfig } from './GitHub'; import { trimEnd } from 'lodash'; import { getBranchName, getCatalogFilename } from '../components/helpers'; +/** + * The default implementation of the {@link CatalogImportApi}. + * + * @public + */ export class CatalogImportClient implements CatalogImportApi { private readonly discoveryApi: DiscoveryApi; private readonly identityApi: IdentityApi; @@ -142,17 +147,14 @@ the component will become available.\n\nFor more information, read an \ }; } - async submitPullRequest({ - repositoryUrl, - fileContent, - title, - body, - }: { + async submitPullRequest(options: { repositoryUrl: string; fileContent: string; title: string; body: string; }): Promise<{ link: string; location: string }> { + const { repositoryUrl, fileContent, title, body } = options; + const ghConfig = getGithubIntegrationConfig( this.scmIntegrationsApi, repositoryUrl, @@ -172,9 +174,7 @@ the component will become available.\n\nFor more information, read an \ } // TODO: this could be part of the catalog api - private async generateEntityDefinitions({ - repo, - }: { + private async generateEntityDefinitions(options: { repo: string; }): Promise { const { token } = await this.identityApi.getCredentials(); @@ -187,7 +187,7 @@ the component will become available.\n\nFor more information, read an \ }, method: 'POST', body: JSON.stringify({ - location: { type: 'url', target: repo }, + location: { type: 'url', target: options.repo }, }), }, ).catch(e => { @@ -204,12 +204,7 @@ the component will become available.\n\nFor more information, read an \ } // TODO: this response should better be part of the analyze-locations response and scm-independent / implemented per scm - private async checkGitHubForExistingCatalogInfo({ - url, - owner, - repo, - githubIntegrationConfig, - }: { + private async checkGitHubForExistingCatalogInfo(options: { url: string; owner: string; repo: string; @@ -220,6 +215,8 @@ the component will become available.\n\nFor more information, read an \ entities: EntityName[]; }> > { + const { url, owner, repo, githubIntegrationConfig } = options; + const { token } = await this.scmAuthApi.getCredentials({ url }); const octo = new Octokit({ auth: token, @@ -269,15 +266,7 @@ the component will become available.\n\nFor more information, read an \ } // TODO: extract this function and implement for non-github - private async submitGitHubPrToRepo({ - owner, - repo, - title, - body, - fileContent, - repositoryUrl, - githubIntegrationConfig, - }: { + private async submitGitHubPrToRepo(options: { owner: string; repo: string; title: string; @@ -286,6 +275,16 @@ the component will become available.\n\nFor more information, read an \ repositoryUrl: string; githubIntegrationConfig: GitHubIntegrationConfig; }): Promise<{ link: string; location: string }> { + const { + owner, + repo, + title, + body, + fileContent, + repositoryUrl, + githubIntegrationConfig, + } = options; + const { token } = await this.scmAuthApi.getCredentials({ url: repositoryUrl, additionalScope: { diff --git a/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx b/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx index 8693895ec0..30cce9603a 100644 --- a/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx +++ b/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx @@ -27,6 +27,11 @@ import React from 'react'; import { ImportInfoCard } from '../ImportInfoCard'; import { ImportStepper } from '../ImportStepper'; +/** + * The default catalog import page. + * + * @public + */ export const DefaultImportPage = () => { const configApi = useApi(configApiRef); const appTitle = configApi.getOptional('app.title') || 'Backstage'; diff --git a/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx b/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx index b8af9942f6..2c59eec18f 100644 --- a/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx +++ b/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx @@ -47,23 +47,35 @@ function sortEntities(entities: Array) { ); } -type Props = { +/** + * Props for {@link EntityListComponent}. + * + * @public + */ +export interface EntityListComponentProps { locations: Array<{ target: string; entities: (Entity | EntityName)[] }>; locationListItemIcon: (target: string) => React.ReactElement; collapsed?: boolean; firstListItem?: React.ReactElement; onItemClick?: (target: string) => void; withLinks?: boolean; -}; +} + +/** + * Shows a result list of entities. + * + * @public + */ +export const EntityListComponent = (props: EntityListComponentProps) => { + const { + locations, + collapsed = false, + locationListItemIcon, + onItemClick, + firstListItem, + withLinks = false, + } = props; -export const EntityListComponent = ({ - locations, - collapsed = false, - locationListItemIcon, - onItemClick, - firstListItem, - withLinks = false, -}: Props) => { const app = useApp(); const classes = useStyles(); diff --git a/plugins/catalog-import/src/components/EntityListComponent/index.ts b/plugins/catalog-import/src/components/EntityListComponent/index.ts index 06b695240c..7fe0a0d55c 100644 --- a/plugins/catalog-import/src/components/EntityListComponent/index.ts +++ b/plugins/catalog-import/src/components/EntityListComponent/index.ts @@ -15,3 +15,4 @@ */ export { EntityListComponent } from './EntityListComponent'; +export type { EntityListComponentProps } from './EntityListComponent'; diff --git a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx index 3e66e137eb..c879cbe998 100644 --- a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx +++ b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx @@ -21,15 +21,27 @@ import React from 'react'; import { catalogImportApiRef } from '../../api'; import { useCatalogFilename } from '../../hooks'; -type Props = { +/** + * Props for {@link ImportInfoCard}. + * + * @public + */ +export interface ImportInfoCardProps { exampleLocationUrl?: string; exampleRepositoryUrl?: string; -}; +} + +/** + * Shows information about the import process. + * + * @public + */ +export const ImportInfoCard = (props: ImportInfoCardProps) => { + const { + exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml', + exampleRepositoryUrl = 'https://github.com/backstage/backstage', + } = props; -export const ImportInfoCard = ({ - exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml', - exampleRepositoryUrl = 'https://github.com/backstage/backstage', -}: Props) => { const configApi = useApi(configApiRef); const appTitle = configApi.getOptional('app.title') || 'Backstage'; const catalogImportApi = useApi(catalogImportApiRef); diff --git a/plugins/catalog-import/src/components/ImportInfoCard/index.ts b/plugins/catalog-import/src/components/ImportInfoCard/index.ts index c82e88f7e8..10dc8726f6 100644 --- a/plugins/catalog-import/src/components/ImportInfoCard/index.ts +++ b/plugins/catalog-import/src/components/ImportInfoCard/index.ts @@ -15,3 +15,4 @@ */ export { ImportInfoCard } from './ImportInfoCard'; +export type { ImportInfoCardProps } from './ImportInfoCard'; diff --git a/plugins/catalog-import/src/components/ImportPage/ImportPage.tsx b/plugins/catalog-import/src/components/ImportPage/ImportPage.tsx index 467bd710f0..129e714952 100644 --- a/plugins/catalog-import/src/components/ImportPage/ImportPage.tsx +++ b/plugins/catalog-import/src/components/ImportPage/ImportPage.tsx @@ -18,6 +18,11 @@ import React from 'react'; import { useOutlet } from 'react-router'; import { DefaultImportPage } from '../DefaultImportPage'; +/** + * The whole catalog import page. + * + * @public + */ export const ImportPage = () => { const outlet = useOutlet(); diff --git a/plugins/catalog-import/src/components/ImportStepper/ImportStepper.tsx b/plugins/catalog-import/src/components/ImportStepper/ImportStepper.tsx index 4112775c2d..b2638e582e 100644 --- a/plugins/catalog-import/src/components/ImportStepper/ImportStepper.tsx +++ b/plugins/catalog-import/src/components/ImportStepper/ImportStepper.tsx @@ -34,20 +34,32 @@ const useStyles = makeStyles(() => ({ }, })); -type Props = { +/** + * Props for {@link ImportStepper}. + * + * @public + */ +export interface ImportStepperProps { initialUrl?: string; generateStepper?: ( flow: ImportFlows, defaults: StepperProvider, ) => StepperProvider; variant?: InfoCardVariants; -}; +} + +/** + * The stepper that holds the different import stages. + * + * @public + */ +export const ImportStepper = (props: ImportStepperProps) => { + const { + initialUrl, + generateStepper = defaultGenerateStepper, + variant, + } = props; -export const ImportStepper = ({ - initialUrl, - generateStepper = defaultGenerateStepper, - variant, -}: Props) => { const catalogImportApi = useApi(catalogImportApiRef); const classes = useStyles(); const state = useImportState({ initialUrl }); diff --git a/plugins/catalog-import/src/components/ImportStepper/defaults.tsx b/plugins/catalog-import/src/components/ImportStepper/defaults.tsx index 553e8977b8..94dff39d0f 100644 --- a/plugins/catalog-import/src/components/ImportStepper/defaults.tsx +++ b/plugins/catalog-import/src/components/ImportStepper/defaults.tsx @@ -42,7 +42,12 @@ export type StepConfiguration = { content: React.ReactElement; }; -export type StepperProvider = { +/** + * Defines the details of the stepper. + * + * @public + */ +export interface StepperProvider { analyze: ( s: Extract, opts: { apis: StepperApis }, @@ -59,7 +64,7 @@ export type StepperProvider = { s: Extract, opts: { apis: StepperApis }, ) => StepConfiguration; -}; +} /** * The default stepper generation function. @@ -69,6 +74,7 @@ export type StepperProvider = { * * @param flow - the name of the active flow * @param defaults - the default steps + * @public */ export function defaultGenerateStepper( flow: ImportFlows, diff --git a/plugins/catalog-import/src/components/ImportStepper/index.ts b/plugins/catalog-import/src/components/ImportStepper/index.ts index 164c6f43f1..db940f5f74 100644 --- a/plugins/catalog-import/src/components/ImportStepper/index.ts +++ b/plugins/catalog-import/src/components/ImportStepper/index.ts @@ -15,4 +15,5 @@ */ export { ImportStepper } from './ImportStepper'; +export type { ImportStepperProps } from './ImportStepper'; export { defaultGenerateStepper } from './defaults'; diff --git a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx index 83377d6b2f..3c655ec11b 100644 --- a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx +++ b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx @@ -27,7 +27,12 @@ type FormData = { url: string; }; -type Props = { +/** + * Props for {@link StepInitAnalyzeUrl}. + * + * @public + */ +export interface StepInitAnalyzeUrlProps { onAnalysis: ( flow: ImportFlows, url: string, @@ -37,7 +42,7 @@ type Props = { disablePullRequest?: boolean; analysisUrl?: string; exampleLocationUrl?: string; -}; +} /** * A form that lets the user input a url and analyze it for existing locations or potential entities. @@ -45,13 +50,16 @@ type Props = { * @param onAnalysis - is called when the analysis was successful * @param analysisUrl - a url that can be used as a default value * @param disablePullRequest - if true, repositories without entities will abort the wizard + * @public */ -export const StepInitAnalyzeUrl = ({ - onAnalysis, - analysisUrl = '', - disablePullRequest = false, - exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml', -}: Props) => { +export const StepInitAnalyzeUrl = (props: StepInitAnalyzeUrlProps) => { + const { + onAnalysis, + analysisUrl = '', + disablePullRequest = false, + exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml', + } = props; + const errorApi = useApi(errorApiRef); const catalogImportApi = useApi(catalogImportApiRef); diff --git a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/index.ts b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/index.ts index 2cd1557d75..2a3dffcf99 100644 --- a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/index.ts +++ b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/index.ts @@ -15,3 +15,4 @@ */ export { StepInitAnalyzeUrl } from './StepInitAnalyzeUrl'; +export type { StepInitAnalyzeUrlProps } from './StepInitAnalyzeUrl'; diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/AutocompleteTextField.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/AutocompleteTextField.tsx index 98d741df15..2e163be2aa 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/AutocompleteTextField.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/AutocompleteTextField.tsx @@ -20,7 +20,12 @@ import { Autocomplete } from '@material-ui/lab'; import React from 'react'; import { Controller, FieldErrors } from 'react-hook-form'; -type Props = { +/** + * Props for {@link AutocompleteTextField}. + * + * @public + */ +export interface AutocompleteTextFieldProps { name: TFieldValue; options: string[]; required?: boolean; @@ -35,20 +40,29 @@ type Props = { errorHelperText?: string; textFieldProps?: Omit; -}; +} + +/** + * An autocompletion text field for the catalog import flows. + * + * @public + */ +export const AutocompleteTextField = ( + props: AutocompleteTextFieldProps, +) => { + const { + name, + options, + required, + errors, + rules, + loading = false, + loadingText, + helperText, + errorHelperText, + textFieldProps = {}, + } = props; -export const AutocompleteTextField = ({ - name, - options, - required, - errors, - rules, - loading = false, - loadingText, - helperText, - errorHelperText, - textFieldProps = {}, -}: Props) => { return ( > = Pick< - UseFormProps, - 'defaultValues' -> & { +/** + * Props for {@link PreparePullRequestForm}. + * + * @public + */ +export type PreparePullRequestFormProps< + TFieldValues extends Record, +> = Pick, 'defaultValues'> & { onSubmit: SubmitHandler; render: ( @@ -48,14 +52,15 @@ type Props> = Pick< * @param onSubmit - a callback that is executed when the form is submitted * (initiated by a button of type="submit") * @param render - render the form elements + * @public */ export const PreparePullRequestForm = < TFieldValues extends Record, ->({ - defaultValues, - onSubmit, - render, -}: Props) => { +>( + props: PreparePullRequestFormProps, +) => { + const { defaultValues, onSubmit, render } = props; + const methods = useForm({ mode: 'onTouched', defaultValues }); const { handleSubmit, watch, control, register, formState, setValue } = methods; diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.tsx index 0f1dc33d2e..a16276f90b 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.tsx @@ -22,17 +22,26 @@ import { CodeSnippet } from '@backstage/core-components'; import { trimEnd } from 'lodash'; import { useCatalogFilename } from '../../hooks'; -type Props = { +/** + * Props for {@link PreviewCatalogInfoComponent}. + * + * @public + */ +export interface PreviewCatalogInfoComponentProps { repositoryUrl: string; entities: Entity[]; classes?: { card?: string; cardContent?: string }; -}; +} -export const PreviewCatalogInfoComponent = ({ - repositoryUrl, - entities, - classes, -}: Props) => { +/** + * Previews information about an entity to create. + * + * @public + */ +export const PreviewCatalogInfoComponent = ( + props: PreviewCatalogInfoComponentProps, +) => { + const { repositoryUrl, entities, classes } = props; const catalogFilename = useCatalogFilename(); return ( diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.tsx index 7b6653e4ca..e8a54489a0 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.tsx @@ -18,17 +18,26 @@ import { Card, CardContent, CardHeader } from '@material-ui/core'; import React from 'react'; import { MarkdownContent } from '@backstage/core-components'; -type Props = { +/** + * Props for {@link PreviewPullRequestComponent}. + * + * @public + */ +export interface PreviewPullRequestComponentProps { title: string; description: string; classes?: { card?: string; cardContent?: string }; -}; +} -export const PreviewPullRequestComponent = ({ - title, - description, - classes, -}: Props) => { +/** + * Previews a pull request. + * + * @public + */ +export const PreviewPullRequestComponent = ( + props: PreviewPullRequestComponentProps, +) => { + const { title, description, classes } = props; return ( diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx index a79caaa0b9..36e8c33a5c 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx @@ -53,7 +53,12 @@ type FormData = { useCodeowners: boolean; }; -type Props = { +/** + * Props for {@link StepPrepareCreatePullRequest}. + * + * @public + */ +export interface StepPrepareCreatePullRequestProps { analyzeResult: Extract; onPrepare: ( result: PrepareResult, @@ -71,7 +76,7 @@ type Props = { groupsLoading: boolean; }, ) => React.ReactNode; -}; +} export function generateEntities( entities: PartialEntity[], @@ -93,12 +98,16 @@ export function generateEntities( })); } -export const StepPrepareCreatePullRequest = ({ - analyzeResult, - onPrepare, - onGoBack, - renderFormFields, -}: Props) => { +/** + * Prepares a pull request. + * + * @public + */ +export const StepPrepareCreatePullRequest = ( + props: StepPrepareCreatePullRequestProps, +) => { + const { analyzeResult, onPrepare, onGoBack, renderFormFields } = props; + const classes = useStyles(); const catalogApi = useApi(catalogApiRef); const catalogImportApi = useApi(catalogImportApiRef); diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/index.ts b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/index.ts index 1e8eaea1b9..ce1cd40e19 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/index.ts +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/index.ts @@ -15,7 +15,12 @@ */ export { AutocompleteTextField } from './AutocompleteTextField'; +export type { AutocompleteTextFieldProps } from './AutocompleteTextField'; export { PreparePullRequestForm } from './PreparePullRequestForm'; +export type { PreparePullRequestFormProps } from './PreparePullRequestForm'; export { PreviewCatalogInfoComponent } from './PreviewCatalogInfoComponent'; +export type { PreviewCatalogInfoComponentProps } from './PreviewCatalogInfoComponent'; export { PreviewPullRequestComponent } from './PreviewPullRequestComponent'; +export type { PreviewPullRequestComponentProps } from './PreviewPullRequestComponent'; export { StepPrepareCreatePullRequest } from './StepPrepareCreatePullRequest'; +export type { StepPrepareCreatePullRequestProps } from './StepPrepareCreatePullRequest'; diff --git a/plugins/catalog-import/src/components/index.ts b/plugins/catalog-import/src/components/index.ts index 886c679d2d..15f57e7219 100644 --- a/plugins/catalog-import/src/components/index.ts +++ b/plugins/catalog-import/src/components/index.ts @@ -20,3 +20,4 @@ export * from './ImportInfoCard'; export * from './ImportStepper'; export * from './StepInitAnalyzeUrl'; export * from './StepPrepareCreatePullRequest'; +export type { ImportFlows, ImportState, PrepareResult } from './useImportState'; diff --git a/plugins/catalog-import/src/components/useImportState.ts b/plugins/catalog-import/src/components/useImportState.ts index a1505b26b5..0cb6b59917 100644 --- a/plugins/catalog-import/src/components/useImportState.ts +++ b/plugins/catalog-import/src/components/useImportState.ts @@ -18,7 +18,11 @@ import { Entity, EntityName } from '@backstage/catalog-model'; import { useReducer } from 'react'; import { AnalyzeResult } from '../api'; -// the configuration of the stepper +/** + * The configuration of the stepper. + * + * @public + */ export type ImportFlows = | 'unknown' | 'single-location' @@ -28,7 +32,11 @@ export type ImportFlows = // the available states of the stepper type ImportStateTypes = 'analyze' | 'prepare' | 'review' | 'finish'; -// result of the prepare state +/** + * Result of the prepare state. + * + * @public + */ export type PrepareResult = | { type: 'locations'; diff --git a/plugins/catalog-import/src/plugin.ts b/plugins/catalog-import/src/plugin.ts index 52c1929dce..d9dd226792 100644 --- a/plugins/catalog-import/src/plugin.ts +++ b/plugins/catalog-import/src/plugin.ts @@ -34,6 +34,12 @@ export const rootRouteRef = createRouteRef({ id: 'catalog-import', }); +/** + * A plugin that helps the user in importing projects and YAML files into the + * catalog. + * + * @public + */ export const catalogImportPlugin = createPlugin({ id: 'catalog-import', apis: [ @@ -70,6 +76,11 @@ export const catalogImportPlugin = createPlugin({ }, }); +/** + * The page for importing projects and YAML files into the catalog. + * + * @public + */ export const CatalogImportPage = catalogImportPlugin.provide( createRoutableExtension({ name: 'CatalogImportPage', diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 8c3ba0daa3..2c064a504f 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -105,22 +105,14 @@ export type CatalogReactUserListPickerClassKey = // @public @deprecated (undocumented) export const catalogRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "createDomainColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createDomainColumn(): TableColumn; -// Warning: (ae-missing-release-tag) "createEntityRefColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -function createEntityRefColumn({ - defaultKind, -}: { +function createEntityRefColumn(options: { defaultKind?: string; }): TableColumn; -// Warning: (ae-missing-release-tag) "createEntityRelationColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createEntityRelationColumn({ title, @@ -136,28 +128,18 @@ function createEntityRelationColumn({ }; }): TableColumn; -// Warning: (ae-missing-release-tag) "createMetadataDescriptionColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createMetadataDescriptionColumn(): TableColumn; -// Warning: (ae-missing-release-tag) "createOwnerColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createOwnerColumn(): TableColumn; -// Warning: (ae-missing-release-tag) "createSpecLifecycleColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createSpecLifecycleColumn(): TableColumn; -// Warning: (ae-missing-release-tag) "createSpecTypeColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createSpecTypeColumn(): TableColumn; -// Warning: (ae-missing-release-tag) "createSystemColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createSystemColumn(): TableColumn; @@ -215,14 +197,18 @@ export class EntityKindFilter implements EntityFilter { readonly value: string; } -// Warning: (ae-forgotten-export) The symbol "EntityKindFilterProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityKindPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityKindPicker: ({ - initialFilter, - hidden, -}: EntityKindFilterProps) => JSX.Element | null; +export const EntityKindPicker: ( + props: EntityKindPickerProps, +) => JSX.Element | null; + +// @public +export interface EntityKindPickerProps { + // (undocumented) + hidden: boolean; + // (undocumented) + initialFilter?: string; +} // Warning: (ae-missing-release-tag) "EntityLifecycleFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -237,8 +223,6 @@ export class EntityLifecycleFilter implements EntityFilter { readonly values: string[]; } -// Warning: (ae-missing-release-tag) "EntityLifecyclePicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityLifecyclePicker: () => JSX.Element | null; @@ -270,8 +254,6 @@ export class EntityOwnerFilter implements EntityFilter { readonly values: string[]; } -// Warning: (ae-missing-release-tag) "EntityOwnerPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityOwnerPicker: () => JSX.Element | null; @@ -289,10 +271,7 @@ export interface EntityProviderProps { entity?: Entity; } -// Warning: (ae-forgotten-export) The symbol "EntityRefLinkProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityRefLink" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export const EntityRefLink: React_2.ForwardRefExoticComponent< Pick< EntityRefLinkProps, @@ -581,16 +560,27 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent< React_2.RefAttributes >; -// Warning: (ae-forgotten-export) The symbol "EntityRefLinksProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityRefLinks" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public +export type EntityRefLinkProps = { + entityRef: Entity | EntityName; + defaultKind?: string; + title?: string; + children?: React_2.ReactNode; +} & Omit; + +// @public export const EntityRefLinks: ({ entityRefs, defaultKind, ...linkProps }: EntityRefLinksProps) => JSX.Element; +// @public +export type EntityRefLinksProps = { + entityRefs: (Entity | EntityName)[]; + defaultKind?: string; +} & Omit; + // Warning: (ae-missing-release-tag) "entityRoute" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public @deprecated (undocumented) @@ -618,8 +608,6 @@ export const entityRouteRef: RouteRef<{ namespace: string; }>; -// Warning: (ae-missing-release-tag) "EntitySearchBar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntitySearchBar: () => JSX.Element; @@ -631,18 +619,12 @@ export type EntitySourceLocation = { integrationType?: string; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-missing-release-tag) "EntityTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // -// @public (undocumented) -export function EntityTable({ - entities, - title, - emptyContent, - variant, - columns, -}: Props): JSX.Element; +// @public +export function EntityTable( + props: EntityTableProps, +): JSX.Element; // @public (undocumented) export namespace EntityTable { @@ -656,6 +638,22 @@ export namespace EntityTable { componentEntityColumns: TableColumn[]; } +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "EntityTable" has more than one declaration; you need to add a TSDoc member reference selector +// +// @public +export interface EntityTableProps { + // (undocumented) + columns: TableColumn[]; + // (undocumented) + emptyContent?: ReactNode; + // (undocumented) + entities: T[]; + // (undocumented) + title: string; + // (undocumented) + variant?: 'gridItem'; +} + // Warning: (ae-missing-release-tag) "EntityTagFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -669,8 +667,6 @@ export class EntityTagFilter implements EntityFilter { readonly values: string[]; } -// Warning: (ae-missing-release-tag) "EntityTagPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityTagPicker: () => JSX.Element | null; @@ -700,26 +696,24 @@ export class EntityTypeFilter implements EntityFilter { readonly value: string | string[]; } -// Warning: (ae-missing-release-tag) "EntityTypeFilterProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type EntityTypeFilterProps = { - initialFilter?: string; - hidden?: boolean; -}; - -// Warning: (ae-missing-release-tag) "EntityTypePicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityTypePicker: ( - props: EntityTypeFilterProps, + props: EntityTypePickerProps, ) => JSX.Element | null; +// @public +export interface EntityTypePickerProps { + // (undocumented) + hidden?: boolean; + // (undocumented) + initialFilter?: string; +} + // Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "FavoriteEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export const FavoriteEntity: (props: Props_2) => JSX.Element; +export const FavoriteEntity: (props: Props) => JSX.Element; // Warning: (ae-missing-release-tag) "favoriteEntityIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -835,7 +829,7 @@ export const UnregisterEntityDialog: ({ onConfirm, onClose, entity, -}: Props_3) => JSX.Element; +}: Props_2) => JSX.Element; // @public export function useEntity(): { diff --git a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx index 6f9119c404..17d28aad9f 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx +++ b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx @@ -19,15 +19,20 @@ import { Alert } from '@material-ui/lab'; import { useEntityListProvider } from '../../hooks'; import { EntityKindFilter } from '../../filters'; -type EntityKindFilterProps = { +/** + * Props for {@link EntityKindPicker}. + * + * @public + */ +export interface EntityKindPickerProps { initialFilter?: string; hidden: boolean; -}; +} + +/** @public */ +export const EntityKindPicker = (props: EntityKindPickerProps) => { + const { initialFilter, hidden } = props; -export const EntityKindPicker = ({ - initialFilter, - hidden, -}: EntityKindFilterProps) => { const { updateFilters, queryParameters } = useEntityListProvider(); const [selectedKind] = useState( [queryParameters.kind].flat()[0] ?? initialFilter, diff --git a/plugins/catalog-react/src/components/EntityKindPicker/index.ts b/plugins/catalog-react/src/components/EntityKindPicker/index.ts index 89dd46230b..a89a96aebc 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/index.ts +++ b/plugins/catalog-react/src/components/EntityKindPicker/index.ts @@ -15,3 +15,4 @@ */ export { EntityKindPicker } from './EntityKindPicker'; +export type { EntityKindPickerProps } from './EntityKindPicker'; diff --git a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx index 630b1700a0..f5f973b829 100644 --- a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx +++ b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx @@ -46,6 +46,7 @@ const useStyles = makeStyles( const icon = ; const checkedIcon = ; +/** @public */ export const EntityLifecyclePicker = () => { const classes = useStyles(); const { updateFilters, backendEntities, filters, queryParameters } = diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx index ae88858666..e807155b0c 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx @@ -48,6 +48,7 @@ const useStyles = makeStyles( const icon = ; const checkedIcon = ; +/** @public */ export const EntityOwnerPicker = () => { const classes = useStyles(); const { updateFilters, backendEntities, filters, queryParameters } = diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx index 02e63e60e3..aa92fd0818 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity, EntityName, @@ -25,6 +26,11 @@ import { Link, LinkProps } from '@backstage/core-components'; import { useRouteRef } from '@backstage/core-plugin-api'; import { Tooltip } from '@material-ui/core'; +/** + * Props for {@link EntityRefLink}. + * + * @public + */ export type EntityRefLinkProps = { entityRef: Entity | EntityName; defaultKind?: string; @@ -32,6 +38,11 @@ export type EntityRefLinkProps = { children?: React.ReactNode; } & Omit; +/** + * Shows a clickable link to an entity. + * + * @public + */ export const EntityRefLink = forwardRef( (props, ref) => { const { entityRef, defaultKind, title, children, ...linkProps } = props; diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx index 4a990f4028..9be970aa56 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx @@ -13,16 +13,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity, EntityName } from '@backstage/catalog-model'; import React from 'react'; import { EntityRefLink } from './EntityRefLink'; import { LinkProps } from '@backstage/core-components'; +/** + * Props for {@link EntityRefLink}. + * + * @public + */ export type EntityRefLinksProps = { entityRefs: (Entity | EntityName)[]; defaultKind?: string; } & Omit; +/** + * Shows a list of clickable links to entities. + * + * @public + */ export const EntityRefLinks = ({ entityRefs, defaultKind, diff --git a/plugins/catalog-react/src/components/EntityRefLink/index.ts b/plugins/catalog-react/src/components/EntityRefLink/index.ts index 1c5297e2f2..d49993feb6 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/index.ts +++ b/plugins/catalog-react/src/components/EntityRefLink/index.ts @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { EntityRefLink } from './EntityRefLink'; +export type { EntityRefLinkProps } from './EntityRefLink'; export { EntityRefLinks } from './EntityRefLinks'; +export type { EntityRefLinksProps } from './EntityRefLinks'; export { formatEntityRefTitle } from './format'; diff --git a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx index 79b2ee36bf..ec977fada4 100644 --- a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx +++ b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx @@ -45,6 +45,7 @@ const useStyles = makeStyles( }, ); +/** @public */ export const EntitySearchBar = () => { const classes = useStyles(); diff --git a/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx b/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx index 43da2b3612..62c33701b4 100644 --- a/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx +++ b/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx @@ -21,13 +21,18 @@ import * as columnFactories from './columns'; import { componentEntityColumns, systemEntityColumns } from './presets'; import { Table, TableColumn } from '@backstage/core-components'; -type Props = { +/** + * Props for {@link EntityTable}. + * + * @public + */ +export interface EntityTableProps { title: string; variant?: 'gridItem'; entities: T[]; emptyContent?: ReactNode; columns: TableColumn[]; -}; +} const useStyles = makeStyles(theme => ({ empty: { @@ -37,13 +42,21 @@ const useStyles = makeStyles(theme => ({ }, })); -export function EntityTable({ - entities, - title, - emptyContent, - variant = 'gridItem', - columns, -}: Props) { +/** + * A general entity table component, that can be used for composing more + * specific entity tables. + * + * @public + */ +export function EntityTable(props: EntityTableProps) { + const { + entities, + title, + emptyContent, + variant = 'gridItem', + columns, + } = props; + const classes = useStyles(); const tableStyle: React.CSSProperties = { minWidth: '0', diff --git a/plugins/catalog-react/src/components/EntityTable/columns.tsx b/plugins/catalog-react/src/components/EntityTable/columns.tsx index 1f4f5ee0d0..f6198fa1dc 100644 --- a/plugins/catalog-react/src/components/EntityTable/columns.tsx +++ b/plugins/catalog-react/src/components/EntityTable/columns.tsx @@ -29,11 +29,11 @@ import { formatEntityRefTitle, } from '../EntityRefLink'; -export function createEntityRefColumn({ - defaultKind, -}: { +/** @public */ +export function createEntityRefColumn(options: { defaultKind?: string; }): TableColumn { + const { defaultKind } = options; function formatContent(entity: T): string { return ( entity.metadata?.title || @@ -49,7 +49,7 @@ export function createEntityRefColumn({ customFilterAndSearch(filter, entity) { // TODO: We could implement this more efficiently, like searching over // each field that is displayed individually (kind, namespace, name). - // but that migth confuse the user as it will behave different than a + // but that might confuse the user as it will behave different than a // simple text search. // Another alternative would be to cache the values. But writing them // into the entity feels bad too. @@ -70,6 +70,7 @@ export function createEntityRefColumn({ }; } +/** @public */ export function createEntityRelationColumn({ title, relation, @@ -110,6 +111,7 @@ export function createEntityRelationColumn({ }; } +/** @public */ export function createOwnerColumn(): TableColumn { return createEntityRelationColumn({ title: 'Owner', @@ -118,6 +120,7 @@ export function createOwnerColumn(): TableColumn { }); } +/** @public */ export function createDomainColumn(): TableColumn { return createEntityRelationColumn({ title: 'Domain', @@ -129,6 +132,7 @@ export function createDomainColumn(): TableColumn { }); } +/** @public */ export function createSystemColumn(): TableColumn { return createEntityRelationColumn({ title: 'System', @@ -140,6 +144,7 @@ export function createSystemColumn(): TableColumn { }); } +/** @public */ export function createMetadataDescriptionColumn< T extends Entity, >(): TableColumn { @@ -157,6 +162,7 @@ export function createMetadataDescriptionColumn< }; } +/** @public */ export function createSpecLifecycleColumn(): TableColumn { return { title: 'Lifecycle', @@ -164,6 +170,7 @@ export function createSpecLifecycleColumn(): TableColumn { }; } +/** @public */ export function createSpecTypeColumn(): TableColumn { return { title: 'Type', diff --git a/plugins/catalog-react/src/components/EntityTable/index.ts b/plugins/catalog-react/src/components/EntityTable/index.ts index 36203e7929..2ed07f9823 100644 --- a/plugins/catalog-react/src/components/EntityTable/index.ts +++ b/plugins/catalog-react/src/components/EntityTable/index.ts @@ -13,4 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { EntityTable } from './EntityTable'; +export type { EntityTableProps } from './EntityTable'; diff --git a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx index a25c50c0a9..9f51a5df68 100644 --- a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx +++ b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx @@ -46,6 +46,7 @@ const useStyles = makeStyles( const icon = ; const checkedIcon = ; +/** @public */ export const EntityTagPicker = () => { const classes = useStyles(); const { updateFilters, backendEntities, filters, queryParameters } = diff --git a/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx b/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx index 225193dc93..a0770ef30a 100644 --- a/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx +++ b/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx @@ -22,12 +22,18 @@ import { useEntityTypeFilter } from '../../hooks/useEntityTypeFilter'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; import { Select } from '@backstage/core-components'; -export type EntityTypeFilterProps = { +/** + * Props for {@link EntityTypePicker}. + * + * @public + */ +export interface EntityTypePickerProps { initialFilter?: string; hidden?: boolean; -}; +} -export const EntityTypePicker = (props: EntityTypeFilterProps) => { +/** @public */ +export const EntityTypePicker = (props: EntityTypePickerProps) => { const { hidden, initialFilter } = props; const alertApi = useApi(alertApiRef); const { error, availableTypes, selectedTypes, setSelectedTypes } = diff --git a/plugins/catalog-react/src/components/EntityTypePicker/index.ts b/plugins/catalog-react/src/components/EntityTypePicker/index.ts index 1124b5c30c..03351337b7 100644 --- a/plugins/catalog-react/src/components/EntityTypePicker/index.ts +++ b/plugins/catalog-react/src/components/EntityTypePicker/index.ts @@ -15,4 +15,4 @@ */ export { EntityTypePicker } from './EntityTypePicker'; -export type { EntityTypeFilterProps } from './EntityTypePicker'; +export type { EntityTypePickerProps } from './EntityTypePicker'; diff --git a/plugins/catalog-react/src/components/index.ts b/plugins/catalog-react/src/components/index.ts index 0977e86d58..b80472a81d 100644 --- a/plugins/catalog-react/src/components/index.ts +++ b/plugins/catalog-react/src/components/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export * from './EntityKindPicker'; export * from './EntityLifecyclePicker'; export * from './EntityOwnerPicker'; diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index dfbd91f76b..1ac43d242d 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -218,7 +218,9 @@ const NO_WARNING_PACKAGES = [ 'packages/types', 'packages/version-bridge', 'plugins/catalog-backend-module-ldap', + 'plugins/catalog-backend-module-msgraph', 'plugins/catalog-common', + 'plugins/catalog-graph', 'plugins/permission-backend', 'plugins/permission-common', 'plugins/permission-node', From 2bd5f240439f63a75a310b7627a55629f2309006 Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 3 Feb 2022 22:14:29 +0100 Subject: [PATCH 155/473] fix(scaffolder-backend): use the right key when initializing a Gitlab client Signed-off-by: djamaile --- .changeset/seven-teachers-arrive.md | 5 +++++ .../src/scaffolder/actions/builtin/publish/gitlab.ts | 3 ++- .../scaffolder/actions/builtin/publish/gitlabMergeRequest.ts | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/seven-teachers-arrive.md diff --git a/.changeset/seven-teachers-arrive.md b/.changeset/seven-teachers-arrive.md new file mode 100644 index 0000000000..b9d6264576 --- /dev/null +++ b/.changeset/seven-teachers-arrive.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +fix for the gitlab:publish action to use the `oauthToken` key when creating a Gilab client. This only happens if ctx.input.token is provided else the key `token` will be used. diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts index a04766f941..48979306b1 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts @@ -112,10 +112,11 @@ export function createPublishGitlabAction(options: { } const token = ctx.input.token || integrationConfig.config.token!; + const tokenType = ctx.input.token ? 'oauthToken' : 'token'; const client = new Gitlab({ host: integrationConfig.config.baseUrl, - token, + [tokenType]: token, }); let { id: targetNamespace } = (await client.Namespaces.show(owner)) as { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index 281b72789f..bf687268c3 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -118,10 +118,11 @@ export const createPublishGitlabMergeRequestAction = (options: { } const token = ctx.input.token ?? integrationConfig.config.token!; + const tokenType = ctx.input.token ? 'oauthToken' : 'token'; const api = new Gitlab({ host: integrationConfig.config.baseUrl, - token, + [tokenType]: token, }); const fileRoot = ctx.workspacePath; From 1049a6d94924304ded900520823e0567b4f29134 Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 3 Feb 2022 22:21:22 +0100 Subject: [PATCH 156/473] fix(scaffolder-backend): spelling mistakes Signed-off-by: djamaile --- .changeset/seven-teachers-arrive.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/seven-teachers-arrive.md b/.changeset/seven-teachers-arrive.md index b9d6264576..bdbbc33c44 100644 --- a/.changeset/seven-teachers-arrive.md +++ b/.changeset/seven-teachers-arrive.md @@ -2,4 +2,5 @@ '@backstage/plugin-scaffolder-backend': patch --- -fix for the gitlab:publish action to use the `oauthToken` key when creating a Gilab client. This only happens if ctx.input.token is provided else the key `token` will be used. +fix for the `gitlab:publish` action to use the `oauthToken` key when creating a +`Gitlab` client. This only happens if `ctx.input.token` is provided else the key `token` will be used. From 08fcda13ef74646c35db8ca4c7c9ce7868df3a1c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 3 Feb 2022 20:38:27 +0100 Subject: [PATCH 157/473] auth-backend: make it possible to tweak the cookie configuration logic Signed-off-by: Patrik Oldsberg --- .changeset/breezy-windows-jump.md | 5 +++ .changeset/metal-lions-fix.md | 5 +++ plugins/auth-backend/api-report.md | 15 ++++++- .../src/lib/oauth/OAuthAdapter.test.ts | 44 +------------------ .../src/lib/oauth/OAuthAdapter.ts | 22 +++++----- .../src/lib/oauth/helpers.test.ts | 41 +++++++++++------ plugins/auth-backend/src/lib/oauth/helpers.ts | 16 +++---- plugins/auth-backend/src/providers/index.ts | 1 + plugins/auth-backend/src/providers/types.ts | 18 ++++++++ plugins/auth-backend/src/service/router.ts | 10 ++++- 10 files changed, 101 insertions(+), 76 deletions(-) create mode 100644 .changeset/breezy-windows-jump.md create mode 100644 .changeset/metal-lions-fix.md diff --git a/.changeset/breezy-windows-jump.md b/.changeset/breezy-windows-jump.md new file mode 100644 index 0000000000..0d839614ff --- /dev/null +++ b/.changeset/breezy-windows-jump.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +The `callbackUrl` option of `OAuthAdapter` is now required. diff --git a/.changeset/metal-lions-fix.md b/.changeset/metal-lions-fix.md new file mode 100644 index 0000000000..5d35d3d0d3 --- /dev/null +++ b/.changeset/metal-lions-fix.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Added a new `cookieConfigurer` option to `createRouter` that makes it possible to override the default logic for configuring OAuth provider cookies. diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 88b75d99b0..ddbef77766 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -214,6 +214,17 @@ export class CatalogIdentityClient { resolveCatalogMembership(query: MemberClaimQuery): Promise; } +// @public +export type CookieConfigurer = (ctx: { + providerId: string; + baseUrl: string; + callbackUrl: string; +}) => { + domain: string; + path: string; + secure: boolean; +}; + // Warning: (ae-missing-release-tag) "createAtlassianProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -665,6 +676,8 @@ export interface RouterOptions { // (undocumented) config: Config; // (undocumented) + cookieConfigurer?: CookieConfigurer; + // (undocumented) database: PluginDatabaseManager; // (undocumented) discovery: PluginEndpointDiscovery; @@ -736,5 +749,5 @@ export type WebMessageResponse = // src/identity/types.d.ts:31:9 - (ae-forgotten-export) The symbol "AnyJWK" needs to be exported by the entry point index.d.ts // src/providers/aws-alb/provider.d.ts:77:5 - (ae-forgotten-export) The symbol "AwsAlbResult" needs to be exported by the entry point index.d.ts // src/providers/github/provider.d.ts:97:5 - (ae-forgotten-export) The symbol "StateEncoder" needs to be exported by the entry point index.d.ts -// src/providers/types.d.ts:98:5 - (ae-forgotten-export) The symbol "AuthProviderConfig" needs to be exported by the entry point index.d.ts +// src/providers/types.d.ts:118:5 - (ae-forgotten-export) The symbol "AuthProviderConfig" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts index d1057b19a8..c1130b4270 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts @@ -69,13 +69,14 @@ describe('OAuthAdapter', () => { secure: false, disableRefresh: true, appOrigin: 'http://localhost:3000', - cookieDomain: 'localhost', + cookieDomain: 'example.com', cookiePath: '/auth/test-provider', tokenIssuer: { issueToken: async () => 'my-id-token', listPublicKeys: async () => ({ keys: [] }), }, isOriginAllowed: () => false, + callbackUrl: 'http://example.com:7007/auth/test-provider/frame/handler', }; it('sets the correct headers in start', async () => { @@ -444,47 +445,6 @@ describe('OAuthAdapter', () => { }); }); - it('sets the correct cookie configuration using the base url', async () => { - const config = { - baseUrl: 'http://domain.org/auth', - appUrl: 'http://domain.org', - isOriginAllowed: () => false, - }; - - const oauthProvider = OAuthAdapter.fromConfig( - config, - providerInstance, - oAuthProviderOptions, - ); - - const mockRequest = { - query: { - scope: 'user', - env: 'development', - }, - } as unknown as express.Request; - - const mockResponse = { - cookie: jest.fn().mockReturnThis(), - end: jest.fn().mockReturnThis(), - setHeader: jest.fn().mockReturnThis(), - statusCode: jest.fn().mockReturnThis(), - } as unknown as express.Response; - - await oauthProvider.start(mockRequest, mockResponse); - - expect(mockResponse.cookie).toBeCalledTimes(1); - expect(mockResponse.cookie).toBeCalledWith( - `${oAuthProviderOptions.providerId}-nonce`, - expect.any(String), - expect.objectContaining({ - domain: 'domain.org', - path: '/auth/test-provider/handler', - secure: false, - }), - ); - }); - it('sets the correct cookie configuration using a callbackUrl', async () => { const config = { baseUrl: 'http://domain.org/auth', diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts index 2e2d26db61..82a43c7c64 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts @@ -35,7 +35,7 @@ import { NotAllowedError, } from '@backstage/errors'; import { TokenIssuer } from '../../identity/types'; -import { getCookieConfig, readState, verifyNonce } from './helpers'; +import { defaultCookieConfigurer, readState, verifyNonce } from './helpers'; import { postMessageResponse, ensuresXRequestedWith } from '../flow'; import { OAuthHandlers, @@ -58,7 +58,7 @@ export type Options = { appOrigin: string; tokenIssuer: TokenIssuer; isOriginAllowed: (origin: string) => boolean; - callbackUrl?: string; + callbackUrl: string; }; export class OAuthAdapter implements AuthProviderRouteHandlers { static fromConfig( @@ -74,18 +74,20 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { >, ): OAuthAdapter { const { origin: appOrigin } = new URL(config.appUrl); - const authUrl = new URL(options.callbackUrl ?? config.baseUrl); - const { cookieDomain, cookiePath, secure } = getCookieConfig( - authUrl, - options.providerId, - ); + + const cookieConfigurer = config.cookieConfigurer ?? defaultCookieConfigurer; + const cookieConfig = cookieConfigurer({ + providerId: options.providerId, + baseUrl: config.baseUrl, + callbackUrl: options.callbackUrl, + }); return new OAuthAdapter(handlers, { ...options, appOrigin, - cookieDomain, - cookiePath, - secure, + cookieDomain: cookieConfig.domain, + cookiePath: cookieConfig.path, + secure: cookieConfig.secure, isOriginAllowed: config.isOriginAllowed, }); } diff --git a/plugins/auth-backend/src/lib/oauth/helpers.test.ts b/plugins/auth-backend/src/lib/oauth/helpers.test.ts index a98b684141..2f79cdef98 100644 --- a/plugins/auth-backend/src/lib/oauth/helpers.test.ts +++ b/plugins/auth-backend/src/lib/oauth/helpers.test.ts @@ -19,7 +19,7 @@ import { verifyNonce, encodeState, readState, - getCookieConfig, + defaultCookieConfigurer, } from './helpers'; describe('OAuthProvider Utils', () => { @@ -110,30 +110,43 @@ describe('OAuthProvider Utils', () => { }); }); - describe('getCookieConfig', () => { + describe('defaultCookieConfigurer', () => { it('should set the correct domain and path for a base url', () => { - const mockAuthUrl = new URL('http://domain.org/auth'); - expect(getCookieConfig(mockAuthUrl, 'test-provider')).toMatchObject({ - cookieDomain: 'domain.org', - cookiePath: '/auth/test-provider', + expect( + defaultCookieConfigurer({ + baseUrl: '', + providerId: 'test-provider', + callbackUrl: 'http://domain.org/auth', + }), + ).toMatchObject({ + domain: 'domain.org', + path: '/auth/test-provider', secure: false, }); }); it('should set the correct domain and path for a url containing a frame handler', () => { - const mockAuthUrl = new URL( - 'http://domain.org/auth/test-provider/handler/frame', - ); - expect(getCookieConfig(mockAuthUrl, 'test-provider')).toMatchObject({ - cookieDomain: 'domain.org', - cookiePath: '/auth/test-provider', + expect( + defaultCookieConfigurer({ + baseUrl: '', + providerId: 'test-provider', + callbackUrl: 'http://domain.org/auth/test-provider/handler/frame', + }), + ).toMatchObject({ + domain: 'domain.org', + path: '/auth/test-provider', secure: false, }); }); it('should set the secure flag if url is using https', () => { - const mockAuthUrl = new URL('https://domain.org/auth'); - expect(getCookieConfig(mockAuthUrl, 'test-provider')).toMatchObject({ + expect( + defaultCookieConfigurer({ + baseUrl: '', + providerId: 'test-provider', + callbackUrl: 'https://domain.org/auth', + }), + ).toMatchObject({ secure: true, }); }); diff --git a/plugins/auth-backend/src/lib/oauth/helpers.ts b/plugins/auth-backend/src/lib/oauth/helpers.ts index 878083e679..eec25696a3 100644 --- a/plugins/auth-backend/src/lib/oauth/helpers.ts +++ b/plugins/auth-backend/src/lib/oauth/helpers.ts @@ -17,6 +17,7 @@ import express from 'express'; import { OAuthState } from './types'; import pickBy from 'lodash/pickBy'; +import { CookieConfigurer } from '../../providers/types'; export const readState = (stateString: string): OAuthState => { const state = Object.fromEntries( @@ -58,20 +59,19 @@ export const verifyNonce = (req: express.Request, providerId: string) => { } }; -export const getCookieConfig = (authUrl: URL, providerId: string) => { - const { hostname: cookieDomain, pathname, protocol } = authUrl; +export const defaultCookieConfigurer: CookieConfigurer = ({ + callbackUrl, + providerId, +}) => { + const { hostname: domain, pathname, protocol } = new URL(callbackUrl); const secure = protocol === 'https:'; // If the provider supports callbackUrls, the pathname will // contain the complete path to the frame handler so we need // to slice off the trailing part of the path. - const cookiePath = pathname.endsWith(`${providerId}/handler/frame`) + const path = pathname.endsWith(`${providerId}/handler/frame`) ? pathname.slice(0, -'/handler/frame'.length) : `${pathname}/${providerId}`; - return { - cookieDomain, - cookiePath, - secure, - }; + return { domain, path, secure }; }; diff --git a/plugins/auth-backend/src/providers/index.ts b/plugins/auth-backend/src/providers/index.ts index 7779b67e04..1207254e11 100644 --- a/plugins/auth-backend/src/providers/index.ts +++ b/plugins/auth-backend/src/providers/index.ts @@ -43,6 +43,7 @@ export type { AuthHandlerResult, SignInResolver, SignInInfo, + CookieConfigurer, } from './types'; // These types are needed for a postMessage from the login pop-up diff --git a/plugins/auth-backend/src/providers/types.ts b/plugins/auth-backend/src/providers/types.ts index b02e8d74b8..f3a1a95919 100644 --- a/plugins/auth-backend/src/providers/types.ts +++ b/plugins/auth-backend/src/providers/types.ts @@ -38,6 +38,19 @@ export type AuthResolverContext = { logger: Logger; }; +/** + * The callback used to resolve the cookie configuration for auth providers that use cookies. + * @public + */ +export type CookieConfigurer = (ctx: { + /** ID of the auth provider that this configuration applies to */ + providerId: string; + /** The externally reachable base URL of the auth-backend plugin */ + baseUrl: string; + /** The configured callback URL of the auth provider */ + callbackUrl: string; +}) => { domain: string; path: string; secure: boolean }; + export type AuthProviderConfig = { /** * The protocol://domain[:port] where the app is hosted. This is used to construct the @@ -54,6 +67,11 @@ export type AuthProviderConfig = { * A function that is called to check whether an origin is allowed to receive the authentication result. */ isOriginAllowed: (origin: string) => boolean; + + /** + * The function used to resolve cookie configuration based on the auth provider options. + */ + cookieConfigurer?: CookieConfigurer; }; export type RedirectInfo = { diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index bdb68929b1..101deb9350 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -34,6 +34,7 @@ import { createOidcRouter, TokenFactory, KeyStores } from '../identity'; import session from 'express-session'; import passport from 'passport'; import { Minimatch } from 'minimatch'; +import { CookieConfigurer } from '../providers/types'; type ProviderFactories = { [s: string]: AuthProviderFactory }; @@ -44,6 +45,7 @@ export interface RouterOptions { discovery: PluginEndpointDiscovery; tokenManager: TokenManager; providerFactories?: ProviderFactories; + cookieConfigurer?: CookieConfigurer; } export async function createRouter( @@ -56,6 +58,7 @@ export async function createRouter( database, tokenManager, providerFactories, + cookieConfigurer, } = options; const router = Router(); @@ -111,7 +114,12 @@ export async function createRouter( try { const provider = providerFactory({ providerId, - globalConfig: { baseUrl: authUrl, appUrl, isOriginAllowed }, + globalConfig: { + baseUrl: authUrl, + appUrl, + isOriginAllowed, + cookieConfigurer, + }, config: providersConfig.getConfig(providerId), logger, tokenManager, From 6dc0256606b9ec70d05ec13c93394809bdabae0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 04:35:19 +0000 Subject: [PATCH 158/473] chore(deps-dev): bump @types/dompurify from 2.2.3 to 2.3.3 Bumps [@types/dompurify](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/dompurify) from 2.2.3 to 2.3.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/dompurify) --- updated-dependencies: - dependency-name: "@types/dompurify" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 63 +++++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9f41538dd3..4c2f34555b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5290,17 +5290,10 @@ "@types/docker-modem" "*" "@types/node" "*" -"@types/dompurify@^2.1.0": - version "2.3.1" - resolved "https://registry.npmjs.org/@types/dompurify/-/dompurify-2.3.1.tgz#2934adcd31c4e6b02676f9c22f9756e5091c04dd" - integrity sha512-YJth9qa0V/E6/XPH1Jq4BC8uCMmO8V1fKWn8PCvuZcAhMn7q0ez9LW6naQT04UZzjFfAPhyRMZmI2a2rbMlEFA== - dependencies: - "@types/trusted-types" "*" - -"@types/dompurify@^2.2.2": - version "2.2.3" - resolved "https://registry.npmjs.org/@types/dompurify/-/dompurify-2.2.3.tgz#6e89677a07902ac1b6821c345f34bd85da239b08" - integrity sha512-CLtc2mZK8+axmrz1JqtpklO/Kvn38arGc8o1l3UVopZaXXuer9ONdZwJ/9f226GrhRLtUmLr9WrvZsRSNpS8og== +"@types/dompurify@^2.1.0", "@types/dompurify@^2.2.2": + version "2.3.3" + resolved "https://registry.npmjs.org/@types/dompurify/-/dompurify-2.3.3.tgz#c24c92f698f77ed9cc9d9fa7888f90cf2bfaa23f" + integrity sha512-nnVQSgRVuZ/843oAfhA25eRSNzUFcBPk/LOiw5gm8mD9/X7CNcbRkQu/OsjCewO8+VIYfPxUnXvPEVGenw14+w== dependencies: "@types/trusted-types" "*" @@ -10671,30 +10664,6 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": - version "0.2.62" - dependencies: - "@backstage/app-defaults" "^0.1.6" - "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1" - "@backstage/config" "^0.1.13" - "@backstage/core-app-api" "^0.5.2" - "@backstage/core-components" "^0.8.7" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.20" - "@backstage/plugin-catalog" "^0.7.11" - "@backstage/plugin-techdocs" "^0.13.2" - "@backstage/test-utils" "^0.2.4" - "@backstage/theme" "^0.2.14" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - history "^5.0.0" - react "^17.0.2" - react-dom "^17.0.2" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-use "^17.2.4" - emittery@^0.7.1: version "0.7.1" resolved "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" @@ -22993,6 +22962,30 @@ tdigest@^0.1.1: dependencies: bintrees "1.0.1" +"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": + version "0.2.62" + dependencies: + "@backstage/app-defaults" "^0.1.6" + "@backstage/catalog-model" "^0.9.10" + "@backstage/cli" "^0.13.1" + "@backstage/config" "^0.1.13" + "@backstage/core-app-api" "^0.5.2" + "@backstage/core-components" "^0.8.7" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/integration-react" "^0.1.20" + "@backstage/plugin-catalog" "^0.7.11" + "@backstage/plugin-techdocs" "^0.13.2" + "@backstage/test-utils" "^0.2.4" + "@backstage/theme" "^0.2.14" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + history "^5.0.0" + react "^17.0.2" + react-dom "^17.0.2" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + teeny-request@^7.0.0: version "7.0.1" resolved "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz#bdd41fdffea5f8fbc0d29392cb47bec4f66b2b4c" From a58fca4cc2ec7123b62ebeb5b1c97d6fea92a0ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 04:38:11 +0000 Subject: [PATCH 159/473] chore(deps-dev): bump @storybook/addon-storysource in /storybook Bumps [@storybook/addon-storysource](https://github.com/storybookjs/storybook/tree/HEAD/addons/storysource) from 6.4.17 to 6.4.18. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.4.18/addons/storysource) --- updated-dependencies: - dependency-name: "@storybook/addon-storysource" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- storybook/package.json | 2 +- storybook/yarn.lock | 163 +++++------------------------------------ 2 files changed, 18 insertions(+), 147 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 9f10b9a972..3864e04484 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -18,7 +18,7 @@ "@storybook/addon-a11y": "^6.4.18", "@storybook/addon-actions": "^6.4.18", "@storybook/addon-links": "^6.4.18", - "@storybook/addon-storysource": "^6.4.17", + "@storybook/addon-storysource": "^6.4.18", "@storybook/addons": "^6.4.14", "@storybook/react": "^6.4.18", "storybook-dark-mode": "^1.0.8" diff --git a/storybook/yarn.lock b/storybook/yarn.lock index d25fdeeead..284ada1cb2 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -1374,18 +1374,18 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" -"@storybook/addon-storysource@^6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/addon-storysource/-/addon-storysource-6.4.17.tgz#b5ca9ab8307de18d8885bcb181a4c867991b5dee" - integrity sha512-LBUyk3JXr9qalQazUsYbV50v9S2aI162y8wprpk1hF5YBZp2gL07+59sYww4riHZ+jZA+2oR5+TcTs8sRFFuXg== +"@storybook/addon-storysource@^6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/addon-storysource/-/addon-storysource-6.4.18.tgz#00f0fb919b6224bfa8379b7c4c66e0b32b443921" + integrity sha512-02hs9dnfJs5lihQ0c/Cv4+lQNmkR0Fd+isEL+oVNcWTE9g0LVSLzC3evzeQCJv0SDzei7T0N+G7pF1P2dmc5PQ== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/api" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/components" "6.4.17" - "@storybook/router" "6.4.17" - "@storybook/source-loader" "6.4.17" - "@storybook/theming" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/api" "6.4.18" + "@storybook/client-logger" "6.4.18" + "@storybook/components" "6.4.18" + "@storybook/router" "6.4.18" + "@storybook/source-loader" "6.4.18" + "@storybook/theming" "6.4.18" core-js "^3.8.2" estraverse "^5.2.0" loader-utils "^2.0.0" @@ -1394,23 +1394,6 @@ react-syntax-highlighter "^13.5.3" regenerator-runtime "^0.13.7" -"@storybook/addons@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.17.tgz#d040db3ddcf72fd9e7df8b8fce2a6dc88578c87e" - integrity sha512-C/hji0Bc7+tssGqaD0JYd/Pz0GM46xbRpdgHSVLInYdhJrb5a9IG6INCbcB8CXeReDKWJCLAaj2+z79Wa96bFQ== - dependencies: - "@storybook/api" "6.4.17" - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" - "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/router" "6.4.17" - "@storybook/theming" "6.4.17" - "@types/webpack-env" "^1.16.0" - core-js "^3.8.2" - global "^4.4.0" - regenerator-runtime "^0.13.7" - "@storybook/addons@6.4.18", "@storybook/addons@^6.4.14": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.4.18.tgz#fc92a4a608680f2e182a5e896ed382792f6b774e" @@ -1428,29 +1411,6 @@ global "^4.4.0" regenerator-runtime "^0.13.7" -"@storybook/api@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.17.tgz#82c3d756c85a65ecd8a3c3d9ce890e581175003a" - integrity sha512-O0ssHVy40t4QD5CNdNESbJo7uZd86UWYrHCFjgeC2gmxrMgBD+ajO34N4HoQFC/F+/84om2/z8RYAGKu/WpoTA== - dependencies: - "@storybook/channels" "6.4.17" - "@storybook/client-logger" "6.4.17" - "@storybook/core-events" "6.4.17" - "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/router" "6.4.17" - "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.4.17" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - lodash "^4.17.21" - memoizerific "^1.11.3" - regenerator-runtime "^0.13.7" - store2 "^2.12.0" - telejson "^5.3.2" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/api@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/api/-/api-6.4.18.tgz#92da2b69aeec712419bec9bab5c8434ff1776e97" @@ -1573,15 +1533,6 @@ global "^4.4.0" telejson "^5.3.2" -"@storybook/channels@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.4.17.tgz#95d05745a96b6059cea26d45aacca3967c401e26" - integrity sha512-C6ON1olkkHc+FaDerkwL1yYGDL1xtFP+eMlm42ZaO06sIT9qv9EkJZ3GU/PNLTeXYMX4OsZl9kjz2whD4rN7gg== - dependencies: - core-js "^3.8.2" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/channels@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.4.18.tgz#2907aca0039b5eb9ae305112f14c488c2621c2f6" @@ -1617,14 +1568,6 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-logger@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.4.17.tgz#50652859592c489b671f010455b8ce85d21a1b3d" - integrity sha512-awKBTOWHXHBxAIl8a/Zy/BitIw49A+0RnhPGuf8aFAw2Ym/vKR4bI8lRHVPtlR6RIHFp5rC1g32HmCQfKE22Fw== - dependencies: - core-js "^3.8.2" - global "^4.4.0" - "@storybook/client-logger@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.4.18.tgz#4ad8ea7d67b17e5db8f15cffcc2f984df3479462" @@ -1633,36 +1576,6 @@ core-js "^3.8.2" global "^4.4.0" -"@storybook/components@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.17.tgz#5be383682d9538c35c96463723cb17740f105fb6" - integrity sha512-R6imELCWlHWQiprYMeeXLKgUQK4m698G/jvkc1xUxAThpTxwgROTcpw5qnJA0k+wltjGn4t6MBWKHhheGZc6Hg== - dependencies: - "@popperjs/core" "^2.6.0" - "@storybook/client-logger" "6.4.17" - "@storybook/csf" "0.0.2--canary.87bc651.0" - "@storybook/theming" "6.4.17" - "@types/color-convert" "^2.0.0" - "@types/overlayscrollbars" "^1.12.0" - "@types/react-syntax-highlighter" "11.0.5" - color-convert "^2.0.1" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - lodash "^4.17.21" - markdown-to-jsx "^7.1.3" - memoizerific "^1.11.3" - overlayscrollbars "^1.13.1" - polished "^4.0.5" - prop-types "^15.7.2" - react-colorful "^5.1.2" - react-popper-tooltip "^3.1.1" - react-syntax-highlighter "^13.5.3" - react-textarea-autosize "^8.3.0" - regenerator-runtime "^0.13.7" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/components@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/components/-/components-6.4.18.tgz#1f3eba9ab69a09b9468af0126d6e7ab040655ca4" @@ -1774,13 +1687,6 @@ util-deprecate "^1.0.2" webpack "4" -"@storybook/core-events@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.4.17.tgz#ad70c883673a2060f1c7c4aa8f5926fc14119f4a" - integrity sha512-k6wNjQLZZ8A/rt4gLz0M4ebTORKYYz2B9hZ3LvPJftNVqv+bTFAV4KVks6bBlvbJWpJ+eCPEyfeSP9Np2QIFMQ== - dependencies: - core-js "^3.8.2" - "@storybook/core-events@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.4.18.tgz#630a19425eb387c6134f29b967c30458c65f7ea8" @@ -1992,23 +1898,6 @@ ts-dedent "^2.0.0" webpack "4" -"@storybook/router@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/router/-/router-6.4.17.tgz#d53c4f9a4ccaa21a7bbe8d875a1a81c9dba2a6f2" - integrity sha512-GLhzth83BB2BbUkM/+ld2JITIbDQtzFLs/CnZZQKq6aR93Kou6VK2epHnIwrPyWbP6rsGavR/8L/UWeBdwwTrQ== - dependencies: - "@storybook/client-logger" "6.4.17" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - history "5.0.0" - lodash "^4.17.21" - memoizerific "^1.11.3" - qs "^6.10.0" - react-router "^6.0.0" - react-router-dom "^6.0.0" - ts-dedent "^2.0.0" - "@storybook/router@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/router/-/router-6.4.18.tgz#8803dd78277f8602d6c11dae56f6229474dfa54c" @@ -2034,13 +1923,13 @@ core-js "^3.6.5" find-up "^4.1.0" -"@storybook/source-loader@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/source-loader/-/source-loader-6.4.17.tgz#d17e73f88f8c2a714fe129bf66ad692b4d4e0c97" - integrity sha512-OAETI21mL/jwmb9e/JtFDIsLWoOOWOAIm3Cj89XHQz/5VkYljZxdh2icb6xDHR8PtEaXj4+sBWQUG3L+a/a9QQ== +"@storybook/source-loader@6.4.18": + version "6.4.18" + resolved "https://registry.npmjs.org/@storybook/source-loader/-/source-loader-6.4.18.tgz#205423e56f7da752d64a0695f2b22ed94378e5d0" + integrity sha512-sjKvngCCYDbBwjjFTjAXO6VsAzKkjy+UctseeULXxEN3cKIsz/R3y7MrrN9yBrwyYcn0k3pqa9d9e3gE+Jv2Tw== dependencies: - "@storybook/addons" "6.4.17" - "@storybook/client-logger" "6.4.17" + "@storybook/addons" "6.4.18" + "@storybook/client-logger" "6.4.18" "@storybook/csf" "0.0.2--canary.87bc651.0" core-js "^3.8.2" estraverse "^5.2.0" @@ -2071,24 +1960,6 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/theming@6.4.17": - version "6.4.17" - resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.4.17.tgz#f0a03d2d3239638ac171e97a8f089ee2656a8287" - integrity sha512-7+U72/VdhoMb00q1URMzdTW3OYHJogro2i2hScgKR+ndL4/dtSmetJ/1z9PuoFxLxHgdLKcwMAV0fZAjEYlhCA== - dependencies: - "@emotion/core" "^10.1.1" - "@emotion/is-prop-valid" "^0.8.6" - "@emotion/styled" "^10.0.27" - "@storybook/client-logger" "6.4.17" - core-js "^3.8.2" - deep-object-diff "^1.1.0" - emotion-theming "^10.0.27" - global "^4.4.0" - memoizerific "^1.11.3" - polished "^4.0.5" - resolve-from "^5.0.0" - ts-dedent "^2.0.0" - "@storybook/theming@6.4.18": version "6.4.18" resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.4.18.tgz#05365cc1d3dab5d71b80a82928fc5188106a0ed6" From 31b081e20abe1afc6c8e0d8e641818f9fdc14acf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 04:40:58 +0000 Subject: [PATCH 160/473] chore(deps): bump @types/zen-observable from 0.8.2 to 0.8.3 Bumps [@types/zen-observable](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/zen-observable) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/zen-observable) --- updated-dependencies: - dependency-name: "@types/zen-observable" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9f41538dd3..0cad6fa16e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6346,9 +6346,9 @@ integrity sha512-qRyuv+P/1t1JK1rA+elmK1MmCL1BapEzKKfbEhDBV/LMMse4lmhZ/XbgETI39JveDJRpLjmToOI6uFtMW/WR2g== "@types/zen-observable@^0.8.0", "@types/zen-observable@^0.8.2": - version "0.8.2" - resolved "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.2.tgz#808c9fa7e4517274ed555fa158f2de4b4f468e71" - integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg== + version "0.8.3" + resolved "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" + integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== "@typescript-eslint/eslint-plugin@^5.9.0": version "5.9.0" @@ -10671,30 +10671,6 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": - version "0.2.62" - dependencies: - "@backstage/app-defaults" "^0.1.6" - "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1" - "@backstage/config" "^0.1.13" - "@backstage/core-app-api" "^0.5.2" - "@backstage/core-components" "^0.8.7" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.20" - "@backstage/plugin-catalog" "^0.7.11" - "@backstage/plugin-techdocs" "^0.13.2" - "@backstage/test-utils" "^0.2.4" - "@backstage/theme" "^0.2.14" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - history "^5.0.0" - react "^17.0.2" - react-dom "^17.0.2" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-use "^17.2.4" - emittery@^0.7.1: version "0.7.1" resolved "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" @@ -22993,6 +22969,30 @@ tdigest@^0.1.1: dependencies: bintrees "1.0.1" +"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": + version "0.2.62" + dependencies: + "@backstage/app-defaults" "^0.1.6" + "@backstage/catalog-model" "^0.9.10" + "@backstage/cli" "^0.13.1" + "@backstage/config" "^0.1.13" + "@backstage/core-app-api" "^0.5.2" + "@backstage/core-components" "^0.8.7" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/integration-react" "^0.1.20" + "@backstage/plugin-catalog" "^0.7.11" + "@backstage/plugin-techdocs" "^0.13.2" + "@backstage/test-utils" "^0.2.4" + "@backstage/theme" "^0.2.14" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + history "^5.0.0" + react "^17.0.2" + react-dom "^17.0.2" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + teeny-request@^7.0.0: version "7.0.1" resolved "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz#bdd41fdffea5f8fbc0d29392cb47bec4f66b2b4c" From 3ce6842b633f383c1374467889f7ceec0091b0c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 07:23:36 +0000 Subject: [PATCH 161/473] chore(deps): bump simple-get from 3.1.0 to 3.1.1 Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/feross/simple-get/releases) - [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: simple-get dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9f41538dd3..603e57a69a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10671,30 +10671,6 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": - version "0.2.62" - dependencies: - "@backstage/app-defaults" "^0.1.6" - "@backstage/catalog-model" "^0.9.10" - "@backstage/cli" "^0.13.1" - "@backstage/config" "^0.1.13" - "@backstage/core-app-api" "^0.5.2" - "@backstage/core-components" "^0.8.7" - "@backstage/core-plugin-api" "^0.6.0" - "@backstage/integration-react" "^0.1.20" - "@backstage/plugin-catalog" "^0.7.11" - "@backstage/plugin-techdocs" "^0.13.2" - "@backstage/test-utils" "^0.2.4" - "@backstage/theme" "^0.2.14" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - history "^5.0.0" - react "^17.0.2" - react-dom "^17.0.2" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-use "^17.2.4" - emittery@^0.7.1: version "0.7.1" resolved "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" @@ -21796,9 +21772,9 @@ simple-concat@^1.0.0: integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== simple-get@^3.0.2, simple-get@^3.0.3: - version "3.1.0" - resolved "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" - integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== + version "3.1.1" + resolved "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" + integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== dependencies: decompress-response "^4.2.0" once "^1.3.1" @@ -22993,6 +22969,30 @@ tdigest@^0.1.1: dependencies: bintrees "1.0.1" +"techdocs-cli-embedded-app@file:packages/techdocs-cli-embedded-app": + version "0.2.62" + dependencies: + "@backstage/app-defaults" "^0.1.6" + "@backstage/catalog-model" "^0.9.10" + "@backstage/cli" "^0.13.1" + "@backstage/config" "^0.1.13" + "@backstage/core-app-api" "^0.5.2" + "@backstage/core-components" "^0.8.7" + "@backstage/core-plugin-api" "^0.6.0" + "@backstage/integration-react" "^0.1.20" + "@backstage/plugin-catalog" "^0.7.11" + "@backstage/plugin-techdocs" "^0.13.2" + "@backstage/test-utils" "^0.2.4" + "@backstage/theme" "^0.2.14" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + history "^5.0.0" + react "^17.0.2" + react-dom "^17.0.2" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + teeny-request@^7.0.0: version "7.0.1" resolved "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz#bdd41fdffea5f8fbc0d29392cb47bec4f66b2b4c" From 8d95c29bd34dd261eaf6c2a1ce39232517fe8687 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 08:39:02 +0000 Subject: [PATCH 162/473] chore(deps): bump dompurify from 2.3.3 to 2.3.5 Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.3.3 to 2.3.5. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/2.3.3...2.3.5) --- updated-dependencies: - dependency-name: dompurify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 792a2ecf15..4083a1a58e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10508,11 +10508,16 @@ domhandler@^4.2.0: dependencies: domelementtype "^2.2.0" -dompurify@=2.3.3, dompurify@^2.2.7, dompurify@^2.2.9: +dompurify@=2.3.3: version "2.3.3" resolved "https://registry.npmjs.org/dompurify/-/dompurify-2.3.3.tgz#c1af3eb88be47324432964d8abc75cf4b98d634c" integrity sha512-dqnqRkPMAjOZE0FogZ+ceJNM2dZ3V/yNOuFB7+39qpO93hHhfRpHw3heYQC7DPK9FqbQTfBKUJhiSfz4MvXYwg== +dompurify@^2.2.7, dompurify@^2.2.9: + version "2.3.5" + resolved "https://registry.npmjs.org/dompurify/-/dompurify-2.3.5.tgz#c83ed5a3ae5ce23e52efe654ea052ffb358dd7e3" + integrity sha512-kD+f8qEaa42+mjdOpKeztu9Mfx5bv9gVLO6K9jRx4uGvh6Wv06Srn4jr1wPNY2OOUGGSKHNFN+A8MA3v0E0QAQ== + domutils@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" From 323f48704d434fcc406754ed6e798d6f77776bf7 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 3 Feb 2022 18:09:30 +0100 Subject: [PATCH 163/473] todo: switch to routable extension + add test Signed-off-by: Patrik Oldsberg --- .changeset/chilly-pans-jog.md | 5 +++ plugins/todo/api-report.md | 8 ++++- plugins/todo/package.json | 1 + plugins/todo/src/plugin.test.ts | 22 ------------- plugins/todo/src/plugin.test.tsx | 56 ++++++++++++++++++++++++++++++++ plugins/todo/src/plugin.ts | 14 ++++---- 6 files changed, 75 insertions(+), 31 deletions(-) create mode 100644 .changeset/chilly-pans-jog.md delete mode 100644 plugins/todo/src/plugin.test.ts create mode 100644 plugins/todo/src/plugin.test.tsx diff --git a/.changeset/chilly-pans-jog.md b/.changeset/chilly-pans-jog.md new file mode 100644 index 0000000000..b63d5fde50 --- /dev/null +++ b/.changeset/chilly-pans-jog.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-todo': minor +--- + +**BREAKING**: The `EntityTodoContent` is now a routable extension. This means it must be rendered within a route, but that's most likely already the case for most apps. The mount point `RouteRef` is available via `todoPlugin.routes.entityContent`. diff --git a/plugins/todo/api-report.md b/plugins/todo/api-report.md index 0784f5d56e..c1667f1111 100644 --- a/plugins/todo/api-report.md +++ b/plugins/todo/api-report.md @@ -10,6 +10,7 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { IdentityApi } from '@backstage/core-plugin-api'; +import { RouteRef } from '@backstage/core-plugin-api'; // @public export const EntityTodoContent: () => JSX.Element; @@ -79,5 +80,10 @@ export type TodoListResult = { }; // @public -export const todoPlugin: BackstagePlugin<{}, {}>; +export const todoPlugin: BackstagePlugin< + { + entityContent: RouteRef; + }, + {} +>; ``` diff --git a/plugins/todo/package.json b/plugins/todo/package.json index fc9893fcd9..fb433992a1 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -52,6 +52,7 @@ "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "cross-fetch": "^3.0.6", + "react-router": "6.0.0-beta.0", "msw": "^0.35.0" }, "files": [ diff --git a/plugins/todo/src/plugin.test.ts b/plugins/todo/src/plugin.test.ts deleted file mode 100644 index a99373abc6..0000000000 --- a/plugins/todo/src/plugin.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { todoPlugin } from './plugin'; - -describe('todo', () => { - it('should export plugin', () => { - expect(todoPlugin).toBeDefined(); - }); -}); diff --git a/plugins/todo/src/plugin.test.tsx b/plugins/todo/src/plugin.test.tsx new file mode 100644 index 0000000000..57b9be291d --- /dev/null +++ b/plugins/todo/src/plugin.test.tsx @@ -0,0 +1,56 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { Route } from 'react-router'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; +import { todoPlugin, EntityTodoContent } from './plugin'; +import { todoApiRef } from './api'; + +describe('todo', () => { + it('should export plugin', () => { + expect(todoPlugin).toBeDefined(); + }); + + it('should render EntityTodoContent', async () => { + const rendered = await renderInTestApp( + ({ + items: [ + { + tag: 'FIXME', + text: 'Make sure this test works', + }, + ], + limit: 10, + offset: 0, + totalCount: 1, + }), + }, + ], + ]} + > + } /> + , + ); + + await expect(rendered.findByText('FIXME')).resolves.toBeInTheDocument(); + }); +}); diff --git a/plugins/todo/src/plugin.ts b/plugins/todo/src/plugin.ts index a7d3702f2c..d74acfb02c 100644 --- a/plugins/todo/src/plugin.ts +++ b/plugins/todo/src/plugin.ts @@ -17,10 +17,11 @@ import { todoApiRef, TodoClient } from './api'; import { createApiFactory, createPlugin, - createComponentExtension, + createRoutableExtension, discoveryApiRef, identityApiRef, } from '@backstage/core-plugin-api'; +import { rootRouteRef } from './routes'; /** * The Todo plugin instance. @@ -42,7 +43,7 @@ export const todoPlugin = createPlugin({ }), ], routes: { - // root: rootRouteRef, + entityContent: rootRouteRef, }, }); @@ -52,12 +53,9 @@ export const todoPlugin = createPlugin({ * @public */ export const EntityTodoContent = todoPlugin.provide( - createComponentExtension({ + createRoutableExtension({ name: 'EntityTodoContent', - component: { - lazy: () => import('./components/TodoList').then(m => m.TodoList), - }, - // TODO(Rugvip): Switch back to routable extension once apps are migrated - // mountPoint: rootRouteRef, + component: () => import('./components/TodoList').then(m => m.TodoList), + mountPoint: rootRouteRef, }), ); From bbbaa8ed61b4e6b5485aa77cd079ea88acc4b501 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 3 Feb 2022 19:03:20 +0100 Subject: [PATCH 164/473] cli: no longer diff dev/ or src/ Signed-off-by: Patrik Oldsberg --- .changeset/big-jeans-love.md | 5 +++++ packages/cli/src/commands/plugin/diff.ts | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .changeset/big-jeans-love.md diff --git a/.changeset/big-jeans-love.md b/.changeset/big-jeans-love.md new file mode 100644 index 0000000000..e97ae15ff4 --- /dev/null +++ b/.changeset/big-jeans-love.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The `plugin:diff` command no longer validates the existence of any of the files within `dev/` or `src/`. diff --git a/packages/cli/src/commands/plugin/diff.ts b/packages/cli/src/commands/plugin/diff.ts index 6a0127794f..153bd16597 100644 --- a/packages/cli/src/commands/plugin/diff.ts +++ b/packages/cli/src/commands/plugin/diff.ts @@ -39,18 +39,13 @@ const fileHandlers = [ patterns: ['package.json'], handler: handlers.packageJson, }, - { - // Not all plugins have routes - patterns: ['src/routes.ts'], - handler: handlers.skip, - }, { // make sure files in 1st level of src/ and dev/ exist - patterns: ['.eslintrc.js', /^(src|dev)\/[^/]+$/], + patterns: ['.eslintrc.js'], handler: handlers.exists, }, { - patterns: ['README.md', 'tsconfig.json', /^src\//], + patterns: ['README.md', 'tsconfig.json', /^src\//, /^dev\//], handler: handlers.skip, }, ]; From 18411594901331edbb7817dd597d501245bc1f27 Mon Sep 17 00:00:00 2001 From: iammnils Date: Fri, 4 Feb 2022 11:44:55 +0100 Subject: [PATCH 165/473] chore: add sda codeowner Signed-off-by: iammnils --- .github/CODEOWNERS | 73 +++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 08057d5af6..eaba7ef3e1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,42 +5,49 @@ # https://help.github.com/articles/about-codeowners/ * @backstage/reviewers -/docs/features/techdocs @backstage/techdocs-core -/docs/features/search @backstage/techdocs-core -/docs/assets/search @backstage/techdocs-core -/plugins/allure @backstage/reviewers @deepak-bhardwaj-ps -/plugins/circleci @backstage/reviewers @adamdmharvey -/plugins/code-coverage @backstage/reviewers @alde @nissayeva -/plugins/code-coverage-backend @backstage/reviewers @alde @nissayeva -/plugins/cost-insights @backstage/silver-lining -/plugins/cloudbuild @backstage/reviewers @trivago/ebarrios -/plugins/search @backstage/techdocs-core -/plugins/search-* @backstage/techdocs-core -/plugins/techdocs @backstage/techdocs-core -/plugins/techdocs-backend @backstage/techdocs-core -/plugins/ilert @backstage/reviewers @yacut -/plugins/home @backstage/techdocs-core -/plugins/azure-devops @backstage/reviewers @marleypowell @awanlin -/plugins/azure-devops-backend @backstage/reviewers @marleypowell @awanlin -/plugins/azure-devops-common @backstage/reviewers @marleypowell @awanlin -/plugins/jenkins @backstage/reviewers @timja -/plugins/jenkins-backend @backstage/reviewers @timja -/plugins/kafka @backstage/reviewers @nirga -/plugins/kafka-backend @backstage/reviewers @nirga -/plugins/scaffolder-backend-module-yeoman @backstage/reviewers @pawelmitka -/plugins/scaffolder-backend-module-rails @backstage/reviewers @angeliski -/plugins/git-release-manager @backstage/reviewers @erikengervall -/tech-insights-backend @backstage/reviewers @xantier @iain-b -/tech-insights-backend-module-jsonfc @backstage/reviewers @xantier @iain-b -/tech-insights-tech-insights-common @backstage/reviewers @xantier @iain-b -/tech-insights-tech-insights-node @backstage/reviewers @xantier @iain-b -/packages/search-common @backstage/techdocs-core -/packages/techdocs-cli @backstage/techdocs-core -/packages/techdocs-cli-embedded-app @backstage/techdocs-core -/packages/techdocs-common @backstage/techdocs-core /.changeset/cost-insights-* @backstage/reviewers @backstage/silver-lining /.changeset/search-* @backstage/techdocs-core /.changeset/techdocs-* @backstage/techdocs-core /cypress/src/integration/plugins/techdocs.spec.ts @backstage/techdocs-core +/docs/assets/search @backstage/techdocs-core +/docs/features/search @backstage/techdocs-core +/docs/features/techdocs @backstage/techdocs-core +/packages/search-common @backstage/techdocs-core +/packages/techdocs-cli @backstage/techdocs-core +/packages/techdocs-cli-embedded-app @backstage/techdocs-core +/packages/techdocs-common @backstage/techdocs-core +/plugins/allure @backstage/reviewers @deepak-bhardwaj-ps /plugins/apache-airflow @backstage/reviewers @cmpadden +/plugins/api-docs @backstage/reviewers @backstage/sda-se-reviewers +/plugins/azure-devops @backstage/reviewers @marleypowell @awanlin +/plugins/azure-devops-backend @backstage/reviewers @marleypowell @awanlin +/plugins/azure-devops-common @backstage/reviewers @marleypowell @awanlin +/plugins/bitrise @backstage/reviewers @backstage/sda-se-reviewers +/plugins/catalog-graph @backstage/reviewers @backstage/sda-se-reviewers +/plugins/circleci @backstage/reviewers @adamdmharvey +/plugins/cloudbuild @backstage/reviewers @trivago/ebarrios +/plugins/code-coverage @backstage/reviewers @alde @nissayeva +/plugins/code-coverage-backend @backstage/reviewers @alde @nissayeva +/plugins/cost-insights @backstage/silver-lining +/plugins/explore @backstage/reviewers @backstage/sda-se-reviewers +/plugins/explore-react @backstage/reviewers @backstage/sda-se-reviewers +/plugins/fossa @backstage/reviewers @backstage/sda-se-reviewers +/plugins/git-release-manager @backstage/reviewers @erikengervall +/plugins/home @backstage/techdocs-core +/plugins/ilert @backstage/reviewers @yacut +/plugins/jenkins @backstage/reviewers @timja +/plugins/jenkins-backend @backstage/reviewers @timja +/plugins/kafka @backstage/reviewers @nirga +/plugins/kafka-backend @backstage/reviewers @nirga /plugins/newrelic-dashboard @backstage/reviewers @mufaddal7 +/plugins/scaffolder-backend-module-rails @backstage/reviewers @angeliski +/plugins/scaffolder-backend-module-yeoman @backstage/reviewers @pawelmitka +/plugins/search @backstage/techdocs-core +/plugins/search-* @backstage/techdocs-core +/plugins/sonarqube @backstage/reviewers @backstage/sda-se-reviewers +/plugins/techdocs @backstage/techdocs-core +/plugins/techdocs-backend @backstage/techdocs-core +/tech-insights-backend @backstage/reviewers @xantier @iain-b +/tech-insights-backend-module-jsonfc @backstage/reviewers @xantier @iain-b +/tech-insights-tech-insights-common @backstage/reviewers @xantier @iain-b +/tech-insights-tech-insights-node @backstage/reviewers @xantier @iain-b From faf49ba82f435b54af7ccb7669dbf637c2f00cf8 Mon Sep 17 00:00:00 2001 From: Jussi Hallila Date: Fri, 4 Feb 2022 13:02:22 +0100 Subject: [PATCH 166/473] Add line clamping to search results on modal search screen. (#9331) * Add line clamping to search results on modal search screen. Signed-off-by: Jussi Hallila * Add mock to test so we don't have to spin up canvas with jsdom. Signed-off-by: Jussi Hallila --- .changeset/old-phones-draw.md | 5 +++++ plugins/search/api-report.md | 2 ++ plugins/search/package.json | 1 + ...tItem.test.jsx => DefaultResultListItem.test.tsx} | 9 +++++++-- .../DefaultResultListItem/DefaultResultListItem.tsx | 12 +++++++++++- 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .changeset/old-phones-draw.md rename plugins/search/src/components/DefaultResultListItem/{DefaultResultListItem.test.jsx => DefaultResultListItem.test.tsx} (88%) diff --git a/.changeset/old-phones-draw.md b/.changeset/old-phones-draw.md new file mode 100644 index 0000000000..fd987844f3 --- /dev/null +++ b/.changeset/old-phones-draw.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search': patch +--- + +Modify modal search to clamp result length to 5 rows. diff --git a/plugins/search/api-report.md b/plugins/search/api-report.md index fc82e2be47..a45f02564f 100644 --- a/plugins/search/api-report.md +++ b/plugins/search/api-report.md @@ -27,10 +27,12 @@ export const DefaultResultListItem: ({ result, icon, secondaryAction, + lineClamp, }: { icon?: ReactNode; secondaryAction?: ReactNode; result: IndexableDocument; + lineClamp?: number | undefined; }) => JSX.Element; // Warning: (ae-forgotten-export) The symbol "FiltersProps" needs to be exported by the entry point index.d.ts diff --git a/plugins/search/package.json b/plugins/search/package.json index 6536c9c386..2a0b7f25a6 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -45,6 +45,7 @@ "qs": "^6.9.4", "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", + "react-text-truncate": "^0.17.0", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.test.jsx b/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.test.tsx similarity index 88% rename from plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.test.jsx rename to plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.test.tsx index 0a8e413107..68f00f9301 100644 --- a/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.test.jsx +++ b/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.test.tsx @@ -20,6 +20,11 @@ import { renderInTestApp } from '@backstage/test-utils'; import FindInPageIcon from '@material-ui/icons/FindInPage'; import { DefaultResultListItem } from './DefaultResultListItem'; +// Using canvas to render text.. +jest.mock('react-text-truncate', () => { + return ({ text }: { text: string }) => {text}; +}); + describe('DefaultResultListItem', () => { const result = { title: 'title', @@ -44,10 +49,10 @@ describe('DefaultResultListItem', () => { await renderInTestApp( } + icon={} />, ); - expect(screen.getByTitle('icon')).toBeInTheDocument(); + expect(screen.getByLabelText('icon')).toBeInTheDocument(); }); it('should render secondary action if prop is specified', async () => { diff --git a/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.tsx b/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.tsx index dd541b6e21..a6c9a36bb6 100644 --- a/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.tsx +++ b/plugins/search/src/components/DefaultResultListItem/DefaultResultListItem.tsx @@ -24,17 +24,20 @@ import { Divider, } from '@material-ui/core'; import { Link } from '@backstage/core-components'; +import TextTruncate from 'react-text-truncate'; type Props = { icon?: ReactNode; secondaryAction?: ReactNode; result: IndexableDocument; + lineClamp?: number; }; export const DefaultResultListItem = ({ result, icon, secondaryAction, + lineClamp = 5, }: Props) => { return ( @@ -43,7 +46,14 @@ export const DefaultResultListItem = ({ + } /> {secondaryAction && {secondaryAction}} From 9f19529e4847a1785ceed629266d7f27ac56afc3 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 4 Feb 2022 12:02:09 +0000 Subject: [PATCH 167/473] adds progress bar to the task page.. .. if the task is still loading Signed-off-by: Brian Fletcher --- .../src/components/TaskPage/TaskPage.tsx | 104 +++++++++--------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx index 9f5dad2adc..cb2eeab3b2 100644 --- a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx +++ b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx @@ -21,6 +21,7 @@ import { Lifecycle, Page, LogViewer, + Progress, } from '@backstage/core-components'; import { useRouteRef } from '@backstage/core-plugin-api'; import { BackstageTheme } from '@backstage/theme'; @@ -294,56 +295,59 @@ export const TaskPage = () => { }; return ( - -
- Task Activity - - } - subtitle={`Activity for task: ${taskId}`} - /> - - {taskNotFound ? ( - - ) : ( -
- - - - - {output && hasLinks(output) && ( - - )} - - + <> + + +
+ Task Activity + + } + subtitle={`Activity for task: ${taskId}`} + /> + + {taskNotFound ? ( + + ) : ( +
+ + + + + {output && hasLinks(output) && ( + + )} + + + + +
+ +
+
- -
- -
-
- -
- )} -
- +
+ )} +
+ + ); }; From 33e139e65248b2133212c9eae6e9878261e6c318 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 4 Feb 2022 12:05:37 +0000 Subject: [PATCH 168/473] adds changeset Signed-off-by: Brian Fletcher --- .changeset/loud-monkeys-explode.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/loud-monkeys-explode.md diff --git a/.changeset/loud-monkeys-explode.md b/.changeset/loud-monkeys-explode.md new file mode 100644 index 0000000000..b17b1e1641 --- /dev/null +++ b/.changeset/loud-monkeys-explode.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Adds a loading bar to the scaffolder task page if the task is still loading. This can happen if it takes a while for a task worker to pick up a task. From 5d5c9bfb4c8b0f4002c07ffd0e28baaa814f2fed Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 4 Feb 2022 13:11:10 +0100 Subject: [PATCH 169/473] auth-backend: removed cookieConfigurer from router options Signed-off-by: Patrik Oldsberg --- .changeset/metal-lions-fix.md | 2 +- plugins/auth-backend/api-report.md | 2 -- plugins/auth-backend/src/service/router.ts | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.changeset/metal-lions-fix.md b/.changeset/metal-lions-fix.md index 5d35d3d0d3..913098bbf7 100644 --- a/.changeset/metal-lions-fix.md +++ b/.changeset/metal-lions-fix.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -Added a new `cookieConfigurer` option to `createRouter` that makes it possible to override the default logic for configuring OAuth provider cookies. +Added a new `cookieConfigurer` option to `AuthProviderConfig` that makes it possible to override the default logic for configuring OAuth provider cookies. diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index ddbef77766..aaacd05815 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -676,8 +676,6 @@ export interface RouterOptions { // (undocumented) config: Config; // (undocumented) - cookieConfigurer?: CookieConfigurer; - // (undocumented) database: PluginDatabaseManager; // (undocumented) discovery: PluginEndpointDiscovery; diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index 101deb9350..ec1a52ffc9 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -34,7 +34,6 @@ import { createOidcRouter, TokenFactory, KeyStores } from '../identity'; import session from 'express-session'; import passport from 'passport'; import { Minimatch } from 'minimatch'; -import { CookieConfigurer } from '../providers/types'; type ProviderFactories = { [s: string]: AuthProviderFactory }; @@ -45,7 +44,6 @@ export interface RouterOptions { discovery: PluginEndpointDiscovery; tokenManager: TokenManager; providerFactories?: ProviderFactories; - cookieConfigurer?: CookieConfigurer; } export async function createRouter( @@ -58,7 +56,6 @@ export async function createRouter( database, tokenManager, providerFactories, - cookieConfigurer, } = options; const router = Router(); @@ -118,7 +115,6 @@ export async function createRouter( baseUrl: authUrl, appUrl, isOriginAllowed, - cookieConfigurer, }, config: providersConfig.getConfig(providerId), logger, From 0a2719a5ab7c0205f8e70a2ce96e82c0b6b31199 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 21 Jan 2022 01:52:05 +0100 Subject: [PATCH 170/473] cli: add initial role types and detection Signed-off-by: Patrik Oldsberg --- packages/cli/package.json | 3 +- .../src/lib/role/detectPackageRole.test.ts | 295 ++++++++++++++++++ .../cli/src/lib/role/detectPackageRole.ts | 117 +++++++ packages/cli/src/lib/role/index.ts | 22 ++ packages/cli/src/lib/role/types.ts | 34 ++ 5 files changed, 470 insertions(+), 1 deletion(-) create mode 100644 packages/cli/src/lib/role/detectPackageRole.test.ts create mode 100644 packages/cli/src/lib/role/detectPackageRole.ts create mode 100644 packages/cli/src/lib/role/index.ts create mode 100644 packages/cli/src/lib/role/types.ts diff --git a/packages/cli/package.json b/packages/cli/package.json index aad08a21eb..41cefe6c53 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -112,7 +112,8 @@ "webpack-node-externals": "^3.0.0", "yaml": "^1.10.0", "yml-loader": "^2.1.0", - "yn": "^4.0.0" + "yn": "^4.0.0", + "zod": "^3.11.6" }, "devDependencies": { "@backstage/backend-common": "^0.10.6", diff --git a/packages/cli/src/lib/role/detectPackageRole.test.ts b/packages/cli/src/lib/role/detectPackageRole.test.ts new file mode 100644 index 0000000000..f513a5aa3a --- /dev/null +++ b/packages/cli/src/lib/role/detectPackageRole.test.ts @@ -0,0 +1,295 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { detectPackageRole } from './detectPackageRole'; + +describe('detectPackageRole', () => { + it('detects explicit package roles', () => { + expect( + detectPackageRole({ + backstage: { + role: 'web-library', + }, + }), + ).toEqual({ + role: 'web-library', + platform: 'web', + }); + + expect( + detectPackageRole({ + backstage: { + role: 'app', + }, + }), + ).toEqual({ + role: 'app', + platform: 'web', + }); + + expect(() => + detectPackageRole({ + name: 'test', + backstage: {}, + }), + ).toThrow('Package test must specify a role in the "backstage" field'); + + expect(() => + detectPackageRole({ + name: 'test', + backstage: { role: 'invalid' }, + }), + ).toThrow(`Unknown role 'invalid' in package test`); + }); + + it('detects the role of example-app', () => { + expect( + detectPackageRole({ + name: 'example-app', + private: true, + bundled: true, + scripts: { + start: 'backstage-cli app:serve', + build: 'backstage-cli app:build', + clean: 'backstage-cli clean', + test: 'backstage-cli test', + 'test:e2e': + 'start-server-and-test start http://localhost:3000 cy:dev', + 'test:e2e:ci': + 'start-server-and-test start http://localhost:3000 cy:run', + lint: 'backstage-cli lint', + 'cy:dev': 'cypress open', + 'cy:run': 'cypress run', + }, + }), + ).toEqual({ + role: 'app', + platform: 'web', + }); + }); + + it('detects the role of example-backend', () => { + expect( + detectPackageRole({ + name: 'example-backend', + main: 'dist/index.cjs.js', + types: 'src/index.ts', + scripts: { + build: 'backstage-cli backend:bundle', + 'build-image': + 'docker build ../.. -f Dockerfile --tag example-backend', + start: 'backstage-cli backend:dev', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + clean: 'backstage-cli clean', + 'migrate:create': 'knex migrate:make -x ts', + }, + }), + ).toEqual({ + role: 'backend', + platform: 'node', + }); + }); + + it('detects the role of @backstage/plugin-catalog', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-catalog', + main: 'src/index.ts', + types: 'src/index.ts', + publishConfig: { + access: 'public', + main: 'dist/index.esm.js', + types: 'dist/index.d.ts', + }, + scripts: { + build: 'backstage-cli plugin:build', + start: 'backstage-cli plugin:serve', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + diff: 'backstage-cli plugin:diff', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'plugin-frontend', + platform: 'web', + }); + }); + + it('detects the role of @backstage/plugin-catalog-backend', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-catalog-backend', + main: 'src/index.ts', + types: 'src/index.ts', + publishConfig: { + access: 'public', + main: 'dist/index.cjs.js', + types: 'dist/index.d.ts', + }, + scripts: { + start: 'backstage-cli backend:dev', + build: 'backstage-cli backend:build', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'plugin-backend', + platform: 'node', + }); + }); + + it('detects the role of @backstage/plugin-catalog-react', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-catalog-react', + main: 'src/index.ts', + types: 'src/index.ts', + publishConfig: { + access: 'public', + main: 'dist/index.esm.js', + types: 'dist/index.d.ts', + }, + scripts: { + build: 'backstage-cli build', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'web-library', + platform: 'web', + }); + }); + + it('detects the role of @backstage/plugin-catalog-common', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-catalog-common', + main: 'src/index.ts', + types: 'src/index.ts', + publishConfig: { + access: 'public', + main: 'dist/index.cjs.js', + module: 'dist/index.esm.js', + types: 'dist/index.d.ts', + }, + scripts: { + build: 'backstage-cli build', + lint: 'backstage-cli lint', + test: 'backstage-cli test --passWithNoTests', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'common-library', + platform: 'common', + }); + }); + + it('detects the role of @backstage/plugin-catalog-backend-module-ldap', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-catalog-backend-module-ldap', + main: 'src/index.ts', + types: 'src/index.ts', + publishConfig: { + access: 'public', + main: 'dist/index.cjs.js', + types: 'dist/index.d.ts', + }, + scripts: { + build: 'backstage-cli backend:build', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'plugin-backend-module', + platform: 'node', + }); + }); + + it('detects the role of @backstage/plugin-permission-node', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-permission-node', + main: 'src/index.ts', + types: 'src/index.ts', + homepage: 'https://backstage.io', + publishConfig: { + access: 'public', + main: 'dist/index.cjs.js', + types: 'dist/index.d.ts', + }, + scripts: { + build: 'backstage-cli backend:build', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'node-library', + platform: 'node', + }); + }); + + it('detects the role of @backstage/plugin-analytics-module-ga', () => { + expect( + detectPackageRole({ + name: '@backstage/plugin-analytics-module-ga', + main: 'src/index.ts', + types: 'src/index.ts', + publishConfig: { + access: 'public', + main: 'dist/index.esm.js', + types: 'dist/index.d.ts', + }, + scripts: { + build: 'backstage-cli plugin:build', + start: 'backstage-cli plugin:serve', + lint: 'backstage-cli lint', + test: 'backstage-cli test', + diff: 'backstage-cli plugin:diff', + prepack: 'backstage-cli prepack', + postpack: 'backstage-cli postpack', + clean: 'backstage-cli clean', + }, + }), + ).toEqual({ + role: 'plugin-frontend-module', + platform: 'web', + }); + }); +}); diff --git a/packages/cli/src/lib/role/detectPackageRole.ts b/packages/cli/src/lib/role/detectPackageRole.ts new file mode 100644 index 0000000000..f0941c1e42 --- /dev/null +++ b/packages/cli/src/lib/role/detectPackageRole.ts @@ -0,0 +1,117 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { z } from 'zod'; +import { PackageRoleInfo } from './types'; + +const packageRoles: PackageRoleInfo[] = [ + { role: 'app', platform: 'web' }, + { role: 'backend', platform: 'node' }, + { role: 'cli', platform: 'node' }, + { role: 'web-library', platform: 'web' }, + { role: 'node-library', platform: 'node' }, + { role: 'common-library', platform: 'common' }, + { role: 'plugin-frontend', platform: 'web' }, + { role: 'plugin-frontend-module', platform: 'web' }, + { role: 'plugin-backend', platform: 'node' }, + { role: 'plugin-backend-module', platform: 'node' }, +]; +const roleMap = Object.fromEntries(packageRoles.map(i => [i.role, i])); + +const backstagePackageSchema = z.object({ + name: z.string().optional(), + scripts: z + .object({ + start: z.string().optional(), + build: z.string().optional(), + }) + .optional(), + backstage: z + .object({ + role: z.string().optional(), + }) + .optional(), + publishConfig: z + .object({ + main: z.string().optional(), + types: z.string().optional(), + module: z.string().optional(), + }) + .optional(), + main: z.string().optional(), + types: z.string().optional(), + module: z.string().optional(), +}); + +export function detectPackageRole( + pkgJson: unknown, +): PackageRoleInfo | undefined { + const pkg = backstagePackageSchema.parse(pkgJson); + + // If there's an explicit role, use that. + if (pkg.backstage) { + const { role } = pkg.backstage; + if (!role) { + throw new Error( + `Package ${pkg.name} must specify a role in the "backstage" field`, + ); + } + + const roleInfo = packageRoles.find(r => r.role === role); + if (!roleInfo) { + throw new Error(`Unknown role '${role}' in package ${pkg.name}`); + } + return roleInfo; + } + + if (pkg.scripts?.start?.includes('app:serve')) { + return roleMap.app; + } + if (pkg.scripts?.build?.includes('backend:bundle')) { + return roleMap.backend; + } + if (pkg.name?.includes('plugin') && pkg.name?.includes('backend-module')) { + return roleMap['plugin-backend-module']; + } + if (pkg.name?.includes('plugin') && pkg.name?.includes('module')) { + return roleMap['plugin-frontend-module']; + } + if (pkg.scripts?.start?.includes('plugin:serve')) { + return roleMap['plugin-frontend']; + } + if (pkg.scripts?.start?.includes('backend:dev')) { + return roleMap['plugin-backend']; + } + + const mainEntry = pkg.publishConfig?.main || pkg.main; + const moduleEntry = pkg.publishConfig?.module || pkg.module; + const typesEntry = pkg.publishConfig?.types || pkg.types; + if (typesEntry) { + if (mainEntry && moduleEntry) { + return roleMap['common-library']; + } + if (moduleEntry || mainEntry?.endsWith('.esm.js')) { + return roleMap['web-library']; + } + if (mainEntry) { + return roleMap['node-library']; + } + } else if (mainEntry) { + return roleMap.cli; + } + + return undefined; +} diff --git a/packages/cli/src/lib/role/index.ts b/packages/cli/src/lib/role/index.ts new file mode 100644 index 0000000000..41d65073d4 --- /dev/null +++ b/packages/cli/src/lib/role/index.ts @@ -0,0 +1,22 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export type { + PackageRoleInfo, + PackagePlatform, + PackageRoleName, +} from './types'; +export { detectPackageRole } from './detectPackageRole'; diff --git a/packages/cli/src/lib/role/types.ts b/packages/cli/src/lib/role/types.ts new file mode 100644 index 0000000000..1f5afe7926 --- /dev/null +++ b/packages/cli/src/lib/role/types.ts @@ -0,0 +1,34 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export type PackageRoleName = + | 'app' + | 'backend' + | 'cli' + | 'web-library' + | 'node-library' + | 'common-library' + | 'plugin-frontend' + | 'plugin-frontend-module' + | 'plugin-backend' + | 'plugin-backend-module'; + +export type PackagePlatform = 'node' | 'web' | 'common'; + +export interface PackageRoleInfo { + role: PackageRoleName; + platform: PackagePlatform; +} From 4e62242eb1945cd9c9f969144a4e72a451953aa7 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 14:03:49 +0100 Subject: [PATCH 171/473] cli: split role detection into read and detect Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/role/index.ts | 2 +- ...ckageRole.test.ts => packageRoles.test.ts} | 16 +++--- .../{detectPackageRole.ts => packageRoles.ts} | 56 +++++++++++-------- 3 files changed, 43 insertions(+), 31 deletions(-) rename packages/cli/src/lib/role/{detectPackageRole.test.ts => packageRoles.test.ts} (97%) rename packages/cli/src/lib/role/{detectPackageRole.ts => packageRoles.ts} (92%) diff --git a/packages/cli/src/lib/role/index.ts b/packages/cli/src/lib/role/index.ts index 41d65073d4..45ddbc8823 100644 --- a/packages/cli/src/lib/role/index.ts +++ b/packages/cli/src/lib/role/index.ts @@ -19,4 +19,4 @@ export type { PackagePlatform, PackageRoleName, } from './types'; -export { detectPackageRole } from './detectPackageRole'; +export { detectPackageRole, readPackageRole } from './packageRoles'; diff --git a/packages/cli/src/lib/role/detectPackageRole.test.ts b/packages/cli/src/lib/role/packageRoles.test.ts similarity index 97% rename from packages/cli/src/lib/role/detectPackageRole.test.ts rename to packages/cli/src/lib/role/packageRoles.test.ts index f513a5aa3a..555dc9ce9c 100644 --- a/packages/cli/src/lib/role/detectPackageRole.test.ts +++ b/packages/cli/src/lib/role/packageRoles.test.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { detectPackageRole } from './detectPackageRole'; +import { readPackageRole, detectPackageRole } from './packageRoles'; -describe('detectPackageRole', () => { - it('detects explicit package roles', () => { +describe('readPackageRole', () => { + it('reads explicit package roles', () => { expect( - detectPackageRole({ + readPackageRole({ backstage: { role: 'web-library', }, @@ -30,7 +30,7 @@ describe('detectPackageRole', () => { }); expect( - detectPackageRole({ + readPackageRole({ backstage: { role: 'app', }, @@ -41,20 +41,22 @@ describe('detectPackageRole', () => { }); expect(() => - detectPackageRole({ + readPackageRole({ name: 'test', backstage: {}, }), ).toThrow('Package test must specify a role in the "backstage" field'); expect(() => - detectPackageRole({ + readPackageRole({ name: 'test', backstage: { role: 'invalid' }, }), ).toThrow(`Unknown role 'invalid' in package test`); }); +}); +describe('detectPackageRole', () => { it('detects the role of example-app', () => { expect( detectPackageRole({ diff --git a/packages/cli/src/lib/role/detectPackageRole.ts b/packages/cli/src/lib/role/packageRoles.ts similarity index 92% rename from packages/cli/src/lib/role/detectPackageRole.ts rename to packages/cli/src/lib/role/packageRoles.ts index f0941c1e42..3525cbd314 100644 --- a/packages/cli/src/lib/role/detectPackageRole.ts +++ b/packages/cli/src/lib/role/packageRoles.ts @@ -31,7 +31,38 @@ const packageRoles: PackageRoleInfo[] = [ ]; const roleMap = Object.fromEntries(packageRoles.map(i => [i.role, i])); -const backstagePackageSchema = z.object({ +const readSchema = z.object({ + name: z.string().optional(), + backstage: z + .object({ + role: z.string().optional(), + }) + .optional(), +}); + +export function readPackageRole(pkgJson: unknown): PackageRoleInfo | undefined { + const pkg = readSchema.parse(pkgJson); + + // If there's an explicit role, use that. + if (pkg.backstage) { + const { role } = pkg.backstage; + if (!role) { + throw new Error( + `Package ${pkg.name} must specify a role in the "backstage" field`, + ); + } + + const roleInfo = packageRoles.find(r => r.role === role); + if (!roleInfo) { + throw new Error(`Unknown role '${role}' in package ${pkg.name}`); + } + return roleInfo; + } + + return undefined; +} + +const detectionSchema = z.object({ name: z.string().optional(), scripts: z .object({ @@ -39,11 +70,6 @@ const backstagePackageSchema = z.object({ build: z.string().optional(), }) .optional(), - backstage: z - .object({ - role: z.string().optional(), - }) - .optional(), publishConfig: z .object({ main: z.string().optional(), @@ -59,23 +85,7 @@ const backstagePackageSchema = z.object({ export function detectPackageRole( pkgJson: unknown, ): PackageRoleInfo | undefined { - const pkg = backstagePackageSchema.parse(pkgJson); - - // If there's an explicit role, use that. - if (pkg.backstage) { - const { role } = pkg.backstage; - if (!role) { - throw new Error( - `Package ${pkg.name} must specify a role in the "backstage" field`, - ); - } - - const roleInfo = packageRoles.find(r => r.role === role); - if (!roleInfo) { - throw new Error(`Unknown role '${role}' in package ${pkg.name}`); - } - return roleInfo; - } + const pkg = detectionSchema.parse(pkgJson); if (pkg.scripts?.start?.includes('app:serve')) { return roleMap.app; From 8263cac40e2b9e7b90b7146b0e73b9cb0b98b33c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 14:53:20 +0100 Subject: [PATCH 172/473] cli: bit more specific matching of module roles Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/role/packageRoles.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/lib/role/packageRoles.ts b/packages/cli/src/lib/role/packageRoles.ts index 3525cbd314..76467d990e 100644 --- a/packages/cli/src/lib/role/packageRoles.ts +++ b/packages/cli/src/lib/role/packageRoles.ts @@ -93,10 +93,10 @@ export function detectPackageRole( if (pkg.scripts?.build?.includes('backend:bundle')) { return roleMap.backend; } - if (pkg.name?.includes('plugin') && pkg.name?.includes('backend-module')) { + if (pkg.name?.includes('plugin-') && pkg.name?.includes('-backend-module-')) { return roleMap['plugin-backend-module']; } - if (pkg.name?.includes('plugin') && pkg.name?.includes('module')) { + if (pkg.name?.includes('plugin-') && pkg.name?.includes('-module-')) { return roleMap['plugin-frontend-module']; } if (pkg.scripts?.start?.includes('plugin:serve')) { From 29260100446370472eaa10cbf2af4e11b5ff8936 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 15:36:06 +0100 Subject: [PATCH 173/473] cli: add new role-based bundle command Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/bundle/bundleApp.ts | 39 ++++++++++ .../cli/src/commands/bundle/bundleBackend.ts | 75 +++++++++++++++++++ packages/cli/src/commands/bundle/command.ts | 46 ++++++++++++ packages/cli/src/commands/bundle/index.ts | 17 +++++ packages/cli/src/commands/index.ts | 14 ++++ 5 files changed, 191 insertions(+) create mode 100644 packages/cli/src/commands/bundle/bundleApp.ts create mode 100644 packages/cli/src/commands/bundle/bundleBackend.ts create mode 100644 packages/cli/src/commands/bundle/command.ts create mode 100644 packages/cli/src/commands/bundle/index.ts diff --git a/packages/cli/src/commands/bundle/bundleApp.ts b/packages/cli/src/commands/bundle/bundleApp.ts new file mode 100644 index 0000000000..1ebd1f044e --- /dev/null +++ b/packages/cli/src/commands/bundle/bundleApp.ts @@ -0,0 +1,39 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import { buildBundle } from '../../lib/bundler'; +import { parseParallel, PARALLEL_ENV_VAR } from '../../lib/parallel'; +import { loadCliConfig } from '../../lib/config'; +import { paths } from '../../lib/paths'; + +interface BundleAppOptions { + writeStats: boolean; + configPaths: string[]; +} + +export async function bundleApp(options: BundleAppOptions) { + const { name } = await fs.readJson(paths.resolveTarget('package.json')); + await buildBundle({ + entry: 'src/index', + parallel: parseParallel(process.env[PARALLEL_ENV_VAR]), + statsJsonEnabled: options.writeStats, + ...(await loadCliConfig({ + args: options.configPaths, + fromPackage: name, + })), + }); +} diff --git a/packages/cli/src/commands/bundle/bundleBackend.ts b/packages/cli/src/commands/bundle/bundleBackend.ts new file mode 100644 index 0000000000..0f240d87dc --- /dev/null +++ b/packages/cli/src/commands/bundle/bundleBackend.ts @@ -0,0 +1,75 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import os from 'os'; +import fs from 'fs-extra'; +import { resolve as resolvePath } from 'path'; +import tar, { CreateOptions } from 'tar'; +import { createDistWorkspace } from '../../lib/packager'; +import { paths } from '../../lib/paths'; +import { parseParallel, PARALLEL_ENV_VAR } from '../../lib/parallel'; +import { buildPackage, Output } from '../../lib/builder'; + +const BUNDLE_FILE = 'bundle.tar.gz'; +const SKELETON_FILE = 'skeleton.tar.gz'; + +interface BundleBackendOptions { + skipBuildDependencies: boolean; +} + +export async function bundleBackend(options: BundleBackendOptions) { + const targetDir = paths.resolveTarget('dist'); + const pkg = await fs.readJson(paths.resolveTarget('package.json')); + + // We build the target package without generating type declarations. + await buildPackage({ outputs: new Set([Output.cjs]) }); + + const tmpDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'backstage-bundle')); + try { + await createDistWorkspace([pkg.name], { + targetDir: tmpDir, + buildDependencies: !options.skipBuildDependencies, + buildExcludes: [pkg.name], + parallel: parseParallel(process.env[PARALLEL_ENV_VAR]), + skeleton: SKELETON_FILE, + }); + + // We built the target backend package using the regular build process, but the result of + // that has now been packed into the dist workspace, so clean up the dist dir. + await fs.remove(targetDir); + await fs.mkdir(targetDir); + + // Move out skeleton.tar.gz before we create the main bundle, no point having that included up twice. + await fs.move( + resolvePath(tmpDir, SKELETON_FILE), + resolvePath(targetDir, SKELETON_FILE), + ); + + // Create main bundle.tar.gz, with some tweaks to make it more likely hit Docker build cache. + await tar.create( + { + file: resolvePath(targetDir, BUNDLE_FILE), + cwd: tmpDir, + portable: true, + noMtime: true, + gzip: true, + } as CreateOptions & { noMtime: boolean }, + [''], + ); + } finally { + await fs.remove(tmpDir); + } +} diff --git a/packages/cli/src/commands/bundle/command.ts b/packages/cli/src/commands/bundle/command.ts new file mode 100644 index 0000000000..a13faeee62 --- /dev/null +++ b/packages/cli/src/commands/bundle/command.ts @@ -0,0 +1,46 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import { Command } from 'commander'; +import { paths } from '../../lib/paths'; +import { readPackageRole } from '../../lib/role/packageRoles'; +import { bundleApp } from './bundleApp'; +import { bundleBackend } from './bundleBackend'; + +export async function command(cmd: Command): Promise { + const pkg = await fs.readJson(paths.resolveTarget('package.json')); + const roleInfo = readPackageRole(pkg); + if (!roleInfo) { + throw new Error(`Target package must have 'backstage.role' set`); + } + + const options = { + configPaths: cmd.config as string[], + writeStats: Boolean(cmd.stats), + skipBuildDependencies: Boolean(cmd.skipBuildDependencies), + }; + + if (roleInfo.role === 'app') { + return bundleApp(options); + } else if (roleInfo.role === 'backend') { + return bundleBackend(options); + } + + throw new Error( + `Bundle command is not supported for package role '${roleInfo.role}'`, + ); +} diff --git a/packages/cli/src/commands/bundle/index.ts b/packages/cli/src/commands/bundle/index.ts new file mode 100644 index 0000000000..680fe9e11d --- /dev/null +++ b/packages/cli/src/commands/bundle/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { command } from './command'; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 362771f8f2..e834e0e494 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -133,6 +133,20 @@ export function registerCommands(program: CommanderStatic) { .option('--experimental-type-build', 'Enable experimental type build') .action(lazy(() => import('./build').then(m => m.default))); + program + .command('bundle') + .description('Bundle a package for deployment') + .option( + '--skip-build-dependencies', + 'Skip the automatic building of local dependencies', + ) + .option( + '--stats', + 'If bundle stats are available, write them to the output directory', + ) + .option(...configOption) + .action(lazy(() => import('./bundle').then(m => m.command))); + program .command('lint') .option( From 17a9f90efcd0a4d9cfc9c93d24755b94ca71437c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 16:06:56 +0100 Subject: [PATCH 174/473] cli: add util to get role info by name Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/role/index.ts | 6 ++++- .../cli/src/lib/role/packageRoles.test.ts | 26 +++++++++++++++++-- packages/cli/src/lib/role/packageRoles.ts | 14 ++++++---- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/lib/role/index.ts b/packages/cli/src/lib/role/index.ts index 45ddbc8823..5a1f836036 100644 --- a/packages/cli/src/lib/role/index.ts +++ b/packages/cli/src/lib/role/index.ts @@ -19,4 +19,8 @@ export type { PackagePlatform, PackageRoleName, } from './types'; -export { detectPackageRole, readPackageRole } from './packageRoles'; +export { + getRoleInfo, + detectPackageRole, + readPackageRole, +} from './packageRoles'; diff --git a/packages/cli/src/lib/role/packageRoles.test.ts b/packages/cli/src/lib/role/packageRoles.test.ts index 555dc9ce9c..d41cd08488 100644 --- a/packages/cli/src/lib/role/packageRoles.test.ts +++ b/packages/cli/src/lib/role/packageRoles.test.ts @@ -14,7 +14,29 @@ * limitations under the License. */ -import { readPackageRole, detectPackageRole } from './packageRoles'; +import { + getRoleInfo, + readPackageRole, + detectPackageRole, +} from './packageRoles'; + +describe('getRoleInfo', () => { + it('provides role info by role', () => { + expect(getRoleInfo('web-library')).toEqual({ + role: 'web-library', + platform: 'web', + }); + + expect(getRoleInfo('app')).toEqual({ + role: 'app', + platform: 'web', + }); + + expect(() => getRoleInfo('invalid')).toThrow( + `Unknown package role 'invalid'`, + ); + }); +}); describe('readPackageRole', () => { it('reads explicit package roles', () => { @@ -52,7 +74,7 @@ describe('readPackageRole', () => { name: 'test', backstage: { role: 'invalid' }, }), - ).toThrow(`Unknown role 'invalid' in package test`); + ).toThrow(`Unknown package role 'invalid'`); }); }); diff --git a/packages/cli/src/lib/role/packageRoles.ts b/packages/cli/src/lib/role/packageRoles.ts index 76467d990e..9d0ec501c6 100644 --- a/packages/cli/src/lib/role/packageRoles.ts +++ b/packages/cli/src/lib/role/packageRoles.ts @@ -31,6 +31,14 @@ const packageRoles: PackageRoleInfo[] = [ ]; const roleMap = Object.fromEntries(packageRoles.map(i => [i.role, i])); +export function getRoleInfo(role: string): PackageRoleInfo { + const roleInfo = packageRoles.find(r => r.role === role); + if (!roleInfo) { + throw new Error(`Unknown package role '${role}'`); + } + return roleInfo; +} + const readSchema = z.object({ name: z.string().optional(), backstage: z @@ -52,11 +60,7 @@ export function readPackageRole(pkgJson: unknown): PackageRoleInfo | undefined { ); } - const roleInfo = packageRoles.find(r => r.role === role); - if (!roleInfo) { - throw new Error(`Unknown role '${role}' in package ${pkg.name}`); - } - return roleInfo; + return getRoleInfo(role); } return undefined; From f0ee50cfabd467c357ed955dc1ce19684a9abcb2 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 16:39:48 +0100 Subject: [PATCH 175/473] cli: add utility for passing explicit role option Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/bundle/command.ts | 10 +---- packages/cli/src/commands/index.ts | 3 +- packages/cli/src/lib/role/index.ts | 3 +- .../cli/src/lib/role/packageRoles.test.ts | 44 +++++++++++++++++++ packages/cli/src/lib/role/packageRoles.ts | 18 ++++++++ 5 files changed, 68 insertions(+), 10 deletions(-) diff --git a/packages/cli/src/commands/bundle/command.ts b/packages/cli/src/commands/bundle/command.ts index a13faeee62..44b39e6797 100644 --- a/packages/cli/src/commands/bundle/command.ts +++ b/packages/cli/src/commands/bundle/command.ts @@ -14,19 +14,13 @@ * limitations under the License. */ -import fs from 'fs-extra'; import { Command } from 'commander'; -import { paths } from '../../lib/paths'; -import { readPackageRole } from '../../lib/role/packageRoles'; import { bundleApp } from './bundleApp'; import { bundleBackend } from './bundleBackend'; +import { readRoleForCommand } from '../../lib/role'; export async function command(cmd: Command): Promise { - const pkg = await fs.readJson(paths.resolveTarget('package.json')); - const roleInfo = readPackageRole(pkg); - if (!roleInfo) { - throw new Error(`Target package must have 'backstage.role' set`); - } + const roleInfo = await readRoleForCommand(cmd); const options = { configPaths: cmd.config as string[], diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index e834e0e494..860cd0fd62 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -136,6 +136,8 @@ export function registerCommands(program: CommanderStatic) { program .command('bundle') .description('Bundle a package for deployment') + .option(...configOption) + .option('--role ', 'Run the command with an explicit package role') .option( '--skip-build-dependencies', 'Skip the automatic building of local dependencies', @@ -144,7 +146,6 @@ export function registerCommands(program: CommanderStatic) { '--stats', 'If bundle stats are available, write them to the output directory', ) - .option(...configOption) .action(lazy(() => import('./bundle').then(m => m.command))); program diff --git a/packages/cli/src/lib/role/index.ts b/packages/cli/src/lib/role/index.ts index 5a1f836036..9becfa367b 100644 --- a/packages/cli/src/lib/role/index.ts +++ b/packages/cli/src/lib/role/index.ts @@ -21,6 +21,7 @@ export type { } from './types'; export { getRoleInfo, - detectPackageRole, readPackageRole, + readRoleForCommand, + detectPackageRole, } from './packageRoles'; diff --git a/packages/cli/src/lib/role/packageRoles.test.ts b/packages/cli/src/lib/role/packageRoles.test.ts index d41cd08488..f3302d3256 100644 --- a/packages/cli/src/lib/role/packageRoles.test.ts +++ b/packages/cli/src/lib/role/packageRoles.test.ts @@ -14,9 +14,12 @@ * limitations under the License. */ +import mockFs from 'mock-fs'; +import { Command } from 'commander'; import { getRoleInfo, readPackageRole, + readRoleForCommand, detectPackageRole, } from './packageRoles'; @@ -78,6 +81,47 @@ describe('readPackageRole', () => { }); }); +describe('readRoleForCommand', () => { + function mkCommand(args: string) { + return new Command() + .option('--role ', 'test role') + .parse(['node', 'entry.js', ...args.split(' ')]) as Command; + } + + beforeEach(() => { + mockFs({ + 'package.json': JSON.stringify({ + name: 'test', + backstage: { + role: 'web-library', + }, + }), + }); + }); + + afterEach(() => { + mockFs.restore(); + }); + + it('provides role info by role', async () => { + await expect(readRoleForCommand(mkCommand(''))).resolves.toEqual({ + role: 'web-library', + platform: 'web', + }); + + await expect( + readRoleForCommand(mkCommand('--role node-library')), + ).resolves.toEqual({ + role: 'node-library', + platform: 'node', + }); + + await expect( + readRoleForCommand(mkCommand('--role invalid')), + ).rejects.toThrow(`Unknown package role 'invalid'`); + }); +}); + describe('detectPackageRole', () => { it('detects the role of example-app', () => { expect( diff --git a/packages/cli/src/lib/role/packageRoles.ts b/packages/cli/src/lib/role/packageRoles.ts index 9d0ec501c6..67bee0e64f 100644 --- a/packages/cli/src/lib/role/packageRoles.ts +++ b/packages/cli/src/lib/role/packageRoles.ts @@ -15,6 +15,9 @@ */ import { z } from 'zod'; +import fs from 'fs-extra'; +import { Command } from 'commander'; +import { paths } from '../paths'; import { PackageRoleInfo } from './types'; const packageRoles: PackageRoleInfo[] = [ @@ -66,6 +69,21 @@ export function readPackageRole(pkgJson: unknown): PackageRoleInfo | undefined { return undefined; } +export async function readRoleForCommand( + cmd: Command, +): Promise { + if (cmd.role) { + return getRoleInfo(cmd.role); + } + + const pkg = await fs.readJson(paths.resolveTarget('package.json')); + const info = readPackageRole(pkg); + if (!info) { + throw new Error(`Target package must have 'backstage.role' set`); + } + return info; +} + const detectionSchema = z.object({ name: z.string().optional(), scripts: z From 9227753a7c30f57c7988dfa0a0e0b8098129aba1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 17:17:23 +0100 Subject: [PATCH 176/473] cli: added role-based start command Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 13 ++++ packages/cli/src/commands/start/command.ts | 53 +++++++++++++ packages/cli/src/commands/start/index.ts | 17 +++++ .../cli/src/commands/start/startBackend.ts | 41 ++++++++++ .../cli/src/commands/start/startFrontend.ts | 76 +++++++++++++++++++ 5 files changed, 200 insertions(+) create mode 100644 packages/cli/src/commands/start/command.ts create mode 100644 packages/cli/src/commands/start/index.ts create mode 100644 packages/cli/src/commands/start/startBackend.ts create mode 100644 packages/cli/src/commands/start/startFrontend.ts diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 860cd0fd62..cecbab82e5 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -148,6 +148,19 @@ export function registerCommands(program: CommanderStatic) { ) .action(lazy(() => import('./bundle').then(m => m.command))); + program + .command('start') + .description('Start a package for local development') + .option(...configOption) + .option('--role ', 'Run the command with an explicit package role') + .option('--check', 'Enable type checking and linting if available') + .option('--inspect', 'Enable debugger in Node.js environments') + .option( + '--inspect-brk', + 'Enable debugger in Node.js environments, breaking before code starts', + ) + .action(lazy(() => import('./start').then(m => m.command))); + program .command('lint') .option( diff --git a/packages/cli/src/commands/start/command.ts b/packages/cli/src/commands/start/command.ts new file mode 100644 index 0000000000..ff4d3b7c0b --- /dev/null +++ b/packages/cli/src/commands/start/command.ts @@ -0,0 +1,53 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Command } from 'commander'; +import { startBackend } from './startBackend'; +import { startFrontend } from './startFrontend'; +import { readRoleForCommand } from '../../lib/role'; + +export async function command(cmd: Command): Promise { + const roleInfo = await readRoleForCommand(cmd); + + const options = { + configPaths: cmd.config as string[], + checksEnabled: Boolean(cmd.check), + inspectEnabled: Boolean(cmd.inspect), + inspectBrkEnabled: Boolean(cmd.inspectBrk), + }; + + switch (roleInfo.role) { + case 'backend': + case 'plugin-backend': + case 'plugin-backend-module': + case 'node-library': + return startBackend(options); + case 'app': + return startFrontend({ + ...options, + entry: 'src/index', + verifyVersions: true, + }); + case 'web-library': + case 'plugin-frontend': + case 'plugin-frontend-module': + return startFrontend({ entry: 'dev/index', ...options }); + default: + throw new Error( + `Start command is not supported for package role '${roleInfo.role}'`, + ); + } +} diff --git a/packages/cli/src/commands/start/index.ts b/packages/cli/src/commands/start/index.ts new file mode 100644 index 0000000000..680fe9e11d --- /dev/null +++ b/packages/cli/src/commands/start/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { command } from './command'; diff --git a/packages/cli/src/commands/start/startBackend.ts b/packages/cli/src/commands/start/startBackend.ts new file mode 100644 index 0000000000..61ada7a291 --- /dev/null +++ b/packages/cli/src/commands/start/startBackend.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import { paths } from '../../lib/paths'; +import { serveBackend } from '../../lib/bundler'; + +interface StartBackendOptions { + checksEnabled: boolean; + inspectEnabled: boolean; + inspectBrkEnabled: boolean; +} + +export async function startBackend(options: StartBackendOptions) { + // Cleaning dist/ before we start the dev process helps work around an issue + // where we end up with the entrypoint executing multiple times, causing + // a port bind conflict among other things. + await fs.remove(paths.resolveTarget('dist')); + + const waitForExit = await serveBackend({ + entry: 'src/index', + checksEnabled: options.checksEnabled, + inspectEnabled: options.inspectEnabled, + inspectBrkEnabled: options.inspectBrkEnabled, + }); + + await waitForExit(); +} diff --git a/packages/cli/src/commands/start/startFrontend.ts b/packages/cli/src/commands/start/startFrontend.ts new file mode 100644 index 0000000000..e5500c310b --- /dev/null +++ b/packages/cli/src/commands/start/startFrontend.ts @@ -0,0 +1,76 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import chalk from 'chalk'; +import uniq from 'lodash/uniq'; +import { serveBundle } from '../../lib/bundler'; +import { loadCliConfig } from '../../lib/config'; +import { paths } from '../../lib/paths'; +import { Lockfile } from '../../lib/versioning'; +import { includedFilter } from '../versions/lint'; + +interface StartAppOptions { + verifyVersions?: boolean; + entry: string; + + checksEnabled: boolean; + configPaths: string[]; +} + +export async function startFrontend(options: StartAppOptions) { + if (options.verifyVersions) { + const lockfile = await Lockfile.load(paths.resolveTargetRoot('yarn.lock')); + const result = lockfile.analyze({ + filter: includedFilter, + }); + const problemPackages = [...result.newVersions, ...result.newRanges].map( + ({ name }) => name, + ); + + if (problemPackages.length > 1) { + console.log( + chalk.yellow( + `⚠️ Some of the following packages may be outdated or have duplicate installations: + + ${uniq(problemPackages).join(', ')} + `, + ), + ); + console.log( + chalk.yellow( + `⚠️ This can be resolved using the following command: + + yarn backstage-cli versions:check --fix + `, + ), + ); + } + } + + const { name } = await fs.readJson(paths.resolveTarget('package.json')); + const waitForExit = await serveBundle({ + entry: options.entry, + checksEnabled: options.checksEnabled, + ...(await loadCliConfig({ + args: options.configPaths, + fromPackage: name, + withFilteredKeys: true, + })), + }); + + await waitForExit(); +} From c7169dc440f0560d945be95ef8e541f9ea6b4f50 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 22 Jan 2022 17:52:30 +0100 Subject: [PATCH 177/473] cli: add migrate:package-role command Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 5 ++ .../cli/src/commands/migrate/packageRole.ts | 69 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 packages/cli/src/commands/migrate/packageRole.ts diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index cecbab82e5..61ded0741c 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -233,6 +233,11 @@ export function registerCommands(program: CommanderStatic) { .description('Print configuration schema') .action(lazy(() => import('./config/schema').then(m => m.default))); + program + .command('migrate:package-role') + .description(`Add package role field to packages that don't have it`) + .action(lazy(() => import('./migrate/packageRole').then(m => m.default))); + program .command('versions:bump') .option( diff --git a/packages/cli/src/commands/migrate/packageRole.ts b/packages/cli/src/commands/migrate/packageRole.ts new file mode 100644 index 0000000000..86898a6012 --- /dev/null +++ b/packages/cli/src/commands/migrate/packageRole.ts @@ -0,0 +1,69 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import { resolve as resolvePath } from 'path'; +import { getPackages } from '@manypkg/get-packages'; +import { paths } from '../../lib/paths'; +import { readPackageRole, detectPackageRole } from '../../lib/role'; + +export default async () => { + const { packages } = await getPackages(paths.targetDir); + + await Promise.all( + packages.map(async ({ dir, packageJson: pkg }) => { + const { name } = pkg; + const existingRole = readPackageRole(pkg); + if (existingRole) { + return; + } + + const detectedRole = detectPackageRole(pkg); + if (!detectedRole) { + console.error(`No role detected for package ${name}`); + return; + } + + console.log(`Detected package role of ${name} as ${detectedRole.role}`); + + let newPkg = pkg as any; + + const pkgKeys = Object.keys(pkg); + if (pkgKeys.includes('backstage')) { + newPkg.backstage = { + ...newPkg.backstage, + role: detectedRole.role, + }; + } else { + // We insert the backstage field after one of these fields, otherwise at the end + const index = + Math.max( + pkgKeys.indexOf('version'), + pkgKeys.indexOf('private'), + pkgKeys.indexOf('publishConfig'), + ) + 1 || pkgKeys.length; + + const pkgEntries = Object.entries(pkg); + pkgEntries.splice(index, 0, ['backstage', { role: detectedRole.role }]); + newPkg = Object.fromEntries(pkgEntries); + } + + await fs.writeJson(resolvePath(dir, 'package.json'), newPkg, { + spaces: 2, + }); + }), + ); +}; From 0bf983e703cef5c7fb3c98ee0dc32d9918800b6e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 13:05:54 +0100 Subject: [PATCH 178/473] cli: add PackageGraph utility for listing extended packages Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/monorepo/PackageGraph.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/monorepo/PackageGraph.ts b/packages/cli/src/lib/monorepo/PackageGraph.ts index 9860b92ef6..db7a528494 100644 --- a/packages/cli/src/lib/monorepo/PackageGraph.ts +++ b/packages/cli/src/lib/monorepo/PackageGraph.ts @@ -14,7 +14,9 @@ * limitations under the License. */ -import { Package } from '@manypkg/get-packages'; +import { getPackages, Package } from '@manypkg/get-packages'; +import { paths } from '../paths'; +import { PackageRoleName } from '../role'; type PackageJSON = Package['packageJson']; @@ -25,8 +27,17 @@ export interface ExtendedPackageJSON extends PackageJSON { // The `bundled` field is a field known within Backstage, it means // that the package bundles all of its dependencies in its build output. bundled?: boolean; + + backstage?: { + role?: PackageRoleName; + }; } +export type ExtendedPackage = { + dir: string; + packageJson: ExtendedPackageJSON; +}; + export type PackageGraphNode = { /** The name of the package */ name: string; @@ -47,6 +58,11 @@ export type PackageGraphNode = { }; export class PackageGraph extends Map { + static async listTargetPackages(): Promise { + const { packages } = await getPackages(paths.targetDir); + return packages as ExtendedPackage[]; + } + static fromPackages(packages: Package[]): PackageGraph { const graph = new PackageGraph(); From 189c44104c05ac3a727cd3002e3813bc746a85d7 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 13:07:21 +0100 Subject: [PATCH 179/473] cli: added migrate:package-scripts Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 7 ++ .../src/commands/migrate/packageScripts.ts | 70 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 packages/cli/src/commands/migrate/packageScripts.ts diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 61ded0741c..ef2e5ef96a 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -238,6 +238,13 @@ export function registerCommands(program: CommanderStatic) { .description(`Add package role field to packages that don't have it`) .action(lazy(() => import('./migrate/packageRole').then(m => m.default))); + program + .command('migrate:package-scripts') + .description('Set package scripts according to each package role') + .action( + lazy(() => import('./migrate/packageScripts').then(m => m.command)), + ); + program .command('versions:bump') .option( diff --git a/packages/cli/src/commands/migrate/packageScripts.ts b/packages/cli/src/commands/migrate/packageScripts.ts new file mode 100644 index 0000000000..58a8481c81 --- /dev/null +++ b/packages/cli/src/commands/migrate/packageScripts.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import { resolve as resolvePath } from 'path'; +import { PackageGraph } from '../../lib/monorepo'; +import { readPackageRole, PackageRoleName } from '../../lib/role'; + +const bundledRoles: PackageRoleName[] = ['app', 'backend']; +const noStartRoles: PackageRoleName[] = ['cli', 'common-library']; + +export async function command() { + const packages = await PackageGraph.listTargetPackages(); + + await Promise.all( + packages.map(async ({ dir, packageJson }) => { + const roleInfo = readPackageRole(packageJson); + if (!roleInfo) { + return; + } + + const hasStart = !noStartRoles.includes(roleInfo.role); + const isBundled = bundledRoles.includes(roleInfo.role); + + const expectedScripts = { + ...(hasStart && { start: 'backstage-cli start' }), + ...(isBundled + ? { bundle: 'backstage-cli bundle' } + : { build: 'backstage-cli build' }), + lint: 'backstage-cli lint', + test: 'backstage-cli test', + clean: 'backstage-cli clean', + ...(!isBundled && { + postpack: 'backstage-cli postpack', + prepack: 'backstage-cli prepack', + }), + }; + + let changed = false; + const currentScripts = (packageJson.scripts = packageJson.scripts || {}); + + for (const [name, value] of Object.entries(expectedScripts)) { + if (currentScripts[name] !== value) { + changed = true; + currentScripts[name] = value; + } + } + + if (changed) { + console.log(`Updating scripts for ${packageJson.name}`); + await fs.writeJson(resolvePath(dir, 'package.json'), packageJson, { + spaces: 2, + }); + } + }), + ); +} From 703314d1a53c5515f960ce43bfb2a0cac0bcfff2 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 14:28:13 +0100 Subject: [PATCH 180/473] cli: move new commands into experimental sub-commands Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 72 ++++++++++--------- .../src/commands/migrate/packageScripts.ts | 4 +- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index ef2e5ef96a..caeee1557c 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -133,34 +133,6 @@ export function registerCommands(program: CommanderStatic) { .option('--experimental-type-build', 'Enable experimental type build') .action(lazy(() => import('./build').then(m => m.default))); - program - .command('bundle') - .description('Bundle a package for deployment') - .option(...configOption) - .option('--role ', 'Run the command with an explicit package role') - .option( - '--skip-build-dependencies', - 'Skip the automatic building of local dependencies', - ) - .option( - '--stats', - 'If bundle stats are available, write them to the output directory', - ) - .action(lazy(() => import('./bundle').then(m => m.command))); - - program - .command('start') - .description('Start a package for local development') - .option(...configOption) - .option('--role ', 'Run the command with an explicit package role') - .option('--check', 'Enable type checking and linting if available') - .option('--inspect', 'Enable debugger in Node.js environments') - .option( - '--inspect-brk', - 'Enable debugger in Node.js environments, breaking before code starts', - ) - .action(lazy(() => import('./start').then(m => m.command))); - program .command('lint') .option( @@ -233,13 +205,49 @@ export function registerCommands(program: CommanderStatic) { .description('Print configuration schema') .action(lazy(() => import('./config/schema').then(m => m.default))); - program - .command('migrate:package-role') + const script = program + .command('script [command]', { hidden: true }) + .description('Lifecycle scripts for Backstage packages [EXPERIMENTAL]'); + + script + .command('bundle') + .description('Bundle a package for deployment') + .option(...configOption) + .option('--role ', 'Run the command with an explicit package role') + .option( + '--skip-build-dependencies', + 'Skip the automatic building of local dependencies', + ) + .option( + '--stats', + 'If bundle stats are available, write them to the output directory', + ) + .action(lazy(() => import('./bundle').then(m => m.command))); + + script + .command('start') + .description('Start a package for local development') + .option(...configOption) + .option('--role ', 'Run the command with an explicit package role') + .option('--check', 'Enable type checking and linting if available') + .option('--inspect', 'Enable debugger in Node.js environments') + .option( + '--inspect-brk', + 'Enable debugger in Node.js environments, breaking before code starts', + ) + .action(lazy(() => import('./start').then(m => m.command))); + + const migrate = program + .command('migrate [command]', { hidden: true }) + .description('Migration utilities [EXPERIMENTAL]'); + + migrate + .command('package-role') .description(`Add package role field to packages that don't have it`) .action(lazy(() => import('./migrate/packageRole').then(m => m.default))); - program - .command('migrate:package-scripts') + migrate + .command('package-scripts') .description('Set package scripts according to each package role') .action( lazy(() => import('./migrate/packageScripts').then(m => m.command)), diff --git a/packages/cli/src/commands/migrate/packageScripts.ts b/packages/cli/src/commands/migrate/packageScripts.ts index 58a8481c81..ada358b56b 100644 --- a/packages/cli/src/commands/migrate/packageScripts.ts +++ b/packages/cli/src/commands/migrate/packageScripts.ts @@ -36,9 +36,9 @@ export async function command() { const isBundled = bundledRoles.includes(roleInfo.role); const expectedScripts = { - ...(hasStart && { start: 'backstage-cli start' }), + ...(hasStart && { start: 'backstage-cli script start' }), ...(isBundled - ? { bundle: 'backstage-cli bundle' } + ? { bundle: 'backstage-cli script bundle' } : { build: 'backstage-cli build' }), lint: 'backstage-cli lint', test: 'backstage-cli test', From 38963aa860feced0673f514d00d901667d3c6d9b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 15:47:53 +0100 Subject: [PATCH 181/473] cli: add new role-based build command Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/build/command.ts | 52 +++++++++++++++++++ packages/cli/src/commands/build/index.ts | 17 ++++++ packages/cli/src/commands/index.ts | 9 +++- .../src/commands/{build.ts => oldBuild.ts} | 0 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 packages/cli/src/commands/build/command.ts create mode 100644 packages/cli/src/commands/build/index.ts rename packages/cli/src/commands/{build.ts => oldBuild.ts} (100%) diff --git a/packages/cli/src/commands/build/command.ts b/packages/cli/src/commands/build/command.ts new file mode 100644 index 0000000000..733faa9480 --- /dev/null +++ b/packages/cli/src/commands/build/command.ts @@ -0,0 +1,52 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Command } from 'commander'; +import { buildPackage, Output } from '../../lib/builder'; +import { PackageRoleName, readRoleForCommand } from '../../lib/role'; + +const bundledRoles: PackageRoleName[] = ['app', 'backend']; + +const esmPlatforms = ['web', 'common']; +const cjsPlatforms = ['node', 'common']; + +export async function command(cmd: Command): Promise { + const roleInfo = await readRoleForCommand(cmd); + + if (bundledRoles.includes(roleInfo.role)) { + throw new Error( + `Build command is not supported for package role '${roleInfo.role}'`, + ); + } + + const outputs = new Set(); + + if (cjsPlatforms.includes(roleInfo.platform)) { + outputs.add(Output.cjs); + } + if (esmPlatforms.includes(roleInfo.platform)) { + outputs.add(Output.esm); + } + if (roleInfo.role !== 'cli') { + outputs.add(Output.types); + } + + await buildPackage({ + outputs, + minify: Boolean(cmd.minify), + useApiExtractor: Boolean(cmd.experimentalTypeBuild), + }); +} diff --git a/packages/cli/src/commands/build/index.ts b/packages/cli/src/commands/build/index.ts new file mode 100644 index 0000000000..680fe9e11d --- /dev/null +++ b/packages/cli/src/commands/build/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { command } from './command'; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index caeee1557c..ea0f7dec58 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -131,7 +131,7 @@ export function registerCommands(program: CommanderStatic) { .option('--outputs ', 'List of formats to output [types,cjs,esm]') .option('--minify', 'Minify the generated code') .option('--experimental-type-build', 'Enable experimental type build') - .action(lazy(() => import('./build').then(m => m.default))); + .action(lazy(() => import('./oldBuild').then(m => m.default))); program .command('lint') @@ -224,6 +224,13 @@ export function registerCommands(program: CommanderStatic) { ) .action(lazy(() => import('./bundle').then(m => m.command))); + script + .command('build') + .description('Build a package for publishing') + .option('--minify', 'Minify the generated code') + .option('--experimental-type-build', 'Enable experimental type build') + .action(lazy(() => import('./build').then(m => m.command))); + script .command('start') .description('Start a package for local development') diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/oldBuild.ts similarity index 100% rename from packages/cli/src/commands/build.ts rename to packages/cli/src/commands/oldBuild.ts From 036d95b99b4d9cec1ec40ebd87d2b6e5526503e0 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 16:19:45 +0100 Subject: [PATCH 182/473] cli: refactored registration of script and migration commands Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 162 ++++++++++++++++++----------- 1 file changed, 101 insertions(+), 61 deletions(-) diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index ea0f7dec58..54fe48e2cf 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -18,14 +18,106 @@ import { assertError } from '@backstage/errors'; import { CommanderStatic } from 'commander'; import { exitWithError } from '../lib/errors'; -export function registerCommands(program: CommanderStatic) { - const configOption = [ - '--config ', - 'Config files to load instead of app-config.yaml', - (opt: string, opts: string[]) => [...opts, opt], - Array(), - ] as const; +const configOption = [ + '--config ', + 'Config files to load instead of app-config.yaml', + (opt: string, opts: string[]) => [...opts, opt], + Array(), +] as const; +export function registerScriptCommand(program: CommanderStatic) { + const command = program + .command('script [command]', { hidden: true }) + .description('Lifecycle scripts for Backstage packages [EXPERIMENTAL]'); + + command + .command('start') + .description('Start a package for local development') + .option(...configOption) + .option('--role ', 'Run the command with an explicit package role') + .option('--check', 'Enable type checking and linting if available') + .option('--inspect', 'Enable debugger in Node.js environments') + .option( + '--inspect-brk', + 'Enable debugger in Node.js environments, breaking before code starts', + ) + .action(lazy(() => import('./start').then(m => m.command))); + + command + .command('build') + .description('Build a package for publishing') + .option('--minify', 'Minify the generated code') + .option('--experimental-type-build', 'Enable experimental type build') + .action(lazy(() => import('./build').then(m => m.command))); + + command + .command('bundle') + .description('Bundle a package for deployment') + .option(...configOption) + .option('--role ', 'Run the command with an explicit package role') + .option( + '--skip-build-dependencies', + 'Skip the automatic building of local dependencies', + ) + .option( + '--stats', + 'If bundle stats are available, write them to the output directory', + ) + .action(lazy(() => import('./bundle').then(m => m.command))); + + program + .command('lint') + .option( + '--format ', + 'Lint report output format', + 'eslint-formatter-friendly', + ) + .option('--fix', 'Attempt to automatically fix violations') + .description('Lint a package') + .action(lazy(() => import('./lint').then(m => m.default))); + + program + .command('test') + .allowUnknownOption(true) // Allows the command to run, but we still need to parse raw args + .helpOption(', --backstage-cli-help') // Let Jest handle help + .description('Run tests, forwarding args to Jest, defaulting to watch mode') + .action(lazy(() => import('./testCommand').then(m => m.default))); + + command + .command('clean') + .description('Delete cache directories') + .action(lazy(() => import('./clean/clean').then(m => m.default))); + + command + .command('prepack') + .description('Prepares a package for packaging before publishing') + .action(lazy(() => import('./pack').then(m => m.pre))); + + command + .command('postpack') + .description('Restores the changes made by the prepack command') + .action(lazy(() => import('./pack').then(m => m.post))); +} + +export function registerMigrateCommand(program: CommanderStatic) { + const command = program + .command('migrate [command]', { hidden: true }) + .description('Migration utilities [EXPERIMENTAL]'); + + command + .command('package-role') + .description(`Add package role field to packages that don't have it`) + .action(lazy(() => import('./migrate/packageRole').then(m => m.default))); + + command + .command('package-scripts') + .description('Set package scripts according to each package role') + .action( + lazy(() => import('./migrate/packageScripts').then(m => m.command)), + ); +} + +export function registerCommands(program: CommanderStatic) { program .command('app:build') .description('Build an app for a production release') @@ -205,60 +297,8 @@ export function registerCommands(program: CommanderStatic) { .description('Print configuration schema') .action(lazy(() => import('./config/schema').then(m => m.default))); - const script = program - .command('script [command]', { hidden: true }) - .description('Lifecycle scripts for Backstage packages [EXPERIMENTAL]'); - - script - .command('bundle') - .description('Bundle a package for deployment') - .option(...configOption) - .option('--role ', 'Run the command with an explicit package role') - .option( - '--skip-build-dependencies', - 'Skip the automatic building of local dependencies', - ) - .option( - '--stats', - 'If bundle stats are available, write them to the output directory', - ) - .action(lazy(() => import('./bundle').then(m => m.command))); - - script - .command('build') - .description('Build a package for publishing') - .option('--minify', 'Minify the generated code') - .option('--experimental-type-build', 'Enable experimental type build') - .action(lazy(() => import('./build').then(m => m.command))); - - script - .command('start') - .description('Start a package for local development') - .option(...configOption) - .option('--role ', 'Run the command with an explicit package role') - .option('--check', 'Enable type checking and linting if available') - .option('--inspect', 'Enable debugger in Node.js environments') - .option( - '--inspect-brk', - 'Enable debugger in Node.js environments, breaking before code starts', - ) - .action(lazy(() => import('./start').then(m => m.command))); - - const migrate = program - .command('migrate [command]', { hidden: true }) - .description('Migration utilities [EXPERIMENTAL]'); - - migrate - .command('package-role') - .description(`Add package role field to packages that don't have it`) - .action(lazy(() => import('./migrate/packageRole').then(m => m.default))); - - migrate - .command('package-scripts') - .description('Set package scripts according to each package role') - .action( - lazy(() => import('./migrate/packageScripts').then(m => m.command)), - ); + registerScriptCommand(program); + registerMigrateCommand(program); program .command('versions:bump') From c9f8c1189f57014c13a331bfa7687c0fbd12f83d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 16:20:27 +0100 Subject: [PATCH 183/473] cli: mark commands for planned deprecation Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 54fe48e2cf..c9c06141c3 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -118,6 +118,7 @@ export function registerMigrateCommand(program: CommanderStatic) { } export function registerCommands(program: CommanderStatic) { + // TODO(Rugvip): Deprecate in favor of script variant program .command('app:build') .description('Build an app for a production release') @@ -125,6 +126,7 @@ export function registerCommands(program: CommanderStatic) { .option(...configOption) .action(lazy(() => import('./app/build').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('app:serve') .description('Serve an app for local development') @@ -132,6 +134,7 @@ export function registerCommands(program: CommanderStatic) { .option(...configOption) .action(lazy(() => import('./app/serve').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('backend:build') .description('Build a backend plugin') @@ -139,6 +142,7 @@ export function registerCommands(program: CommanderStatic) { .option('--experimental-type-build', 'Enable experimental type build') .action(lazy(() => import('./backend/build').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('backend:bundle') .description('Bundle the backend into a deployment archive') @@ -148,6 +152,7 @@ export function registerCommands(program: CommanderStatic) { ) .action(lazy(() => import('./backend/bundle').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('backend:dev') .description('Start local development server with HMR for the backend') @@ -196,6 +201,7 @@ export function registerCommands(program: CommanderStatic) { lazy(() => import('./create-plugin/createPlugin').then(m => m.default)), ); + // TODO(Rugvip): Deprecate in favor of script variant program .command('plugin:build') .description('Build a plugin') @@ -203,6 +209,7 @@ export function registerCommands(program: CommanderStatic) { .option('--experimental-type-build', 'Enable experimental type build') .action(lazy(() => import('./plugin/build').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('plugin:serve') .description('Serves the dev/ folder of a plugin') @@ -217,6 +224,7 @@ export function registerCommands(program: CommanderStatic) { .description('Diff an existing plugin with the creation template') .action(lazy(() => import('./plugin/diff').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('build') .description('Build a package for publishing') @@ -225,6 +233,7 @@ export function registerCommands(program: CommanderStatic) { .option('--experimental-type-build', 'Enable experimental type build') .action(lazy(() => import('./oldBuild').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('lint') .option( @@ -236,6 +245,7 @@ export function registerCommands(program: CommanderStatic) { .description('Lint a package') .action(lazy(() => import('./lint').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('test') .allowUnknownOption(true) // Allows the command to run, but we still need to parse raw args @@ -315,16 +325,19 @@ export function registerCommands(program: CommanderStatic) { .description('Check Backstage package versioning') .action(lazy(() => import('./versions/lint').then(m => m.default))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('prepack') .description('Prepares a package for packaging before publishing') .action(lazy(() => import('./pack').then(m => m.pre))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('postpack') .description('Restores the changes made by the prepack command') .action(lazy(() => import('./pack').then(m => m.post))); + // TODO(Rugvip): Deprecate in favor of script variant program .command('clean') .description('Delete cache directories') From 3532a7d81c94d77b3c275685e0201a2e443d0a78 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Jan 2022 16:33:46 +0100 Subject: [PATCH 184/473] cli: update package script migration to use script commands Signed-off-by: Patrik Oldsberg --- .../cli/src/commands/migrate/packageScripts.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/commands/migrate/packageScripts.ts b/packages/cli/src/commands/migrate/packageScripts.ts index ada358b56b..5d0033606f 100644 --- a/packages/cli/src/commands/migrate/packageScripts.ts +++ b/packages/cli/src/commands/migrate/packageScripts.ts @@ -38,19 +38,20 @@ export async function command() { const expectedScripts = { ...(hasStart && { start: 'backstage-cli script start' }), ...(isBundled - ? { bundle: 'backstage-cli script bundle' } - : { build: 'backstage-cli build' }), - lint: 'backstage-cli lint', - test: 'backstage-cli test', - clean: 'backstage-cli clean', + ? { bundle: 'backstage-cli script bundle', build: undefined } + : { build: 'backstage-cli script build', bundle: undefined }), + lint: 'backstage-cli script lint', + test: 'backstage-cli script test', + clean: 'backstage-cli script clean', ...(!isBundled && { - postpack: 'backstage-cli postpack', - prepack: 'backstage-cli prepack', + postpack: 'backstage-cli script postpack', + prepack: 'backstage-cli script prepack', }), }; let changed = false; - const currentScripts = (packageJson.scripts = packageJson.scripts || {}); + const currentScripts: Record = + (packageJson.scripts = packageJson.scripts || {}); for (const [name, value] of Object.entries(expectedScripts)) { if (currentScripts[name] !== value) { From f2c5b7461773a2c9ced713c9bc3c86a83c912588 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 24 Jan 2022 00:34:20 +0100 Subject: [PATCH 185/473] cli: refactor role functions to work around simpler PackageRole Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/build/command.ts | 13 +- packages/cli/src/commands/bundle/command.ts | 12 +- .../cli/src/commands/migrate/packageRole.ts | 12 +- .../src/commands/migrate/packageScripts.ts | 14 +-- packages/cli/src/commands/start/command.ts | 8 +- packages/cli/src/lib/monorepo/PackageGraph.ts | 4 +- packages/cli/src/lib/role/index.ts | 12 +- .../cli/src/lib/role/packageRoles.test.ts | 111 ++++++------------ packages/cli/src/lib/role/packageRoles.ts | 63 +++++----- packages/cli/src/lib/role/types.ts | 5 +- 10 files changed, 106 insertions(+), 148 deletions(-) diff --git a/packages/cli/src/commands/build/command.ts b/packages/cli/src/commands/build/command.ts index 733faa9480..5db6baa34f 100644 --- a/packages/cli/src/commands/build/command.ts +++ b/packages/cli/src/commands/build/command.ts @@ -16,19 +16,20 @@ import { Command } from 'commander'; import { buildPackage, Output } from '../../lib/builder'; -import { PackageRoleName, readRoleForCommand } from '../../lib/role'; +import { PackageRole, findRoleFromCommand, getRoleInfo } from '../../lib/role'; -const bundledRoles: PackageRoleName[] = ['app', 'backend']; +const bundledRoles: PackageRole[] = ['app', 'backend']; const esmPlatforms = ['web', 'common']; const cjsPlatforms = ['node', 'common']; export async function command(cmd: Command): Promise { - const roleInfo = await readRoleForCommand(cmd); + const role = await findRoleFromCommand(cmd); + const roleInfo = getRoleInfo(role); - if (bundledRoles.includes(roleInfo.role)) { + if (bundledRoles.includes(role)) { throw new Error( - `Build command is not supported for package role '${roleInfo.role}'`, + `Build command is not supported for package role '${role}'`, ); } @@ -40,7 +41,7 @@ export async function command(cmd: Command): Promise { if (esmPlatforms.includes(roleInfo.platform)) { outputs.add(Output.esm); } - if (roleInfo.role !== 'cli') { + if (role !== 'cli') { outputs.add(Output.types); } diff --git a/packages/cli/src/commands/bundle/command.ts b/packages/cli/src/commands/bundle/command.ts index 44b39e6797..4b8c718001 100644 --- a/packages/cli/src/commands/bundle/command.ts +++ b/packages/cli/src/commands/bundle/command.ts @@ -17,10 +17,10 @@ import { Command } from 'commander'; import { bundleApp } from './bundleApp'; import { bundleBackend } from './bundleBackend'; -import { readRoleForCommand } from '../../lib/role'; +import { findRoleFromCommand } from '../../lib/role'; export async function command(cmd: Command): Promise { - const roleInfo = await readRoleForCommand(cmd); + const role = await findRoleFromCommand(cmd); const options = { configPaths: cmd.config as string[], @@ -28,13 +28,11 @@ export async function command(cmd: Command): Promise { skipBuildDependencies: Boolean(cmd.skipBuildDependencies), }; - if (roleInfo.role === 'app') { + if (role === 'app') { return bundleApp(options); - } else if (roleInfo.role === 'backend') { + } else if (role === 'backend') { return bundleBackend(options); } - throw new Error( - `Bundle command is not supported for package role '${roleInfo.role}'`, - ); + throw new Error(`Bundle command is not supported for package role '${role}'`); } diff --git a/packages/cli/src/commands/migrate/packageRole.ts b/packages/cli/src/commands/migrate/packageRole.ts index 86898a6012..e8bfb8e7c8 100644 --- a/packages/cli/src/commands/migrate/packageRole.ts +++ b/packages/cli/src/commands/migrate/packageRole.ts @@ -18,7 +18,7 @@ import fs from 'fs-extra'; import { resolve as resolvePath } from 'path'; import { getPackages } from '@manypkg/get-packages'; import { paths } from '../../lib/paths'; -import { readPackageRole, detectPackageRole } from '../../lib/role'; +import { getRoleFromPackage, detectRoleFromPackage } from '../../lib/role'; export default async () => { const { packages } = await getPackages(paths.targetDir); @@ -26,18 +26,18 @@ export default async () => { await Promise.all( packages.map(async ({ dir, packageJson: pkg }) => { const { name } = pkg; - const existingRole = readPackageRole(pkg); + const existingRole = getRoleFromPackage(pkg); if (existingRole) { return; } - const detectedRole = detectPackageRole(pkg); + const detectedRole = detectRoleFromPackage(pkg); if (!detectedRole) { console.error(`No role detected for package ${name}`); return; } - console.log(`Detected package role of ${name} as ${detectedRole.role}`); + console.log(`Detected package role of ${name} as ${detectedRole}`); let newPkg = pkg as any; @@ -45,7 +45,7 @@ export default async () => { if (pkgKeys.includes('backstage')) { newPkg.backstage = { ...newPkg.backstage, - role: detectedRole.role, + role: detectedRole, }; } else { // We insert the backstage field after one of these fields, otherwise at the end @@ -57,7 +57,7 @@ export default async () => { ) + 1 || pkgKeys.length; const pkgEntries = Object.entries(pkg); - pkgEntries.splice(index, 0, ['backstage', { role: detectedRole.role }]); + pkgEntries.splice(index, 0, ['backstage', { role: detectedRole }]); newPkg = Object.fromEntries(pkgEntries); } diff --git a/packages/cli/src/commands/migrate/packageScripts.ts b/packages/cli/src/commands/migrate/packageScripts.ts index 5d0033606f..c54d4ebb31 100644 --- a/packages/cli/src/commands/migrate/packageScripts.ts +++ b/packages/cli/src/commands/migrate/packageScripts.ts @@ -17,23 +17,23 @@ import fs from 'fs-extra'; import { resolve as resolvePath } from 'path'; import { PackageGraph } from '../../lib/monorepo'; -import { readPackageRole, PackageRoleName } from '../../lib/role'; +import { getRoleFromPackage, PackageRole } from '../../lib/role'; -const bundledRoles: PackageRoleName[] = ['app', 'backend']; -const noStartRoles: PackageRoleName[] = ['cli', 'common-library']; +const bundledRoles: PackageRole[] = ['app', 'backend']; +const noStartRoles: PackageRole[] = ['cli', 'common-library']; export async function command() { const packages = await PackageGraph.listTargetPackages(); await Promise.all( packages.map(async ({ dir, packageJson }) => { - const roleInfo = readPackageRole(packageJson); - if (!roleInfo) { + const role = getRoleFromPackage(packageJson); + if (!role) { return; } - const hasStart = !noStartRoles.includes(roleInfo.role); - const isBundled = bundledRoles.includes(roleInfo.role); + const hasStart = !noStartRoles.includes(role); + const isBundled = bundledRoles.includes(role); const expectedScripts = { ...(hasStart && { start: 'backstage-cli script start' }), diff --git a/packages/cli/src/commands/start/command.ts b/packages/cli/src/commands/start/command.ts index ff4d3b7c0b..6615d5fd46 100644 --- a/packages/cli/src/commands/start/command.ts +++ b/packages/cli/src/commands/start/command.ts @@ -17,10 +17,10 @@ import { Command } from 'commander'; import { startBackend } from './startBackend'; import { startFrontend } from './startFrontend'; -import { readRoleForCommand } from '../../lib/role'; +import { findRoleFromCommand } from '../../lib/role'; export async function command(cmd: Command): Promise { - const roleInfo = await readRoleForCommand(cmd); + const role = await findRoleFromCommand(cmd); const options = { configPaths: cmd.config as string[], @@ -29,7 +29,7 @@ export async function command(cmd: Command): Promise { inspectBrkEnabled: Boolean(cmd.inspectBrk), }; - switch (roleInfo.role) { + switch (role) { case 'backend': case 'plugin-backend': case 'plugin-backend-module': @@ -47,7 +47,7 @@ export async function command(cmd: Command): Promise { return startFrontend({ entry: 'dev/index', ...options }); default: throw new Error( - `Start command is not supported for package role '${roleInfo.role}'`, + `Start command is not supported for package role '${role}'`, ); } } diff --git a/packages/cli/src/lib/monorepo/PackageGraph.ts b/packages/cli/src/lib/monorepo/PackageGraph.ts index db7a528494..89d5f79cd2 100644 --- a/packages/cli/src/lib/monorepo/PackageGraph.ts +++ b/packages/cli/src/lib/monorepo/PackageGraph.ts @@ -16,7 +16,7 @@ import { getPackages, Package } from '@manypkg/get-packages'; import { paths } from '../paths'; -import { PackageRoleName } from '../role'; +import { PackageRole } from '../role'; type PackageJSON = Package['packageJson']; @@ -29,7 +29,7 @@ export interface ExtendedPackageJSON extends PackageJSON { bundled?: boolean; backstage?: { - role?: PackageRoleName; + role?: PackageRole; }; } diff --git a/packages/cli/src/lib/role/index.ts b/packages/cli/src/lib/role/index.ts index 9becfa367b..a01be8d11e 100644 --- a/packages/cli/src/lib/role/index.ts +++ b/packages/cli/src/lib/role/index.ts @@ -14,14 +14,10 @@ * limitations under the License. */ -export type { - PackageRoleInfo, - PackagePlatform, - PackageRoleName, -} from './types'; +export type { PackageRoleInfo, PackagePlatform, PackageRole } from './types'; export { getRoleInfo, - readPackageRole, - readRoleForCommand, - detectPackageRole, + getRoleFromPackage, + findRoleFromCommand, + detectRoleFromPackage, } from './packageRoles'; diff --git a/packages/cli/src/lib/role/packageRoles.test.ts b/packages/cli/src/lib/role/packageRoles.test.ts index f3302d3256..db79143e50 100644 --- a/packages/cli/src/lib/role/packageRoles.test.ts +++ b/packages/cli/src/lib/role/packageRoles.test.ts @@ -18,9 +18,9 @@ import mockFs from 'mock-fs'; import { Command } from 'commander'; import { getRoleInfo, - readPackageRole, - readRoleForCommand, - detectPackageRole, + getRoleFromPackage, + findRoleFromCommand, + detectRoleFromPackage, } from './packageRoles'; describe('getRoleInfo', () => { @@ -28,11 +28,13 @@ describe('getRoleInfo', () => { expect(getRoleInfo('web-library')).toEqual({ role: 'web-library', platform: 'web', + bundled: false, }); expect(getRoleInfo('app')).toEqual({ role: 'app', platform: 'web', + bundled: true, }); expect(() => getRoleInfo('invalid')).toThrow( @@ -41,39 +43,33 @@ describe('getRoleInfo', () => { }); }); -describe('readPackageRole', () => { +describe('getRoleFromPackage', () => { it('reads explicit package roles', () => { expect( - readPackageRole({ + getRoleFromPackage({ backstage: { role: 'web-library', }, }), - ).toEqual({ - role: 'web-library', - platform: 'web', - }); + ).toEqual('web-library'); expect( - readPackageRole({ + getRoleFromPackage({ backstage: { role: 'app', }, }), - ).toEqual({ - role: 'app', - platform: 'web', - }); + ).toEqual('app'); expect(() => - readPackageRole({ + getRoleFromPackage({ name: 'test', backstage: {}, }), ).toThrow('Package test must specify a role in the "backstage" field'); expect(() => - readPackageRole({ + getRoleFromPackage({ name: 'test', backstage: { role: 'invalid' }, }), @@ -81,7 +77,7 @@ describe('readPackageRole', () => { }); }); -describe('readRoleForCommand', () => { +describe('findRoleFromCommand', () => { function mkCommand(args: string) { return new Command() .option('--role ', 'test role') @@ -104,28 +100,24 @@ describe('readRoleForCommand', () => { }); it('provides role info by role', async () => { - await expect(readRoleForCommand(mkCommand(''))).resolves.toEqual({ - role: 'web-library', - platform: 'web', - }); + await expect(findRoleFromCommand(mkCommand(''))).resolves.toEqual( + 'web-library', + ); await expect( - readRoleForCommand(mkCommand('--role node-library')), - ).resolves.toEqual({ - role: 'node-library', - platform: 'node', - }); + findRoleFromCommand(mkCommand('--role node-library')), + ).resolves.toEqual('node-library'); await expect( - readRoleForCommand(mkCommand('--role invalid')), + findRoleFromCommand(mkCommand('--role invalid')), ).rejects.toThrow(`Unknown package role 'invalid'`); }); }); -describe('detectPackageRole', () => { +describe('detectRoleFromPackage', () => { it('detects the role of example-app', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: 'example-app', private: true, bundled: true, @@ -143,15 +135,12 @@ describe('detectPackageRole', () => { 'cy:run': 'cypress run', }, }), - ).toEqual({ - role: 'app', - platform: 'web', - }); + ).toEqual('app'); }); it('detects the role of example-backend', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: 'example-backend', main: 'dist/index.cjs.js', types: 'src/index.ts', @@ -166,15 +155,12 @@ describe('detectPackageRole', () => { 'migrate:create': 'knex migrate:make -x ts', }, }), - ).toEqual({ - role: 'backend', - platform: 'node', - }); + ).toEqual('backend'); }); it('detects the role of @backstage/plugin-catalog', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-catalog', main: 'src/index.ts', types: 'src/index.ts', @@ -194,15 +180,12 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'plugin-frontend', - platform: 'web', - }); + ).toEqual('plugin-frontend'); }); it('detects the role of @backstage/plugin-catalog-backend', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-catalog-backend', main: 'src/index.ts', types: 'src/index.ts', @@ -221,15 +204,12 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'plugin-backend', - platform: 'node', - }); + ).toEqual('plugin-backend'); }); it('detects the role of @backstage/plugin-catalog-react', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-catalog-react', main: 'src/index.ts', types: 'src/index.ts', @@ -247,15 +227,12 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'web-library', - platform: 'web', - }); + ).toEqual('web-library'); }); it('detects the role of @backstage/plugin-catalog-common', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-catalog-common', main: 'src/index.ts', types: 'src/index.ts', @@ -274,15 +251,12 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'common-library', - platform: 'common', - }); + ).toEqual('common-library'); }); it('detects the role of @backstage/plugin-catalog-backend-module-ldap', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-catalog-backend-module-ldap', main: 'src/index.ts', types: 'src/index.ts', @@ -300,15 +274,12 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'plugin-backend-module', - platform: 'node', - }); + ).toEqual('plugin-backend-module'); }); it('detects the role of @backstage/plugin-permission-node', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-permission-node', main: 'src/index.ts', types: 'src/index.ts', @@ -327,15 +298,12 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'node-library', - platform: 'node', - }); + ).toEqual('node-library'); }); it('detects the role of @backstage/plugin-analytics-module-ga', () => { expect( - detectPackageRole({ + detectRoleFromPackage({ name: '@backstage/plugin-analytics-module-ga', main: 'src/index.ts', types: 'src/index.ts', @@ -355,9 +323,6 @@ describe('detectPackageRole', () => { clean: 'backstage-cli clean', }, }), - ).toEqual({ - role: 'plugin-frontend-module', - platform: 'web', - }); + ).toEqual('plugin-frontend-module'); }); }); diff --git a/packages/cli/src/lib/role/packageRoles.ts b/packages/cli/src/lib/role/packageRoles.ts index 67bee0e64f..c12ca644b9 100644 --- a/packages/cli/src/lib/role/packageRoles.ts +++ b/packages/cli/src/lib/role/packageRoles.ts @@ -18,24 +18,23 @@ import { z } from 'zod'; import fs from 'fs-extra'; import { Command } from 'commander'; import { paths } from '../paths'; -import { PackageRoleInfo } from './types'; +import { PackageRole, PackageRoleInfo } from './types'; -const packageRoles: PackageRoleInfo[] = [ - { role: 'app', platform: 'web' }, - { role: 'backend', platform: 'node' }, - { role: 'cli', platform: 'node' }, - { role: 'web-library', platform: 'web' }, - { role: 'node-library', platform: 'node' }, - { role: 'common-library', platform: 'common' }, - { role: 'plugin-frontend', platform: 'web' }, - { role: 'plugin-frontend-module', platform: 'web' }, - { role: 'plugin-backend', platform: 'node' }, - { role: 'plugin-backend-module', platform: 'node' }, +const packageRoleInfos: PackageRoleInfo[] = [ + { role: 'app', bundled: true, platform: 'web' }, + { role: 'backend', bundled: true, platform: 'node' }, + { role: 'cli', bundled: false, platform: 'node' }, + { role: 'web-library', bundled: false, platform: 'web' }, + { role: 'node-library', bundled: false, platform: 'node' }, + { role: 'common-library', bundled: false, platform: 'common' }, + { role: 'plugin-frontend', bundled: false, platform: 'web' }, + { role: 'plugin-frontend-module', bundled: false, platform: 'web' }, + { role: 'plugin-backend', bundled: false, platform: 'node' }, + { role: 'plugin-backend-module', bundled: false, platform: 'node' }, ]; -const roleMap = Object.fromEntries(packageRoles.map(i => [i.role, i])); export function getRoleInfo(role: string): PackageRoleInfo { - const roleInfo = packageRoles.find(r => r.role === role); + const roleInfo = packageRoleInfos.find(r => r.role === role); if (!roleInfo) { throw new Error(`Unknown package role '${role}'`); } @@ -51,7 +50,7 @@ const readSchema = z.object({ .optional(), }); -export function readPackageRole(pkgJson: unknown): PackageRoleInfo | undefined { +export function getRoleFromPackage(pkgJson: unknown): PackageRole | undefined { const pkg = readSchema.parse(pkgJson); // If there's an explicit role, use that. @@ -63,21 +62,19 @@ export function readPackageRole(pkgJson: unknown): PackageRoleInfo | undefined { ); } - return getRoleInfo(role); + return getRoleInfo(role).role; } return undefined; } -export async function readRoleForCommand( - cmd: Command, -): Promise { +export async function findRoleFromCommand(cmd: Command): Promise { if (cmd.role) { - return getRoleInfo(cmd.role); + return getRoleInfo(cmd.role)?.role; } const pkg = await fs.readJson(paths.resolveTarget('package.json')); - const info = readPackageRole(pkg); + const info = getRoleFromPackage(pkg); if (!info) { throw new Error(`Target package must have 'backstage.role' set`); } @@ -104,28 +101,28 @@ const detectionSchema = z.object({ module: z.string().optional(), }); -export function detectPackageRole( +export function detectRoleFromPackage( pkgJson: unknown, -): PackageRoleInfo | undefined { +): PackageRole | undefined { const pkg = detectionSchema.parse(pkgJson); if (pkg.scripts?.start?.includes('app:serve')) { - return roleMap.app; + return 'app'; } if (pkg.scripts?.build?.includes('backend:bundle')) { - return roleMap.backend; + return 'backend'; } if (pkg.name?.includes('plugin-') && pkg.name?.includes('-backend-module-')) { - return roleMap['plugin-backend-module']; + return 'plugin-backend-module'; } if (pkg.name?.includes('plugin-') && pkg.name?.includes('-module-')) { - return roleMap['plugin-frontend-module']; + return 'plugin-frontend-module'; } if (pkg.scripts?.start?.includes('plugin:serve')) { - return roleMap['plugin-frontend']; + return 'plugin-frontend'; } if (pkg.scripts?.start?.includes('backend:dev')) { - return roleMap['plugin-backend']; + return 'plugin-backend'; } const mainEntry = pkg.publishConfig?.main || pkg.main; @@ -133,16 +130,16 @@ export function detectPackageRole( const typesEntry = pkg.publishConfig?.types || pkg.types; if (typesEntry) { if (mainEntry && moduleEntry) { - return roleMap['common-library']; + return 'common-library'; } if (moduleEntry || mainEntry?.endsWith('.esm.js')) { - return roleMap['web-library']; + return 'web-library'; } if (mainEntry) { - return roleMap['node-library']; + return 'node-library'; } } else if (mainEntry) { - return roleMap.cli; + return 'cli'; } return undefined; diff --git a/packages/cli/src/lib/role/types.ts b/packages/cli/src/lib/role/types.ts index 1f5afe7926..efe2c99fd5 100644 --- a/packages/cli/src/lib/role/types.ts +++ b/packages/cli/src/lib/role/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -export type PackageRoleName = +export type PackageRole = | 'app' | 'backend' | 'cli' @@ -29,6 +29,7 @@ export type PackageRoleName = export type PackagePlatform = 'node' | 'web' | 'common'; export interface PackageRoleInfo { - role: PackageRoleName; + role: PackageRole; + bundled: boolean; platform: PackagePlatform; } From 323562efc9236bd397034d8e24881fa15ea97065 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 25 Jan 2022 21:35:39 +0100 Subject: [PATCH 186/473] cli: switch to keeping track of outputs for each package role Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/build/command.ts | 9 +-- .../src/commands/migrate/packageScripts.ts | 6 +- packages/cli/src/lib/role/index.ts | 7 ++- .../cli/src/lib/role/packageRoles.test.ts | 4 +- packages/cli/src/lib/role/packageRoles.ts | 60 +++++++++++++++---- packages/cli/src/lib/role/types.ts | 3 +- 6 files changed, 66 insertions(+), 23 deletions(-) diff --git a/packages/cli/src/commands/build/command.ts b/packages/cli/src/commands/build/command.ts index 5db6baa34f..b2e5925119 100644 --- a/packages/cli/src/commands/build/command.ts +++ b/packages/cli/src/commands/build/command.ts @@ -20,9 +20,6 @@ import { PackageRole, findRoleFromCommand, getRoleInfo } from '../../lib/role'; const bundledRoles: PackageRole[] = ['app', 'backend']; -const esmPlatforms = ['web', 'common']; -const cjsPlatforms = ['node', 'common']; - export async function command(cmd: Command): Promise { const role = await findRoleFromCommand(cmd); const roleInfo = getRoleInfo(role); @@ -35,13 +32,13 @@ export async function command(cmd: Command): Promise { const outputs = new Set(); - if (cjsPlatforms.includes(roleInfo.platform)) { + if (roleInfo.output.includes('cjs')) { outputs.add(Output.cjs); } - if (esmPlatforms.includes(roleInfo.platform)) { + if (roleInfo.output.includes('esm')) { outputs.add(Output.esm); } - if (role !== 'cli') { + if (roleInfo.output.includes('types')) { outputs.add(Output.types); } diff --git a/packages/cli/src/commands/migrate/packageScripts.ts b/packages/cli/src/commands/migrate/packageScripts.ts index c54d4ebb31..7a02411690 100644 --- a/packages/cli/src/commands/migrate/packageScripts.ts +++ b/packages/cli/src/commands/migrate/packageScripts.ts @@ -17,9 +17,8 @@ import fs from 'fs-extra'; import { resolve as resolvePath } from 'path'; import { PackageGraph } from '../../lib/monorepo'; -import { getRoleFromPackage, PackageRole } from '../../lib/role'; +import { getRoleFromPackage, getRoleInfo, PackageRole } from '../../lib/role'; -const bundledRoles: PackageRole[] = ['app', 'backend']; const noStartRoles: PackageRole[] = ['cli', 'common-library']; export async function command() { @@ -32,8 +31,9 @@ export async function command() { return; } + const roleInfo = getRoleInfo(role); const hasStart = !noStartRoles.includes(role); - const isBundled = bundledRoles.includes(role); + const isBundled = roleInfo.output.includes('bundle'); const expectedScripts = { ...(hasStart && { start: 'backstage-cli script start' }), diff --git a/packages/cli/src/lib/role/index.ts b/packages/cli/src/lib/role/index.ts index a01be8d11e..4e1047a628 100644 --- a/packages/cli/src/lib/role/index.ts +++ b/packages/cli/src/lib/role/index.ts @@ -14,7 +14,12 @@ * limitations under the License. */ -export type { PackageRoleInfo, PackagePlatform, PackageRole } from './types'; +export type { + PackageRoleInfo, + PackagePlatform, + PackageOutputType, + PackageRole, +} from './types'; export { getRoleInfo, getRoleFromPackage, diff --git a/packages/cli/src/lib/role/packageRoles.test.ts b/packages/cli/src/lib/role/packageRoles.test.ts index db79143e50..f6c9fb418a 100644 --- a/packages/cli/src/lib/role/packageRoles.test.ts +++ b/packages/cli/src/lib/role/packageRoles.test.ts @@ -28,13 +28,13 @@ describe('getRoleInfo', () => { expect(getRoleInfo('web-library')).toEqual({ role: 'web-library', platform: 'web', - bundled: false, + output: ['types', 'esm'], }); expect(getRoleInfo('app')).toEqual({ role: 'app', platform: 'web', - bundled: true, + output: ['bundle'], }); expect(() => getRoleInfo('invalid')).toThrow( diff --git a/packages/cli/src/lib/role/packageRoles.ts b/packages/cli/src/lib/role/packageRoles.ts index c12ca644b9..7c855ee0fd 100644 --- a/packages/cli/src/lib/role/packageRoles.ts +++ b/packages/cli/src/lib/role/packageRoles.ts @@ -21,16 +21,56 @@ import { paths } from '../paths'; import { PackageRole, PackageRoleInfo } from './types'; const packageRoleInfos: PackageRoleInfo[] = [ - { role: 'app', bundled: true, platform: 'web' }, - { role: 'backend', bundled: true, platform: 'node' }, - { role: 'cli', bundled: false, platform: 'node' }, - { role: 'web-library', bundled: false, platform: 'web' }, - { role: 'node-library', bundled: false, platform: 'node' }, - { role: 'common-library', bundled: false, platform: 'common' }, - { role: 'plugin-frontend', bundled: false, platform: 'web' }, - { role: 'plugin-frontend-module', bundled: false, platform: 'web' }, - { role: 'plugin-backend', bundled: false, platform: 'node' }, - { role: 'plugin-backend-module', bundled: false, platform: 'node' }, + { + role: 'app', + platform: 'web', + output: ['bundle'], + }, + { + role: 'backend', + platform: 'node', + output: ['bundle'], + }, + { + role: 'cli', + platform: 'node', + output: ['cjs'], + }, + { + role: 'web-library', + platform: 'web', + output: ['types', 'esm'], + }, + { + role: 'node-library', + platform: 'node', + output: ['types', 'cjs'], + }, + { + role: 'common-library', + platform: 'common', + output: ['types', 'esm', 'cjs'], + }, + { + role: 'plugin-frontend', + platform: 'web', + output: ['types', 'esm'], + }, + { + role: 'plugin-frontend-module', + platform: 'web', + output: ['types', 'esm'], + }, + { + role: 'plugin-backend', + platform: 'node', + output: ['types', 'cjs'], + }, + { + role: 'plugin-backend-module', + platform: 'node', + output: ['types', 'cjs'], + }, ]; export function getRoleInfo(role: string): PackageRoleInfo { diff --git a/packages/cli/src/lib/role/types.ts b/packages/cli/src/lib/role/types.ts index efe2c99fd5..6a89f7bdaf 100644 --- a/packages/cli/src/lib/role/types.ts +++ b/packages/cli/src/lib/role/types.ts @@ -27,9 +27,10 @@ export type PackageRole = | 'plugin-backend-module'; export type PackagePlatform = 'node' | 'web' | 'common'; +export type PackageOutputType = 'bundle' | 'types' | 'esm' | 'cjs'; export interface PackageRoleInfo { role: PackageRole; - bundled: boolean; platform: PackagePlatform; + output: PackageOutputType[]; } From eaf67f05783da2a5c140f66ce19647daa9faf8b8 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 27 Jan 2022 18:43:50 +0100 Subject: [PATCH 187/473] changesets: add changset for cli role addition Signed-off-by: Patrik Oldsberg --- .changeset/brave-tools-drop.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/brave-tools-drop.md diff --git a/.changeset/brave-tools-drop.md b/.changeset/brave-tools-drop.md new file mode 100644 index 0000000000..02b6b7ebb1 --- /dev/null +++ b/.changeset/brave-tools-drop.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Introduced initial support for an experimental `backstage.role` field in package.json, as well as experimental and hidden `migrate` and `script` sub-commands. We do not recommend usage of any of these additions yet. From 3941ada3cfa8dcf58c9939dd9ae56dd7cffd326d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 3 Feb 2022 13:35:53 +0100 Subject: [PATCH 188/473] cli: remove separate bundle script, using build instead Signed-off-by: Patrik Oldsberg --- .../bundleApp.ts => build/buildApp.ts} | 4 +- .../buildBackend.ts} | 4 +- packages/cli/src/commands/build/command.ts | 25 +++++++----- packages/cli/src/commands/bundle/command.ts | 38 ------------------- packages/cli/src/commands/bundle/index.ts | 17 --------- packages/cli/src/commands/index.ts | 31 ++++++++------- .../src/commands/migrate/packageScripts.ts | 4 +- 7 files changed, 39 insertions(+), 84 deletions(-) rename packages/cli/src/commands/{bundle/bundleApp.ts => build/buildApp.ts} (93%) rename packages/cli/src/commands/{bundle/bundleBackend.ts => build/buildBackend.ts} (96%) delete mode 100644 packages/cli/src/commands/bundle/command.ts delete mode 100644 packages/cli/src/commands/bundle/index.ts diff --git a/packages/cli/src/commands/bundle/bundleApp.ts b/packages/cli/src/commands/build/buildApp.ts similarity index 93% rename from packages/cli/src/commands/bundle/bundleApp.ts rename to packages/cli/src/commands/build/buildApp.ts index 1ebd1f044e..3d86d796b7 100644 --- a/packages/cli/src/commands/bundle/bundleApp.ts +++ b/packages/cli/src/commands/build/buildApp.ts @@ -20,12 +20,12 @@ import { parseParallel, PARALLEL_ENV_VAR } from '../../lib/parallel'; import { loadCliConfig } from '../../lib/config'; import { paths } from '../../lib/paths'; -interface BundleAppOptions { +interface BuildAppOptions { writeStats: boolean; configPaths: string[]; } -export async function bundleApp(options: BundleAppOptions) { +export async function buildApp(options: BuildAppOptions) { const { name } = await fs.readJson(paths.resolveTarget('package.json')); await buildBundle({ entry: 'src/index', diff --git a/packages/cli/src/commands/bundle/bundleBackend.ts b/packages/cli/src/commands/build/buildBackend.ts similarity index 96% rename from packages/cli/src/commands/bundle/bundleBackend.ts rename to packages/cli/src/commands/build/buildBackend.ts index 0f240d87dc..a4d8858cf8 100644 --- a/packages/cli/src/commands/bundle/bundleBackend.ts +++ b/packages/cli/src/commands/build/buildBackend.ts @@ -26,11 +26,11 @@ import { buildPackage, Output } from '../../lib/builder'; const BUNDLE_FILE = 'bundle.tar.gz'; const SKELETON_FILE = 'skeleton.tar.gz'; -interface BundleBackendOptions { +interface BuildBackendOptions { skipBuildDependencies: boolean; } -export async function bundleBackend(options: BundleBackendOptions) { +export async function buildBackend(options: BuildBackendOptions) { const targetDir = paths.resolveTarget('dist'); const pkg = await fs.readJson(paths.resolveTarget('package.json')); diff --git a/packages/cli/src/commands/build/command.ts b/packages/cli/src/commands/build/command.ts index b2e5925119..8c13b515d7 100644 --- a/packages/cli/src/commands/build/command.ts +++ b/packages/cli/src/commands/build/command.ts @@ -16,19 +16,26 @@ import { Command } from 'commander'; import { buildPackage, Output } from '../../lib/builder'; -import { PackageRole, findRoleFromCommand, getRoleInfo } from '../../lib/role'; - -const bundledRoles: PackageRole[] = ['app', 'backend']; +import { findRoleFromCommand, getRoleInfo } from '../../lib/role'; +import { buildApp } from './buildApp'; +import { buildBackend } from './buildBackend'; export async function command(cmd: Command): Promise { const role = await findRoleFromCommand(cmd); - const roleInfo = getRoleInfo(role); - if (bundledRoles.includes(role)) { - throw new Error( - `Build command is not supported for package role '${role}'`, - ); + if (role === 'app') { + return buildApp({ + configPaths: cmd.config as string[], + writeStats: Boolean(cmd.stats), + }); } + if (role === 'backend') { + return buildBackend({ + skipBuildDependencies: Boolean(cmd.skipBuildDependencies), + }); + } + + const roleInfo = getRoleInfo(role); const outputs = new Set(); @@ -42,7 +49,7 @@ export async function command(cmd: Command): Promise { outputs.add(Output.types); } - await buildPackage({ + return buildPackage({ outputs, minify: Boolean(cmd.minify), useApiExtractor: Boolean(cmd.experimentalTypeBuild), diff --git a/packages/cli/src/commands/bundle/command.ts b/packages/cli/src/commands/bundle/command.ts deleted file mode 100644 index 4b8c718001..0000000000 --- a/packages/cli/src/commands/bundle/command.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Command } from 'commander'; -import { bundleApp } from './bundleApp'; -import { bundleBackend } from './bundleBackend'; -import { findRoleFromCommand } from '../../lib/role'; - -export async function command(cmd: Command): Promise { - const role = await findRoleFromCommand(cmd); - - const options = { - configPaths: cmd.config as string[], - writeStats: Boolean(cmd.stats), - skipBuildDependencies: Boolean(cmd.skipBuildDependencies), - }; - - if (role === 'app') { - return bundleApp(options); - } else if (role === 'backend') { - return bundleBackend(options); - } - - throw new Error(`Bundle command is not supported for package role '${role}'`); -} diff --git a/packages/cli/src/commands/bundle/index.ts b/packages/cli/src/commands/bundle/index.ts deleted file mode 100644 index 680fe9e11d..0000000000 --- a/packages/cli/src/commands/bundle/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2022 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export { command } from './command'; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index c9c06141c3..a33e7d4afe 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -45,25 +45,30 @@ export function registerScriptCommand(program: CommanderStatic) { command .command('build') - .description('Build a package for publishing') - .option('--minify', 'Minify the generated code') - .option('--experimental-type-build', 'Enable experimental type build') - .action(lazy(() => import('./build').then(m => m.command))); - - command - .command('bundle') - .description('Bundle a package for deployment') - .option(...configOption) - .option('--role ', 'Run the command with an explicit package role') + .description('Build a package for production deployment or publishing') + .option( + '--minify', + 'Minify the generated code. Does not apply to app or backend packages.', + ) + .option( + '--experimental-type-build', + 'Enable experimental type build. Does not apply to app or backend packages.', + ) .option( '--skip-build-dependencies', - 'Skip the automatic building of local dependencies', + 'Skip the automatic building of local dependencies. Applies to backend packages only.', ) .option( '--stats', - 'If bundle stats are available, write them to the output directory', + 'If bundle stats are available, write them to the output directory. Applies to app packages only.', ) - .action(lazy(() => import('./bundle').then(m => m.command))); + .option( + '--config ', + 'Config files to load instead of app-config.yaml. Applies to app packages only.', + (opt: string, opts: string[]) => [...opts, opt], + Array(), + ) + .action(lazy(() => import('./build').then(m => m.command))); program .command('lint') diff --git a/packages/cli/src/commands/migrate/packageScripts.ts b/packages/cli/src/commands/migrate/packageScripts.ts index 7a02411690..a3fdd20018 100644 --- a/packages/cli/src/commands/migrate/packageScripts.ts +++ b/packages/cli/src/commands/migrate/packageScripts.ts @@ -37,9 +37,7 @@ export async function command() { const expectedScripts = { ...(hasStart && { start: 'backstage-cli script start' }), - ...(isBundled - ? { bundle: 'backstage-cli script bundle', build: undefined } - : { build: 'backstage-cli script build', bundle: undefined }), + build: 'backstage-cli script build', lint: 'backstage-cli script lint', test: 'backstage-cli script test', clean: 'backstage-cli script clean', From b2db40b700a6da3ca812cb6789b72f8b86f48c50 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 01:23:44 +0100 Subject: [PATCH 189/473] cli: add support for specifying target dir in build options Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/builder/config.ts | 18 +++++++++++------- packages/cli/src/lib/builder/types.ts | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/lib/builder/config.ts b/packages/cli/src/lib/builder/config.ts index 617e354864..65c4d6c740 100644 --- a/packages/cli/src/lib/builder/config.ts +++ b/packages/cli/src/lib/builder/config.ts @@ -16,7 +16,7 @@ import chalk from 'chalk'; import fs from 'fs-extra'; -import { relative as relativePath } from 'path'; +import { relative as relativePath, resolve as resolvePath } from 'path'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; @@ -37,6 +37,9 @@ export async function makeRollupConfigs( options: BuildOptions, ): Promise { const configs = new Array(); + const targetDir = options.targetDir ?? paths.targetDir; + + const distDir = resolvePath(targetDir, 'dist'); if (options.outputs.has(Output.cjs) || options.outputs.has(Output.esm)) { const output = new Array(); @@ -44,7 +47,7 @@ export async function makeRollupConfigs( if (options.outputs.has(Output.cjs)) { output.push({ - dir: 'dist', + dir: distDir, entryFileNames: 'index.cjs.js', chunkFileNames: 'cjs/[name]-[hash].cjs.js', format: 'commonjs', @@ -53,7 +56,7 @@ export async function makeRollupConfigs( } if (options.outputs.has(Output.esm)) { output.push({ - dir: 'dist', + dir: distDir, entryFileNames: 'index.esm.js', chunkFileNames: 'esm/[name]-[hash].esm.js', format: 'module', @@ -64,12 +67,13 @@ export async function makeRollupConfigs( } configs.push({ - input: 'src/index.ts', + input: resolvePath(targetDir, 'src/index.ts'), output, preserveEntrySignatures: 'strict', external: require('module').builtinModules, plugins: [ peerDepsExternal({ + packageJsonPath: resolvePath(targetDir, 'package.json'), includeDependencies: true, }), resolve({ mainFields }), @@ -109,13 +113,13 @@ export async function makeRollupConfigs( if (options.outputs.has(Output.types) && !options.useApiExtractor) { const typesInput = paths.resolveTargetRoot( 'dist-types', - relativePath(paths.targetRoot, paths.targetDir), + relativePath(paths.targetRoot, targetDir), 'src/index.d.ts', ); const declarationsExist = await fs.pathExists(typesInput); if (!declarationsExist) { - const path = relativePath(paths.targetDir, typesInput); + const path = relativePath(targetDir, typesInput); throw new Error( `No declaration files found at ${path}, be sure to run ${chalk.bgRed.white( 'yarn tsc', @@ -126,7 +130,7 @@ export async function makeRollupConfigs( configs.push({ input: typesInput, output: { - file: 'dist/index.d.ts', + file: resolvePath(distDir, 'index.d.ts'), format: 'es', }, plugins: [dts()], diff --git a/packages/cli/src/lib/builder/types.ts b/packages/cli/src/lib/builder/types.ts index a02afef01a..c9233c024e 100644 --- a/packages/cli/src/lib/builder/types.ts +++ b/packages/cli/src/lib/builder/types.ts @@ -21,6 +21,7 @@ export enum Output { } export type BuildOptions = { + targetDir?: string; outputs: Set; minify?: boolean; useApiExtractor?: boolean; From ee4931047470df16e9fa407d48c864caaf729fac Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 01:55:02 +0100 Subject: [PATCH 190/473] cli: custom warning handler for rollup + support for log prefix Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/builder/config.ts | 14 +++++++++++++- packages/cli/src/lib/builder/types.ts | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/builder/config.ts b/packages/cli/src/lib/builder/config.ts index 65c4d6c740..0a214f1a7a 100644 --- a/packages/cli/src/lib/builder/config.ts +++ b/packages/cli/src/lib/builder/config.ts @@ -26,7 +26,7 @@ import svgr from '@svgr/rollup'; import dts from 'rollup-plugin-dts'; import json from '@rollup/plugin-json'; import yaml from '@rollup/plugin-yaml'; -import { RollupOptions, OutputOptions } from 'rollup'; +import { RollupOptions, OutputOptions, RollupWarning } from 'rollup'; import { forwardFileImports } from './plugins'; import { BuildOptions, Output } from './types'; @@ -38,6 +38,16 @@ export async function makeRollupConfigs( ): Promise { const configs = new Array(); const targetDir = options.targetDir ?? paths.targetDir; + const onwarn = ({ code, message }: RollupWarning) => { + if (code === 'EMPTY_BUNDLE') { + return; // We don't care about this one + } + if (options.logPrefix) { + console.log(options.logPrefix + message); + } else { + console.log(message); + } + }; const distDir = resolvePath(targetDir, 'dist'); @@ -69,6 +79,7 @@ export async function makeRollupConfigs( configs.push({ input: resolvePath(targetDir, 'src/index.ts'), output, + onwarn, preserveEntrySignatures: 'strict', external: require('module').builtinModules, plugins: [ @@ -133,6 +144,7 @@ export async function makeRollupConfigs( file: resolvePath(distDir, 'index.d.ts'), format: 'es', }, + onwarn, plugins: [dts()], }); } diff --git a/packages/cli/src/lib/builder/types.ts b/packages/cli/src/lib/builder/types.ts index c9233c024e..f43d84cd92 100644 --- a/packages/cli/src/lib/builder/types.ts +++ b/packages/cli/src/lib/builder/types.ts @@ -21,6 +21,7 @@ export enum Output { } export type BuildOptions = { + logPrefix?: string; targetDir?: string; outputs: Set; minify?: boolean; From 4917c71d00e0049dd8ed75cb676cec1ee6eefd18 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 11:10:33 +0100 Subject: [PATCH 191/473] cli: allow optimized type definition builds across packages Signed-off-by: Patrik Oldsberg --- .../src/lib/builder/buildTypeDefinitions.ts | 165 ++++++++++-------- 1 file changed, 91 insertions(+), 74 deletions(-) diff --git a/packages/cli/src/lib/builder/buildTypeDefinitions.ts b/packages/cli/src/lib/builder/buildTypeDefinitions.ts index ba67532bdb..6822e22ccc 100644 --- a/packages/cli/src/lib/builder/buildTypeDefinitions.ts +++ b/packages/cli/src/lib/builder/buildTypeDefinitions.ts @@ -71,91 +71,108 @@ function prepareApiExtractor() { return apiExtractor!; } -export async function buildTypeDefinitions() { - const { Extractor, ExtractorConfig } = prepareApiExtractor(); +export async function buildTypeDefinitions( + targetDirs: string[] = [paths.targetDir], +) { + const { Extractor, ExtractorConfig, CompilerState } = prepareApiExtractor(); - const distTypesPackageDir = paths.resolveTargetRoot( - 'dist-types', - relativePath(paths.targetRoot, paths.targetDir), + const packageDirs = targetDirs.map(dir => + relativePath(paths.targetRoot, dir), + ); + const entryPoints = packageDirs.map(dir => + paths.resolveTargetRoot('dist-types', dir, 'src/index.d.ts'), ); - const entryPoint = resolvePath(distTypesPackageDir, 'src/index.d.ts'); - const declarationsExist = await fs.pathExists(entryPoint); - if (!declarationsExist) { - const path = relativePath(paths.targetDir, entryPoint); - throw new Error( - `No declaration files found at ${path}, be sure to run ${chalk.bgRed.white( - 'yarn tsc', - )} to generate .d.ts files before packaging`, - ); - } + let compilerState; - const extractorConfig = ExtractorConfig.prepare({ - configObject: { - mainEntryPointFilePath: entryPoint, - bundledPackages: [], + for (const packageDir of packageDirs) { + const targetDir = paths.resolveTargetRoot(packageDir); + const targetTypesDir = paths.resolveTargetRoot('dist-types', packageDir); + const entryPoint = resolvePath(targetTypesDir, 'src/index.d.ts'); - compiler: { - skipLibCheck: true, - tsconfigFilePath: paths.resolveTargetRoot('tsconfig.json'), + const declarationsExist = await fs.pathExists(entryPoint); + if (!declarationsExist) { + throw new Error( + `No declaration files found at ${entryPoint}, be sure to run ${chalk.bgRed.white( + 'yarn tsc', + )} to generate .d.ts files before packaging`, + ); + } + + const extractorConfig = ExtractorConfig.prepare({ + configObject: { + mainEntryPointFilePath: entryPoint, + bundledPackages: [], + + compiler: { + skipLibCheck: true, + tsconfigFilePath: paths.resolveTargetRoot('tsconfig.json'), + }, + + dtsRollup: { + enabled: true, + untrimmedFilePath: resolvePath(targetDir, 'dist/index.alpha.d.ts'), + betaTrimmedFilePath: resolvePath(targetDir, 'dist/index.beta.d.ts'), + publicTrimmedFilePath: resolvePath(targetDir, 'dist/index.d.ts'), + }, + + newlineKind: 'lf', + + projectFolder: targetDir, }, + configObjectFullPath: targetDir, + packageJsonFullPath: resolvePath(targetDir, 'package.json'), + }); - dtsRollup: { - enabled: true, - untrimmedFilePath: paths.resolveTarget('dist/index.alpha.d.ts'), - betaTrimmedFilePath: paths.resolveTarget('dist/index.beta.d.ts'), - publicTrimmedFilePath: paths.resolveTarget('dist/index.d.ts'), - }, + if (!compilerState) { + compilerState = CompilerState.create(extractorConfig, { + additionalEntryPoints: entryPoints, + }); + } - newlineKind: 'lf', + const typescriptDir = paths.resolveTargetRoot('node_modules/typescript'); + const hasTypescript = await fs.pathExists(typescriptDir); + const extractorResult = Extractor.invoke(extractorConfig, { + typescriptCompilerFolder: hasTypescript ? typescriptDir : undefined, + compilerState, + localBuild: false, + showVerboseMessages: false, + showDiagnostics: false, + messageCallback(message) { + message.handled = true; + if (ignoredMessages.has(message.messageId)) { + return; + } - projectFolder: paths.targetDir, - }, - configObjectFullPath: paths.targetDir, - packageJsonFullPath: paths.resolveTarget('package.json'), - }); - - const typescriptDir = paths.resolveTargetRoot('node_modules/typescript'); - const hasTypescript = await fs.pathExists(typescriptDir); - const extractorResult = Extractor.invoke(extractorConfig, { - typescriptCompilerFolder: hasTypescript ? typescriptDir : undefined, - localBuild: false, - showVerboseMessages: false, - showDiagnostics: false, - messageCallback(message) { - message.handled = true; - if (ignoredMessages.has(message.messageId)) { - return; - } - - let text = `${message.text} (${message.messageId})`; - if (message.sourceFilePath) { - text += ' at '; - text += relativePath(distTypesPackageDir, message.sourceFilePath); - if (message.sourceFileLine) { - text += `:${message.sourceFileLine}`; - if (message.sourceFileColumn) { - text += `:${message.sourceFileColumn}`; + let text = `${message.text} (${message.messageId})`; + if (message.sourceFilePath) { + text += ' at '; + text += relativePath(targetTypesDir, message.sourceFilePath); + if (message.sourceFileLine) { + text += `:${message.sourceFileLine}`; + if (message.sourceFileColumn) { + text += `:${message.sourceFileColumn}`; + } } } - } - if (message.logLevel === 'error') { - console.error(chalk.red(`Error: ${text}`)); - } else if ( - message.logLevel === 'warning' || - message.category === 'Extractor' - ) { - console.warn(`Warning: ${text}`); - } else { - console.log(text); - } - }, - }); + if (message.logLevel === 'error') { + console.error(chalk.red(`Error: ${text}`)); + } else if ( + message.logLevel === 'warning' || + message.category === 'Extractor' + ) { + console.warn(`Warning: ${text}`); + } else { + console.log(text); + } + }, + }); - if (!extractorResult.succeeded) { - throw new Error( - `Type definition build completed with ${extractorResult.errorCount} errors` + - ` and ${extractorResult.warningCount} warnings`, - ); + if (!extractorResult.succeeded) { + throw new Error( + `Type definition build completed with ${extractorResult.errorCount} errors` + + ` and ${extractorResult.warningCount} warnings`, + ); + } } } From 03b39bbcc3c467bd28ee39ea6b787dca5d66fde0 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 12:20:27 +0100 Subject: [PATCH 192/473] cli: run API Extractor type builds in worker thread Signed-off-by: Patrik Oldsberg --- .../src/lib/builder/buildTypeDefinitions.ts | 152 +++++++----------- .../lib/builder/buildTypeDefinitionsWorker.ts | 105 ++++++++++++ 2 files changed, 163 insertions(+), 94 deletions(-) create mode 100644 packages/cli/src/lib/builder/buildTypeDefinitionsWorker.ts diff --git a/packages/cli/src/lib/builder/buildTypeDefinitions.ts b/packages/cli/src/lib/builder/buildTypeDefinitions.ts index 6822e22ccc..85e54850e4 100644 --- a/packages/cli/src/lib/builder/buildTypeDefinitions.ts +++ b/packages/cli/src/lib/builder/buildTypeDefinitions.ts @@ -16,92 +16,47 @@ import fs from 'fs-extra'; import chalk from 'chalk'; -import { - relative as relativePath, - resolve as resolvePath, - dirname, -} from 'path'; +import { Worker } from 'worker_threads'; +import { relative as relativePath, resolve as resolvePath } from 'path'; import { paths } from '../paths'; +import { buildTypeDefinitionsWorker } from './buildTypeDefinitionsWorker'; // These message types are ignored since we want to avoid duplicating the logic of // handling them correctly, and we already have the API Reports warning about them. const ignoredMessages = new Set(['tsdoc-undefined-tag', 'ae-forgotten-export']); -let apiExtractor: undefined | typeof import('@microsoft/api-extractor'); -function prepareApiExtractor() { - if (apiExtractor) { - return apiExtractor; - } - - try { - apiExtractor = require('@microsoft/api-extractor'); - } catch (error) { - throw new Error( - 'Failed to resolve @microsoft/api-extractor, it must best installed ' + - 'as a dependency of your project in order to use experimental type builds', - ); - } - - /** - * All of this monkey patching below is because MUI has these bare package.json file as a method - * for making TypeScript accept imports like `@material-ui/core/Button`, and improve tree-shaking - * by declaring them side effect free. - * - * The package.json lookup logic in api-extractor really doesn't like that though, as it enforces - * that the 'name' field exists in all package.json files that it discovers. This below is just - * making sure that we ignore those file package.json files instead of crashing. - */ - const { - PackageJsonLookup, - // eslint-disable-next-line import/no-extraneous-dependencies - } = require('@rushstack/node-core-library/lib/PackageJsonLookup'); - - const old = PackageJsonLookup.prototype.tryGetPackageJsonFilePathFor; - PackageJsonLookup.prototype.tryGetPackageJsonFilePathFor = - function tryGetPackageJsonFilePathForPatch(path: string) { - if ( - path.includes('@material-ui') && - !dirname(path).endsWith('@material-ui') - ) { - return undefined; - } - return old.call(this, path); - }; - - return apiExtractor!; -} - export async function buildTypeDefinitions( targetDirs: string[] = [paths.targetDir], ) { - const { Extractor, ExtractorConfig, CompilerState } = prepareApiExtractor(); - const packageDirs = targetDirs.map(dir => relativePath(paths.targetRoot, dir), ); - const entryPoints = packageDirs.map(dir => - paths.resolveTargetRoot('dist-types', dir, 'src/index.d.ts'), + const entryPoints = await Promise.all( + packageDirs.map(async dir => { + const entryPoint = paths.resolveTargetRoot( + 'dist-types', + dir, + 'src/index.d.ts', + ); + + const declarationsExist = await fs.pathExists(entryPoint); + if (!declarationsExist) { + throw new Error( + `No declaration files found at ${entryPoint}, be sure to run ${chalk.bgRed.white( + 'yarn tsc', + )} to generate .d.ts files before packaging`, + ); + } + return entryPoint; + }), ); - let compilerState; - - for (const packageDir of packageDirs) { + const workerConfigs = packageDirs.map(packageDir => { const targetDir = paths.resolveTargetRoot(packageDir); const targetTypesDir = paths.resolveTargetRoot('dist-types', packageDir); - const entryPoint = resolvePath(targetTypesDir, 'src/index.d.ts'); - - const declarationsExist = await fs.pathExists(entryPoint); - if (!declarationsExist) { - throw new Error( - `No declaration files found at ${entryPoint}, be sure to run ${chalk.bgRed.white( - 'yarn tsc', - )} to generate .d.ts files before packaging`, - ); - } - - const extractorConfig = ExtractorConfig.prepare({ + const extractorOptions = { configObject: { - mainEntryPointFilePath: entryPoint, + mainEntryPointFilePath: resolvePath(targetTypesDir, 'src/index.d.ts'), bundledPackages: [], compiler: { @@ -122,24 +77,40 @@ export async function buildTypeDefinitions( }, configObjectFullPath: targetDir, packageJsonFullPath: resolvePath(targetDir, 'package.json'), + }; + return { extractorOptions, targetTypesDir }; + }); + + const typescriptDir = paths.resolveTargetRoot('node_modules/typescript'); + const hasTypescript = await fs.pathExists(typescriptDir); + const typescriptCompilerFolder = hasTypescript ? typescriptDir : undefined; + + const worker = new Worker(`(${buildTypeDefinitionsWorker})()`, { + eval: true, + workerData: { + entryPoints, + workerConfigs, + typescriptCompilerFolder, + }, + }); + + await new Promise((resolve, reject) => { + worker.once('error', reject); + worker.once('exit', code => { + if (code) { + reject(new Error(`Worker exited with code ${code}`)); + } }); + worker.on('message', data => { + if (data.type === 'done') { + if (data.error) { + reject(data.error); + } else { + resolve(); + } + } else if (data.type === 'message') { + const { message, targetTypesDir } = data; - if (!compilerState) { - compilerState = CompilerState.create(extractorConfig, { - additionalEntryPoints: entryPoints, - }); - } - - const typescriptDir = paths.resolveTargetRoot('node_modules/typescript'); - const hasTypescript = await fs.pathExists(typescriptDir); - const extractorResult = Extractor.invoke(extractorConfig, { - typescriptCompilerFolder: hasTypescript ? typescriptDir : undefined, - compilerState, - localBuild: false, - showVerboseMessages: false, - showDiagnostics: false, - messageCallback(message) { - message.handled = true; if (ignoredMessages.has(message.messageId)) { return; } @@ -165,14 +136,7 @@ export async function buildTypeDefinitions( } else { console.log(text); } - }, + } }); - - if (!extractorResult.succeeded) { - throw new Error( - `Type definition build completed with ${extractorResult.errorCount} errors` + - ` and ${extractorResult.warningCount} warnings`, - ); - } - } + }); } diff --git a/packages/cli/src/lib/builder/buildTypeDefinitionsWorker.ts b/packages/cli/src/lib/builder/buildTypeDefinitionsWorker.ts new file mode 100644 index 0000000000..8cb843f58e --- /dev/null +++ b/packages/cli/src/lib/builder/buildTypeDefinitionsWorker.ts @@ -0,0 +1,105 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * NOTE: This is a worker thread function that is stringified and executed + * withing a `worker_threads.Worker`. Everything in this function must + * be self-contained. + * Using TypeScript is fine as it is transpiled before being stringified. + */ +export function buildTypeDefinitionsWorker() { + try { + require('@microsoft/api-extractor'); + } catch (error) { + throw new Error( + 'Failed to resolve @microsoft/api-extractor, it must best installed ' + + 'as a dependency of your project in order to use experimental type builds', + ); + } + + const { dirname } = require('path'); + const { workerData, parentPort } = require('worker_threads'); + const { entryPoints, workerConfigs, typescriptCompilerFolder } = workerData; + + const apiExtractor = require('@microsoft/api-extractor'); + const { Extractor, ExtractorConfig, CompilerState } = apiExtractor; + + /** + * All of this monkey patching below is because MUI has these bare package.json file as a method + * for making TypeScript accept imports like `@material-ui/core/Button`, and improve tree-shaking + * by declaring them side effect free. + * + * The package.json lookup logic in api-extractor really doesn't like that though, as it enforces + * that the 'name' field exists in all package.json files that it discovers. This below is just + * making sure that we ignore those file package.json files instead of crashing. + */ + const { + PackageJsonLookup, + // eslint-disable-next-line import/no-extraneous-dependencies + } = require('@rushstack/node-core-library/lib/PackageJsonLookup'); + + const old = PackageJsonLookup.prototype.tryGetPackageJsonFilePathFor; + PackageJsonLookup.prototype.tryGetPackageJsonFilePathFor = + function tryGetPackageJsonFilePathForPatch(path: string) { + if ( + path.includes('@material-ui') && + !dirname(path).endsWith('@material-ui') + ) { + return undefined; + } + return old.call(this, path); + }; + + let success = true; + let compilerState; + for (const { extractorOptions, targetTypesDir } of workerConfigs) { + const extractorConfig = ExtractorConfig.prepare(extractorOptions); + + if (!compilerState) { + compilerState = CompilerState.create(extractorConfig, { + additionalEntryPoints: entryPoints, + }); + } + + const extractorResult = Extractor.invoke(extractorConfig, { + compilerState, + localBuild: false, + typescriptCompilerFolder, + showVerboseMessages: false, + showDiagnostics: false, + messageCallback: (message: any) => { + message.handled = true; + parentPort.postMessage({ type: 'message', message, targetTypesDir }); + }, + }); + + if (!extractorResult.succeeded) { + parentPort.postMessage({ + type: 'done', + error: new Error( + `Type definition build completed with ${extractorResult.errorCount} errors` + + ` and ${extractorResult.warningCount} warnings`, + ), + }); + success = false; + break; + } + } + + if (success) { + parentPort.postMessage({ type: 'done' }); + } +} From fe571d2b0652e541819d3ff6c9eef84c088fb234 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 12:31:16 +0100 Subject: [PATCH 193/473] cli: add buildPackages for building multiple packages at once Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/builder/index.ts | 2 +- packages/cli/src/lib/builder/packager.ts | 27 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/lib/builder/index.ts b/packages/cli/src/lib/builder/index.ts index c39d964ade..de6ccac0ae 100644 --- a/packages/cli/src/lib/builder/index.ts +++ b/packages/cli/src/lib/builder/index.ts @@ -14,6 +14,6 @@ * limitations under the License. */ -export { buildPackage } from './packager'; +export { buildPackage, buildPackages } from './packager'; export { Output } from './types'; export type { BuildOptions } from './types'; diff --git a/packages/cli/src/lib/builder/packager.ts b/packages/cli/src/lib/builder/packager.ts index 96c488fce2..9ef1954677 100644 --- a/packages/cli/src/lib/builder/packager.ts +++ b/packages/cli/src/lib/builder/packager.ts @@ -17,7 +17,7 @@ import fs from 'fs-extra'; import { rollup, RollupOptions } from 'rollup'; import chalk from 'chalk'; -import { relative as relativePath } from 'path'; +import { relative as relativePath, resolve as resolvePath } from 'path'; import { paths } from '../paths'; import { makeRollupConfigs } from './config'; import { BuildOptions, Output } from './types'; @@ -116,3 +116,28 @@ export const buildPackage = async (options: BuildOptions) => { await Promise.all(buildTasks); }; + +export const buildPackages = async ( + options: (BuildOptions & { targetDir: string })[], +) => { + const rollupConfigs = await Promise.all(options.map(makeRollupConfigs)); + + await Promise.all( + options.map(({ targetDir }) => fs.remove(resolvePath(targetDir, 'dist'))), + ); + + const buildTasks = rollupConfigs.flat().map(rollupBuild); + + const typeDefinitionTargetDirs = options + .filter( + ({ outputs, useApiExtractor }) => + outputs.has(Output.types) && useApiExtractor, + ) + .map(_ => _.targetDir); + + if (typeDefinitionTargetDirs.length > 0) { + buildTasks.push(buildTypeDefinitions(typeDefinitionTargetDirs)); + } + + await Promise.all(buildTasks); +}; From 336b3101519c32428e73599ec4f41f91fe8ef31a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 12:43:51 +0100 Subject: [PATCH 194/473] cli: add initial experimental repo sub-command with build Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/index.ts | 16 ++++++ packages/cli/src/commands/repo/build.ts | 75 +++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 packages/cli/src/commands/repo/build.ts diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index a33e7d4afe..b7de9ced14 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -25,6 +25,21 @@ const configOption = [ Array(), ] as const; +export function registerRepoCommand(program: CommanderStatic) { + const command = program + .command('repo [command]', { hidden: true }) + .description( + 'Command that run across an entire Backstage project [EXPERIMENTAL]', + ); + + command + .command('build') + .description( + 'Build all packages in the project that use the standard backstage build script', + ) + .action(lazy(() => import('./repo/build').then(m => m.command))); +} + export function registerScriptCommand(program: CommanderStatic) { const command = program .command('script [command]', { hidden: true }) @@ -312,6 +327,7 @@ export function registerCommands(program: CommanderStatic) { .description('Print configuration schema') .action(lazy(() => import('./config/schema').then(m => m.default))); + registerRepoCommand(program); registerScriptCommand(program); registerMigrateCommand(program); diff --git a/packages/cli/src/commands/repo/build.ts b/packages/cli/src/commands/repo/build.ts new file mode 100644 index 0000000000..50198772d7 --- /dev/null +++ b/packages/cli/src/commands/repo/build.ts @@ -0,0 +1,75 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import chalk from 'chalk'; +import { relative as relativePath } from 'path'; +import { buildPackages, Output } from '../../lib/builder'; +import { PackageGraph } from '../../lib/monorepo'; +import { paths } from '../../lib/paths'; +import { getRoleInfo } from '../../lib/role'; + +const outputMap = { + esm: Output.esm, + cjs: Output.cjs, + types: Output.types, + bundle: undefined, +}; + +export async function command(): Promise { + const packages = await PackageGraph.listTargetPackages(); + + const options = packages.flatMap(pkg => { + const role = pkg.packageJson.backstage?.role; + if (!role) { + console.warn(`Ignored ${pkg.packageJson.name} because it has no role`); + return []; + } + + const roleInfo = getRoleInfo(role); + const outputs = roleInfo.output + .map(output => outputMap[output]) + .filter((x): x is Output => Boolean(x)); + if (outputs.length === 0) { + console.warn(`Ignored ${pkg.packageJson.name} because it has no output`); + return []; + } + + const buildScript = pkg.packageJson.scripts?.build; + if (!buildScript) { + console.warn( + `Ignored ${pkg.packageJson.name} because it has no build script`, + ); + return []; + } + if (!buildScript.startsWith('backstage-cli script build')) { + console.warn( + `Ignored ${pkg.packageJson.name} because it has a custom build script, '${buildScript}'`, + ); + return []; + } + + return { + targetDir: pkg.dir, + outputs: new Set(outputs), + logPrefix: `${chalk.cyan(relativePath(paths.targetRoot, pkg.dir))}: `, + // TODO(Rugvip): Use commander to parse the script and grab these instead + minify: buildScript.includes('--minify'), + useApiExtractor: buildScript.includes('--experimental-type-build'), + }; + }); + + await buildPackages(options); +} From f8e529030eeb788ff814b0fe21635e30de932dbf Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 18:55:31 +0100 Subject: [PATCH 195/473] cli: added getOutputsForRole utility Signed-off-by: Patrik Oldsberg --- packages/cli/src/commands/repo/build.ts | 19 ++++--------------- packages/cli/src/lib/builder/index.ts | 2 +- packages/cli/src/lib/builder/packager.ts | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/cli/src/commands/repo/build.ts b/packages/cli/src/commands/repo/build.ts index 50198772d7..7b1e4771ec 100644 --- a/packages/cli/src/commands/repo/build.ts +++ b/packages/cli/src/commands/repo/build.ts @@ -16,17 +16,9 @@ import chalk from 'chalk'; import { relative as relativePath } from 'path'; -import { buildPackages, Output } from '../../lib/builder'; +import { buildPackages, getOutputsForRole } from '../../lib/builder'; import { PackageGraph } from '../../lib/monorepo'; import { paths } from '../../lib/paths'; -import { getRoleInfo } from '../../lib/role'; - -const outputMap = { - esm: Output.esm, - cjs: Output.cjs, - types: Output.types, - bundle: undefined, -}; export async function command(): Promise { const packages = await PackageGraph.listTargetPackages(); @@ -38,11 +30,8 @@ export async function command(): Promise { return []; } - const roleInfo = getRoleInfo(role); - const outputs = roleInfo.output - .map(output => outputMap[output]) - .filter((x): x is Output => Boolean(x)); - if (outputs.length === 0) { + const outputs = getOutputsForRole(role); + if (outputs.size === 0) { console.warn(`Ignored ${pkg.packageJson.name} because it has no output`); return []; } @@ -63,7 +52,7 @@ export async function command(): Promise { return { targetDir: pkg.dir, - outputs: new Set(outputs), + outputs, logPrefix: `${chalk.cyan(relativePath(paths.targetRoot, pkg.dir))}: `, // TODO(Rugvip): Use commander to parse the script and grab these instead minify: buildScript.includes('--minify'), diff --git a/packages/cli/src/lib/builder/index.ts b/packages/cli/src/lib/builder/index.ts index de6ccac0ae..00cc463cfb 100644 --- a/packages/cli/src/lib/builder/index.ts +++ b/packages/cli/src/lib/builder/index.ts @@ -14,6 +14,6 @@ * limitations under the License. */ -export { buildPackage, buildPackages } from './packager'; +export { buildPackage, buildPackages, getOutputsForRole } from './packager'; export { Output } from './types'; export type { BuildOptions } from './types'; diff --git a/packages/cli/src/lib/builder/packager.ts b/packages/cli/src/lib/builder/packager.ts index 9ef1954677..c4963373fa 100644 --- a/packages/cli/src/lib/builder/packager.ts +++ b/packages/cli/src/lib/builder/packager.ts @@ -22,6 +22,7 @@ import { paths } from '../paths'; import { makeRollupConfigs } from './config'; import { BuildOptions, Output } from './types'; import { buildTypeDefinitions } from './buildTypeDefinitions'; +import { getRoleInfo } from '../role'; export function formatErrorMessage(error: any) { let msg = ''; @@ -141,3 +142,21 @@ export const buildPackages = async ( await Promise.all(buildTasks); }; + +export function getOutputsForRole(role: string): Set { + const outputs = new Set(); + + for (const output of getRoleInfo(role).output) { + if (output === 'cjs') { + outputs.add(Output.cjs); + } + if (output === 'esm') { + outputs.add(Output.esm); + } + if (output === 'types') { + outputs.add(Output.types); + } + } + + return outputs; +} From d20f260e6dcb2eba8b3c23f63b16665d97995193 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 29 Jan 2022 18:57:16 +0100 Subject: [PATCH 196/473] cli: tweak buildPackages to use standard BuildOptions Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/builder/packager.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/lib/builder/packager.ts b/packages/cli/src/lib/builder/packager.ts index c4963373fa..2413662a17 100644 --- a/packages/cli/src/lib/builder/packager.ts +++ b/packages/cli/src/lib/builder/packager.ts @@ -118,13 +118,14 @@ export const buildPackage = async (options: BuildOptions) => { await Promise.all(buildTasks); }; -export const buildPackages = async ( - options: (BuildOptions & { targetDir: string })[], -) => { +export const buildPackages = async (options: BuildOptions[]) => { + if (options.some(opt => !opt.targetDir)) { + throw new Error('targetDir must be set for all build options'); + } const rollupConfigs = await Promise.all(options.map(makeRollupConfigs)); await Promise.all( - options.map(({ targetDir }) => fs.remove(resolvePath(targetDir, 'dist'))), + options.map(({ targetDir }) => fs.remove(resolvePath(targetDir!, 'dist'))), ); const buildTasks = rollupConfigs.flat().map(rollupBuild); @@ -134,7 +135,7 @@ export const buildPackages = async ( ({ outputs, useApiExtractor }) => outputs.has(Output.types) && useApiExtractor, ) - .map(_ => _.targetDir); + .map(_ => _.targetDir!); if (typeDefinitionTargetDirs.length > 0) { buildTasks.push(buildTypeDefinitions(typeDefinitionTargetDirs)); From d59b90852a6d5893bd8bf4f00046329e2a2e9d93 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 30 Jan 2022 19:24:10 +0100 Subject: [PATCH 197/473] changesets: added changesets for CLI repo command and type worker thread Signed-off-by: Patrik Oldsberg --- .changeset/many-terms-type.md | 5 +++++ .changeset/twenty-colts-applaud.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/many-terms-type.md create mode 100644 .changeset/twenty-colts-applaud.md diff --git a/.changeset/many-terms-type.md b/.changeset/many-terms-type.md new file mode 100644 index 0000000000..fd11d14106 --- /dev/null +++ b/.changeset/many-terms-type.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The experimental types build enabled by `--experimental-type-build` now runs in a separate worker thread. diff --git a/.changeset/twenty-colts-applaud.md b/.changeset/twenty-colts-applaud.md new file mode 100644 index 0000000000..2390e21a6e --- /dev/null +++ b/.changeset/twenty-colts-applaud.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Introduced an experimental and hidden `repo` sub-command, that contains commands that operate on an entire monorepo rather than individual packages. From 437659b92f0a0adb1056bf6a386b9edfbafbbbf2 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Fri, 4 Feb 2022 14:59:12 +0100 Subject: [PATCH 198/473] accept JSX Element as additionalInfo prop Signed-off-by: Emma Indal --- .../src/layout/ErrorPage/ErrorPage.test.tsx | 12 ++++++++++++ .../src/layout/ErrorPage/ErrorPage.tsx | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx index a314128bce..12ac0927ed 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx @@ -16,6 +16,7 @@ import React from 'react'; import { ErrorPage } from './ErrorPage'; +import { Link } from '../../components/Link'; import { renderInTestApp } from '@backstage/test-utils'; describe('', () => { @@ -30,4 +31,15 @@ describe('', () => { ).toBeInTheDocument(); expect(getByTestId('go-back-link')).toBeInTheDocument(); }); + + it('should render with additional information including link', async () => { + const { getByText } = await renderInTestApp( + This is some additional information including a link} />, + ); + expect( + getByText(/looks like someone dropped the mic!/i), + ).toBeInTheDocument(); + expect(getByText(/a link/i)).toBeInTheDocument(); + expect(getByText(/a link/i)).toHaveAttribute('href', '/test'); + }); }); diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx index 08c002d849..b8e0193bcf 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx @@ -27,7 +27,7 @@ import { MicDrop } from './MicDrop'; interface IErrorPageProps { status: string; statusMessage: string; - additionalInfo?: string; + additionalInfo?: string | JSX.Element; } /** @public */ From f2dfbd3fb06f3fccb4c8c36cd52b469eb9ce6429 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Fri, 4 Feb 2022 14:59:41 +0100 Subject: [PATCH 199/473] add changeset Signed-off-by: Emma Indal --- .changeset/khaki-jokes-grab.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/khaki-jokes-grab.md diff --git a/.changeset/khaki-jokes-grab.md b/.changeset/khaki-jokes-grab.md new file mode 100644 index 0000000000..967ed1e0e4 --- /dev/null +++ b/.changeset/khaki-jokes-grab.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Accept JSX Element as additionalInfo property of ErrorPage component From 308efff0ac09d9255786edbac15b218f85165ea9 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Fri, 4 Feb 2022 15:11:40 +0100 Subject: [PATCH 200/473] add optional supportUrl property Signed-off-by: Emma Indal --- .../src/layout/ErrorPage/ErrorPage.test.tsx | 22 +++++++++++++++++++ .../src/layout/ErrorPage/ErrorPage.tsx | 5 +++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx index 12ac0927ed..d6ef392f76 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx @@ -42,4 +42,26 @@ describe('', () => { expect(getByText(/a link/i)).toBeInTheDocument(); expect(getByText(/a link/i)).toHaveAttribute('href', '/test'); }); + + it('should render with default support url if supportUrl is not provided', async () => { + const { getByText } = await renderInTestApp( + , + ); + expect( + getByText(/looks like someone dropped the mic!/i), + ).toBeInTheDocument(); + expect(getByText(/contact support/i)).toBeInTheDocument(); + expect(getByText(/contact support/i)).toHaveAttribute('href', 'https://github.com/backstage/backstage/issues'); + }); + + it('should override support url if supportUrl property is provided', async () => { + const { getByText } = await renderInTestApp( + , + ); + expect( + getByText(/looks like someone dropped the mic!/i), + ).toBeInTheDocument(); + expect(getByText(/contact support/i)).toBeInTheDocument(); + expect(getByText(/contact support/i)).toHaveAttribute('href', 'https://error-page-test-support-url.com'); + }); }); diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx index b8e0193bcf..cae8f95ec8 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx @@ -28,6 +28,7 @@ interface IErrorPageProps { status: string; statusMessage: string; additionalInfo?: string | JSX.Element; + supportUrl?: string; } /** @public */ @@ -62,7 +63,7 @@ const useStyles = makeStyles( * */ export function ErrorPage(props: IErrorPageProps) { - const { status, statusMessage, additionalInfo } = props; + const { status, statusMessage, additionalInfo, supportUrl } = props; const classes = useStyles(); const navigate = useNavigate(); const support = useSupportConfig(); @@ -88,7 +89,7 @@ export function ErrorPage(props: IErrorPageProps) { navigate(-1)}> Go back - ... or please contact support if you + ... or please contact support if you think this is a bug. From 0912186d16154c59fedf56a3eeff0096a9fa5828 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Fri, 4 Feb 2022 15:17:37 +0100 Subject: [PATCH 201/473] update changelog and prettier fixups Signed-off-by: Emma Indal --- .changeset/khaki-jokes-grab.md | 2 +- .../src/layout/ErrorPage/ErrorPage.test.tsx | 29 +++++++++++++++---- .../src/layout/ErrorPage/ErrorPage.tsx | 3 +- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.changeset/khaki-jokes-grab.md b/.changeset/khaki-jokes-grab.md index 967ed1e0e4..e94a580e58 100644 --- a/.changeset/khaki-jokes-grab.md +++ b/.changeset/khaki-jokes-grab.md @@ -2,4 +2,4 @@ '@backstage/core-components': patch --- -Accept JSX Element as additionalInfo property of ErrorPage component +Adjust ErrorPage to accept optional supportUrl property to override app config and JSX Element as additionalInfo property. diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx index d6ef392f76..57d0ba34a1 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.test.tsx @@ -34,7 +34,16 @@ describe('', () => { it('should render with additional information including link', async () => { const { getByText } = await renderInTestApp( - This is some additional information including a link} />, + + This is some additional information including{' '} + a link + + } + />, ); expect( getByText(/looks like someone dropped the mic!/i), @@ -45,23 +54,33 @@ describe('', () => { it('should render with default support url if supportUrl is not provided', async () => { const { getByText } = await renderInTestApp( - , + , ); expect( getByText(/looks like someone dropped the mic!/i), ).toBeInTheDocument(); expect(getByText(/contact support/i)).toBeInTheDocument(); - expect(getByText(/contact support/i)).toHaveAttribute('href', 'https://github.com/backstage/backstage/issues'); + expect(getByText(/contact support/i)).toHaveAttribute( + 'href', + 'https://github.com/backstage/backstage/issues', + ); }); it('should override support url if supportUrl property is provided', async () => { const { getByText } = await renderInTestApp( - , + , ); expect( getByText(/looks like someone dropped the mic!/i), ).toBeInTheDocument(); expect(getByText(/contact support/i)).toBeInTheDocument(); - expect(getByText(/contact support/i)).toHaveAttribute('href', 'https://error-page-test-support-url.com'); + expect(getByText(/contact support/i)).toHaveAttribute( + 'href', + 'https://error-page-test-support-url.com', + ); }); }); diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx index cae8f95ec8..27d884684b 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx @@ -89,7 +89,8 @@ export function ErrorPage(props: IErrorPageProps) { navigate(-1)}> Go back - ... or please contact support if you + ... or please{' '} + contact support if you think this is a bug. From 0fdba0af76d5c11cd2d7a2131d7b150a4c231a7c Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 4 Feb 2022 16:00:39 +0100 Subject: [PATCH 202/473] actions: Comment information about DCO signing when failing Signed-off-by: Johan Haals --- .github/workflows/verify_dco.yaml | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/verify_dco.yaml diff --git a/.github/workflows/verify_dco.yaml b/.github/workflows/verify_dco.yaml new file mode 100644 index 0000000000..8d071afd4c --- /dev/null +++ b/.github/workflows/verify_dco.yaml @@ -0,0 +1,60 @@ +name: Verify DCO +on: + schedule: + - cron: '*/15 * * * *' + +jobs: + dco-helper: + runs-on: ubuntu-latest + steps: + - name: Verify DCO status for open pull requests + uses: actions/github-script@v5 + with: + script: | + const owner = "backstage"; + const repo = "backstage"; + const pulls = await github.paginate(github.rest.pulls.list, { + state: "open", + owner, + repo, + }); + + for (const pull of pulls) { + // Pick out the PRs that have the DCO check + const checks = await github.rest.checks.listForRef({ + owner, + repo, + ref: pull.head.sha, + check_name: "DCO", + status: "completed", + }); + // Skip if there are no checks + if (!checks.data.check_runs.length) { + continue; + } + // Skip if the conclusion is not action_required + if (checks.data.check_runs[0].conclusion !== "action_required") { + console.log(`No checks found for PR #${pull.number}, skipping`); + continue; + } + + const comments = await github.paginate(github.rest.issues.listComments, { + owner, + repo, + issue_number: pull.number, + }); + + if (comments.find((c) => c.user.login === "github-actions[bot]")) { + console.log(`already commented on PR #${pull.number}, skipping`); + continue; + } + + console.log(`creating comment on PR #${pull.number}`); + const body = `Thanks for the contribution!\nAll commits need to be DCO signed before merging. Please refer to the the DCO section in [CONTRIBUTING.md](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#developer-certificate-of-origin) or the [DCO](${checks.data.check_runs[0].html_url}) status for more info.`; + await github.rest.issues.createComment({ + repo, + owner, + issue_number: pull.number, + body, + }); + } From 85636955987f84d2fb8b320a684f88d7f1ddb586 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 4 Feb 2022 15:07:24 +0000 Subject: [PATCH 203/473] move the progress bar inside the log viewer Signed-off-by: Brian Fletcher --- .../src/components/TaskPage/TaskPage.tsx | 105 +++++++++--------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx index cb2eeab3b2..a5a36d1d40 100644 --- a/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx +++ b/plugins/scaffolder/src/components/TaskPage/TaskPage.tsx @@ -295,59 +295,58 @@ export const TaskPage = () => { }; return ( - <> - - -
- Task Activity - - } - subtitle={`Activity for task: ${taskId}`} - /> - - {taskNotFound ? ( - - ) : ( -
- - - - - {output && hasLinks(output) && ( - - )} - - - - -
- -
-
+ +
+ Task Activity + + } + subtitle={`Activity for task: ${taskId}`} + /> + + {taskNotFound ? ( + + ) : ( +
+ + + + + {output && hasLinks(output) && ( + + )} + + -
- )} -
- - + + {!currentStepId && } + +
+ +
+
+ +
+ )} +
+ ); }; From d408d210c21b1e638ed16af30b343276035b4d9b Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Fri, 4 Feb 2022 14:17:36 +0100 Subject: [PATCH 204/473] Remove duplicated SearchContextProvider Signed-off-by: Vincenzo Scamporlino --- packages/app/src/components/Root/Root.tsx | 9 ++------- packages/core-app-api/src/apis/system/ApiProvider.tsx | 7 ++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/app/src/components/Root/Root.tsx b/packages/app/src/components/Root/Root.tsx index 57f1fa536f..2441ace27b 100644 --- a/packages/app/src/components/Root/Root.tsx +++ b/packages/app/src/components/Root/Root.tsx @@ -34,10 +34,7 @@ import { Settings as SidebarSettings, UserSettingsSignInAvatar, } from '@backstage/plugin-user-settings'; -import { - SidebarSearchModal, - SearchContextProvider, -} from '@backstage/plugin-search'; +import { SidebarSearchModal } from '@backstage/plugin-search'; import { Shortcuts } from '@backstage/plugin-shortcuts'; import { Sidebar, @@ -89,9 +86,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => ( } to="/search"> - - - + }> diff --git a/packages/core-app-api/src/apis/system/ApiProvider.tsx b/packages/core-app-api/src/apis/system/ApiProvider.tsx index c75f883a51..f1ebf38d71 100644 --- a/packages/core-app-api/src/apis/system/ApiProvider.tsx +++ b/packages/core-app-api/src/apis/system/ApiProvider.tsx @@ -14,7 +14,12 @@ * limitations under the License. */ -import React, { useContext, ReactNode, PropsWithChildren } from 'react'; +import React, { + useContext, + ReactNode, + PropsWithChildren, + useEffect, +} from 'react'; import PropTypes from 'prop-types'; import { ApiHolder } from '@backstage/core-plugin-api'; import { ApiAggregator } from './ApiAggregator'; From 4a4ab7c6034837a59b9781e9f0592c68715d6d4d Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Fri, 4 Feb 2022 14:22:29 +0100 Subject: [PATCH 205/473] Invoke search only when SearchModal is visible Signed-off-by: Vincenzo Scamporlino --- .../src/apis/system/ApiProvider.tsx | 7 +-- .../src/components/SearchBar/SearchBar.tsx | 17 ++++--- .../SearchModal/SearchModal.test.tsx | 32 +++++++++++--- .../components/SearchModal/SearchModal.tsx | 44 ++++++++++++------- .../SidebarSearchModal/SidebarSearchModal.tsx | 22 +++++++--- 5 files changed, 81 insertions(+), 41 deletions(-) diff --git a/packages/core-app-api/src/apis/system/ApiProvider.tsx b/packages/core-app-api/src/apis/system/ApiProvider.tsx index f1ebf38d71..c75f883a51 100644 --- a/packages/core-app-api/src/apis/system/ApiProvider.tsx +++ b/packages/core-app-api/src/apis/system/ApiProvider.tsx @@ -14,12 +14,7 @@ * limitations under the License. */ -import React, { - useContext, - ReactNode, - PropsWithChildren, - useEffect, -} from 'react'; +import React, { useContext, ReactNode, PropsWithChildren } from 'react'; import PropTypes from 'prop-types'; import { ApiHolder } from '@backstage/core-plugin-api'; import { ApiAggregator } from './ApiAggregator'; diff --git a/plugins/search/src/components/SearchBar/SearchBar.tsx b/plugins/search/src/components/SearchBar/SearchBar.tsx index 2ddec22294..a203d27c93 100644 --- a/plugins/search/src/components/SearchBar/SearchBar.tsx +++ b/plugins/search/src/components/SearchBar/SearchBar.tsx @@ -169,13 +169,16 @@ export type SearchBarProps = Partial; export const SearchBar = ({ onChange, ...props }: SearchBarProps) => { const { term, setTerm } = useSearch(); - const handleChange = (newValue: string) => { - if (onChange) { - onChange(newValue); - } else { - setTerm(newValue); - } - }; + const handleChange = useCallback( + (newValue: string) => { + if (onChange) { + onChange(newValue); + } else { + setTerm(newValue); + } + }, + [onChange, setTerm], + ); return ; }; diff --git a/plugins/search/src/components/SearchModal/SearchModal.test.tsx b/plugins/search/src/components/SearchModal/SearchModal.test.tsx index b59be710de..d3b2a825e2 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.test.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.test.tsx @@ -24,7 +24,6 @@ import { rootRouteRef } from '../../plugin'; import { searchApiRef } from '../../apis'; import { SearchModal } from './SearchModal'; -import { SearchContextProvider } from '../SearchContext'; describe('SearchModal', () => { const query = jest.fn().mockResolvedValue({ results: [] }); @@ -34,14 +33,16 @@ describe('SearchModal', () => { [searchApiRef, { query }], ); + beforeEach(() => { + query.mockClear(); + }); + const toggleModal = jest.fn(); it('Should render the Modal correctly', async () => { await renderInTestApp( - - - + , { mountedRoutes: { @@ -51,14 +52,13 @@ describe('SearchModal', () => { ); expect(screen.getByRole('dialog')).toBeInTheDocument(); + expect(query).toHaveBeenCalledTimes(1); }); it('Calls toggleModal handler', async () => { await renderInTestApp( - - - + , { mountedRoutes: { @@ -66,7 +66,25 @@ describe('SearchModal', () => { }, }, ); + + expect(query).toHaveBeenCalledTimes(1); userEvent.keyboard('{esc}'); expect(toggleModal).toHaveBeenCalledTimes(1); }); + + it('should render SearchModal hiding its content', async () => { + const { getByTestId } = await renderInTestApp( + + , + { + mountedRoutes: { + '/search': rootRouteRef, + }, + }, + ); + + expect(getByTestId('search-bar-next')).toBeInTheDocument(); + expect(getByTestId('search-bar-next')).not.toBeVisible(); + }); }); diff --git a/plugins/search/src/components/SearchModal/SearchModal.tsx b/plugins/search/src/components/SearchModal/SearchModal.tsx index 1f0a879f96..ce3f51dac3 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.tsx @@ -39,6 +39,7 @@ import { rootRouteRef } from '../../plugin'; export interface SearchModalProps { open?: boolean; + hidden?: boolean; toggleModal: () => void; } @@ -57,7 +58,7 @@ const useStyles = makeStyles(theme => ({ viewResultsLink: { verticalAlign: '0.5em' }, })); -export const Modal = ({ open = true, toggleModal }: SearchModalProps) => { +export const Modal = ({ toggleModal }: SearchModalProps) => { const getSearchLink = useRouteRef(rootRouteRef); const classes = useStyles(); @@ -75,16 +76,7 @@ export const Modal = ({ open = true, toggleModal }: SearchModalProps) => { }; return ( - + <> @@ -139,14 +131,34 @@ export const Modal = ({ open = true, toggleModal }: SearchModalProps) => { - + ); }; -export const SearchModal = ({ open = true, toggleModal }: SearchModalProps) => { +export const SearchModal = ({ + open = true, + hidden, + toggleModal, +}: SearchModalProps) => { + const classes = useStyles(); + return ( - - - + ); }; diff --git a/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx b/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx index b8f20de67d..077ad1016e 100644 --- a/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx +++ b/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx @@ -13,30 +13,42 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import React from 'react'; +import React, { useCallback, useState } from 'react'; import SearchIcon from '@material-ui/icons/Search'; import { SidebarItem } from '@backstage/core-components'; import { IconComponent } from '@backstage/core-plugin-api'; import { SearchModal } from '../SearchModal'; -import { useSearch } from '../SearchContext'; export type SidebarSearchModalProps = { icon?: IconComponent; }; export const SidebarSearchModal = (props: SidebarSearchModalProps) => { - const { open, toggleModal } = useSearch(); + const [state, setState] = useState({ hidden: true, opened: false }); const Icon = props.icon ? props.icon : SearchIcon; + const handleToggleModal = useCallback( + () => + setState(previousState => ({ + opened: true, + hidden: !previousState.hidden, + })), + [], + ); + return ( <> +