From a1646e53499f6b871c631dbffec80e2eac3c7b52 Mon Sep 17 00:00:00 2001 From: outslept <135520429+outslept@users.noreply.github.com> Date: Fri, 27 Nov 2026 18:30:12 +0300 Subject: [PATCH] Replace slash package with an inline implementation --- index.js | 8 ++++++-- package.json | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 4e29b96..73b695e 100755 --- a/index.js +++ b/index.js @@ -6,7 +6,6 @@ import prettyHrtime from 'pretty-hrtime' import read from 'read-cache' import pc from 'picocolors' import { glob } from 'tinyglobby' -import slash from 'slash' import chokidar from 'chokidar' import postcss from 'postcss' @@ -25,7 +24,12 @@ const expandGlob = async (patterns) => { if (!Array.isArray(patterns)) patterns = [patterns] const paths = await glob( - patterns.map((i) => slash(String(i))), + patterns.map((i) => { + const pattern = String(i) + return pattern.startsWith('\\\\?\\') + ? pattern + : pattern.replace(/\\/g, '/') + }), { dot: argv.includeDotfiles }, ) diff --git a/package.json b/package.json index 5ea60c3..47fe83a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "postcss-reporter": "^7.0.0", "pretty-hrtime": "^1.0.3", "read-cache": "^1.0.0", - "slash": "^5.0.0", "tinyglobby": "^0.2.12", "yargs": "^18.0.0" },