Skip to content

Commit 51f5fe4

Browse files
authored
fix(core): merge package.json plugins and updated project.json plugin… (#26952)
… using v2 ## Current Behavior <!-- This is the behavior we have today --> The `package.json` handling is split between before and after plugins so it's confusing. Also, `package.json` nodes will get overwritten by plugins while others won't. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The `package.json` handling is merged. Also, the `package.json` nodes will always overwrite plugins as intended. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 1a94296 commit 51f5fe4

File tree

17 files changed

+393
-465
lines changed

17 files changed

+393
-465
lines changed

packages/jest/src/plugins/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
clearRequireCache,
2626
loadConfigFile,
2727
} from '@nx/devkit/src/utils/config-utils';
28-
import { getGlobPatternsFromPackageManagerWorkspaces } from 'nx/src/plugins/package-json-workspaces';
28+
import { getGlobPatternsFromPackageManagerWorkspaces } from 'nx/src/plugins/package-json';
2929
import { combineGlobPatterns } from 'nx/src/utils/globs';
3030
import { minimatch } from 'minimatch';
3131
import { hashObject } from 'nx/src/devkit-internals';

packages/nx/plugins/package-json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { NxPluginV2 } from '../src/project-graph/plugins';
22
import { workspaceRoot } from '../src/utils/workspace-root';
3-
import { createNodeFromPackageJson } from '../src/plugins/package-json-workspaces';
3+
import { createNodeFromPackageJson } from '../src/plugins/package-json';
44

55
const plugin: NxPluginV2 = {
66
name: 'nx-all-package-jsons-plugin',

packages/nx/src/generators/utils/project-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { basename, join, relative } from 'path';
44
import {
55
buildProjectConfigurationFromPackageJson,
66
getGlobPatternsFromPackageManagerWorkspaces,
7-
} from '../../plugins/package-json-workspaces';
7+
} from '../../plugins/package-json';
88
import { buildProjectFromProjectJson } from '../../plugins/project-json/build-nodes/project-json';
99
import { renamePropertyWithStableKeys } from '../../adapter/angular-json';
1010
import {

packages/nx/src/plugins/package-json-workspaces/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)