@shipstatic/drop 2.13.0-beta.2 → 2.13.0-beta.4

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.js CHANGED
@@ -271,11 +271,13 @@ function rebase(line, base) {
271
271
  const pattern = line.replace(/(\\ )? *$/, (_, escaped) => escaped ?? "");
272
272
  if (pattern === "" || pattern.startsWith("#")) return null;
273
273
  if (base === "") return pattern;
274
+ const folder = base.replace(/[\\*?[\]]/g, "\\$&").replace(/^[#!]/, "\\$&");
274
275
  const negated = pattern.startsWith("!");
275
276
  let body = negated ? pattern.slice(1) : pattern;
276
277
  const directoryOnly = body.endsWith("/");
277
278
  if (directoryOnly) body = body.slice(0, -1);
278
- const rebased = body.includes("/") ? `${base}/${body.replace(/^\//, "")}` : `${base}/**/${body}`;
279
+ if (body.replace(/^\//, "") === "") return null;
280
+ const rebased = body.includes("/") ? `${folder}/${body.replace(/^\//, "")}` : `${folder}/**/${body}`;
279
281
  return `${negated ? "!" : ""}${rebased}${directoryOnly ? "/" : ""}`;
280
282
  }
281
283
  async function projectSource(files) {
@@ -1018,7 +1020,7 @@ async function processFiles(input, { limits, onStatus }) {
1018
1020
  needsBuild: true,
1019
1021
  status: {
1020
1022
  title: "Ready",
1021
- details: `${pluralize(ready.length, "file", "files", true)} ready \u2014 project will be built`
1023
+ details: `${pluralize(ready.length, "file", "files", true)} ready. We'll build the project.`
1022
1024
  }
1023
1025
  };
1024
1026
  }