@jsnw/srv-utils 1.0.3 → 1.0.4

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.
@@ -11,6 +11,11 @@ function getRootPackageDirnameSync() {
11
11
  if (cachedRootPackageDirname !== null)
12
12
  return cachedRootPackageDirname;
13
13
  let path = (0, node_path_1.resolve)(__dirname, '..'), lastValidPath = path;
14
+ if (/[\\\/]node_modules[\\\/]/i.test(path)) {
15
+ const pieces = path.split(/[\\\/]node_modules[\\\/]/i);
16
+ if (pieces.length > 0)
17
+ path = pieces[0];
18
+ }
14
19
  while (true) {
15
20
  const packageJsonPath = (0, node_path_1.resolve)(path, 'package.json');
16
21
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsnw/srv-utils",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Server-side utilities for Node.js/TypeScript: tsconfig paths, Nest helpers, and config loading.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/types/index.d.ts",