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(js): report createGlobPatternsForDependencies errors on tailwind #16266

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/angular/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function createGlobPatternsForDependencies(
) {
try {
return jsGenerateGlobs(dirPath, fileGlobPattern);
} catch {
} catch (e) {
/**
* It should not be possible to reach this point when the utility is invoked as part of the normal
* lifecycle of Nx executors. However, other tooling, such as the VSCode Tailwind IntelliSense plugin
Expand All @@ -22,7 +22,8 @@ export function createGlobPatternsForDependencies(
* fundamently unavailable in this tailwind-specific context.
*/
console.warn(
'\n[createGlobPatternsForDependencies] WARNING: There was no ProjectGraph available to read from, returning an empty array of glob patterns\n'
'\nWARNING: There was an error creating glob patterns, returning an empty array\n' +
`${e.message}\n`
);
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/utils/generate-globs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function createGlobPatternsForDependencies(

if (!projectName) {
throw new Error(
`Could not find any project containing the file "${filenameRelativeToWorkspaceRoot}" among it's project files`
`createGlobPatternsForDependencies: Could not find any project containing the file "${filenameRelativeToWorkspaceRoot}" among it's project files`
);
}
} catch (e) {
Expand Down
5 changes: 3 additions & 2 deletions packages/react/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function createGlobPatternsForDependencies(
) {
try {
return jsGenerateGlobs(dirPath, fileGlobPattern);
} catch {
} catch (e) {
/**
* It should not be possible to reach this point when the utility is invoked as part of the normal
* lifecycle of Nx executors. However, other tooling, such as the VSCode Tailwind IntelliSense plugin
Expand All @@ -22,7 +22,8 @@ export function createGlobPatternsForDependencies(
* fundamently unavailable in this tailwind-specific context.
*/
console.warn(
'\n[createGlobPatternsForDependencies] WARNING: There was no ProjectGraph available to read from, returning an empty array of glob patterns\n'
'\nWARNING: There was an error creating glob patterns, returning an empty array\n' +
`${e.message}\n`
);
return [];
}
Expand Down