@shipstatic/drop 2.13.0-beta.2 → 2.13.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -277,11 +277,12 @@ function rebase(line, base) {
|
|
|
277
277
|
const pattern = line.replace(/(\\ )? *$/, (_, escaped) => escaped ?? "");
|
|
278
278
|
if (pattern === "" || pattern.startsWith("#")) return null;
|
|
279
279
|
if (base === "") return pattern;
|
|
280
|
+
const folder = base.replace(/[\\*?[\]]/g, "\\$&").replace(/^[#!]/, "\\$&");
|
|
280
281
|
const negated = pattern.startsWith("!");
|
|
281
282
|
let body = negated ? pattern.slice(1) : pattern;
|
|
282
283
|
const directoryOnly = body.endsWith("/");
|
|
283
284
|
if (directoryOnly) body = body.slice(0, -1);
|
|
284
|
-
const rebased = body.includes("/") ? `${
|
|
285
|
+
const rebased = body.includes("/") ? `${folder}/${body.replace(/^\//, "")}` : `${folder}/**/${body}`;
|
|
285
286
|
return `${negated ? "!" : ""}${rebased}${directoryOnly ? "/" : ""}`;
|
|
286
287
|
}
|
|
287
288
|
async function projectSource(files) {
|