feat(core): move forEachExecutorOptions to devkit (#15547)
This commit is contained in:
parent
46b3767303
commit
c3a58e9c1d
@ -4,7 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
const executors = [
|
||||
'@angular-devkit/build-angular:browser',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { formatFiles, readNxJson, Tree, updateNxJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
const nxJson = readNxJson(tree);
|
||||
|
||||
@ -2,7 +2,7 @@ import type { Tree } from '@nrwl/devkit';
|
||||
import { formatFiles } from '@nrwl/devkit';
|
||||
import * as ts from 'typescript';
|
||||
import { Builders } from '@schematics/angular/utility/workspace-models';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { FileChangeRecorder } from '../../utils/file-change-recorder';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { Tree } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export function getMFProjects(
|
||||
tree: Tree,
|
||||
|
||||
@ -13,7 +13,7 @@ import {
|
||||
updateJson,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { CypressExecutorOptions } from '../../executors/cypress/cypress.impl';
|
||||
import {
|
||||
addConfigToTsConfig,
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
updateJson,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import * as ts from 'typescript';
|
||||
import { CypressExecutorOptions } from '../../executors/cypress/cypress.impl';
|
||||
@ -165,4 +165,5 @@ function cacheComponentTestTarget(tree: Tree) {
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
export default updateCypressConfigsPresets;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { formatFiles, readNxJson, Tree, updateNxJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { CypressExecutorOptions } from '@nrwl/cypress/src/executors/cypress/cypress.impl';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
|
||||
@ -12,8 +12,8 @@ import {
|
||||
Tree,
|
||||
visitNotIgnoredFiles,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { checkAndCleanWithSemver } from '@nrwl/devkit/src/utils/semver';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import { gte } from 'semver';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
@ -7,7 +7,7 @@ import {
|
||||
Tree,
|
||||
visitNotIgnoredFiles,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import { extname } from 'path';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import {
|
||||
GeneratorCallback,
|
||||
getProjects,
|
||||
installPackagesTask,
|
||||
stripIndents,
|
||||
Tree,
|
||||
updateJson,
|
||||
visitNotIgnoredFiles,
|
||||
installPackagesTask,
|
||||
GeneratorCallback,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import {
|
||||
CallExpression,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { addProjectConfiguration, Tree } from '@nrwl/devkit';
|
||||
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
||||
import { addProjectConfiguration, Tree } from 'nx/src/devkit-exports';
|
||||
import { createTreeWithEmptyWorkspace } from 'nx/src/devkit-testing-exports';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from './executor-options-utils';
|
||||
|
||||
describe('forEachExecutorOptions', () => {
|
||||
let tree: Tree;
|
||||
@ -1,9 +1,9 @@
|
||||
import {
|
||||
Tree,
|
||||
getProjects,
|
||||
ProjectConfiguration,
|
||||
ProjectGraph,
|
||||
} from '@nrwl/devkit';
|
||||
import type { Tree } from 'nx/src/generators/tree';
|
||||
import type { ProjectGraph } from 'nx/src/config/project-graph';
|
||||
import type { ProjectConfiguration } from 'nx/src/config/workspace-json-project-json';
|
||||
import { requireNx } from '../../nx';
|
||||
|
||||
const { getProjects } = requireNx();
|
||||
|
||||
type CallBack<T> = (
|
||||
currentValue: T,
|
||||
@ -25,7 +25,7 @@ export function forEachExecutorOptions<Options>(
|
||||
* Callback that is called for each options configured for a builder
|
||||
*/
|
||||
callback: CallBack<Options>
|
||||
) {
|
||||
): void {
|
||||
forEachProjectConfig(getProjects(tree), executorName, callback);
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ export function forEachExecutorOptionsInGraph<Options>(
|
||||
graph: ProjectGraph,
|
||||
executorName: string,
|
||||
callback: CallBack<Options>
|
||||
) {
|
||||
): void {
|
||||
const projects = new Map<string, ProjectConfiguration>();
|
||||
Object.values(graph.nodes).forEach((p) => projects.set(p.name, p.data));
|
||||
|
||||
@ -48,7 +48,7 @@ function forEachProjectConfig<Options>(
|
||||
projects: Map<string, ProjectConfiguration>,
|
||||
executorName: string,
|
||||
callback: CallBack<Options>
|
||||
) {
|
||||
): void {
|
||||
for (const [projectName, project] of projects) {
|
||||
for (const [targetName, target] of Object.entries(project.targets || {})) {
|
||||
if (executorName !== target.executor) {
|
||||
@ -7,12 +7,12 @@ import {
|
||||
Tree,
|
||||
updateJson,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import {
|
||||
addPropertyToJestConfig,
|
||||
removePropertyFromJestConfig,
|
||||
} from '@nrwl/jest';
|
||||
import { JestExecutorOptions } from '@nrwl/jest/src/executors/jest/schema';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
|
||||
/**
|
||||
|
||||
@ -5,13 +5,12 @@ import {
|
||||
stripIndents,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
import {
|
||||
addPropertyToJestConfig,
|
||||
removePropertyFromJestConfig,
|
||||
} from '../../utils/config/update-config';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
|
||||
function updateJestConfig(tree: Tree) {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { formatFiles, logger, stripIndents, Tree } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
import {
|
||||
addPropertyToJestConfig,
|
||||
|
||||
@ -6,9 +6,8 @@ import {
|
||||
stripIndents,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
import { addPropertyToJestConfig } from '../../utils/config/update-config';
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { formatFiles, logger, stripIndents, Tree } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
import {
|
||||
addPropertyToJestConfig,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import {
|
||||
formatFiles,
|
||||
logger,
|
||||
@ -8,6 +7,7 @@ import {
|
||||
updateJson,
|
||||
visitNotIgnoredFiles,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { basename } from 'path';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
readProjectConfiguration,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
import { jestConfigObject } from '../../utils/config/functions';
|
||||
import { nxVersion } from '../../utils/versions';
|
||||
|
||||
@ -10,9 +10,9 @@ import {
|
||||
updateJson,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { extname } from 'path';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
|
||||
const allowedExt = ['.ts', '.js'];
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { addDependenciesToPackageJson, GeneratorCallback } from '@nrwl/devkit';
|
||||
import type { Tree } from '@nrwl/devkit';
|
||||
import { addDependenciesToPackageJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsNodeVersion } from '../../utils/versions';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import type { BinaryExpression } from 'typescript';
|
||||
import type { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { addDependenciesToPackageJson, readJson, Tree } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import { isStringLiteralLike, PropertyAssignment } from 'typescript';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
|
||||
@ -3,7 +3,7 @@ import {
|
||||
Tree,
|
||||
visitNotIgnoredFiles,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import * as ts from 'typescript';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { formatFiles, readNxJson, Tree, updateNxJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
const nxJson = readNxJson(tree);
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
import {
|
||||
createProjectGraphAsync,
|
||||
formatFiles,
|
||||
logger,
|
||||
stripIndents,
|
||||
Tree,
|
||||
createProjectGraphAsync,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { TS_QUERY_JEST_CONFIG_PREFIX } from '../../utils/ast-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import * as ts from 'typescript';
|
||||
import { JestExecutorOptions } from '../../executors/jest/schema';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { findRootJestPreset } from '../../utils/config/find-root-jest-files';
|
||||
|
||||
export async function updateConfigsJest29(tree: Tree) {
|
||||
@ -226,4 +226,5 @@ function getNodeWithComments(fullText: string, node: ts.Node) {
|
||||
}
|
||||
return node.getText();
|
||||
}
|
||||
|
||||
export default updateConfigsJest29;
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
Tree,
|
||||
visitNotIgnoredFiles,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import {
|
||||
CallExpression,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { readProjectConfiguration, Tree, updateJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
import { SwcExecutorOptions } from '../../utils/schema';
|
||||
import { defaultExclude } from '../../utils/swc/add-swc-config';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { readProjectConfiguration, Tree, updateJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { SwcExecutorOptions } from '../../utils/schema';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
|
||||
export function excludeJestConfigSwcrc(tree: Tree) {
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { SwcExecutorOptions } from '../../utils/schema';
|
||||
|
||||
type OldSwcExecutorOptions = SwcExecutorOptions & { swcrcPath?: string };
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { SwcExecutorOptions } from '../../utils/schema';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import type { TemplateSpan } from 'typescript';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Tree } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export function getEslintTargets(tree: Tree) {
|
||||
const eslintTargetNames = new Set<string>();
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export default async function update(host: Tree) {
|
||||
forEachExecutorOptions(
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export default async function update(tree: Tree) {
|
||||
forEachExecutorOptions(
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import {
|
||||
addDependenciesToPackageJson,
|
||||
formatFiles,
|
||||
getProjects,
|
||||
readProjectConfiguration,
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { nxVersion } from '@nrwl/workspace/src/utils/versions';
|
||||
|
||||
export default async function update(host: Tree) {
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import {
|
||||
createProjectGraphAsync,
|
||||
formatFiles,
|
||||
logger,
|
||||
stripIndents,
|
||||
Tree,
|
||||
createProjectGraphAsync,
|
||||
} from '@nrwl/devkit';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import * as ts from 'typescript';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { TS_QUERY_JEST_CONFIG_PREFIX } from '@nrwl/jest/src/utils/ast-utils';
|
||||
import { findRootJestPreset } from '@nrwl/jest/src/utils/config/find-root-jest-files';
|
||||
import { JestExecutorOptions } from '@nrwl/jest/src/executors/jest/schema';
|
||||
@ -227,4 +227,5 @@ function getNodeWithComments(fullText: string, node: ts.Node) {
|
||||
}
|
||||
return node.getText();
|
||||
}
|
||||
|
||||
export default updateConfigsJest29;
|
||||
|
||||
@ -7,7 +7,7 @@ import {
|
||||
} from '@nrwl/devkit';
|
||||
import { JestExecutorOptions } from '@nrwl/jest/src/executors/jest/schema';
|
||||
import { TEST_FILE_PATTERN } from '@nrwl/jest/src/utils/ast-utils';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptionsInGraph } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import {
|
||||
CallExpression,
|
||||
|
||||
@ -5,8 +5,8 @@ import {
|
||||
stripIndents,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { JestExecutorOptions } from '@nrwl/jest/src/executors/jest/schema';
|
||||
|
||||
/**
|
||||
|
||||
@ -6,9 +6,9 @@ import {
|
||||
stripIndents,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { removePropertyFromJestConfig } from '@nrwl/jest';
|
||||
import { JestExecutorOptions } from '@nrwl/jest/src/executors/jest/schema';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { join } from 'path';
|
||||
|
||||
/**
|
||||
|
||||
@ -3,7 +3,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export async function updateExternalEmotionJsxRuntime(tree: Tree) {
|
||||
forEachExecutorOptions<any>(
|
||||
|
||||
@ -4,8 +4,8 @@ import {
|
||||
readProjectConfiguration,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import type { JestExecutorOptions } from '@nrwl/jest/src/executors/jest/schema';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import { StringLiteral } from 'typescript';
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { basename } from 'path';
|
||||
import type { WebpackExecutorOptions } from '@nrwl/webpack';
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import {
|
||||
workspaceRoot,
|
||||
writeJson,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { Linter } from '@nrwl/linter';
|
||||
import { join, relative } from 'path';
|
||||
import {
|
||||
@ -24,7 +25,6 @@ import {
|
||||
TsConfig,
|
||||
} from '../../utils/utilities';
|
||||
import { StorybookConfigureSchema } from './schema';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { UiFramework, UiFramework7 } from '../../utils/models';
|
||||
|
||||
const DEFAULT_PORT = 4400;
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
updateProjectConfiguration,
|
||||
workspaceRoot,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import ts = require('typescript');
|
||||
import * as fs from 'fs';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { formatFiles, readNxJson, Tree, updateNxJson } from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
const nxJson = readNxJson(tree);
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
updateNonAngularStorybookBuildTargets(tree);
|
||||
|
||||
@ -5,10 +5,10 @@ import {
|
||||
logger,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import ts = require('typescript');
|
||||
import { removeRootConfig } from './remove-root-config';
|
||||
import ts = require('typescript');
|
||||
|
||||
/**
|
||||
* The purpose of this migrator is to help users move away
|
||||
|
||||
@ -5,10 +5,10 @@ import {
|
||||
StringChange,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import ts = require('typescript');
|
||||
import { getRootMainVariableName } from './add-addon-essentials-to-all';
|
||||
import ts = require('typescript');
|
||||
|
||||
/**
|
||||
* The purpose of this migrator is to help users move away
|
||||
|
||||
@ -5,12 +5,11 @@ import {
|
||||
readProjectConfiguration,
|
||||
Tree,
|
||||
} from '@nrwl/devkit';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
import { findNodes } from 'nx/src/utils/typescript';
|
||||
import ts = require('typescript');
|
||||
import { normalizeViteConfigFilePathWithTree } from '../../utils/generator-utils';
|
||||
import ts = require('typescript');
|
||||
|
||||
export async function removeProjectsFromViteTsConfigPaths(tree: Tree) {
|
||||
findAllProjectsWithViteConfig(tree);
|
||||
|
||||
@ -4,8 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export async function setModeInConfiguration(tree: Tree) {
|
||||
forAllProjectsUsingViteAddMode(tree);
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { VitestExecutorOptions } from '../../executors/test/schema';
|
||||
|
||||
export function updateReportDirectoryPlaceholders(tree: Tree) {
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { WebpackExecutorOptions } from '../../executors/webpack/schema';
|
||||
import { basename } from 'path';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
import { WebpackExecutorOptions } from '../../executors/webpack/schema';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
|
||||
@ -4,7 +4,8 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export async function changeNpmScriptExecutor(tree: Tree) {
|
||||
forEachExecutorOptions(
|
||||
|
||||
@ -4,7 +4,8 @@ import {
|
||||
Tree,
|
||||
updateProjectConfiguration,
|
||||
} from '@nrwl/devkit';
|
||||
import { forEachExecutorOptions } from '@nrwl/workspace/src/utilities/executor-options-utils';
|
||||
|
||||
import { forEachExecutorOptions } from '@nrwl/devkit/src/generators/executor-options-utils';
|
||||
|
||||
export async function changeRunCommandsExecutor(tree: Tree) {
|
||||
forEachExecutorOptions(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user