@travetto/manifest 5.0.6 → 5.0.7

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/package.json +1 -1
  2. package/src/context.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/manifest",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "Support for project indexing, manifesting, along with file watching",
5
5
  "keywords": [
6
6
  "path",
package/src/context.ts CHANGED
@@ -39,13 +39,13 @@ function findPackage(base: string, pred: (_p?: Pkg) => boolean): Pkg {
39
39
  /**
40
40
  * Gets build context
41
41
  */
42
- export function getManifestContext(root: string, mod?: string): ManifestContext {
42
+ export function getManifestContext(root: string = process.cwd()): ManifestContext {
43
43
  const workspace = findPackage(root, pkg => !!pkg?.workspaces || !!pkg?.travetto?.build?.isolated);
44
44
  const build = workspace.travetto?.build ?? {};
45
45
  const resolve = createRequire(path.resolve(workspace.path, 'node_modules')).resolve.bind(null);
46
46
  const wsPrefix = `${workspace.path}/`;
47
- const modPkg = mod ?
48
- readPackage(resolve(`${mod}/package.json`)) :
47
+ const modPkg = (!!workspace.workspaces && process.env.TRV_MODULE) ?
48
+ readPackage(resolve(`${process.env.TRV_MODULE}/package.json`)) :
49
49
  findPackage(root, pkg => !!pkg) ?? workspace;
50
50
 
51
51
  return {