@stryke/path 0.4.5 → 0.4.6

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.
@@ -5,23 +5,22 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getWorkspaceRoot = exports.getProjectRoot = void 0;
7
7
  var _configTools = require("@storm-software/config-tools");
8
- var _packageManager = require("@stryke/types/package-manager");
9
8
  var _getParentPath = require("./get-parent-path.cjs");
10
9
  var _isRootDir = require("./is-root-dir.cjs");
11
- const getWorkspaceRoot = (r = process.cwd()) => {
10
+ const getWorkspaceRoot = (t = process.cwd()) => {
12
11
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) return process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
13
- const t = (0, _configTools.findWorkspaceRootSafe)(r);
14
- if (t) return t;
15
- let o = (0, _getParentPath.getParentPath)([_packageManager.PackageManagerLockFiles.NPM, _packageManager.PackageManagerLockFiles.YARN, _packageManager.PackageManagerLockFiles.PNPM, _packageManager.PackageManagerLockFiles.BUN, "nx.json", "knip.json", "pnpm-workspace.yaml", "LICENSE", ".all-contributorsrc", ".whitesource", "syncpack.config.js", "syncpack.json", "socket.yaml", "lefthook.yaml", ".npmrc", ".log4brains.yml", ".huskyrc", ".husky", ".lintstagedrc", ".commitlintrc", "lefthook.yml", ".github", ".nx", ".vscode", "patches"], r);
12
+ const r = (0, _configTools.findWorkspaceRootSafe)(t);
13
+ if (r) return r;
14
+ let o = (0, _getParentPath.getParentPath)(["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lock", "nx.json", "knip.json", "pnpm-workspace.yaml", "LICENSE", ".all-contributorsrc", ".whitesource", "syncpack.config.js", "syncpack.json", "socket.yaml", "lefthook.yaml", ".npmrc", ".log4brains.yml", ".huskyrc", ".husky", ".lintstagedrc", ".commitlintrc", "lefthook.yml", ".github", ".nx", ".vscode", "patches"], t);
16
15
  if (o) return o;
17
- for (o = r; o && !(0, _isRootDir.isSystemRoot)(o);) if (o = (0, _getParentPath.getParentPath)("storm.json", o, {
16
+ for (o = t; o && !(0, _isRootDir.isSystemRoot)(o);) if (o = (0, _getParentPath.getParentPath)("storm.json", o, {
18
17
  skipCwd: !0
19
18
  }), o) return o;
20
- return r;
19
+ return t;
21
20
  },
22
- getProjectRoot = (r = process.cwd()) => {
23
- const t = (0, _getParentPath.getParentPath)(["project.json", "package.json", ".storm"], r);
24
- return t || r;
21
+ getProjectRoot = (t = process.cwd()) => {
22
+ const r = (0, _getParentPath.getParentPath)(["project.json", "package.json", ".storm"], t);
23
+ return r || t;
25
24
  };
26
25
  exports.getProjectRoot = getProjectRoot;
27
26
  exports.getWorkspaceRoot = getWorkspaceRoot;
@@ -1 +1 @@
1
- import{findWorkspaceRootSafe as c}from"@storm-software/config-tools";import{PackageManagerLockFiles as e}from"@stryke/types/package-manager";import{getParentPath as s}from"./get-parent-path";import{isSystemRoot as n}from"./is-root-dir";export const getWorkspaceRoot=(r=process.cwd())=>{if(process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH)return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH;const t=c(r);if(t)return t;let o=s([e.NPM,e.YARN,e.PNPM,e.BUN,"nx.json","knip.json","pnpm-workspace.yaml","LICENSE",".all-contributorsrc",".whitesource","syncpack.config.js","syncpack.json","socket.yaml","lefthook.yaml",".npmrc",".log4brains.yml",".huskyrc",".husky",".lintstagedrc",".commitlintrc","lefthook.yml",".github",".nx",".vscode","patches"],r);if(o)return o;for(o=r;o&&!n(o);)if(o=s("storm.json",o,{skipCwd:!0}),o)return o;return r},getProjectRoot=(r=process.cwd())=>{const t=s(["project.json","package.json",".storm"],r);return t||r};
1
+ import{findWorkspaceRootSafe as s}from"@storm-software/config-tools";import{getParentPath as e}from"./get-parent-path";import{isSystemRoot as c}from"./is-root-dir";export const getWorkspaceRoot=(t=process.cwd())=>{if(process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH)return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH;const r=s(t);if(r)return r;let o=e(["package-lock.json","yarn.lock","pnpm-lock.yaml","bun.lock","nx.json","knip.json","pnpm-workspace.yaml","LICENSE",".all-contributorsrc",".whitesource","syncpack.config.js","syncpack.json","socket.yaml","lefthook.yaml",".npmrc",".log4brains.yml",".huskyrc",".husky",".lintstagedrc",".commitlintrc","lefthook.yml",".github",".nx",".vscode","patches"],t);if(o)return o;for(o=t;o&&!c(o);)if(o=e("storm.json",o,{skipCwd:!0}),o)return o;return t},getProjectRoot=(t=process.cwd())=>{const r=e(["project.json","package.json",".storm"],t);return r||t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/path",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "type": "module",
5
5
  "description": "A package containing various utilities that expand the functionality of NodeJs's built-in `path` module",
6
6
  "repository": {
@@ -12,9 +12,9 @@
12
12
  "dependencies": {
13
13
  "@storm-software/config-tools": "latest",
14
14
  "mlly": "1.7.4",
15
- "@stryke/types": ">=0.7.1"
15
+ "@stryke/types": ">=0.7.2"
16
16
  },
17
- "devDependencies": { "@stryke/types": "0.7.1", "@types/node": "^22.13.1" },
17
+ "devDependencies": { "@stryke/types": "0.7.2", "@types/node": "^22.13.1" },
18
18
  "publishConfig": { "access": "public" },
19
19
  "sideEffects": false,
20
20
  "files": ["dist/**/*"],