@genesislcap/build-kit 15.88.1 → 15.88.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"build-context.d.ts","sourceRoot":"","sources":["../../src/utils/build-context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,gBAAgB,GAAU,QAAG,EAAE,SAAS,OAAO,EAAE,YAAO,KAAG,OAAO,CAAC,YAAY,CAmC3F,CAAC"}
1
+ {"version":3,"file":"build-context.d.ts","sourceRoot":"","sources":["../../src/utils/build-context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,gBAAgB,GAAU,QAAG,EAAE,SAAS,OAAO,EAAE,YAAO,KAAG,OAAO,CAAC,YAAY,CAqC3F,CAAC"}
@@ -8,8 +8,11 @@ const types_1 = require("../types");
8
8
  const config_1 = require("./config");
9
9
  const npm_1 = require("./npm");
10
10
  const loadBuildContext = (cwd, command, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
11
+ var _a;
11
12
  const pkg = yield (0, npm_1.loadPackageJSON)();
12
- const workspace = yield (0, pkg_types_1.findWorkspaceDir)();
13
+ // Prefer the nearest workspace marker: findWorkspaceDir looks for .git/config first, which in a
14
+ // git worktree (where .git is a file) resolves to the main checkout and its node_modules.
15
+ const workspace = (_a = (0, npm_1.findWorkspaceRoot)(cwd)) !== null && _a !== void 0 ? _a : (yield (0, pkg_types_1.findWorkspaceDir)());
13
16
  const config = yield (0, config_1.loadConfig)(pkg);
14
17
  return {
15
18
  cli: {
@@ -3,6 +3,7 @@ import type { BuildContext } from '../types';
3
3
  export declare const tryRequire: (id: any, rootDir?: string) => any;
4
4
  export declare const resolveBin: (bin: string, module?: string, from?: string) => Promise<string>;
5
5
  export declare const loadPackageJSON: (dir?: string) => Promise<PackageJson>;
6
+ export declare const findWorkspaceRoot: (start: string) => string | null;
6
7
  export declare const loadPackageJSONFiles: (packages?: any[]) => Promise<PackageJson[]>;
7
8
  export declare const getLatestVersion: (name: any, range?: string, verbose?: boolean) => any;
8
9
  export declare const getRangeSpecifier: (version: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../src/utils/npm.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,eAAO,MAAM,UAAU,GAAI,OAAE,EAAE,gBAAuB,QAUrD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,KAAK,MAAM,EAAE,SAAQ,MAAY,EAAE,OAAO,MAAM,oBAShF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,WAAW,CAUvE,CAAC;AAmCF,eAAO,MAAM,oBAAoB,GAAU,gBAAa,KAAG,OAAO,CAAC,WAAW,EAAE,CAoB7E,CAAC;AAeJ,eAAO,MAAM,gBAAgB,GAAI,SAAI,EAAE,cAAgB,EAAE,iBAAc,QAqBtE,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,YAAO,QAGxC,CAAC;AAGF,eAAO,MAAM,SAAS,GAAI,KAAK,YAAY;;;;;;;;WArCR,CAAC;aAG/B,CAAC;;;;;;iBA8BqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA+DutJ,CAAC;WAA+G,CAAC;cAA2H,CAAC;uBAA+d,CAAC;iBAA0Z,CAAC;qBAAkQ,CAAC;;;CAxD7lM,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,KAAK,WAAW,kBAOvD,CAAC;AAoCF,eAAO,MAAM,cAAc,GACzB,KAAK,WAAW,EAChB,YAAY,MAAM,EAClB,SAAS,MAAM,EAAE,E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AAM;GAuC1C,CAAC"}
package/dist/utils/npm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateVersions = exports.updatePackageJSON = exports.getRawPkg = exports.getRangeSpecifier = exports.getLatestVersion = exports.loadPackageJSONFiles = exports.loadPackageJSON = exports.resolveBin = exports.tryRequire = void 0;
3
+ exports.updateVersions = exports.updatePackageJSON = exports.getRawPkg = exports.getRangeSpecifier = exports.getLatestVersion = exports.loadPackageJSONFiles = exports.findWorkspaceRoot = exports.loadPackageJSON = exports.resolveBin = exports.tryRequire = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const node_child_process_1 = require("node:child_process");
6
6
  const node_fs_1 = require("node:fs");
@@ -58,6 +58,7 @@ const findWorkspaceRoot = (start) => {
58
58
  dir = parent;
59
59
  }
60
60
  };
61
+ exports.findWorkspaceRoot = findWorkspaceRoot;
61
62
  // Resolve a package name to its directory by searching workspace packages.
62
63
  // Used as a fallback when nodeLinker:hoisted means workspace link: packages
63
64
  // are not present in node_modules (unlike npm which always symlinks them).
@@ -103,7 +104,7 @@ const loadPackageJSONFiles = (...args_1) => tslib_1.__awaiter(void 0, [...args_1
103
104
  catch (_a) { }
104
105
  // Fallback: pnpm hoisted mode does not put workspace link: packages into
105
106
  // node_modules. Search the workspace by name using the root package.json globs.
106
- const root = findWorkspaceRoot(process.cwd());
107
+ const root = (0, exports.findWorkspaceRoot)(process.cwd());
107
108
  if (root) {
108
109
  const dir = yield findInWorkspace(p, root);
109
110
  if (dir)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/build-kit",
3
3
  "description": "Build utilities & types",
4
- "version": "15.88.1",
4
+ "version": "15.88.2",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  "unparse-args": "^1.2.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@genesislcap/foundation-testing": "15.88.1",
41
+ "@genesislcap/foundation-testing": "15.88.2",
42
42
  "@types/http-proxy": "^1.17.8",
43
43
  "@types/node": "^22.10.2",
44
44
  "tsx": "^4.7.0",