Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix parsing of npm workspace patterns #13206

Merged
merged 1 commit into from Nov 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/nx/src/config/workspaces.ts
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