chore(deps): remove normalize-path dependency
Remove normalize-path dependency
The output directory is now passed to glob through the cwd option instead of being part of the pattern, so no path normalization is needed:
const allBuiltTemplates = glob.sync('**/*.cjs', {
cwd: pathToWhereEmailMarkupShouldBeDumped,
absolute: true,
});
This also removes the unused @types/normalize-path from packages/ui.
Behavior
Nothing changes for ordinary output directories. One side effect is a fix: an --outDir containing glob characters was previously treated as part of the pattern.
--outDir | Before | After |
|---|---|---|
out[1], out{a,b} | No templates found, nothing rendered | Templates render |
out* | Also picked up .cjs files from sibling directories | Only that directory is searched |
Summary by cubic
Removes the normalize-path dependency by passing --outDir to glob's cwd option instead of concatenating it into the pattern.
Fixes two edge cases: --outDir values containing glob characters (like out[1] or out{a,b}) previously matched no templates, and values like out* previously pulled in .cjs files from sibling directories. Both now correctly search only the intended output directory. Also removes the unused @types/normalize-path from packages/ui.