Skip to content

Commit

Permalink
fix(core): fix parsing of npm workspace patterns (#13206)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored Nov 17, 2022
1 parent bae31b2 commit 1d848dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nx/src/config/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
import { PackageJson } from '../utils/package-json';
import { sortObjectByKeys } from '../utils/object-sort';
import { output } from '../utils/output';
import { joinPathFragments } from '../utils/path';

export function workspaceConfigName(
root: string
Expand Down Expand Up @@ -655,7 +656,9 @@ export function getGlobPatternsFromPackageManagerWorkspaces(
function normalizePatterns(patterns: string[]): string[] {
return patterns.map((pattern) =>
removeRelativePath(
pattern.endsWith('/package.json') ? pattern : `${pattern}/package.json`
pattern.endsWith('/package.json')
? pattern
: joinPathFragments(pattern, 'package.json')
)
);
}
Expand Down

1 comment on commit 1d848dd

@vercel
Copy link

@vercel vercel bot commented on 1d848dd Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app

Please sign in to comment.