-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
feat(pluginutils): normalizePath #550
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugin-typescript has a similar function to normalize the path. Can we make that its own pluginUtil?
@eight04 please take a look at the last comment |
How does typescript plugin use the normalization? If it also relates to picomatch then we can add a Or, do you want a small util like this: export function normalizePathSep(path) {
return path
.split(sep)
.join('/');
} |
Just a small util like that, although I prefer the implementation in the typescript plugin as it uses constants from node. |
@@ -88,9 +88,9 @@ export default function myPlugin(options = {}) { | |||
}, | |||
leave(node) { | |||
if (node.scope) scope = scope.parent; | |||
} | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these were added by prettier.
Rollup Plugin Name:
pluginutils
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
This PR includes:
normalizePath
.path.resolve
creates patterns including backward slash\
. This patch adds a normalization similar tocreateFilter
:plugins/packages/pluginutils/src/createFilter.ts
Lines 15 to 17 in 55a9cb2