@rollup/pluginutils
Advanced tools
Comparing version
@@ -168,4 +168,5 @@ 'use strict'; | ||
const normalizePathRegExp = new RegExp(`\\${path.win32.sep}`, 'g'); | ||
const normalizePath = function normalizePath(filename) { | ||
return filename.split(path.win32.sep).join(path.posix.sep); | ||
return filename.replace(normalizePathRegExp, path.posix.sep); | ||
}; | ||
@@ -202,6 +203,8 @@ | ||
const excludeMatchers = ensureArray(exclude).map(getMatcher); | ||
if (!includeMatchers.length && !excludeMatchers.length) | ||
return (id) => typeof id === 'string' && !id.includes('\0'); | ||
return function result(id) { | ||
if (typeof id !== 'string') | ||
return false; | ||
if (/\0/.test(id)) | ||
if (id.includes('\0')) | ||
return false; | ||
@@ -208,0 +211,0 @@ const pathId = normalizePath(id); |
@@ -168,4 +168,5 @@ 'use strict'; | ||
const normalizePathRegExp = new RegExp(`\\${path.win32.sep}`, 'g'); | ||
const normalizePath = function normalizePath(filename) { | ||
return filename.split(path.win32.sep).join(path.posix.sep); | ||
return filename.replace(normalizePathRegExp, path.posix.sep); | ||
}; | ||
@@ -202,6 +203,8 @@ | ||
const excludeMatchers = ensureArray(exclude).map(getMatcher); | ||
if (!includeMatchers.length && !excludeMatchers.length) | ||
return (id) => typeof id === 'string' && !id.includes('\0'); | ||
return function result(id) { | ||
if (typeof id !== 'string') | ||
return false; | ||
if (/\0/.test(id)) | ||
if (id.includes('\0')) | ||
return false; | ||
@@ -208,0 +211,0 @@ const pathId = normalizePath(id); |
@@ -164,4 +164,5 @@ import { extname, win32, posix, isAbsolute, resolve } from 'path'; | ||
const normalizePathRegExp = new RegExp(`\\${win32.sep}`, 'g'); | ||
const normalizePath = function normalizePath(filename) { | ||
return filename.split(win32.sep).join(posix.sep); | ||
return filename.replace(normalizePathRegExp, posix.sep); | ||
}; | ||
@@ -198,6 +199,8 @@ | ||
const excludeMatchers = ensureArray(exclude).map(getMatcher); | ||
if (!includeMatchers.length && !excludeMatchers.length) | ||
return (id) => typeof id === 'string' && !id.includes('\0'); | ||
return function result(id) { | ||
if (typeof id !== 'string') | ||
return false; | ||
if (/\0/.test(id)) | ||
if (id.includes('\0')) | ||
return false; | ||
@@ -204,0 +207,0 @@ const pathId = normalizePath(id); |
{ | ||
"name": "@rollup/pluginutils", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
57742
1.07%1159
0.78%