From 7d6815a883a99dca77fdd366b85004c149adc380 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Tue, 4 Jun 2024 13:26:12 +0200 Subject: [PATCH] chore: migrate to TS 4.9 (#31496) --- apps/vr-tests-web-components/tsconfig.json | 3 +- .../typings/html-react-parser/index.d.ts | 15 ++++ ...-44f3b6cf-e2ae-452b-bf50-ef1af35445bb.json | 7 ++ package.json | 9 +- packages/api-docs/package.json | 4 +- .../react-bindings/src/hooks/useStyles.ts | 2 +- .../fluentui/react-northstar/package.json | 2 +- .../src/components/Popup/Popup.tsx | 4 +- .../src/components/Popup/PopupContent.tsx | 6 +- .../src/components/Tooltip/TooltipContent.tsx | 6 +- .../src/themes/teams/getPointerStyles.ts | 6 +- .../fluentui/react-northstar/src/types.ts | 8 +- .../src/utils/commonPropInterfaces.ts | 4 +- .../src/utils/commonPropTypes.ts | 4 +- .../src/utils/createComponentInternal.ts | 2 +- .../react-northstar/src/utils/factories.ts | 14 +-- .../src/utils/positioner/Popper.tsx | 8 +- .../positioner/createReferenceFromClick.ts | 4 +- .../src/utils/positioner/getBasePlacement.ts | 8 +- .../src/utils/positioner/getBoundary.ts | 4 +- .../positioner/isIntersectingModifier.ts | 3 +- .../partitionPopperPropsFromShorthand.ts | 2 +- .../src/utils/positioner/positioningHelper.ts | 6 +- .../src/utils/positioner/types.ts | 47 ++++++---- .../src/utils/positioner/usePopper.ts | 35 ++++---- .../positioner/positioningHelper-test.ts | 4 +- packages/fluentui/styles/src/types.ts | 18 ++-- .../src/utils/getCallbackArguments.test.ts | 5 +- .../approvedPackages.ts | 1 + yarn.lock | 86 +++++++++---------- 30 files changed, 178 insertions(+), 149 deletions(-) create mode 100644 apps/vr-tests-web-components/typings/html-react-parser/index.d.ts create mode 100644 change/@fluentui-api-docs-44f3b6cf-e2ae-452b-bf50-ef1af35445bb.json diff --git a/apps/vr-tests-web-components/tsconfig.json b/apps/vr-tests-web-components/tsconfig.json index e97236aca82b5..e702905030d13 100644 --- a/apps/vr-tests-web-components/tsconfig.json +++ b/apps/vr-tests-web-components/tsconfig.json @@ -10,5 +10,6 @@ "jsx": "react", "types": ["jest", "node", "web"] }, - "include": ["./src", "./.storybook/*"] + "include": ["./src", "./.storybook/*"], + "files": ["./typings/html-react-parser/index.d.ts"] } diff --git a/apps/vr-tests-web-components/typings/html-react-parser/index.d.ts b/apps/vr-tests-web-components/typings/html-react-parser/index.d.ts new file mode 100644 index 0000000000000..145e1a96b3f14 --- /dev/null +++ b/apps/vr-tests-web-components/typings/html-react-parser/index.d.ts @@ -0,0 +1,15 @@ +/** + * Typings override for invalid html-react-parser types + * Types started explode after upgrading to TypeScript 4.9 which properly parses export maps within native ESM environments + * @see https://github.com/remarkablemark/html-react-parser/issues/1305#issuecomment-2136962278 + */ +declare module 'html-react-parser' { + import type { Comment, Element, Node, ProcessingInstruction, Text } from 'domhandler'; + type DOMNode = Comment | Element | Node | ProcessingInstruction | Text; + interface HTMLReactParserOptions { + replace?: (domNode: DOMNode) => JSX.Element | Record | void | undefined | null | false; + + trim?: boolean; + } + export default function parse(html: string, options?: HTMLReactParserOptions): string | JSX.Element | JSX.Element[]; +} diff --git a/change/@fluentui-api-docs-44f3b6cf-e2ae-452b-bf50-ef1af35445bb.json b/change/@fluentui-api-docs-44f3b6cf-e2ae-452b-bf50-ef1af35445bb.json new file mode 100644 index 0000000000000..65b098bf1174b --- /dev/null +++ b/change/@fluentui-api-docs-44f3b6cf-e2ae-452b-bf50-ef1af35445bb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: bump api-extractor-model in order to migrate to TS 4.9", + "packageName": "@fluentui/api-docs", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/package.json b/package.json index f58d49d8e85e0..28aaa6b7cf100 100644 --- a/package.json +++ b/package.json @@ -85,12 +85,12 @@ "@griffel/webpack-loader": "2.2.10", "@jest/reporters": "29.7.0", "@mdx-js/loader": "1.6.22", - "@microsoft/api-extractor": "7.31.2", - "@microsoft/api-extractor-model": "7.24.2", + "@microsoft/api-extractor": "7.34.9", + "@microsoft/api-extractor-model": "7.26.9", "@microsoft/eslint-plugin-sdl": "0.1.9", "@microsoft/load-themed-styles": "1.10.26", "@microsoft/loader-load-themed-styles": "2.0.17", - "@microsoft/tsdoc": "0.14.1", + "@microsoft/tsdoc": "0.14.2", "@nx/devkit": "17.3.2", "@nx/eslint": "17.3.2", "@nx/eslint-plugin": "17.3.2", @@ -334,7 +334,7 @@ "tsconfig-paths": "4.2.0", "tsconfig-paths-webpack-plugin": "4.1.0", "tslib": "2.5.0", - "typescript": "4.7.4", + "typescript": "4.9.5", "vinyl": "2.2.0", "vrscreenshotdiff": "0.0.17", "webpack": "5.90.3", @@ -374,6 +374,7 @@ "@typescript-eslint/experimental-utils": "4.22.0", "@typescript-eslint/parser": "4.22.0", "@types/jest-axe/axe-core": "4.7.2", + "@microsoft/api-extractor/typescript": "4.9.5", "eslint": "7.25.0", "@mdx-js/loader/loader-utils": "~2.0.4", "swc-loader": "^0.2.3", diff --git a/packages/api-docs/package.json b/packages/api-docs/package.json index 032f4df1779df..17f5d5f3a1096 100644 --- a/packages/api-docs/package.json +++ b/packages/api-docs/package.json @@ -21,8 +21,8 @@ "@fluentui/scripts-tasks": "*" }, "dependencies": { - "@microsoft/api-extractor-model": "7.24.2", - "@microsoft/tsdoc": "0.14.1", + "@microsoft/api-extractor-model": "7.26.9", + "@microsoft/tsdoc": "0.14.2", "fs-extra": "^8.1.0" } } diff --git a/packages/fluentui/react-bindings/src/hooks/useStyles.ts b/packages/fluentui/react-bindings/src/hooks/useStyles.ts index 8538387a153ff..ccf17bf071b1f 100644 --- a/packages/fluentui/react-bindings/src/hooks/useStyles.ts +++ b/packages/fluentui/react-bindings/src/hooks/useStyles.ts @@ -43,7 +43,7 @@ export type UseStylesResult = { styles: ComponentSlotStylesResolved; }; -type InlineStyleProps = { +type InlineStyleProps = { /** Additional CSS class name(s) to apply. */ className?: string; diff --git a/packages/fluentui/react-northstar/package.json b/packages/fluentui/react-northstar/package.json index 28d58ad282b52..9bfd239a4d10e 100644 --- a/packages/fluentui/react-northstar/package.json +++ b/packages/fluentui/react-northstar/package.json @@ -18,7 +18,7 @@ "@fluentui/react-proptypes": "^0.66.5", "@fluentui/state": "^0.66.5", "@fluentui/styles": "^0.66.5", - "@popperjs/core": "~2.4.3", + "@popperjs/core": "~2.11.8", "body-scroll-lock": "^3.1.5", "classnames": "^2.2.6", "compute-scroll-into-view": "1.0.11", diff --git a/packages/fluentui/react-northstar/src/components/Popup/Popup.tsx b/packages/fluentui/react-northstar/src/components/Popup/Popup.tsx index c8806ab67a24d..81bab903d7889 100644 --- a/packages/fluentui/react-northstar/src/components/Popup/Popup.tsx +++ b/packages/fluentui/react-northstar/src/components/Popup/Popup.tsx @@ -20,7 +20,7 @@ import { EventListener } from '@fluentui/react-component-event-listener'; import { NodeRef, Unstable_NestingAuto } from '@fluentui/react-component-nesting-registry'; import { handleRef, Ref } from '@fluentui/react-component-ref'; import * as customPropTypes from '@fluentui/react-proptypes'; -import * as PopperJs from '@popperjs/core'; +import type { VirtualElement as PopperJsVirtualElement } from '@popperjs/core'; import * as _ from 'lodash'; import * as PropTypes from 'prop-types'; import * as React from 'react'; @@ -190,7 +190,7 @@ export const Popup: React.FC & const triggerRef = React.useRef(); // focusable element which has triggered Popup, can be either triggerDomElement or the element inside it const triggerFocusableRef = React.useRef(); - const rightClickReferenceObject = React.useRef(); + const rightClickReferenceObject = React.useRef(); useOnIFrameFocus(open, context.target, (e: Event) => { const iframeInsidePopup = elementContains(popupContentRef.current, e.target as HTMLElement); diff --git a/packages/fluentui/react-northstar/src/components/Popup/PopupContent.tsx b/packages/fluentui/react-northstar/src/components/Popup/PopupContent.tsx index ff313c8950477..816abda8d25b9 100644 --- a/packages/fluentui/react-northstar/src/components/Popup/PopupContent.tsx +++ b/packages/fluentui/react-northstar/src/components/Popup/PopupContent.tsx @@ -13,7 +13,7 @@ import { ForwardRefWithAs, } from '@fluentui/react-bindings'; import * as customPropTypes from '@fluentui/react-proptypes'; -import * as PopperJs from '@popperjs/core'; +import type { BasePlacement as PopperJsBasePlacement, Placement as PopperJsPlacement } from '@popperjs/core'; import cx from 'classnames'; import * as _ from 'lodash'; import * as PropTypes from 'prop-types'; @@ -78,7 +78,7 @@ export interface PopupContentProps extends UIComponentProps, ChildrenComponentPr } export type PopupContentStylesProps = Required> & { - basePlacement: PopperJs.BasePlacement; + basePlacement: PopperJsBasePlacement; autoSize?: AutoSize; }; @@ -195,7 +195,7 @@ PopupContent.displayName = 'PopupContent'; PopupContent.propTypes = { ...commonPropTypes.createCommon(), - placement: PropTypes.oneOf([ + placement: PropTypes.oneOf([ 'auto-start', 'auto', 'auto-end', diff --git a/packages/fluentui/react-northstar/src/components/Tooltip/TooltipContent.tsx b/packages/fluentui/react-northstar/src/components/Tooltip/TooltipContent.tsx index 607ea7dbe4ceb..366a3ecc4919e 100644 --- a/packages/fluentui/react-northstar/src/components/Tooltip/TooltipContent.tsx +++ b/packages/fluentui/react-northstar/src/components/Tooltip/TooltipContent.tsx @@ -9,7 +9,7 @@ import { ForwardRefWithAs, } from '@fluentui/react-bindings'; import * as customPropTypes from '@fluentui/react-proptypes'; -import * as PopperJs from '@popperjs/core'; +import type { BasePlacement as PopperJsBasePlacement, Placement as PopperJsPlacement } from '@popperjs/core'; import * as PropTypes from 'prop-types'; import * as React from 'react'; @@ -49,7 +49,7 @@ export interface TooltipContentProps extends UIComponentProps, ChildrenComponent } export type TooltipContentStylesProps = Required> & { - basePlacement: PopperJs.BasePlacement; + basePlacement: PopperJsBasePlacement; }; export const tooltipContentClassName = 'ui-tooltip__content'; @@ -127,7 +127,7 @@ TooltipContent.displayName = 'TooltipContent'; TooltipContent.propTypes = { ...commonPropTypes.createCommon(), - placement: PropTypes.oneOf([ + placement: PropTypes.oneOf([ 'auto-start', 'auto', 'auto-end', diff --git a/packages/fluentui/react-northstar/src/themes/teams/getPointerStyles.ts b/packages/fluentui/react-northstar/src/themes/teams/getPointerStyles.ts index 91cbaa3ba97e8..e666df0a3c063 100644 --- a/packages/fluentui/react-northstar/src/themes/teams/getPointerStyles.ts +++ b/packages/fluentui/react-northstar/src/themes/teams/getPointerStyles.ts @@ -1,9 +1,9 @@ import { ICSSInJSStyle } from '@fluentui/styles'; -import * as PopperJs from '@popperjs/core'; +import type { BasePlacement as PopperJsBasePlacement } from '@popperjs/core'; type GetContainerStylesOptions = { padding: string; - placement: PopperJs.BasePlacement; + placement: PopperJsBasePlacement; }; type GetPointerStylesOptions = { @@ -16,7 +16,7 @@ type GetPointerStylesOptions = { height: string; width: string; - placement: PopperJs.BasePlacement; + placement: PopperJsBasePlacement; rtl: boolean; svg?: string; }; diff --git a/packages/fluentui/react-northstar/src/types.ts b/packages/fluentui/react-northstar/src/types.ts index dc8f2a834589b..31e94083c3769 100644 --- a/packages/fluentui/react-northstar/src/types.ts +++ b/packages/fluentui/react-northstar/src/types.ts @@ -9,7 +9,7 @@ import { ShorthandFactory } from './utils/factories'; export type ResultOf = T extends (...arg: any[]) => infer TResult ? TResult : never; -export type ObjectOf = { [key: string]: T }; +export type ObjectOf = { [key: string]: T }; export type Omit = Pick>; @@ -17,7 +17,7 @@ export type Omit = Pick>; // Components // ======================================================== -export type FluentComponentStaticProps

= { +export type FluentComponentStaticProps

= { handledProps: (keyof P)[]; create?: ShorthandFactory

; shorthandConfig?: ShorthandConfig

; @@ -59,8 +59,8 @@ type KindSelector = { [P in keyof T]: { kind?: P } & T[P]; }[keyof T]; -export type ShorthandCollection> = ShorthandValue< - Props | (KindSelector & Props) +export type ShorthandCollection

> = ShorthandValue< + P | (KindSelector & P) >[]; export type ObjectShorthandValue

= Props

& { diff --git a/packages/fluentui/react-northstar/src/utils/commonPropInterfaces.ts b/packages/fluentui/react-northstar/src/utils/commonPropInterfaces.ts index f0b3a1d846e66..4b8a24819bd63 100644 --- a/packages/fluentui/react-northstar/src/utils/commonPropInterfaces.ts +++ b/packages/fluentui/react-northstar/src/utils/commonPropInterfaces.ts @@ -3,7 +3,7 @@ import { ComponentSlotStyle, ComponentVariablesInput } from '@fluentui/styles'; import * as React from 'react'; import { ReactChildren } from '../types'; -export interface StyledComponentProps

{ +export interface StyledComponentProps

{ /** Additional CSS styles to apply to the component instance. */ styles?: ComponentSlotStyle; @@ -11,7 +11,7 @@ export interface StyledComponentProps

{ variables?: ComponentVariablesInput; } -export interface UIComponentProps

extends StyledComponentProps { +export interface UIComponentProps

extends StyledComponentProps { /** Additional CSS class name(s) to apply. */ className?: string; design?: ComponentDesignProp; diff --git a/packages/fluentui/react-northstar/src/utils/commonPropTypes.ts b/packages/fluentui/react-northstar/src/utils/commonPropTypes.ts index 179f90b418d47..9ccf922693e4b 100644 --- a/packages/fluentui/react-northstar/src/utils/commonPropTypes.ts +++ b/packages/fluentui/react-northstar/src/utils/commonPropTypes.ts @@ -6,7 +6,7 @@ import * as React from 'react'; import { ReactChildren } from '../types'; -export interface StyledComponentProps

{ +export interface StyledComponentProps

{ /** Additional CSS styles to apply to the component instance. */ styles?: ComponentSlotStyle; @@ -14,7 +14,7 @@ export interface StyledComponentProps

{ variables?: ComponentVariablesInput; } -export interface UIComponentProps

extends StyledComponentProps { +export interface UIComponentProps

extends StyledComponentProps { /** Additional CSS class name(s) to apply. */ className?: string; design?: ComponentDesignProp; diff --git a/packages/fluentui/react-northstar/src/utils/createComponentInternal.ts b/packages/fluentui/react-northstar/src/utils/createComponentInternal.ts index 25e09074f69f0..2f892d435d19b 100644 --- a/packages/fluentui/react-northstar/src/utils/createComponentInternal.ts +++ b/packages/fluentui/react-northstar/src/utils/createComponentInternal.ts @@ -17,7 +17,7 @@ export interface CreateComponentConfig

{ render: (config: RenderResultConfig

, props: P) => React.ReactNode; } -export type CreateComponentReturnType

= React.FunctionComponent

& { +export type CreateComponentReturnType

= React.FunctionComponent

& { deprecated_className: string; create: ShorthandFactory

; }; diff --git a/packages/fluentui/react-northstar/src/utils/factories.ts b/packages/fluentui/react-northstar/src/utils/factories.ts index f09aacd1d977d..e8f51652eb13d 100644 --- a/packages/fluentui/react-northstar/src/utils/factories.ts +++ b/packages/fluentui/react-northstar/src/utils/factories.ts @@ -10,7 +10,7 @@ import { ShorthandValue, Props, PropsOf, ShorthandRenderFunction } from '../type type HTMLTag = 'iframe' | 'img' | 'input'; type ShorthandProp = 'children' | 'src' | 'type'; -interface CreateShorthandOptions

{ +interface CreateShorthandOptions

{ /** Default props object */ defaultProps?: () => Partial>; @@ -31,7 +31,7 @@ const mappedProps: { [key in HTMLTag]: ShorthandProp } = { input: 'type', }; -export type ShorthandFactory

= ( +export type ShorthandFactory

= ( value: ShorthandValue

, options?: CreateShorthandOptions

, ) => React.ReactElement | null | undefined; @@ -44,7 +44,7 @@ export type ShorthandFactory

= ( * @param config - Options passed to factory * @returns A shorthand factory function waiting for `val` and `defaultProps`. */ -export function createShorthandFactory(config: { +export function createShorthandFactory(config: { /** A ReactClass or string */ Component: TStringElement; /** A function that maps a primitive value to the Component props */ @@ -54,13 +54,13 @@ export function createShorthandFactory; -export function createShorthandFactory(config: { +export function createShorthandFactory(config: { Component: TFunctionComponent; mappedProp?: keyof PropsOf; mappedArrayProp?: keyof PropsOf; allowsJSX?: boolean; }): ShorthandFactory

; -export function createShorthandFactory(config: { +export function createShorthandFactory(config: { Component: { new (...args: any[]): TInstance }; mappedProp?: keyof PropsOf; mappedArrayProp?: keyof PropsOf; @@ -86,7 +86,7 @@ export function createShorthandFactory

({ Component, mappedProp, mappedArrayPr // Factories // ============================================================ -export function createShorthandInternal

({ +export function createShorthandInternal

({ Component, mappedProp, mappedArrayProp, @@ -255,7 +255,7 @@ export function createShorthand( value?: ShorthandValue>, options?: CreateShorthandOptions>, ): React.ReactElement; -export function createShorthand( +export function createShorthand( Component: ComponentWithAs & { shorthandConfig?: ShorthandConfig

; fluentComposeConfig?: ComposePreparedOptions

; diff --git a/packages/fluentui/react-northstar/src/utils/positioner/Popper.tsx b/packages/fluentui/react-northstar/src/utils/positioner/Popper.tsx index abce6f951b440..59799cae08160 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/Popper.tsx +++ b/packages/fluentui/react-northstar/src/utils/positioner/Popper.tsx @@ -1,6 +1,6 @@ import { useIsomorphicLayoutEffect, useMergedRefs } from '@fluentui/react-bindings'; import { Ref, isRefObject } from '@fluentui/react-component-ref'; -import * as PopperJs from '@popperjs/core'; +import type { Placement as PopperJsPlacement, VirtualElement as PopperJsVirtualElement } from '@popperjs/core'; import * as React from 'react'; import { getPlacement } from './positioningHelper'; @@ -16,8 +16,8 @@ export const Popper: React.FunctionComponent = props => { const usesRenderProps: boolean = typeof props.children === 'function'; const proposedPlacement = getPlacement(props.align, props.position, props.rtl); - const latestPlacement = React.useRef(proposedPlacement); - const [computedPlacement, setComputedPlacement] = React.useState(proposedPlacement); + const latestPlacement = React.useRef(proposedPlacement); + const [computedPlacement, setComputedPlacement] = React.useState(proposedPlacement); const popperRef = React.useRef(null); const { targetRef, containerRef, arrowRef } = usePopper({ @@ -43,7 +43,7 @@ export const Popper: React.FunctionComponent = props => { // Does not make anything worse as Popper component does not have proper handing for ref updates ¯\_(ツ)_/¯ targetRef.current = isRefObject(props.targetRef) ? (props.targetRef as React.RefObject).current - : (props.targetRef as PopperJs.VirtualElement); + : (props.targetRef as PopperJsVirtualElement); arrowRef.current = props.pointerTargetRef?.current as HTMLElement; }); diff --git a/packages/fluentui/react-northstar/src/utils/positioner/createReferenceFromClick.ts b/packages/fluentui/react-northstar/src/utils/positioner/createReferenceFromClick.ts index 728f1a6599fa3..db25a36bc1106 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/createReferenceFromClick.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/createReferenceFromClick.ts @@ -1,6 +1,6 @@ -import * as PopperJs from '@popperjs/core'; +import type { VirtualElement as PopperJsVirtualElement } from '@popperjs/core'; -export function createReferenceFromClick(nativeEvent: MouseEvent): PopperJs.VirtualElement { +export function createReferenceFromClick(nativeEvent: MouseEvent): PopperJsVirtualElement { const left = nativeEvent.clientX; const top = nativeEvent.clientY; const right = left + 1; diff --git a/packages/fluentui/react-northstar/src/utils/positioner/getBasePlacement.ts b/packages/fluentui/react-northstar/src/utils/positioner/getBasePlacement.ts index 68c8f5543363d..24114c1433ab8 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/getBasePlacement.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/getBasePlacement.ts @@ -1,12 +1,12 @@ -import * as PopperJs from '@popperjs/core'; +import type { BasePlacement as PopperJsBasePlacement, Placement as PopperJsPlacement } from '@popperjs/core'; -const rtlMapping: Partial> = { +const rtlMapping: Partial> = { left: 'right', right: 'left', }; -export function getBasePlacement(placement: PopperJs.Placement | undefined, rtl: boolean): PopperJs.BasePlacement { - const basePlacement = (placement || '').split('-', 1).pop() as PopperJs.BasePlacement; +export function getBasePlacement(placement: PopperJsPlacement | undefined, rtl: boolean): PopperJsBasePlacement { + const basePlacement = (placement || '').split('-', 1).pop() as PopperJsBasePlacement; return (rtl && rtlMapping[basePlacement]) || basePlacement; } diff --git a/packages/fluentui/react-northstar/src/utils/positioner/getBoundary.ts b/packages/fluentui/react-northstar/src/utils/positioner/getBoundary.ts index 76b31a444ef5a..1bc9b34e44714 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/getBoundary.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/getBoundary.ts @@ -1,4 +1,4 @@ -import * as PopperJs from '@popperjs/core'; +import type { Boundary as PopperJsBoundary } from '@popperjs/core'; import { getScrollParent } from './getScrollParent'; import { Boundary } from './types'; @@ -6,7 +6,7 @@ import { Boundary } from './types'; /** * Allows to mimic a behavior from V1 of Popper and accept `window` and `scrollParent` as strings. */ -export function getBoundary(element: HTMLElement, boundary: Boundary): PopperJs.Boundary { +export function getBoundary(element: HTMLElement, boundary: Boundary): PopperJsBoundary { if (boundary === 'window') { return element.ownerDocument.documentElement; } diff --git a/packages/fluentui/react-northstar/src/utils/positioner/isIntersectingModifier.ts b/packages/fluentui/react-northstar/src/utils/positioner/isIntersectingModifier.ts index 9f0fcc0993884..71af0bdbae51e 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/isIntersectingModifier.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/isIntersectingModifier.ts @@ -1,4 +1,5 @@ -import { detectOverflow, Modifier } from '@popperjs/core'; +import { detectOverflow } from '@popperjs/core'; +import type { Modifier } from '@popperjs/core'; export const isIntersectingModifier: IsIntersectingModifier = { name: 'is-intersecting-modifier', diff --git a/packages/fluentui/react-northstar/src/utils/positioner/partitionPopperPropsFromShorthand.ts b/packages/fluentui/react-northstar/src/utils/positioner/partitionPopperPropsFromShorthand.ts index 35d1a1f6724a4..1f7d8fac1516c 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/partitionPopperPropsFromShorthand.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/partitionPopperPropsFromShorthand.ts @@ -1,7 +1,7 @@ import { ObjectShorthandValue, ShorthandValue } from '../../types'; import { PopperShorthandProps } from './types'; -export function partitionPopperPropsFromShorthand

( +export function partitionPopperPropsFromShorthand

( value: ShorthandValue

, ): [ShorthandValue

| ObjectShorthandValue

, PopperShorthandProps | undefined] { if (typeof value === 'object' && value !== null && !Array.isArray(value)) { diff --git a/packages/fluentui/react-northstar/src/utils/positioner/positioningHelper.ts b/packages/fluentui/react-northstar/src/utils/positioner/positioningHelper.ts index c26948c16bf1c..22916a128000e 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/positioningHelper.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/positioningHelper.ts @@ -1,4 +1,4 @@ -import * as PopperJs from '@popperjs/core'; +import type { Placement as PopperJsPlacement } from '@popperjs/core'; import { Alignment, Offset, OffsetFunction, OffsetFunctionParam, Position } from './types'; enum PlacementParts { @@ -49,13 +49,13 @@ const shouldAlignToCenter = (p: Position, a: Alignment) => { * | after | center | right | left * | after | bottom | right-end | left-end */ -export const getPlacement = (align: Alignment, position: Position, rtl: boolean): PopperJs.Placement => { +export const getPlacement = (align: Alignment, position: Position, rtl: boolean): PopperJsPlacement => { const alignment: Alignment = shouldAlignToCenter(position, align) ? 'center' : align; const computedPosition = getPositionMap(rtl)[position]; const computedAlignment = getAlignmentMap(rtl)[alignment]; const stringifiedAlignment = computedAlignment && `-${computedAlignment}`; - return `${computedPosition}${stringifiedAlignment}` as PopperJs.Placement; + return `${computedPosition}${stringifiedAlignment}` as PopperJsPlacement; }; export const applyRtlToOffset = (offset: Offset | undefined): Offset | undefined => { diff --git a/packages/fluentui/react-northstar/src/utils/positioner/types.ts b/packages/fluentui/react-northstar/src/utils/positioner/types.ts index 569be98ab7eba..292b1f4449cd1 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/types.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/types.ts @@ -1,4 +1,13 @@ -import * as PopperJs from '@popperjs/core'; +import type { + Placement, + Boundary as PopperJsBoundary, + RootBoundary, + Rect, + Padding, + VirtualElement, + State, + Instance, +} from '@popperjs/core'; import * as React from 'react'; // Temporary typings for modifiers @@ -13,26 +22,26 @@ export type ArrowModifier = ModifierProps< 'arrow', Partial<{ element: HTMLElement | string; - padding: PopperJs.Padding; + padding: Padding; }> >; export type FlipModifier = ModifierProps< 'flip', Partial<{ - fallbackPlacements: PopperJs.Placement[]; - padding: PopperJs.Padding; - boundary: PopperJs.Boundary; - rootBoundary: PopperJs.RootBoundary; + fallbackPlacements: Placement[]; + padding: Padding; + boundary: PopperJsBoundary; + rootBoundary: RootBoundary; altBoundary: boolean; flipVariations: boolean; }> >; export type OffsetFunctionParam = { - popper: PopperJs.Rect; - reference: PopperJs.Rect; - placement: PopperJs.Placement; + popper: Rect; + reference: Rect; + placement: Placement; }; export type OffsetFunction = (param: OffsetFunctionParam) => [number | null | undefined, number | null | undefined]; @@ -51,22 +60,22 @@ export type PreventOverflowModifier = ModifierProps< Partial<{ mainAxis: boolean; altAxis: boolean; - boundary: PopperJs.Boundary; - rootBoundary: PopperJs.RootBoundary; + boundary: Boundary; + rootBoundary: RootBoundary; altBoundary: boolean; /** * Allows the popper to overflow from its boundaries to keep it near its * reference element */ tether: boolean; - tetherOffset: (arg0: { popper: PopperJs.Rect; reference: PopperJs.Rect; placement: PopperJs.Placement }) => number; - padding: PopperJs.Padding; + tetherOffset: (arg0: { popper: Rect; reference: Rect; placement: Placement }) => number; + padding: Padding; }> >; export type PopperModifiers = (ArrowModifier | FlipModifier | OffsetModifier | PreventOverflowModifier)[]; export type PopperModifiersFn = ( - target: HTMLElement | PopperJs.VirtualElement, + target: HTMLElement | VirtualElement, container: HTMLElement, arrow: HTMLElement | null, ) => PopperModifiers; @@ -78,7 +87,7 @@ export type AutoSize = 'height' | 'height-always' | 'width' | 'width-always' | ' export type PopperChildrenFn = (props: PopperChildrenProps) => React.ReactElement; -export type Boundary = PopperJs.Boundary | 'scrollParent' | 'window'; +export type Boundary = PopperJsBoundary | 'scrollParent' | 'window'; export type PopperRefHandle = { updatePosition: () => void }; @@ -169,7 +178,7 @@ export interface PopperProps extends PositioningProps { /** * Ref object containing the target node (the element that we're using as reference for Popper box). */ - targetRef: React.RefObject | PopperJs.VirtualElement; + targetRef: React.RefObject | VirtualElement; /** Rtl attribute for the component. */ rtl?: boolean; @@ -179,7 +188,7 @@ export interface PopperChildrenProps { /** * Popper's placement. */ - placement: PopperJs.Placement; + placement: Placement; /** * Function that updates the position of the Popper box, computing the new offsets and applying the new style. @@ -190,7 +199,7 @@ export interface PopperChildrenProps { export type PopperShorthandProps = PositioningProps; export type PopperOptions = Omit & { - onStateUpdate?: (state: Partial) => void; + onStateUpdate?: (state: Partial) => void; }; -export type PopperInstance = PopperJs.Instance & { isFirstRun?: boolean }; +export type PopperInstance = Instance & { isFirstRun?: boolean }; diff --git a/packages/fluentui/react-northstar/src/utils/positioner/usePopper.ts b/packages/fluentui/react-northstar/src/utils/positioner/usePopper.ts index e1919d26f241d..78db9e87d8706 100644 --- a/packages/fluentui/react-northstar/src/utils/positioner/usePopper.ts +++ b/packages/fluentui/react-northstar/src/utils/positioner/usePopper.ts @@ -5,7 +5,8 @@ import { useFirstMount, useIsomorphicLayoutEffect, } from '@fluentui/react-bindings'; -import * as PopperJs from '@popperjs/core'; +import { createPopper, detectOverflow } from '@popperjs/core'; +import type { State, ModifierPhases, ModifierArguments, VirtualElement, Options, SideObject } from '@popperjs/core'; import * as React from 'react'; import { getReactFiberFromNode } from '../getReactFiberFromNode'; @@ -73,7 +74,7 @@ function usePopperOptions(options: PopperOptions, popperOriginalPositionRef: Rea const placement = getPlacement(options.align, options.position, options.rtl); const strategy = options.positionFixed ? 'fixed' : 'absolute'; - const handleStateUpdate = useEventCallback(({ state }: { state: Partial }) => { + const handleStateUpdate = useEventCallback(({ state }: { state: Partial }) => { if (onStateUpdate) { onStateUpdate(state); } @@ -92,17 +93,13 @@ function usePopperOptions(options: PopperOptions, popperOriginalPositionRef: Rea const userModifiers = useDeepMemo(() => options.modifiers, options.modifiers); return React.useCallback( - ( - target: HTMLElement | PopperJs.VirtualElement, - container: HTMLElement, - arrow: HTMLElement | null, - ): PopperJs.Options => { + (target: HTMLElement | VirtualElement, container: HTMLElement, arrow: HTMLElement | null): Options => { const scrollParentElement: HTMLElement = getScrollParent(container); const hasScrollableElement = scrollParentElement ? scrollParentElement !== scrollParentElement.ownerDocument.body : false; - const modifiers: PopperJs.Options['modifiers'] = [ + const modifiers: Options['modifiers'] = [ isIntersectingModifier, /** @@ -113,8 +110,8 @@ function usePopperOptions(options: PopperOptions, popperOriginalPositionRef: Rea { name: 'positionStyleFix', enabled: true, - phase: 'afterWrite' as PopperJs.ModifierPhases, - effect: ({ state, instance }: { state: Partial; instance: PopperInstance }) => { + phase: 'afterWrite' as ModifierPhases, + effect: ({ state, instance }: { state: Partial; instance: PopperInstance }) => { // ".isFirstRun" is a part of our patch, on a first evaluation it will "undefined" // should be disabled for subsequent runs as it breaks positioning for them if (instance.isFirstRun !== false) { @@ -178,7 +175,7 @@ function usePopperOptions(options: PopperOptions, popperOriginalPositionRef: Rea { name: 'onUpdate', enabled: true, - phase: 'afterWrite' as PopperJs.ModifierPhases, + phase: 'afterWrite' as ModifierPhases, fn: handleStateUpdate, }, @@ -188,20 +185,20 @@ function usePopperOptions(options: PopperOptions, popperOriginalPositionRef: Rea // This modifier can apply max sizes always, or apply the max sizes only when overflow is detected name: 'applyMaxSize', enabled: true, - phase: 'beforeWrite' as PopperJs.ModifierPhases, + phase: 'beforeWrite' as ModifierPhases, requiresIfExists: ['offset', 'preventOverflow', 'flip'], options: { altBoundary: true, boundary: getBoundary(container, overflowBoundary), }, - fn({ state, options: modifierOptions }: PopperJs.ModifierArguments<{}>) { - const overflow = PopperJs.detectOverflow(state, modifierOptions); + fn({ state, options: modifierOptions }: ModifierArguments<{}>) { + const overflow = detectOverflow(state, modifierOptions); const { x, y } = state.modifiersData.preventOverflow || { x: 0, y: 0 }; const { width, height } = state.rects.popper; const [basePlacement] = state.placement.split('-'); - const widthProp: keyof PopperJs.SideObject = basePlacement === 'left' ? 'left' : 'right'; - const heightProp: keyof PopperJs.SideObject = basePlacement === 'top' ? 'top' : 'bottom'; + const widthProp: keyof SideObject = basePlacement === 'left' ? 'left' : 'right'; + const heightProp: keyof SideObject = basePlacement === 'top' ? 'top' : 'bottom'; const applyMaxWidth = autoSize === 'always' || @@ -232,7 +229,7 @@ function usePopperOptions(options: PopperOptions, popperOriginalPositionRef: Rea }, ].filter(Boolean); - const popperOptions: PopperJs.Options = { + const popperOptions: Options = { modifiers, placement, @@ -294,7 +291,7 @@ export function usePopper(options: PopperOptions = {}): { if (isBrowser() && enabled) { if (targetRef.current && containerRef.current) { - popperInstance = PopperJs.createPopper( + popperInstance = createPopper( targetRef.current, containerRef.current, resolvePopperOptions(targetRef.current, containerRef.current, arrowRef.current), @@ -343,7 +340,7 @@ export function usePopper(options: PopperOptions = {}): { // // This again can be solved with callback refs. It's not a huge issue as with hooks we are moving popper's creation // to ChatMessage itself, however, without `useCallback()` refs it's still a Pandora box. - const targetRef = useCallbackRef(null, handlePopperUpdate, true); + const targetRef = useCallbackRef(null, handlePopperUpdate, true); const containerRef = useCallbackRef(null, handlePopperUpdate, true); const arrowRef = useCallbackRef(null, handlePopperUpdate, true); diff --git a/packages/fluentui/react-northstar/test/specs/utils/positioner/positioningHelper-test.ts b/packages/fluentui/react-northstar/test/specs/utils/positioner/positioningHelper-test.ts index 2b781dd248b66..bc22e8ce5371c 100644 --- a/packages/fluentui/react-northstar/test/specs/utils/positioner/positioningHelper-test.ts +++ b/packages/fluentui/react-northstar/test/specs/utils/positioner/positioningHelper-test.ts @@ -1,4 +1,4 @@ -import * as PopperJs from '@popperjs/core'; +import type { Placement as PopperJsPlacement } from '@popperjs/core'; import { Alignment, OffsetFunction, Position } from 'src/utils/positioner'; import { applyRtlToOffset, getPlacement } from 'src/utils/positioner/positioningHelper'; @@ -6,7 +6,7 @@ import { applyRtlToOffset, getPlacement } from 'src/utils/positioner/positioning type PositionTestInput = { align: Alignment; position: Position; - expectedPlacement: PopperJs.Placement; + expectedPlacement: PopperJsPlacement; rtl?: boolean; }; diff --git a/packages/fluentui/styles/src/types.ts b/packages/fluentui/styles/src/types.ts index 911d16db49b46..6fa12a1d26d0f 100644 --- a/packages/fluentui/styles/src/types.ts +++ b/packages/fluentui/styles/src/types.ts @@ -118,7 +118,9 @@ export type ComponentVariablesPrepared = (siteVariables?: SiteVariablesPrepared) // Component Style Props // ======================================================== -export type ComponentSlotStyle = ComponentSlotStyleFunction | ICSSInJSStyle; +export type ComponentSlotStyle = + | ComponentSlotStyleFunction + | ICSSInJSStyle; export type PropsWithVarsAndStyles = Extendable<{ variables?: ComponentVariablesInput; @@ -129,10 +131,10 @@ export type PropsWithVarsAndStyles = Extendable<{ // Component Styles // ======================================================== -export interface ComponentSlotStylesInput +export interface ComponentSlotStylesInput extends Record> {} -export interface ComponentSlotStylesPrepared +export interface ComponentSlotStylesPrepared extends Record> {} export interface ComponentSlotStylesResolved extends Record {} @@ -148,7 +150,7 @@ export interface ComponentStyleFunctionParam< disableAnimations: boolean; } -export type ComponentSlotStyleFunction = ( +export type ComponentSlotStyleFunction = ( styleParam: ComponentStyleFunctionParam, ) => ICSSInJSStyle; @@ -173,19 +175,19 @@ export type StaticStyles = StaticStyle[]; // TODO: Theme typings that have no sense // ======================================================== -export type ThemeComponentVariablesInput = { +export type ThemeComponentVariablesInput = { [K in keyof ThemeStylesProps]?: ComponentVariablesInput; } & Record; -export type ThemeComponentVariablesPrepared = { +export type ThemeComponentVariablesPrepared = { [K in keyof ThemeStylesProps]?: ComponentVariablesPrepared; } & Record; -export type ThemeComponentStylesInput = { +export type ThemeComponentStylesInput = any> = { [K in keyof ThemeStylesProps]?: ComponentSlotStylesInput; } & Record; -export type ThemeComponentStylesPrepared = { +export type ThemeComponentStylesPrepared = any> = { [K in keyof ThemeStylesProps]?: ComponentSlotStylesPrepared; } & Record; diff --git a/packages/react-conformance/src/utils/getCallbackArguments.test.ts b/packages/react-conformance/src/utils/getCallbackArguments.test.ts index 90a63da7df795..5ed02b703053c 100644 --- a/packages/react-conformance/src/utils/getCallbackArguments.test.ts +++ b/packages/react-conformance/src/utils/getCallbackArguments.test.ts @@ -34,10 +34,11 @@ function createCompilerHost(): ts.CompilerHost { ...originalHost, readFile: () => { - throw new Error('Not supported'); + // throw new Error('Not supported'); + return ''; }, writeFile: () => { - throw new Error('Not supported'); + // throw new Error('Not supported'); }, getSourceFile, diff --git a/scripts/dangerjs/src/detectNonApprovedDependencies/approvedPackages.ts b/scripts/dangerjs/src/detectNonApprovedDependencies/approvedPackages.ts index 8595ea3814f74..67846789cc80b 100644 --- a/scripts/dangerjs/src/detectNonApprovedDependencies/approvedPackages.ts +++ b/scripts/dangerjs/src/detectNonApprovedDependencies/approvedPackages.ts @@ -85,6 +85,7 @@ export default [ '@popperjs/core@2.4.0', '@popperjs/core@2.4.2', '@popperjs/core@2.4.3', + '@popperjs/core@2.11.8', 'prop-types@15.6.2', 'prop-types@15.7.2', 'raf-schd@4.0.2', diff --git a/yarn.lock b/yarn.lock index 5921eac7f95e9..88a113ace8da0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2520,32 +2520,32 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== -"@microsoft/api-extractor-model@7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.24.2.tgz#759b09f2360fe761ff40bcf7e5a57b9b86284235" - integrity sha512-uUvjqTCY7hYERWGks+joTioN1QYHIucCDy7I/JqLxFxLbFXE5dpc1X7L+FG4PN/s8QYL24DKt0fqJkgcrFKLTw== +"@microsoft/api-extractor-model@7.26.9": + version "7.26.9" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.26.9.tgz#22b4e86ab654488b06c9fb240ec440a446846828" + integrity sha512-1AowqcRy5qMH/OB7UNkdXa4qLoJp58WFdJ026IMFS8skA0OOAOcvBV/Fi4L7fO1R/8uCMz5KHi3NsqVH4Li8xg== dependencies: - "@microsoft/tsdoc" "0.14.1" + "@microsoft/tsdoc" "0.14.2" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.52.0" + "@rushstack/node-core-library" "3.59.0" -"@microsoft/api-extractor@7.31.2": - version "7.31.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.31.2.tgz#8312fe2519deaed8f81d60efe9e54b99fc5a19a0" - integrity sha512-ZODCU9ckTS9brXiZpUW2iDrnAg7jLxeLBM1AkPpSZFcbG/8HGLvfKOKrd71VIJHjc52x2lB8xj7ZWksnP7AOBA== +"@microsoft/api-extractor@7.34.9": + version "7.34.9" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.34.9.tgz#ff92cd6939aa5c1674085494c101e0b614512bfd" + integrity sha512-dasBIbqgHgxvfRfEOX4+ynNYQPnTYc6k7jkL3V4f/MoaS2xFUoIj/D71crrsDxf5MNMybjzeyZPdRNZdzvKBVw== dependencies: - "@microsoft/api-extractor-model" "7.24.2" - "@microsoft/tsdoc" "0.14.1" + "@microsoft/api-extractor-model" "7.26.9" + "@microsoft/tsdoc" "0.14.2" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.52.0" - "@rushstack/rig-package" "0.3.15" - "@rushstack/ts-command-line" "4.12.3" + "@rushstack/node-core-library" "3.59.0" + "@rushstack/rig-package" "0.3.18" + "@rushstack/ts-command-line" "4.13.2" colors "~1.2.1" lodash "~4.17.15" - resolve "~1.17.0" + resolve "~1.22.1" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.7.4" + typescript "~4.8.4" "@microsoft/applicationinsights-analytics-js@3.0.2": version "3.0.2" @@ -2686,11 +2686,6 @@ jju "~1.4.0" resolve "~1.19.0" -"@microsoft/tsdoc@0.14.1": - version "0.14.1" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz#155ef21065427901994e765da8a0ba0eaae8b8bd" - integrity sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw== - "@microsoft/tsdoc@0.14.2": version "0.14.2" resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz#c3ec604a0b54b9a9b87e9735dfc59e1a5da6a5fb" @@ -3304,10 +3299,10 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3" integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ== -"@popperjs/core@~2.4.3": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.4.4.tgz#11d5db19bd178936ec89cd84519c4de439574398" - integrity sha512-1oO6+dN5kdIA3sKPZhRGJTfGVP4SWV6KqlMOwry4J3HfyD68sl/3KmG7DeYUzvN+RbhXDnv/D8vNNB8168tAMg== +"@popperjs/core@~2.11.8": + version "2.11.8" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" + integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== "@react-native/babel-plugin-codegen@0.73.4": version "0.73.4" @@ -3433,17 +3428,16 @@ timsort "~0.3.0" z-schema "~5.0.2" -"@rushstack/node-core-library@3.52.0": - version "3.52.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.52.0.tgz#ee45e52b4b5fc038ce59bf59b1534311884e63fb" - integrity sha512-Z+MAP//G3rEGZd3JxJcBGcPYJlh8pvPoLMTLa5Sy6FTE6hRPzN+5J8DT7BbTmlqZaL6SZpXF30heRUbnYOvujw== +"@rushstack/node-core-library@3.59.0": + version "3.59.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.59.0.tgz#f04db22575a242c30114b4723ba0580b6f2d8c85" + integrity sha512-f8ilzooAu8vj60dDe7weqHvR1NujOaKfe3TaNgAoT22rk+daUTmDtY3TlVGJ3HayVPmw3ffWToDatITi7Ic4ag== dependencies: - "@types/node" "12.20.24" colors "~1.2.1" fs-extra "~7.0.1" import-lazy "~4.0.0" jju "~1.4.0" - resolve "~1.17.0" + resolve "~1.22.1" semver "~7.3.0" z-schema "~5.0.2" @@ -3454,18 +3448,18 @@ dependencies: "@rushstack/node-core-library" "3.50.1" -"@rushstack/rig-package@0.3.15": - version "0.3.15" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.15.tgz#8a870880cbeb8de82b951e628f6a37d428b4c5ce" - integrity sha512-jxVfvO5OnkRlYRhcVDZWvwiI2l4pv37HDJRtyg5HbD8Z/I8Xj32RICgrxS5xMeGGytobrg5S6OfPOHskg7Nw+A== +"@rushstack/rig-package@0.3.18": + version "0.3.18" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.18.tgz#2b59eb8ed482e8cd6ad8d396414bf3200efdd682" + integrity sha512-SGEwNTwNq9bI3pkdd01yCaH+gAsHqs0uxfGvtw9b0LJXH52qooWXnrFTRRLG1aL9pf+M2CARdrA9HLHJys3jiQ== dependencies: - resolve "~1.17.0" + resolve "~1.22.1" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.12.3": - version "4.12.3" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.3.tgz#3c5e4b381dcd780aab6efe42c7faa2018248cbb1" - integrity sha512-Pdij22RotMXzI+HWHyYCvw0RMZhiP5a6Za/96XamZ1+mxmpSm4ujf8TROKxGAHySmR5A8iNVSlzhNMnUlFQE6g== +"@rushstack/ts-command-line@4.13.2": + version "4.13.2" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.13.2.tgz#2dfdcf418d58256671433b1da4a3b67e1814cc7a" + integrity sha512-bCU8qoL9HyWiciltfzg7GqdfODUeda/JpI0602kbN5YH22rzTxyqYvv7aRLENCM7XCQ1VRs7nMkEqgJUOU8Sag== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -20748,7 +20742,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@1.22.8, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.3.2, resolve@^1.4.0: +resolve@1.22.8, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.3.2, resolve@^1.4.0, resolve@~1.22.1: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -23183,10 +23177,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.7.4, typescript@~4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +typescript@4.9.5, typescript@~4.8.4: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@~5.3.2: version "5.3.3"