@intentic/constants 1.265.0 → 1.266.0
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/package.json +1 -1
- package/src/mirror-roots.mjs +1 -2
- package/src/node.d.mts +2 -8
package/package.json
CHANGED
package/src/mirror-roots.mjs
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
// Overlaid directory names; `.cache` is deliberately excluded and `.venv` is python's node_modules.
|
|
6
6
|
export const MIRRORED_DIRS = new Set(["node_modules", ".venv", "dist", "generated"]);
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
// is.
|
|
8
|
+
// Classify the last path segment after stripping quotes and slashes; directory contents are not matches.
|
|
10
9
|
const lastSegment = (token) => {
|
|
11
10
|
const bare = token.replace(/^['"]|['"]$/g, "").replace(/\/+$/, "");
|
|
12
11
|
return bare.slice(bare.lastIndexOf("/") + 1);
|
package/src/node.d.mts
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/** Where the caller is: `import.meta.url`, `import.meta.dirname`, or any path. */
|
|
2
2
|
type Origin = string;
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* The monorepo root, found by walking up from `from` until `pnpm-workspace.yaml` appears.
|
|
6
|
-
* Throws if it never does — a wrong root is worse than a loud one.
|
|
7
|
-
*/
|
|
4
|
+
/** The monorepo root, found by walking up from `from` until `pnpm-workspace.yaml` appears. */
|
|
8
5
|
export declare const repoRoot: (from: Origin) => string;
|
|
9
6
|
|
|
10
|
-
/**
|
|
11
|
-
* The calling package's own root — the directory of the first `package.json` at or above `from`.
|
|
12
|
-
* Throws if there is none.
|
|
13
|
-
*/
|
|
7
|
+
/** The calling package's own root — the directory of the first `package.json` at or above `from`. */
|
|
14
8
|
export declare const packageRoot: (from: Origin) => string;
|