@yawlabs/ctxlint 0.18.2 → 0.18.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.
@@ -4,7 +4,7 @@
4
4
  # Version-pinned so a checkout at `rev: vX.Y.Z` runs exactly that release
5
5
  # of ctxlint — matches the pinning done by `ctxlint init`. release.sh keeps
6
6
  # this in sync with package.json on each bump.
7
- entry: npx @yawlabs/ctxlint@0.18.2 --strict
7
+ entry: npx @yawlabs/ctxlint@0.18.4 --strict
8
8
  language: node
9
9
  always_run: true
10
10
  pass_filenames: false
package/dist/index.js CHANGED
@@ -13767,6 +13767,13 @@ function extractPathReferences(lines, sections) {
13767
13767
  cleanValue = cleanValue.slice(0, -1);
13768
13768
  }
13769
13769
  if (!cleanValue.includes("/")) continue;
13770
+ if (inCodeBlock && codeBlockLang === "" && /^\s/.test(line) && /^[\w@.-]+\/$/.test(cleanValue)) {
13771
+ continue;
13772
+ }
13773
+ const lowerProse = /^([a-z][\w-]*)\/[a-z][\w-]*$/.exec(cleanValue);
13774
+ if (lowerProse && !PATH_FIRST_SEGMENTS.has(lowerProse[1])) {
13775
+ continue;
13776
+ }
13770
13777
  if (/(^|\/)\.git\//.test(cleanValue) || /\.app\//.test(cleanValue)) continue;
13771
13778
  const column = match.index + match[0].length - match[1].length + 1;
13772
13779
  paths.push({
@@ -13872,7 +13879,7 @@ function extractCommandReferences(lines, sections) {
13872
13879
  }
13873
13880
  return commands;
13874
13881
  }
13875
- var PATH_PATTERN, PATH_EXCLUDE, COMMAND_PREFIXES, COMMON_COMMANDS;
13882
+ var PATH_PATTERN, PATH_EXCLUDE, PATH_FIRST_SEGMENTS, COMMAND_PREFIXES, COMMON_COMMANDS;
13876
13883
  var init_parser = __esm({
13877
13884
  "src/core/parser.ts"() {
13878
13885
  "use strict";
@@ -13881,6 +13888,39 @@ var init_parser = __esm({
13881
13888
  init_tokens();
13882
13889
  PATH_PATTERN = /(?:^|[\s`"'(])((\.{0,2}\/)?(?:(?:\*{1,2}|[\w@.-][\w@.*-]*)\/)+[\w.*-]*(?:\.\w+)?)(?=[\s`"'),;:]|$)/gm;
13883
13890
  PATH_EXCLUDE = /^(https?:\/\/|ftp:\/\/|mailto:|n\/a|w\/o|I\/O|i\/o|e\.g\.|N\/A|\.deb\/|\.rpm[.\/]|\.tar[.\/]|\.zip[.\/])/i;
13891
+ PATH_FIRST_SEGMENTS = /* @__PURE__ */ new Set([
13892
+ "src",
13893
+ "app",
13894
+ "apps",
13895
+ "lib",
13896
+ "libs",
13897
+ "pkg",
13898
+ "packages",
13899
+ "scripts",
13900
+ "docs",
13901
+ "test",
13902
+ "tests",
13903
+ "dist",
13904
+ "build",
13905
+ "infra",
13906
+ "config",
13907
+ "bin",
13908
+ "cmd",
13909
+ "core",
13910
+ "services",
13911
+ "internal",
13912
+ "public",
13913
+ "static",
13914
+ "assets",
13915
+ "components",
13916
+ "pages",
13917
+ "migrations",
13918
+ "modules",
13919
+ "vendor",
13920
+ "examples",
13921
+ "e2e",
13922
+ "node_modules"
13923
+ ]);
13884
13924
  COMMAND_PREFIXES = /^\s*[\$>]\s+(.+)$/;
13885
13925
  COMMON_COMMANDS = /^(npm|npx|pnpm|yarn|make|cargo|go\s+(run|build|test)|python|pytest|vitest|jest|mocha|tsc|eslint|prettier|bun|deno)\b/;
13886
13926
  }
@@ -27750,7 +27790,7 @@ import { readFileSync as readFileSync7 } from "node:fs";
27750
27790
  import { resolve as resolve14, dirname as dirname6 } from "node:path";
27751
27791
  import { fileURLToPath as fileURLToPath2 } from "node:url";
27752
27792
  function loadVersion() {
27753
- if (true) return "0.18.2";
27793
+ if (true) return "0.18.4";
27754
27794
  try {
27755
27795
  const __dir = dirname6(fileURLToPath2(import.meta.url));
27756
27796
  const pkgPath = resolve14(__dir, "../package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/ctxlint",
3
- "version": "0.18.2",
3
+ "version": "0.18.4",
4
4
  "mcpName": "io.github.YawLabs/ctxlint",
5
5
  "description": "Lint your AI agent context files, MCP server configs, and session data against your actual codebase",
6
6
  "bin": {