@prover-coder-ai/context-doc 1.0.11 → 1.0.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.
@@ -33,16 +33,11 @@ const safeParseJson = (line) => {
33
33
  }
34
34
  };
35
35
  const metadataMatches = (metadata, locator) => {
36
- const fallbackCwdOnly = locator.normalizedRepositoryUrl === locator.normalizedCwd;
37
- const repoMatches = Option.exists(metadata.repositoryUrl, (repositoryUrl) => normalizeRepositoryUrl(repositoryUrl) === locator.normalizedRepositoryUrl);
38
36
  const cwdMatches = Option.exists(metadata.cwd, (cwdValue) => {
39
37
  const normalized = normalizeCwd(cwdValue);
40
- return fallbackCwdOnly
41
- ? normalized === locator.normalizedCwd
42
- : locator.normalizedCwd.startsWith(normalized) ||
43
- normalized.startsWith(locator.normalizedCwd);
38
+ return normalized === locator.normalizedCwd;
44
39
  });
45
- return repoMatches || cwdMatches;
40
+ return cwdMatches;
46
41
  };
47
42
  export const buildProjectLocator = (repositoryUrl, cwd) => normalizeLocator(repositoryUrl, cwd);
48
43
  export const linesMatchProject = (lines, locator) => lines.some((line) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prover-coder-ai/context-doc",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -107,24 +107,12 @@ const metadataMatches = (
107
107
  metadata: RecordMetadata,
108
108
  locator: ProjectLocator,
109
109
  ): boolean => {
110
- const fallbackCwdOnly =
111
- locator.normalizedRepositoryUrl === locator.normalizedCwd;
112
-
113
- const repoMatches = Option.exists(
114
- metadata.repositoryUrl,
115
- (repositoryUrl) =>
116
- normalizeRepositoryUrl(repositoryUrl) === locator.normalizedRepositoryUrl,
117
- );
118
-
119
110
  const cwdMatches = Option.exists(metadata.cwd, (cwdValue) => {
120
111
  const normalized = normalizeCwd(cwdValue);
121
- return fallbackCwdOnly
122
- ? normalized === locator.normalizedCwd
123
- : locator.normalizedCwd.startsWith(normalized) ||
124
- normalized.startsWith(locator.normalizedCwd);
112
+ return normalized === locator.normalizedCwd;
125
113
  });
126
114
 
127
- return repoMatches || cwdMatches;
115
+ return cwdMatches;
128
116
  };
129
117
 
130
118
  export const buildProjectLocator = (