From 0f446a744fec0f7198aeba69eddb542f1ce14134 Mon Sep 17 00:00:00 2001 From: Vladimir Guguiev Date: Sun, 6 Sep 2020 21:13:08 +0200 Subject: [PATCH] improvement(esm): use full file paths in import module specifiers --- packages/demo/src/apps/ConsoleUI/index.tsx | 12 +- packages/react-sunbeam/.eslintrc.js | 3 +- packages/react-sunbeam/jest.config.js | 1 + .../jest/js-extension-resolver.js | 40 ++++++ packages/react-sunbeam/package.json | 2 + .../src/focus/FocusManager.spec.tsx | 6 +- .../react-sunbeam/src/focus/FocusManager.ts | 8 +- .../src/focus/FocusableTreeContext.ts | 2 +- .../src/focus/FocusableTreeUtils.ts | 4 +- .../src/focus/components/Focusable.spec.tsx | 8 +- .../src/focus/components/Focusable.tsx | 16 +-- .../SunbeamProvider/SunbeamProvider.spec.tsx | 6 +- .../components/SunbeamProvider/index.tsx | 20 +-- .../SunbeamProvider/useFocusPath.ts | 4 +- .../getClosestFocusableNodeInDirection.ts | 6 +- .../src/focus/getPreferredNode.ts | 6 +- .../hooks/useChildKeyPressTreeContextValue.ts | 2 +- .../src/focus/hooks/useFocusable.spec.tsx | 12 +- .../src/focus/hooks/useFocusable.ts | 14 +- .../src/focus/hooks/useKeyPressTreeNode.ts | 4 +- .../src/focus/hooks/useSunbeam.ts | 2 +- packages/react-sunbeam/src/focus/index.ts | 20 +-- packages/react-sunbeam/src/focus/types.ts | 2 +- packages/react-sunbeam/src/index.ts | 8 +- .../keyPressManagement.integration.spec.tsx | 10 +- .../KeyPressManager.spec.ts | 10 +- .../keyPressManagement/KeyPressTreeContext.ts | 2 +- .../src/keyPressManagement/index.ts | 6 +- .../src/keyPressManagement/types.ts | 4 +- .../frustumFilteringUtils.spec.ts | 4 +- .../frustumFilteringUtils.ts | 4 +- .../src/spatialNavigation/getBestCandidate.ts | 6 +- .../src/spatialNavigation/index.ts | 6 +- packages/react-sunbeam/tsconfig.json | 3 +- yarn.lock | 128 +++++++++++++++++- 35 files changed, 277 insertions(+), 114 deletions(-) create mode 100644 packages/react-sunbeam/jest/js-extension-resolver.js diff --git a/packages/demo/src/apps/ConsoleUI/index.tsx b/packages/demo/src/apps/ConsoleUI/index.tsx index 9073b9f..add14c4 100644 --- a/packages/demo/src/apps/ConsoleUI/index.tsx +++ b/packages/demo/src/apps/ConsoleUI/index.tsx @@ -2,13 +2,7 @@ import * as React from "react" import { useCallback } from "react" import { useHistory } from "react-router-dom" -import { - Direction, - Focusable, - FocusableTreeNode, - FocusEvent, - unstable_defaultGetPreferredChildOnFocusReceive, -} from "react-sunbeam" +import { Direction, Focusable, FocusableTreeNode, FocusEvent, defaultGetPreferredChildOnFocus } from "react-sunbeam" import { ProfilesMenu } from "./ProfilesMenu" import { GamesGallery } from "./GamesGallery" @@ -52,7 +46,7 @@ export function ConsoleUI() { history.goBack() }} - unstable_getPreferredChildOnFocusReceive={({ + getPreferredChildOnFocus={({ focusableChildren, focusOrigin, direction, @@ -66,7 +60,7 @@ export function ConsoleUI() { if (focusableChildren.has("gamesGallery")) return focusableChildren.get("gamesGallery") } - return unstable_defaultGetPreferredChildOnFocusReceive({ + return defaultGetPreferredChildOnFocus({ focusableChildren, focusOrigin, direction, diff --git a/packages/react-sunbeam/.eslintrc.js b/packages/react-sunbeam/.eslintrc.js index 8f90134..3c51220 100644 --- a/packages/react-sunbeam/.eslintrc.js +++ b/packages/react-sunbeam/.eslintrc.js @@ -9,7 +9,7 @@ module.exports = { version: "detect", }, }, - plugins: ["@typescript-eslint", "react", "react-hooks"], + plugins: ["@typescript-eslint", "react", "react-hooks", "import"], extends: [ "plugin:@typescript-eslint/recommended", "plugin:react/recommended", @@ -23,5 +23,6 @@ module.exports = { "@typescript-eslint/no-use-before-define": ["error", { functions: false }], "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], "@typescript-eslint/no-empty-function": "off", + "import/extensions": ["error", "always"], }, } diff --git a/packages/react-sunbeam/jest.config.js b/packages/react-sunbeam/jest.config.js index cb3d7fa..11cab74 100644 --- a/packages/react-sunbeam/jest.config.js +++ b/packages/react-sunbeam/jest.config.js @@ -1,4 +1,5 @@ module.exports = { preset: "ts-jest", testMatch: ["/src/**/*.spec.ts", "/src/**/*.spec.tsx"], + resolver: "/jest/js-extension-resolver", } diff --git a/packages/react-sunbeam/jest/js-extension-resolver.js b/packages/react-sunbeam/jest/js-extension-resolver.js new file mode 100644 index 0000000..c2aa720 --- /dev/null +++ b/packages/react-sunbeam/jest/js-extension-resolver.js @@ -0,0 +1,40 @@ +let defaultResolver + +function requireDefaultResolver() { + if (!defaultResolver) { + try { + defaultResolver = require(`jest-resolve/build/defaultResolver`).default + } catch (error) { + defaultResolver = require(`jest-resolve/build/default_resolver`).default + } + } + + return defaultResolver +} + +function resolveWithTypeScript(resolver, request, options) { + let error + for (const ext of [".ts", ".tsx"]) { + try { + const result = resolver(request.replace(/\.js$/, ext), options) + return result + } catch (err) { + error = err + } + } + throw error +} + +module.exports = (request, options) => { + let { defaultResolver: resolver } = options + + if (!resolver) { + resolver = requireDefaultResolver() + } + + try { + return resolver(request, options) + } catch (e) { + return resolveWithTypeScript(resolver, request, options) + } +} diff --git a/packages/react-sunbeam/package.json b/packages/react-sunbeam/package.json index 3b19c8a..71b3d2f 100644 --- a/packages/react-sunbeam/package.json +++ b/packages/react-sunbeam/package.json @@ -33,9 +33,11 @@ "concurrently": "^5.1.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", + "eslint-plugin-import": "^2.22.0", "eslint-plugin-react": "^7.19.0", "eslint-plugin-react-hooks": "^2.5.1", "jest": "^25.1.0", + "jest-ts-webcompat-resolver": "^1.0.0", "react": "^16.13.1", "ts-jest": "^25.2.1", "typescript": "^3.8.3" diff --git a/packages/react-sunbeam/src/focus/FocusManager.spec.tsx b/packages/react-sunbeam/src/focus/FocusManager.spec.tsx index c7eaf0b..26b8931 100644 --- a/packages/react-sunbeam/src/focus/FocusManager.spec.tsx +++ b/packages/react-sunbeam/src/focus/FocusManager.spec.tsx @@ -1,8 +1,8 @@ import * as React from "react" import { act, render } from "@testing-library/react" -import { SunbeamProvider } from "./components/SunbeamProvider" -import { Focusable } from "./components/Focusable" -import { FocusManager } from "./FocusManager" +import { SunbeamProvider } from "./components/SunbeamProvider/index.js" +import { Focusable } from "./components/Focusable.js" +import { FocusManager } from "./FocusManager.js" describe("FocusManager", () => { describe("setFocus", () => { diff --git a/packages/react-sunbeam/src/focus/FocusManager.ts b/packages/react-sunbeam/src/focus/FocusManager.ts index 7c5a88a..e94a85b 100644 --- a/packages/react-sunbeam/src/focus/FocusManager.ts +++ b/packages/react-sunbeam/src/focus/FocusManager.ts @@ -1,7 +1,7 @@ -import { FocusableTreeNode, FocusPath } from "./types" -import { getNodeByPath, getPathToNode, getSiblings, validateAndFixFocusPathIfNeeded } from "./FocusableTreeUtils" -import { Direction, getBestCandidate } from "../spatialNavigation" -import { boxesWithinFrustumOfOrigin } from "../spatialNavigation/frustumFilteringUtils" +import type { FocusableTreeNode, FocusPath } from "./types.js" +import { getNodeByPath, getPathToNode, getSiblings, validateAndFixFocusPathIfNeeded } from "./FocusableTreeUtils.js" +import { Direction, getBestCandidate } from "../spatialNavigation/index.js" +import { boxesWithinFrustumOfOrigin } from "../spatialNavigation/frustumFilteringUtils.js" interface Options { initialFocusPath: FocusPath diff --git a/packages/react-sunbeam/src/focus/FocusableTreeContext.ts b/packages/react-sunbeam/src/focus/FocusableTreeContext.ts index 896b266..d1566c8 100755 --- a/packages/react-sunbeam/src/focus/FocusableTreeContext.ts +++ b/packages/react-sunbeam/src/focus/FocusableTreeContext.ts @@ -1,5 +1,5 @@ import { createContext } from "react" -import { FocusableNodesMap, FocusableTreeNode } from "./types" +import type { FocusableNodesMap, FocusableTreeNode } from "./types.js" export interface FocusableTreeContextValue { addFocusableToMap: (focusableChildrenMap: FocusableNodesMap, focusableTreeNode: FocusableTreeNode) => void diff --git a/packages/react-sunbeam/src/focus/FocusableTreeUtils.ts b/packages/react-sunbeam/src/focus/FocusableTreeUtils.ts index 4ecd7f1..0f795ce 100644 --- a/packages/react-sunbeam/src/focus/FocusableTreeUtils.ts +++ b/packages/react-sunbeam/src/focus/FocusableTreeUtils.ts @@ -1,5 +1,5 @@ -import { FocusableNodesMap, FocusableTreeNode, FocusPath } from "./types" -import { FOCUSABLE_TREE_ROOT_KEY } from "./Constants" +import type { FocusableNodesMap, FocusableTreeNode, FocusPath } from "./types.js" +import { FOCUSABLE_TREE_ROOT_KEY } from "./Constants.js" export function validateAndFixFocusPathIfNeeded(focusPath: FocusPath, treeRoot: FocusableTreeNode): FocusPath | null { let fixedFocusPath: string[] | null = null // only initialize if we need to fix the path diff --git a/packages/react-sunbeam/src/focus/components/Focusable.spec.tsx b/packages/react-sunbeam/src/focus/components/Focusable.spec.tsx index a49e0f3..ed9b13b 100644 --- a/packages/react-sunbeam/src/focus/components/Focusable.spec.tsx +++ b/packages/react-sunbeam/src/focus/components/Focusable.spec.tsx @@ -1,9 +1,9 @@ import React from "react" import { act, render } from "@testing-library/react" -import { FocusManager, SunbeamProvider } from ".." -import { Focusable } from "./Focusable" -import { mockGetBoundingClientRect, waitForFocusTreeUpdates } from "../../test/utils" -import { Direction } from "../../spatialNavigation" +import { FocusManager, SunbeamProvider } from "../index.js" +import { Focusable } from "./Focusable.js" +import { mockGetBoundingClientRect, waitForFocusTreeUpdates } from "../../test/utils.js" +import { Direction } from "../../spatialNavigation/index.js" describe("Focusable", () => { mockGetBoundingClientRect() diff --git a/packages/react-sunbeam/src/focus/components/Focusable.tsx b/packages/react-sunbeam/src/focus/components/Focusable.tsx index 166b03f..f4f826a 100644 --- a/packages/react-sunbeam/src/focus/components/Focusable.tsx +++ b/packages/react-sunbeam/src/focus/components/Focusable.tsx @@ -1,13 +1,13 @@ import * as React from "react" import { useMemo, useRef, useCallback, useEffect } from "react" -import { FocusableTreeContext } from "../FocusableTreeContext" -import { BoundingBox, Direction } from "../../spatialNavigation" -import { KeyPressListener, KeyPressTreeContextProvider } from "../../keyPressManagement" -import { FocusableNodesMap, FocusableTreeNode, FocusEvent } from "../types" -import { useGeneratedFocusKey } from "../hooks/useGeneratedFocusKey" -import { useOnFocusedChange } from "../hooks/useOnFocusedChange" -import { useKeyPressTreeNode } from "../hooks/useKeyPressTreeNode" -import getPreferredNode from "../getPreferredNode" +import { FocusableTreeContext } from "../FocusableTreeContext.js" +import type { BoundingBox, Direction } from "../../spatialNavigation/index.js" +import { KeyPressListener, KeyPressTreeContextProvider } from "../../keyPressManagement/index.js" +import type { FocusableNodesMap, FocusableTreeNode, FocusEvent } from "../types.js" +import { useGeneratedFocusKey } from "../hooks/useGeneratedFocusKey.js" +import { useOnFocusedChange } from "../hooks/useOnFocusedChange.js" +import { useKeyPressTreeNode } from "../hooks/useKeyPressTreeNode.js" +import getPreferredNode from "../getPreferredNode.js" interface Props { focusKey?: string diff --git a/packages/react-sunbeam/src/focus/components/SunbeamProvider/SunbeamProvider.spec.tsx b/packages/react-sunbeam/src/focus/components/SunbeamProvider/SunbeamProvider.spec.tsx index 690907c..49d2466 100644 --- a/packages/react-sunbeam/src/focus/components/SunbeamProvider/SunbeamProvider.spec.tsx +++ b/packages/react-sunbeam/src/focus/components/SunbeamProvider/SunbeamProvider.spec.tsx @@ -1,8 +1,8 @@ import React from "react" import { act, render, fireEvent } from "@testing-library/react" -import { Focusable, FocusManager } from "../.." -import { KeyPressManager } from "../../../keyPressManagement" -import { SunbeamProvider } from "." +import { Focusable, FocusManager } from "../../index.js" +import { KeyPressManager } from "../../../keyPressManagement/index.js" +import { SunbeamProvider } from "./index.js" describe("", () => { it("should call focusManager.revalidateFocusPath() only once when multiple nodes are added/removed from the tree", async () => { diff --git a/packages/react-sunbeam/src/focus/components/SunbeamProvider/index.tsx b/packages/react-sunbeam/src/focus/components/SunbeamProvider/index.tsx index b636bec..7cc30a1 100755 --- a/packages/react-sunbeam/src/focus/components/SunbeamProvider/index.tsx +++ b/packages/react-sunbeam/src/focus/components/SunbeamProvider/index.tsx @@ -1,20 +1,20 @@ import * as React from "react" import { useCallback, useEffect, useMemo, useRef } from "react" -import { FOCUSABLE_TREE_ROOT_KEY } from "../../Constants" -import { FocusableTreeContext, FocusableTreeContextValue } from "../../FocusableTreeContext" -import { SunbeamContext } from "../../SunbeamContext" -import { FocusableNodesMap, FocusableTreeNode, FocusPath } from "../../types" -import { FocusManager } from "../../FocusManager" +import { FOCUSABLE_TREE_ROOT_KEY } from "../../Constants.js" +import { FocusableTreeContext, FocusableTreeContextValue } from "../../FocusableTreeContext.js" +import { SunbeamContext } from "../../SunbeamContext.js" +import type { FocusableNodesMap, FocusableTreeNode, FocusPath } from "../../types.js" +import type { FocusManager } from "../../FocusManager.js" import { KeyPressManager, KeyPressListener, KeyPressTreeContextProvider, KeyPressTreeNode, -} from "../../../keyPressManagement" -import { BoundingBox, Direction } from "../../../spatialNavigation" -import getPreferredNode from "../../getPreferredNode" -import { useChildKeyPressTreeContextValue } from "../../hooks/useChildKeyPressTreeContextValue" -import useFocusPath from "./useFocusPath" +} from "../../../keyPressManagement/index.js" +import type { BoundingBox, Direction } from "../../../spatialNavigation/index.js" +import getPreferredNode from "../../getPreferredNode.js" +import { useChildKeyPressTreeContextValue } from "../../hooks/useChildKeyPressTreeContextValue.js" +import useFocusPath from "./useFocusPath.js" type Props = { focusManager: FocusManager diff --git a/packages/react-sunbeam/src/focus/components/SunbeamProvider/useFocusPath.ts b/packages/react-sunbeam/src/focus/components/SunbeamProvider/useFocusPath.ts index c8f7336..735910a 100644 --- a/packages/react-sunbeam/src/focus/components/SunbeamProvider/useFocusPath.ts +++ b/packages/react-sunbeam/src/focus/components/SunbeamProvider/useFocusPath.ts @@ -1,6 +1,6 @@ import { useState, useEffect } from "react" -import { FocusManager } from "../../FocusManager" -import { FocusPath } from "../../types" +import type { FocusManager } from "../../FocusManager.js" +import type { FocusPath } from "../../types.js" export default function useFocusPath( focusManager: FocusManager, diff --git a/packages/react-sunbeam/src/focus/getClosestFocusableNodeInDirection.ts b/packages/react-sunbeam/src/focus/getClosestFocusableNodeInDirection.ts index 9491422..58aac7e 100644 --- a/packages/react-sunbeam/src/focus/getClosestFocusableNodeInDirection.ts +++ b/packages/react-sunbeam/src/focus/getClosestFocusableNodeInDirection.ts @@ -1,5 +1,5 @@ -import { FocusableNodesMap, FocusableTreeNode } from "./types" -import { Direction, getBestCandidate, BoundingBox } from "../spatialNavigation" +import type { FocusableNodesMap, FocusableTreeNode } from "./types.js" +import { Direction, getBestCandidate, BoundingBox } from "../spatialNavigation/index.js" export function getClosestFocusableNodeInDirection( focusableNodes: FocusableNodesMap, @@ -7,7 +7,7 @@ export function getClosestFocusableNodeInDirection( direction: Direction ): FocusableTreeNode | undefined { const focusableNodesArray = Array.from(focusableNodes.values()) - const nodeBoxes = focusableNodesArray.map(node => node.getBoundingBox()) + const nodeBoxes = focusableNodesArray.map((node) => node.getBoundingBox()) const bestChildCandidateBox = getBestCandidate(focusOrigin, nodeBoxes, direction) if (!bestChildCandidateBox) return undefined diff --git a/packages/react-sunbeam/src/focus/getPreferredNode.ts b/packages/react-sunbeam/src/focus/getPreferredNode.ts index 492d917..f05540d 100644 --- a/packages/react-sunbeam/src/focus/getPreferredNode.ts +++ b/packages/react-sunbeam/src/focus/getPreferredNode.ts @@ -1,6 +1,6 @@ -import { FocusableNodesMap, FocusableTreeNode } from "./types" -import { Direction } from "../spatialNavigation" -import { getClosestFocusableNodeInDirection } from "./getClosestFocusableNodeInDirection" +import type { FocusableNodesMap, FocusableTreeNode } from "./types.js" +import type { Direction } from "../spatialNavigation/index.js" +import { getClosestFocusableNodeInDirection } from "./getClosestFocusableNodeInDirection.js" interface Arguments { nodes: FocusableNodesMap diff --git a/packages/react-sunbeam/src/focus/hooks/useChildKeyPressTreeContextValue.ts b/packages/react-sunbeam/src/focus/hooks/useChildKeyPressTreeContextValue.ts index 4ca0bb6..32c99dd 100644 --- a/packages/react-sunbeam/src/focus/hooks/useChildKeyPressTreeContextValue.ts +++ b/packages/react-sunbeam/src/focus/hooks/useChildKeyPressTreeContextValue.ts @@ -1,5 +1,5 @@ import { MutableRefObject, useCallback, useMemo } from "react" -import { KeyPressTreeNode, KeyPressTreeContextValue } from "../../keyPressManagement" +import type { KeyPressTreeNode, KeyPressTreeContextValue } from "../../keyPressManagement/index.js" export function useChildKeyPressTreeContextValue( childKeyPressTreeNodeRef: MutableRefObject diff --git a/packages/react-sunbeam/src/focus/hooks/useFocusable.spec.tsx b/packages/react-sunbeam/src/focus/hooks/useFocusable.spec.tsx index 1bbdd48..4a374a8 100644 --- a/packages/react-sunbeam/src/focus/hooks/useFocusable.spec.tsx +++ b/packages/react-sunbeam/src/focus/hooks/useFocusable.spec.tsx @@ -1,11 +1,11 @@ import React, { useRef } from "react" import { render, act } from "@testing-library/react" -import { FocusManager } from "../FocusManager" -import { SunbeamProvider } from "../components/SunbeamProvider" -import { useFocusable } from "./useFocusable" -import { Focusable } from ".." -import { mockGetBoundingClientRect, waitForFocusTreeUpdates } from "../../test/utils" -import { Direction } from "../../spatialNavigation" +import { FocusManager } from "../FocusManager.js" +import { SunbeamProvider } from "../components/SunbeamProvider/index.js" +import { useFocusable } from "./useFocusable.js" +import { Focusable } from "../index.js" +import { mockGetBoundingClientRect, waitForFocusTreeUpdates } from "../../test/utils.js" +import { Direction } from "../../spatialNavigation/index.js" describe("useFocusable", () => { mockGetBoundingClientRect() diff --git a/packages/react-sunbeam/src/focus/hooks/useFocusable.ts b/packages/react-sunbeam/src/focus/hooks/useFocusable.ts index 93601f8..5436e29 100644 --- a/packages/react-sunbeam/src/focus/hooks/useFocusable.ts +++ b/packages/react-sunbeam/src/focus/hooks/useFocusable.ts @@ -1,11 +1,11 @@ import React, { RefObject, useCallback, useMemo, useEffect } from "react" -import { FocusableTreeNode, FocusEvent } from "../types" -import { BoundingBox, Direction } from "../../spatialNavigation" -import { FocusableTreeContext } from "../FocusableTreeContext" -import { useGeneratedFocusKey } from "./useGeneratedFocusKey" -import { useOnFocusedChange } from "./useOnFocusedChange" -import { useKeyPressTreeNode } from "./useKeyPressTreeNode" -import { KeyPressListener } from "../../keyPressManagement" +import type { FocusableTreeNode, FocusEvent } from "../types.js" +import type { BoundingBox, Direction } from "../../spatialNavigation/index.js" +import { FocusableTreeContext } from "../FocusableTreeContext.js" +import { useGeneratedFocusKey } from "./useGeneratedFocusKey.js" +import { useOnFocusedChange } from "./useOnFocusedChange.js" +import { useKeyPressTreeNode } from "./useKeyPressTreeNode.js" +import type { KeyPressListener } from "../../keyPressManagement/index.js" // TODO: add other options: () => ClientRect | ClientRect type Element = RefObject<{ diff --git a/packages/react-sunbeam/src/focus/hooks/useKeyPressTreeNode.ts b/packages/react-sunbeam/src/focus/hooks/useKeyPressTreeNode.ts index b266ef3..d6a1384 100644 --- a/packages/react-sunbeam/src/focus/hooks/useKeyPressTreeNode.ts +++ b/packages/react-sunbeam/src/focus/hooks/useKeyPressTreeNode.ts @@ -4,8 +4,8 @@ import { KeyPressTreeContextValue, KeyPressTreeNode, useKeyPressTreeContext, -} from "../../keyPressManagement" -import { useChildKeyPressTreeContextValue } from "./useChildKeyPressTreeContextValue" +} from "../../keyPressManagement/index.js" +import { useChildKeyPressTreeContextValue } from "./useChildKeyPressTreeContextValue.js" export function useKeyPressTreeNode({ focused, diff --git a/packages/react-sunbeam/src/focus/hooks/useSunbeam.ts b/packages/react-sunbeam/src/focus/hooks/useSunbeam.ts index 03072b5..773440d 100644 --- a/packages/react-sunbeam/src/focus/hooks/useSunbeam.ts +++ b/packages/react-sunbeam/src/focus/hooks/useSunbeam.ts @@ -1,5 +1,5 @@ import { useContext } from "react" -import { SunbeamContext, SunbeamContextValue } from "../SunbeamContext" +import { SunbeamContext, SunbeamContextValue } from "../SunbeamContext.js" export function useSunbeam(): SunbeamContextValue { return useContext(SunbeamContext) diff --git a/packages/react-sunbeam/src/focus/index.ts b/packages/react-sunbeam/src/focus/index.ts index 9190fcb..1e7cad1 100644 --- a/packages/react-sunbeam/src/focus/index.ts +++ b/packages/react-sunbeam/src/focus/index.ts @@ -1,16 +1,16 @@ -import getPreferredNode from "./getPreferredNode" -import { FocusableTreeNode } from "./types" -import { Direction } from "../spatialNavigation" +import getPreferredNode from "./getPreferredNode.js" +import type { FocusableTreeNode } from "./types.js" +import type { Direction } from "../spatialNavigation/index.js" -export { FocusEvent, FocusableTreeNode } from "./types" -export { FocusManager } from "./FocusManager" -export { Focusable } from "./components/Focusable" -export { SunbeamProvider } from "./components/SunbeamProvider" -export { useSunbeam } from "./hooks/useSunbeam" -export { useFocusable } from "./hooks/useFocusable" +export type { FocusEvent, FocusableTreeNode } from "./types.js" +export { FocusManager } from "./FocusManager.js" +export { Focusable } from "./components/Focusable.js" +export { SunbeamProvider } from "./components/SunbeamProvider/index.js" +export { useSunbeam } from "./hooks/useSunbeam.js" +export { useFocusable } from "./hooks/useFocusable.js" // eslint-disable-next-line @typescript-eslint/camelcase -export function unstable_defaultGetPreferredChildOnFocusReceive({ +export function defaultGetPreferredChildOnFocus({ focusableChildren, focusOrigin, direction, diff --git a/packages/react-sunbeam/src/focus/types.ts b/packages/react-sunbeam/src/focus/types.ts index 9f765ca..0082b46 100644 --- a/packages/react-sunbeam/src/focus/types.ts +++ b/packages/react-sunbeam/src/focus/types.ts @@ -1,4 +1,4 @@ -import { BoundingBox, Direction } from "../spatialNavigation" +import type { BoundingBox, Direction } from "../spatialNavigation/index.js" export type FocusEvent = { getBoundingClientRect: () => ClientRect diff --git a/packages/react-sunbeam/src/index.ts b/packages/react-sunbeam/src/index.ts index 714cdbd..700870d 100644 --- a/packages/react-sunbeam/src/index.ts +++ b/packages/react-sunbeam/src/index.ts @@ -7,7 +7,7 @@ export { FocusableTreeNode, FocusEvent, // eslint-disable-next-line @typescript-eslint/camelcase - unstable_defaultGetPreferredChildOnFocusReceive, -} from "./focus" -export { Direction } from "./spatialNavigation" -export { KeyPressManager, KeyPressListener } from "./keyPressManagement" + defaultGetPreferredChildOnFocus, +} from "./focus/index.js" +export { Direction } from "./spatialNavigation/index.js" +export { KeyPressManager, KeyPressListener } from "./keyPressManagement/index.js" diff --git a/packages/react-sunbeam/src/keyPressManagement.integration.spec.tsx b/packages/react-sunbeam/src/keyPressManagement.integration.spec.tsx index 2958b2b..d6f1525 100644 --- a/packages/react-sunbeam/src/keyPressManagement.integration.spec.tsx +++ b/packages/react-sunbeam/src/keyPressManagement.integration.spec.tsx @@ -1,15 +1,15 @@ import React, { useRef } from "react" import { act, render, fireEvent } from "@testing-library/react" -import { SunbeamProvider, FocusManager, Focusable, useFocusable } from "./focus" -import { KeyPressListener } from "./keyPressManagement" +import { SunbeamProvider, FocusManager, Focusable, useFocusable } from "./focus/index.js" +import type { KeyPressListener } from "./keyPressManagement/index.js" describe("Key press management integration", () => { test("Nested key handlers", () => { - const sunbeamProviderKeyHandler = jest.fn(event => event.stopPropagation()) - const focusable1KeyHandler = jest.fn(event => event.stopPropagation()) + const sunbeamProviderKeyHandler = jest.fn((event) => event.stopPropagation()) + const focusable1KeyHandler = jest.fn((event) => event.stopPropagation()) const focusable2KeyHandler = jest.fn() const focusableButton1KeyHandler = jest.fn() - const focusableButton2KeyHandler = jest.fn(event => event.stopPropagation()) + const focusableButton2KeyHandler = jest.fn((event) => event.stopPropagation()) function FocusableButton({ focusKey, onKeyPress }: { focusKey: string; onKeyPress: KeyPressListener }) { const ref = useRef(null) diff --git a/packages/react-sunbeam/src/keyPressManagement/KeyPressManager.spec.ts b/packages/react-sunbeam/src/keyPressManagement/KeyPressManager.spec.ts index dfa1377..8ed6d39 100644 --- a/packages/react-sunbeam/src/keyPressManagement/KeyPressManager.spec.ts +++ b/packages/react-sunbeam/src/keyPressManagement/KeyPressManager.spec.ts @@ -1,4 +1,4 @@ -import { KeyPressManager } from "./KeyPressManager" +import { KeyPressManager } from "./KeyPressManager.js" import { fireEvent } from "@testing-library/react" describe("KeyPressManager", () => { @@ -7,7 +7,7 @@ describe("KeyPressManager", () => { const keyboardEvent = new KeyboardEvent("keydown", { key: "x", }) - const managedListener = jest.fn(event => event.stopImmediatePropagation()) + const managedListener = jest.fn((event) => event.stopImmediatePropagation()) const otherListener = jest.fn() manager.addListener(managedListener) @@ -26,7 +26,7 @@ describe("KeyPressManager", () => { key: "x", cancelable: true, }) - const managedListener = jest.fn(event => event.preventDefault()) + const managedListener = jest.fn((event) => event.preventDefault()) manager.addListener(managedListener) fireEvent(window, keyboardEvent) @@ -57,7 +57,7 @@ describe("KeyPressManager", () => { key: "x", }) const listener1 = jest.fn() - const listener2 = jest.fn(event => event.stopPropagation()) + const listener2 = jest.fn((event) => event.stopPropagation()) manager.addListener(listener1) manager.addListener(listener2) @@ -74,7 +74,7 @@ describe("KeyPressManager", () => { key: "k", }) const listener1 = jest.fn() - const listener2 = jest.fn(event => event.stopPropagation()) + const listener2 = jest.fn((event) => event.stopPropagation()) manager.addListener(listener1) manager.addListener(listener2) diff --git a/packages/react-sunbeam/src/keyPressManagement/KeyPressTreeContext.ts b/packages/react-sunbeam/src/keyPressManagement/KeyPressTreeContext.ts index fcff3ae..31db928 100644 --- a/packages/react-sunbeam/src/keyPressManagement/KeyPressTreeContext.ts +++ b/packages/react-sunbeam/src/keyPressManagement/KeyPressTreeContext.ts @@ -1,5 +1,5 @@ import { createContext, useContext } from "react" -import { KeyPressTreeNode } from "./types" +import type { KeyPressTreeNode } from "./types.js" export interface KeyPressTreeContextValue { registerActiveKeyPressTreeNode?: (node: KeyPressTreeNode) => void diff --git a/packages/react-sunbeam/src/keyPressManagement/index.ts b/packages/react-sunbeam/src/keyPressManagement/index.ts index 86de4cf..8acc846 100644 --- a/packages/react-sunbeam/src/keyPressManagement/index.ts +++ b/packages/react-sunbeam/src/keyPressManagement/index.ts @@ -1,3 +1,3 @@ -export { KeyPressManager, KeyPressListener } from "./KeyPressManager" -export { KeyPressTreeContextProvider, useKeyPressTreeContext, KeyPressTreeContextValue } from "./KeyPressTreeContext" -export { KeyPressTreeNode } from "./types" +export { KeyPressManager, KeyPressListener } from "./KeyPressManager.js" +export { KeyPressTreeContextProvider, useKeyPressTreeContext, KeyPressTreeContextValue } from "./KeyPressTreeContext.js" +export { KeyPressTreeNode } from "./types.js" diff --git a/packages/react-sunbeam/src/keyPressManagement/types.ts b/packages/react-sunbeam/src/keyPressManagement/types.ts index 5b6a12e..5f93e1c 100644 --- a/packages/react-sunbeam/src/keyPressManagement/types.ts +++ b/packages/react-sunbeam/src/keyPressManagement/types.ts @@ -1,5 +1,5 @@ -import { MutableRefObject } from "react" -import { KeyPressListener } from "./KeyPressManager" +import type { MutableRefObject } from "react" +import type { KeyPressListener } from "./KeyPressManager.js" export type KeyPressTreeNode = { listenerRef: MutableRefObject diff --git a/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.spec.ts b/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.spec.ts index 6716e0e..6b3f8dc 100644 --- a/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.spec.ts +++ b/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.spec.ts @@ -1,5 +1,5 @@ -import { boxesWithinFrustumOfOrigin } from "./frustumFilteringUtils" -import { Direction } from "./types" +import { boxesWithinFrustumOfOrigin } from "./frustumFilteringUtils.js" +import { Direction } from "./types.js" describe("isWithinTopFrustumOf", () => { const originBox = { diff --git a/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.ts b/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.ts index 4ffd31b..af33af6 100755 --- a/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.ts +++ b/packages/react-sunbeam/src/spatialNavigation/frustumFilteringUtils.ts @@ -1,5 +1,5 @@ -import { BoundingBox, Direction } from "./types" -import absurd from "../shared/absurd" +import { BoundingBox, Direction } from "./types.js" +import absurd from "../shared/absurd.js" // ax + bx + c = 0 interface Line { diff --git a/packages/react-sunbeam/src/spatialNavigation/getBestCandidate.ts b/packages/react-sunbeam/src/spatialNavigation/getBestCandidate.ts index 91bfe58..43d8334 100755 --- a/packages/react-sunbeam/src/spatialNavigation/getBestCandidate.ts +++ b/packages/react-sunbeam/src/spatialNavigation/getBestCandidate.ts @@ -1,6 +1,6 @@ -import { BoundingBox, Direction } from "./types" -import { boxesWithinFrustumOfOrigin } from "./frustumFilteringUtils" -import absurd from "../shared/absurd" +import { BoundingBox, Direction } from "./types.js" +import { boxesWithinFrustumOfOrigin } from "./frustumFilteringUtils.js" +import absurd from "../shared/absurd.js" function getMinkowskiDifference(boxA: BoundingBox, boxB: BoundingBox): BoundingBox { const left = boxA.left - boxB.right diff --git a/packages/react-sunbeam/src/spatialNavigation/index.ts b/packages/react-sunbeam/src/spatialNavigation/index.ts index 2671b00..00eebc2 100755 --- a/packages/react-sunbeam/src/spatialNavigation/index.ts +++ b/packages/react-sunbeam/src/spatialNavigation/index.ts @@ -1,5 +1,5 @@ -import { BoundingBox as BoundingBoxType } from "./types" -export { Direction } from "./types" -export { default as getBestCandidate } from "./getBestCandidate" +import type { BoundingBox as BoundingBoxType } from "./types.js" +export { Direction } from "./types.js" +export { default as getBestCandidate } from "./getBestCandidate.js" export type BoundingBox = BoundingBoxType diff --git a/packages/react-sunbeam/tsconfig.json b/packages/react-sunbeam/tsconfig.json index 40805ae..1465972 100644 --- a/packages/react-sunbeam/tsconfig.json +++ b/packages/react-sunbeam/tsconfig.json @@ -7,7 +7,8 @@ "strict": true, "esModuleInterop": true, "jsx": "react", - "rootDir": "src" + "rootDir": "src", + "importsNotUsedAsValues": "error" }, "exclude": ["dist"] } diff --git a/yarn.lock b/yarn.lock index 6b53110..ff4dfe9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2262,6 +2262,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -2684,6 +2689,14 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +array.prototype.flat@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -3576,6 +3589,11 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + conventional-changelog-angular@^1.3.3: version "1.6.6" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz#b27f2b315c16d0a1f23eb181309d0e6a4698ea0f" @@ -4075,7 +4093,7 @@ deasync@^0.1.14: bindings "^1.5.0" node-addon-api "^1.7.1" -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -4254,6 +4272,14 @@ dir-glob@^2.2.2: dependencies: path-type "^3.0.0" +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -4542,6 +4568,41 @@ eslint-config-prettier@^6.10.1: dependencies: get-stdin "^6.0.0" +eslint-import-resolver-node@^0.3.3: + version "0.3.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.22.0: + version "2.22.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz#92f7736fe1fde3e2de77623c838dd992ff5ffb7e" + integrity sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg== + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.3" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + eslint-plugin-react-hooks@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0" @@ -4956,7 +5017,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= @@ -6621,6 +6682,11 @@ jest-snapshot@^25.1.0: pretty-format "^25.1.0" semver "^7.1.1" +jest-ts-webcompat-resolver@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jest-ts-webcompat-resolver/-/jest-ts-webcompat-resolver-1.0.0.tgz#a554eb77446e1a8d2aabb810d6302bffaa00095c" + integrity sha512-BFoaU7LeYqZNnTYEr6iMRf87xdCQntNc/Wk8YpzDBcuz+CIZ0JsTtzuMAMnKiEgTRTC1wRWLUo2RlVjVijBcHQ== + jest-util@^25.1.0: version "25.1.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.1.0.tgz#7bc56f7b2abd534910e9fa252692f50624c897d9" @@ -6922,6 +6988,16 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -8306,6 +8382,13 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -8378,6 +8461,13 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -9108,6 +9198,14 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -9125,6 +9223,15 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -9446,6 +9553,13 @@ resolve@1.x, resolve@^1.1.5, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.15.1, r dependencies: path-parse "^1.0.6" +resolve@^1.13.1, resolve@^1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -10592,6 +10706,16 @@ ts-jest@^25.2.1: semver "^5.5" yargs-parser "^16.1.0" +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"