@stryke/path 0.4.4 â 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.
- package/README.md +18 -21
- package/dist/get-workspace-root.cjs +9 -10
- package/dist/get-workspace-root.mjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- markdownlint-disable -->
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div align="center"><img src="https://
|
|
6
|
+
<div align="center"><img src="https://public.storm-cdn.com/storm-banner.gif" width="100%" alt="Storm Software" /></div>
|
|
7
7
|
<br />
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŠī¸ Stryke** monorepo. Stryke pac
|
|
|
22
22
|
|
|
23
23
|
<h3 align="center">đģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
24
24
|
|
|
25
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
26
26
|
|
|
27
27
|
> [!IMPORTANT] This repository, and the apps, libraries, and tools contained
|
|
28
28
|
> within, is still in it's initial development phase. As a result, bugs and
|
|
@@ -51,24 +51,21 @@ built-in \`path\` module
|
|
|
51
51
|
|
|
52
52
|
<!-- START doctoc -->
|
|
53
53
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
54
|
-
|
|
55
54
|
## Table of Contents
|
|
56
55
|
|
|
57
|
-
- [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- [
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- [Contributing](#contributing)
|
|
71
|
-
- [Contributors](#contributors)
|
|
56
|
+
- [Installing](#installing)
|
|
57
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
58
|
+
- [Development](#development)
|
|
59
|
+
- [Building](#building)
|
|
60
|
+
- [Running unit tests](#running-unit-tests)
|
|
61
|
+
- [Linting](#linting)
|
|
62
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
63
|
+
- [Roadmap](#roadmap)
|
|
64
|
+
- [Support](#support)
|
|
65
|
+
- [License](#license)
|
|
66
|
+
- [Changelog](#changelog)
|
|
67
|
+
- [Contributing](#contributing)
|
|
68
|
+
- [Contributors](#contributors)
|
|
72
69
|
|
|
73
70
|
<!-- END doctoc -->
|
|
74
71
|
|
|
@@ -247,7 +244,7 @@ specification. Contributions of any kind welcome!
|
|
|
247
244
|
<br />
|
|
248
245
|
|
|
249
246
|
<div align="center">
|
|
250
|
-
<img src="https://
|
|
247
|
+
<img src="https://public.storm-cdn.com/logo-banner.png" width="100%" alt="Storm Software" />
|
|
251
248
|
</div>
|
|
252
249
|
<br />
|
|
253
250
|
|
|
@@ -278,9 +275,9 @@ generation of development tools, please reach out on our
|
|
|
278
275
|
|
|
279
276
|
<br />
|
|
280
277
|
|
|
281
|
-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://
|
|
278
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
|
|
282
279
|
<br />
|
|
283
|
-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://
|
|
280
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
|
|
284
281
|
|
|
285
282
|
<br />
|
|
286
283
|
|
|
@@ -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 = (
|
|
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
|
|
14
|
-
if (
|
|
15
|
-
let o = (0, _getParentPath.getParentPath)([
|
|
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 =
|
|
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
|
|
19
|
+
return t;
|
|
21
20
|
},
|
|
22
|
-
getProjectRoot = (
|
|
23
|
-
const
|
|
24
|
-
return
|
|
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
|
|
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.
|
|
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.
|
|
15
|
+
"@stryke/types": ">=0.7.2"
|
|
16
16
|
},
|
|
17
|
-
"devDependencies": { "@stryke/types": "0.
|
|
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/**/*"],
|