chore(repo): enable enforce-module-boundaries on nx repo (#16864)
This commit is contained in:
parent
284fedab46
commit
846320a6b9
@ -35,6 +35,24 @@
|
||||
"rules": {
|
||||
"@nx/workspace/valid-schema-description": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {
|
||||
"@nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
{
|
||||
"enforceBuildableLibDependency": true,
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
"sourceTag": "*",
|
||||
"onlyDependOnLibsWithTags": ["*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
1
graph/client-e2e/src/globals.d.ts
vendored
1
graph/client-e2e/src/globals.d.ts
vendored
@ -1,2 +1,3 @@
|
||||
// ensure we have the types for the externalApi on window
|
||||
// eslint-disable-next-line @nx/enforce-module-boundaries
|
||||
export type { global } from 'graph/client/src/globals';
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { GraphPerfReport } from '../../interfaces';
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import {
|
||||
ProjectGraphDependency,
|
||||
ProjectGraphProjectNode,
|
||||
} from 'nx/src/config/project-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { ActionObject, ActorRef, State, StateNodeConfig } from 'xstate';
|
||||
import { GraphRenderEvents } from '../../machines/interfaces';
|
||||
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphDependency,
|
||||
ProjectGraphProjectNode,
|
||||
} from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { interpret } from 'xstate';
|
||||
import { projectGraphMachine } from './project-graph.machine';
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphProjectNode } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { ProjectGraphSelector } from '../hooks/use-project-graph-selector';
|
||||
import { GraphPerfReport, WorkspaceLayout } from '../../interfaces';
|
||||
import { TracingAlgorithmType } from './interfaces';
|
||||
|
||||
@ -4,8 +4,10 @@ import {
|
||||
FlagIcon,
|
||||
MapPinIcon,
|
||||
} from '@heroicons/react/24/outline';
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphNode } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { useProjectGraphSelector } from './hooks/use-project-graph-selector';
|
||||
import {
|
||||
allProjectsSelector,
|
||||
|
||||
@ -23,8 +23,10 @@ import { useEnvironmentConfig } from '../hooks/use-environment-config';
|
||||
import { TracingAlgorithmType } from './machines/interfaces';
|
||||
import { getProjectGraphService } from '../machines/get-services';
|
||||
import { useIntervalWhen } from '../hooks/use-interval-when';
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import { ProjectGraphClientResponse } from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import {
|
||||
useNavigate,
|
||||
useParams,
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphProjectNode } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import {
|
||||
createTaskName,
|
||||
getProjectsByType,
|
||||
@ -10,7 +12,6 @@ import { ExclamationCircleIcon, EyeIcon } from '@heroicons/react/24/outline';
|
||||
import { ReactNode } from 'react';
|
||||
import { Tooltip } from '@nx/graph/ui-tooltips';
|
||||
import { TaskGraphErrorTooltip } from './task-graph-error-tooltip';
|
||||
import { ExperimentalFeature } from '../ui-components/experimental-feature';
|
||||
|
||||
interface SidebarProject {
|
||||
projectGraphNode: ProjectGraphProjectNode;
|
||||
|
||||
@ -5,11 +5,13 @@ import {
|
||||
useRouteLoaderData,
|
||||
useSearchParams,
|
||||
} from 'react-router-dom';
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphClientResponse,
|
||||
TaskGraphClientResponse,
|
||||
} from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { getGraphService } from '../machines/graph.service';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
import { CheckboxPanel } from '../ui-components/checkbox-panel';
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphClientResponse,
|
||||
TaskGraphClientResponse,
|
||||
} from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { ProjectGraphService } from './interfaces';
|
||||
|
||||
export class FetchProjectGraphService implements ProjectGraphService {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphClientResponse } from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { useRef } from 'react';
|
||||
import { AppConfig } from '../interfaces';
|
||||
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphClientResponse,
|
||||
TaskGraphClientResponse,
|
||||
} from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
|
||||
export interface WorkspaceData {
|
||||
id: string;
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphClientResponse,
|
||||
TaskGraphClientResponse,
|
||||
} from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { ProjectGraphService } from './interfaces';
|
||||
|
||||
export class LocalProjectGraphService implements ProjectGraphService {
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphDependency,
|
||||
ProjectGraphProjectNode,
|
||||
} from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { TracingAlgorithmType } from '../feature-projects/machines/interfaces';
|
||||
|
||||
// The events that the graph actor handles
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
DependencyType,
|
||||
@ -9,6 +10,7 @@ import type {
|
||||
ProjectGraphClientResponse,
|
||||
TaskGraphClientResponse,
|
||||
} from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { ProjectGraphService } from '../app/interfaces';
|
||||
|
||||
export class MockProjectGraphService implements ProjectGraphService {
|
||||
|
||||
@ -3,10 +3,11 @@ import { redirect, RouteObject } from 'react-router-dom';
|
||||
import { ProjectsSidebar } from './feature-projects/projects-sidebar';
|
||||
import { TasksSidebar } from './feature-tasks/tasks-sidebar';
|
||||
import { getEnvironmentConfig } from './hooks/use-environment-config';
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import { ProjectGraphClientResponse } from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { getProjectGraphDataService } from './hooks/get-project-graph-data-service';
|
||||
import { getProjectGraphService } from './machines/get-services';
|
||||
import { TasksSidebarErrorBoundary } from './feature-tasks/tasks-sidebar-error-boundary';
|
||||
|
||||
const { appConfig } = getEnvironmentConfig();
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import { ProjectGraphDependency, ProjectGraphProjectNode } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { getEnvironmentConfig } from './hooks/use-environment-config';
|
||||
import { To, useParams, useSearchParams } from 'react-router-dom';
|
||||
|
||||
|
||||
2
graph/client/src/globals.d.ts
vendored
2
graph/client/src/globals.d.ts
vendored
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphClientResponse,
|
||||
TaskGraphClientResponse,
|
||||
} from 'nx/src/command-line/dep-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { AppConfig } from './app/interfaces';
|
||||
import { ExternalApi } from './app/external-api';
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
import '../../client/.storybook/tailwind-imports.css';
|
||||
import 'graph-client/.storybook/tailwind-imports.css';
|
||||
|
||||
export const parameters = {};
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type {
|
||||
ProjectGraphDependency,
|
||||
ProjectGraphProjectNode,
|
||||
TaskGraph,
|
||||
} from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { VirtualElement } from '@floating-ui/react';
|
||||
import {
|
||||
ProjectEdgeNodeTooltipProps,
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
/* nx-ignore-next-line */
|
||||
import type {
|
||||
ProjectGraphProjectNode,
|
||||
ProjectGraphDependency,
|
||||
} from 'nx/src/config/project-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { GraphService } from './graph';
|
||||
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
||||
import {
|
||||
ProjectEdgeNodeTooltip,
|
||||
ProjectNodeToolTip,
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
/* nx-ignore-next-line */
|
||||
import type { ProjectGraphProjectNode } from 'nx/src/config/project-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { GraphService } from './graph';
|
||||
import { TaskGraphRecord, TooltipEvent } from './interfaces';
|
||||
import {
|
||||
ProjectEdgeNodeTooltip,
|
||||
ProjectNodeToolTip,
|
||||
TaskNodeTooltip,
|
||||
Tooltip,
|
||||
} from '@nx/graph/ui-tooltips';
|
||||
import { TaskNodeTooltip, Tooltip } from '@nx/graph/ui-tooltips';
|
||||
import { GraphTooltipService } from './tooltip-service';
|
||||
|
||||
type Theme = 'light' | 'dark' | 'system';
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphDependency } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import * as cy from 'cytoscape';
|
||||
|
||||
export interface ProjectEdgeDataDefinition extends cy.NodeDataDefinition {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphProjectNode } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import * as cy from 'cytoscape';
|
||||
import { parseParentDirectoriesFromFilePath } from '../util';
|
||||
|
||||
|
||||
@ -6,12 +6,13 @@ import cytoscape, {
|
||||
NodeSingular,
|
||||
} from 'cytoscape';
|
||||
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import {
|
||||
ProjectGraphDependency,
|
||||
ProjectGraphProjectNode,
|
||||
} from 'nx/src/config/project-graph';
|
||||
import { edgeStyles, nodeStyles } from '../styles-graph';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { ProjectNode } from './project-node';
|
||||
import { ProjectEdge } from './project-edge';
|
||||
import { ParentNode } from './parent-node';
|
||||
|
||||
@ -5,7 +5,7 @@ import cytoscape, {
|
||||
EdgeSingular,
|
||||
} from 'cytoscape';
|
||||
import { edgeStyles, nodeStyles } from '../styles-graph';
|
||||
import { GraphInteractionEvents } from '@nx/graph/ui-graph';
|
||||
import { GraphInteractionEvents } from '../graph-interaction-events';
|
||||
import { VirtualElement } from '@floating-ui/react';
|
||||
import {
|
||||
darkModeScratchKey,
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphDependency } from '@nx/devkit';
|
||||
import * as cy from 'cytoscape';
|
||||
|
||||
export interface TaskEdgeDataDefinition extends cy.NodeDataDefinition {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphProjectNode, Task } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import * as cy from 'cytoscape';
|
||||
|
||||
export interface TaskNodeDataDefinition extends cy.NodeDataDefinition {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import type { ProjectGraphProjectNode } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
import { TaskGraphRecord } from '../interfaces';
|
||||
import { TaskNode } from './task-node';
|
||||
import { TaskEdge } from './task-edge';
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @nx/enforce-module-boundaries */
|
||||
// nx-ignore-next-line
|
||||
import { ProjectGraphDependency } from '@nx/devkit';
|
||||
/* eslint-enable @nx/enforce-module-boundaries */
|
||||
|
||||
export function trimBackSlash(value: string): string {
|
||||
return value.replace(/\/$/, '');
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { PackageSchemaList } from '@nx/nx-dev/feature-package-schema-viewer';
|
||||
import { getPackagesSections } from '@nx/nx-dev/data-access-menu';
|
||||
import { sortCorePackagesFirst } from '@nx/nx-dev/data-access-packages';
|
||||
import { Menu, MenuItem, MenuSection } from '@nx/nx-dev/models-menu';
|
||||
@ -7,7 +6,7 @@ import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||
import { GetStaticPaths } from 'next';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { PackageSchemaSubList } from '../../../../../feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { PackageSchemaSubList } from '@nx/nx-dev/feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { menusApi } from '../../../../lib/menus.api';
|
||||
import { useNavToggle } from '../../../../lib/navigation-toggle.effect';
|
||||
import { nxPackagesApi } from '../../../../lib/packages.api';
|
||||
|
||||
@ -6,7 +6,7 @@ import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||
import { GetStaticPaths } from 'next';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { PackageSchemaSubList } from '../../../../../feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { PackageSchemaSubList } from '@nx/nx-dev/feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { menusApi } from '../../../../lib/menus.api';
|
||||
import { useNavToggle } from '../../../../lib/navigation-toggle.effect';
|
||||
import { nxPackagesApi } from '../../../../lib/packages.api';
|
||||
|
||||
@ -6,7 +6,7 @@ import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||
import { GetStaticPaths } from 'next';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { PackageSchemaSubList } from '../../../../../feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { PackageSchemaSubList } from '@nx/nx-dev/feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { menusApi } from '../../../../lib/menus.api';
|
||||
import { useNavToggle } from '../../../../lib/navigation-toggle.effect';
|
||||
import { nxPackagesApi } from '../../../../lib/packages.api';
|
||||
|
||||
@ -5,7 +5,7 @@ import { ProcessedPackageMetadata } from '@nx/nx-dev/models-package';
|
||||
import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { PackageSchemaSubList } from '../../../../../feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { PackageSchemaSubList } from '@nx/nx-dev/feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { menusApi } from '../../../../lib/menus.api';
|
||||
import { useNavToggle } from '../../../../lib/navigation-toggle.effect';
|
||||
import { pkg } from '../../../../lib/rspack/pkg';
|
||||
|
||||
@ -5,7 +5,7 @@ import { ProcessedPackageMetadata } from '@nx/nx-dev/models-package';
|
||||
import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { PackageSchemaSubList } from '../../../../../feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { PackageSchemaSubList } from '@nx/nx-dev/feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { menusApi } from '../../../../lib/menus.api';
|
||||
import { useNavToggle } from '../../../../lib/navigation-toggle.effect';
|
||||
import { pkg } from '../../../../lib/rspack/pkg';
|
||||
|
||||
@ -5,7 +5,7 @@ import { ProcessedPackageMetadata } from '@nx/nx-dev/models-package';
|
||||
import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { PackageSchemaSubList } from '../../../../../feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { PackageSchemaSubList } from '@nx/nx-dev/feature-package-schema-viewer/src/lib/package-schema-sub-list';
|
||||
import { menusApi } from '../../../../lib/menus.api';
|
||||
import { useNavToggle } from '../../../../lib/navigation-toggle.effect';
|
||||
import { pkg } from '../../../../lib/rspack/pkg';
|
||||
|
||||
@ -27,7 +27,7 @@ interface BrowseProps {
|
||||
// segments: string[];
|
||||
}
|
||||
|
||||
export async function getStaticProps({}): Promise<{ props: BrowseProps }> {
|
||||
export async function getStaticProps(): Promise<{ props: BrowseProps }> {
|
||||
const res = await fetch(
|
||||
'https://raw.githubusercontent.com/nrwl/nx/master/community/approved-plugins.json'
|
||||
);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Menu } from '@nx/nx-dev/models-menu';
|
||||
import { Sidebar, SidebarMobile } from '@nx/nx-dev/ui-common';
|
||||
import { Sidebar, SidebarMobile } from './sidebar';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
// TODO(jack): Remove this rspack modification once we move rspack into main repo (when stable).
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { E2eTestRunner } from '@nx/angular/src/utils/test-runners';
|
||||
import { E2eTestRunner } from '../../utils/test-runners';
|
||||
import {
|
||||
getProjects,
|
||||
readNxJson,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line @nx/enforce-module-boundaries
|
||||
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
||||
import { getWorkspaceLayout } from './get-workspace-layout';
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import {
|
||||
getProjects,
|
||||
ProjectConfiguration,
|
||||
readJson,
|
||||
readProjectConfiguration,
|
||||
@ -7,7 +6,7 @@ import {
|
||||
updateProjectConfiguration,
|
||||
} from '@nx/devkit';
|
||||
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
||||
import { libraryGenerator } from '@nx/js';
|
||||
import { libraryGenerator } from '../../generators/library/library';
|
||||
import { defaultExclude } from '../../utils/swc/add-swc-config';
|
||||
import update from './update-swcrc';
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
jest.mock('fs');
|
||||
import * as fs from 'fs';
|
||||
import * as configModule from 'nx/src/config/configuration';
|
||||
import { detectPackageManager } from 'nx/src/utils/package-manager';
|
||||
import * as configModule from '../config/configuration';
|
||||
import { detectPackageManager } from './package-manager';
|
||||
|
||||
describe('package-manager', () => {
|
||||
it('should detect package manager in nxJson', () => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { addProjectConfiguration, Tree, updateJson } from '@nx/devkit';
|
||||
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
||||
import { allReactProjectsWithStorybookConfiguration } from '@nx/react/src/migrations/update-13-0-0/webpack5-changes-utils';
|
||||
import { allReactProjectsWithStorybookConfiguration } from './webpack5-changes-utils';
|
||||
|
||||
describe('webpack5ChangesUtils', () => {
|
||||
let tree: Tree;
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
} from '@nx/devkit';
|
||||
import { joinPathFragments, writeJson } from '@nx/devkit';
|
||||
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
||||
import { storybookVersion } from '@nx/storybook';
|
||||
import { storybookVersion } from '../../../utils/versions';
|
||||
import { findNodes } from '@nx/js';
|
||||
import * as ts from 'typescript';
|
||||
import { SyntaxKind } from 'typescript';
|
||||
@ -15,7 +15,7 @@ import {
|
||||
overrideCollectionResolutionForTesting,
|
||||
wrapAngularDevkitSchematic,
|
||||
} from '@nx/devkit/ngcli-adapter';
|
||||
import { getTsSourceFile } from '@nx/storybook/src/utils/utilities';
|
||||
import { getTsSourceFile } from '../../../utils/utilities';
|
||||
|
||||
// nested code imports graph from the repo, which might have innacurate graph version
|
||||
jest.mock('nx/src/project-graph/project-graph', () => ({
|
||||
|
||||
@ -4,7 +4,7 @@ import Ajv from 'ajv';
|
||||
import { generateWorkspaceFiles } from './generate-workspace-files';
|
||||
import { createTree } from '@nx/devkit/testing';
|
||||
import { Preset } from '../utils/presets';
|
||||
import * as nxSchema from '../../../../nx/schemas/nx-schema.json';
|
||||
import * as nxSchema from 'nx/schemas/nx-schema.json';
|
||||
|
||||
describe('@nx/workspace:generateWorkspaceFiles', () => {
|
||||
let tree: Tree;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { readProjectConfiguration, Tree } from '@nx/devkit';
|
||||
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
||||
import { Schema } from '../schema';
|
||||
import { removeProject } from '@nx/workspace/src/generators/remove/lib/remove-project';
|
||||
import { removeProject } from './remove-project';
|
||||
|
||||
// nx-ignore-next-line
|
||||
const { libraryGenerator } = require('@nx/js');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { NxJsonConfiguration, readJson, Tree, writeJson } from '@nx/devkit';
|
||||
import { createTree } from '@nx/devkit/testing';
|
||||
import removeOldTaskRunnerOptions from '@nx/workspace/src/migrations/update-13-6-0/remove-old-task-runner-options';
|
||||
import removeOldTaskRunnerOptions from './remove-old-task-runner-options';
|
||||
|
||||
describe('removeOldTaskRunnerOptions', () => {
|
||||
let tree: Tree;
|
||||
|
||||
@ -66,6 +66,9 @@
|
||||
"@nx/nx-dev/feature-package-schema-viewer": [
|
||||
"nx-dev/feature-package-schema-viewer/src/index.ts"
|
||||
],
|
||||
"@nx/nx-dev/feature-package-schema-viewer/*": [
|
||||
"nx-dev/feature-package-schema-viewer/*"
|
||||
],
|
||||
"@nx/nx-dev/feature-search": ["nx-dev/feature-search/src/index.ts"],
|
||||
"@nx/nx-dev/models-document": ["nx-dev/models-document/src/index.ts"],
|
||||
"@nx/nx-dev/models-menu": ["nx-dev/models-menu/src/index.ts"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user