Skip to content

Commit

Permalink
feat: implement internal/alpha/beta/ API removals from package public…
Browse files Browse the repository at this point in the history
… API surface (#23369)

* feat(tools): update migration v9 generator to adopt new tsc build setup
* feat(scripts): implement public api enforcement during build exec on dts level
* fix(tools):fix dep tree violations
* feat(scripts): add projecType filtering to isConvergedPkg helper
* chore(priority-flow): re-generate api.md
* docs(react-utilities): re-generate api.md
* docs(react-shared-contexts): re-generate api.md
* docs(react-context-selector): re-generate api.md
* docs(react-aria): re-generate api.md
* docs: re-generate api.md files
* refactor(scripts): combine isNorthstar with private package check for run published
* generate changefiles
  • Loading branch information
Hotell authored Aug 22, 2022
1 parent bf151e7 commit 16aa65d
Show file tree
Hide file tree
Showing 39 changed files with 538 additions and 230 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore(priority-flow): re-generate api.md",
"packageName": "@fluentui/priority-overflow",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "docs(react-aria): re-generate api.md",
"packageName": "@fluentui/react-aria",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs: re-generate api.md files",
"packageName": "@fluentui/react-avatar",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs(react-context-selector): re-generate api.md",
"packageName": "@fluentui/react-context-selector",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs: re-generate api.md files",
"packageName": "@fluentui/react-overflow",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs: re-generate api.md files",
"packageName": "@fluentui/react-positioning",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs(react-shared-contexts): re-generate api.md",
"packageName": "@fluentui/react-shared-contexts",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs: re-generate api.md files",
"packageName": "@fluentui/react-tabster",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "docs(react-utilities): re-generate api.md",
"packageName": "@fluentui/react-utilities",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
```ts

// Warning: (ae-internal-missing-underscore) The name "createOverflowManager" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function createOverflowManager(): OverflowManager;

Expand Down Expand Up @@ -61,8 +59,6 @@ export interface OverflowItemEntry {
priority: number;
}

// Warning: (ae-internal-missing-underscore) The name "OverflowManager" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export interface OverflowManager {
addItem: (items: OverflowItemEntry) => void;
Expand Down
4 changes: 0 additions & 4 deletions packages/react-components/react-aria/etc/react-aria.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ export type ARIAButtonSlotProps<AlternateAs extends 'a' | 'div' = 'a' | 'div'> =
// @public (undocumented)
export type ARIAButtonType = 'button' | 'a' | 'div';

// Warning: (ae-internal-missing-underscore) The name "useARIAButtonProps" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(type?: Type, props?: Props): ARIAButtonResultProps<Type, Props>;

// Warning: (ae-internal-missing-underscore) The name "useARIAButtonShorthand" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps>;

Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/react-aria/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"start": "yarn storybook",
"test": "jest --passWithNoTests",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-aria/src && yarn docs",
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/types/packages/react-components/react-aria/src && yarn docs",
"storybook": "start-storybook",
"type-check": "tsc -b tsconfig.json"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ export type AvatarState = ComponentState<AvatarSlots> & Required<Pick<AvatarProp
color: NonNullable<Exclude<AvatarProps['color'], 'colorful'>>;
};

// Warning: (ae-internal-missing-underscore) The name "getInitials" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function getInitials(displayName: string | undefined | null, isRtl: boolean, options?: {
allowPhoneInitials?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,36 @@

import * as React_2 from 'react';

// Warning: (ae-internal-missing-underscore) The name "Context" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type Context<Value> = React_2.Context<Value> & {
Provider: React_2.FC<React_2.ProviderProps<Value>>;
Consumer: never;
};

// Warning: (ae-internal-missing-underscore) The name "ContextSelector" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type ContextSelector<Value, SelectedValue> = (value: Value) => SelectedValue;

// Warning: (ae-internal-missing-underscore) The name "ContextValue" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type ContextValue<Value> = {
listeners: ((payload: readonly [ContextVersion, Value]) => void)[];
value: React_2.MutableRefObject<Value>;
version: React_2.MutableRefObject<ContextVersion>;
};

// Warning: (ae-internal-missing-underscore) The name "ContextValues" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type ContextValues<Value> = ContextValue<Value> & {
listeners: ((payload: readonly [ContextVersion, Record<string, Value>]) => void)[];
};

// Warning: (ae-internal-missing-underscore) The name "ContextVersion" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type ContextVersion = number;

// Warning: (ae-internal-missing-underscore) The name "createContext" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export const createContext: <Value>(defaultValue: Value) => Context<Value>;

// Warning: (ae-internal-missing-underscore) The name "useContextSelector" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const useContextSelector: <Value, SelectedValue>(context: Context<Value>, selector: ContextSelector<Value, SelectedValue>) => SelectedValue;

// Warning: (ae-internal-missing-underscore) The name "useHasParentContext" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function useHasParentContext<Value>(context: Context<Value>): boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@ export function useIsOverflowGroupVisible(id: string): OverflowGroupState;
// @public (undocumented)
export function useIsOverflowItemVisible(id: string): boolean;

// Warning: (ae-internal-missing-underscore) The name "useOverflowContainer" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export const useOverflowContainer: <TElement extends HTMLElement>(update: OnUpdateOverflow, options: Omit<ObserveOptions, 'onUpdateOverflow'>) => UseOverflowContainerReturn<TElement>;

// Warning: (ae-internal-missing-underscore) The name "UseOverflowContainerReturn" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export interface UseOverflowContainerReturn<TElement extends HTMLElement> {
containerRef: React_2.RefObject<TElement>;
Expand All @@ -63,8 +59,6 @@ export interface UseOverflowContainerReturn<TElement extends HTMLElement> {
// @public (undocumented)
export const useOverflowCount: () => number;

// Warning: (ae-internal-missing-underscore) The name "useOverflowItem" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function useOverflowItem<TElement extends HTMLElement>(id: string, priority?: number, groupId?: string): React_2.RefObject<TElement>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,15 @@ export type AutoSize = 'height' | 'height-always' | 'width' | 'width-always' | '
// @public (undocumented)
export type Boundary = HTMLElement | Array<HTMLElement> | 'clippingParents' | 'scrollParent' | 'window';

// Warning: (ae-internal-missing-underscore) The name "createArrowHeightStyles" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function createArrowHeightStyles(arrowHeight: number): {
width: string;
height: string;
};

// Warning: (ae-internal-missing-underscore) The name "createArrowStyles" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function createArrowStyles(options: CreateArrowStylesOptions): GriffelStyle;

// Warning: (ae-internal-missing-underscore) The name "CreateArrowStylesOptions" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type CreateArrowStylesOptions = {
arrowHeight: number | undefined;
Expand All @@ -42,8 +36,6 @@ export type CreateArrowStylesOptions = {
// @public
export function createVirtualElementFromClick(nativeEvent: MouseEvent): PositioningVirtualElement;

// Warning: (ae-internal-missing-underscore) The name "mergeArrowOffset" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function mergeArrowOffset(userOffset: Offset | undefined | null, arrowHeight: number): Offset;

Expand Down Expand Up @@ -109,17 +101,13 @@ export type PositioningVirtualElement = {
// @public (undocumented)
export function resolvePositioningShorthand(shorthand: PositioningShorthand | undefined | null): Readonly<PositioningProps>;

// Warning: (ae-internal-missing-underscore) The name "usePositioning" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function usePositioning(options: UsePositioningOptions): {
targetRef: React_2.MutableRefObject<any>;
containerRef: React_2.MutableRefObject<any>;
arrowRef: React_2.MutableRefObject<any>;
};

// Warning: (ae-internal-missing-underscore) The name "usePositioningMouseTarget" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const usePositioningMouseTarget: (initialState?: PositioningVirtualElement | (() => PositioningVirtualElement) | undefined) => readonly [PositioningVirtualElement | undefined, (event: React_2.MouseEvent | MouseEvent | undefined | null) => void];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import * as React_2 from 'react';
import type { Theme } from '@fluentui/react-theme';

// Warning: (ae-internal-missing-underscore) The name "Provider_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export const Provider_unstable: React_2.Provider<ProviderContextValue_unstable>;

Expand All @@ -24,45 +22,31 @@ export type ThemeClassNameContextValue_unstable = string;
// @public (undocumented)
export const ThemeClassNameProvider_unstable: React_2.Provider<string>;

// Warning: (ae-internal-missing-underscore) The name "ThemeContext_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export const ThemeContext_unstable: React_2.Context<ThemeContextValue_unstable>;

// Warning: (ae-internal-missing-underscore) The name "ThemeContextValue_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type ThemeContextValue_unstable = Theme | Partial<Theme> | undefined;

// Warning: (ae-internal-missing-underscore) The name "ThemeProvider_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export const ThemeProvider_unstable: React_2.Provider<ThemeContextValue_unstable>;

// Warning: (ae-internal-missing-underscore) The name "TooltipVisibilityContextValue_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type TooltipVisibilityContextValue_unstable = {
visibleTooltip?: {
hide: () => void;
};
};

// Warning: (ae-internal-missing-underscore) The name "TooltipVisibilityProvider_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export const TooltipVisibilityProvider_unstable: React_2.Provider<TooltipVisibilityContextValue_unstable>;

// @public (undocumented)
export function useFluent_unstable(): ProviderContextValue_unstable;

// Warning: (ae-internal-missing-underscore) The name "useThemeClassName_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function useThemeClassName_unstable(): ThemeClassNameContextValue_unstable;

// Warning: (ae-internal-missing-underscore) The name "useTooltipVisibility_unstable" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function useTooltipVisibility_unstable(): TooltipVisibilityContextValue_unstable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export interface UseModalAttributesOptions {
trapFocus?: boolean;
}

// Warning: (ae-internal-missing-underscore) The name "useTabsterAttributes" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const useTabsterAttributes: (props: Types.TabsterAttributeProps) => Types.TabsterDOMAttribute;

Expand Down
Loading

0 comments on commit 16aa65d

Please sign in to comment.