fix(docs): asset cleaning errors on windows #2668
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
rimraf v4 recently removed support for glob patterns, then subsequently added them back, but requiring the
{ glob: true }
in the options passed to rimraf API methods. My understanding is, on POSIX-compliant OSs, it'll use the native shell handling of glob patterns anyway, but on Windows, now needs to passed this option for it to use the node-glob, which handles glob patterns on Windows.What is the current behavior?
As mentioned in the below issue, the
rimraf.sync
call incleanGeneratedFiles.ts
will error with "Illegal characters in path." when the${OUTPUT_PATH}/{docs,*.json}
glob is passed in, apparently only on Windows (I'm on Windows 11 and get the exact same output as #2635).Issue Number: #2635
What is the new behavior?
Explicitly uses the built-in glob handling, which now runs fine on Windows. This may change behavior on other OSs, which at least since rimraf v4 were doing glob handling using native shell functionality, but I assume that getting identical behavior between different operating systems is why you're using rimraf in the first place.
Does this PR introduce a breaking change?
Other information