nf3 0.1.11 → 0.1.12

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -2
  2. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -285,12 +285,12 @@ function rollupNodeFileTrace(opts = {}) {
285
285
  }
286
286
  function normalizeMatcher(input) {
287
287
  if (typeof input === "function") {
288
- input.score = 2e4 + input.toString().length;
288
+ input.score = input.score ?? 1e4;
289
289
  return input;
290
290
  }
291
291
  if (input instanceof RegExp) {
292
292
  const matcher = ((id) => input.test(id));
293
- matcher.score = 1e4 + input.toString().length;
293
+ matcher.score = input.toString().length;
294
294
  Object.defineProperty(matcher, "name", { value: `match(${input})` });
295
295
  return matcher;
296
296
  }
@@ -301,6 +301,7 @@ function normalizeMatcher(input) {
301
301
  return id.startsWith(pattern) || idWithoutNodeModules?.startsWith(pattern);
302
302
  });
303
303
  matcher.score = input.length;
304
+ if (!isAbsolute$1(input) && input[0] !== ".") matcher.score += 1e3;
304
305
  Object.defineProperty(matcher, "name", { value: `match(${pattern})` });
305
306
  return matcher;
306
307
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nf3",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "",
5
5
  "repository": "unjs/nf3",
6
6
  "license": "MIT",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@rollup/plugin-node-resolve": "^16.0.3",
28
- "@types/node": "^24.10.1",
28
+ "@types/node": "^24.10.0",
29
29
  "@types/semver": "^7.7.1",
30
30
  "@vercel/nft": "^0.30.3",
31
- "@vitest/coverage-v8": "^4.0.9",
31
+ "@vitest/coverage-v8": "^4.0.8",
32
32
  "automd": "^0.4.2",
33
33
  "changelogen": "^0.6.2",
34
34
  "eslint": "^9.39.1",
@@ -36,16 +36,16 @@
36
36
  "exsolve": "^1.0.8",
37
37
  "mlly": "^1.8.0",
38
38
  "obuild": "^0.4.1",
39
- "oxc-minify": "^0.97.0",
39
+ "oxc-minify": "^0.96.0",
40
40
  "pathe": "^2.0.3",
41
41
  "pkg-types": "^2.3.0",
42
42
  "prettier": "^3.6.2",
43
- "rolldown": "^1.0.0-beta.50",
43
+ "rolldown": "1.0.0-beta.47",
44
44
  "rollup": "^4.53.2",
45
45
  "rollup-plugin-esbuild": "^6.2.1",
46
46
  "semver": "^7.7.3",
47
47
  "typescript": "^5.9.3",
48
- "vitest": "^4.0.9"
48
+ "vitest": "^4.0.8"
49
49
  },
50
- "packageManager": "pnpm@10.22.0"
50
+ "packageManager": "pnpm@10.20.0"
51
51
  }