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