Skip to content

Commit

Permalink
fix(js): report createGlobPatternsForDependencies errors on tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Apr 12, 2023
1 parent 0578116 commit f9f8b83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
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

0 comments on commit f9f8b83

Please sign in to comment.