@travetto/manifest 5.0.4 → 5.0.5
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/README.md +2 -1
- package/package.json +1 -1
- package/src/context.ts +7 -6
package/README.md
CHANGED
|
@@ -91,7 +91,8 @@ By default, all paths within the framework are assumed to be in a POSIX style, a
|
|
|
91
91
|
"compilerUrl": "http://127.0.0.1:26803",
|
|
92
92
|
"compilerModuleFolder": "module/compiler",
|
|
93
93
|
"outputFolder": ".trv/output",
|
|
94
|
-
"toolFolder": ".trv/tool"
|
|
94
|
+
"toolFolder": ".trv/tool",
|
|
95
|
+
"typesFolder": ".trv/types"
|
|
95
96
|
},
|
|
96
97
|
"main": {
|
|
97
98
|
"name": "@travetto/manifest",
|
package/package.json
CHANGED
package/src/context.ts
CHANGED
|
@@ -53,14 +53,15 @@ function findPackage(dir: string): Pkg {
|
|
|
53
53
|
* Get workspace root
|
|
54
54
|
*/
|
|
55
55
|
function resolveWorkspace(base: string = process.cwd()): Workspace {
|
|
56
|
-
if (base in WS_ROOT) {
|
|
56
|
+
if (base in WS_ROOT) {
|
|
57
|
+
return WS_ROOT[base];
|
|
58
|
+
}
|
|
57
59
|
let folder = base;
|
|
58
|
-
let prev;
|
|
59
|
-
|
|
60
|
-
let prevPkg, pkg;
|
|
60
|
+
let prev: string | undefined;
|
|
61
|
+
let pkg: Pkg | undefined;
|
|
61
62
|
|
|
62
63
|
while (prev !== folder) {
|
|
63
|
-
|
|
64
|
+
prev = folder;
|
|
64
65
|
pkg = readPackage(folder) ?? pkg;
|
|
65
66
|
if (
|
|
66
67
|
(pkg && (!!pkg.workspaces || !!pkg.travetto?.build?.isolated)) || // if we have a monorepo root, or we are isolated
|
|
@@ -82,7 +83,7 @@ function resolveWorkspace(base: string = process.cwd()): Workspace {
|
|
|
82
83
|
manager: existsSync(path.resolve(pkg.path, 'yarn.lock')) ? 'yarn' : 'npm',
|
|
83
84
|
resolve: createRequire(`${pkg.path}/node_modules`).resolve.bind(null),
|
|
84
85
|
stripRoot: (full) => full === pkg.path ? '' : full.replace(`${pkg.path}/`, ''),
|
|
85
|
-
mono: !!pkg.workspaces
|
|
86
|
+
mono: !!pkg.workspaces
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
|