@stryke/path 0.23.0 → 0.23.2
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/CHANGELOG.md +34 -0
- package/README.md +6 -6
- package/dist/is-parent-path.cjs +1 -1
- package/dist/is-parent-path.mjs +1 -1
- package/dist/is-parent-path.mjs.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Changelog for Stryke - Path
|
|
4
|
+
|
|
5
|
+
## [0.23.1](https://github.com/storm-software/stryke/releases/tag/path%400.23.1) (12/18/2025)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Update CDN URLs for banner assets
|
|
10
|
+
([5aefe1b](https://github.com/storm-software/stryke/commit/5aefe1b))
|
|
11
|
+
|
|
12
|
+
### Updated Dependencies
|
|
13
|
+
|
|
14
|
+
- Updated **type-checks** to **v0.5.13**
|
|
15
|
+
- Updated **convert** to **v0.6.28**
|
|
16
|
+
- Updated **types** to **v0.10.27**
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
# Changelog for Stryke - Path
|
|
21
|
+
|
|
22
|
+
## [0.23.0](https://github.com/storm-software/stryke/releases/tag/path%400.23.0) (12/18/2025)
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
- **path:** Added options to `appendPath` and improved `isParentPath` helpers
|
|
27
|
+
([726a82f](https://github.com/storm-software/stryke/commit/726a82f))
|
|
28
|
+
|
|
29
|
+
### Updated Dependencies
|
|
30
|
+
|
|
31
|
+
- Updated **type-checks** to **v0.5.12**
|
|
32
|
+
- Updated **convert** to **v0.6.27**
|
|
33
|
+
- Updated **types** to **v0.10.26**
|
|
34
|
+
|
|
1
35
|

|
|
2
36
|
|
|
3
37
|
# Changelog for Stryke - Path
|
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
<picture>
|
|
8
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-dark
|
|
9
|
-
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-light
|
|
10
|
-
<img src="https://public.storm-cdn.com/storm-software/banner-1280x640-dark
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-dark.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-light.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x640-dark.gif" width="100%" alt="Storm Software" />
|
|
11
11
|
</picture>
|
|
12
12
|
</div>
|
|
13
13
|
<br />
|
|
@@ -246,9 +246,9 @@ specification. Contributions of any kind welcome!
|
|
|
246
246
|
|
|
247
247
|
<div align="center">
|
|
248
248
|
<picture>
|
|
249
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark
|
|
250
|
-
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light
|
|
251
|
-
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark
|
|
249
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp">
|
|
250
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light.webp">
|
|
251
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
|
|
252
252
|
</picture>
|
|
253
253
|
</div>
|
|
254
254
|
<br />
|
package/dist/is-parent-path.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./slash.cjs`);function t(t,n){let r=e.slash(t.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase(),i=e.slash(n.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase();return r!==i&&r.startsWith(`${i}/`)}exports.isParentPath=t;
|
|
1
|
+
const e=require(`./slash.cjs`);function t(t,n){let r=e.slash(t.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase(),i=e.slash(n.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase();return t!==n&&r!==i&&r.startsWith(`${i}/`)}exports.isParentPath=t;
|
package/dist/is-parent-path.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slash as e}from"./slash.mjs";function t(t,n){let r=e(t.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase(),i=e(n.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase();return r!==i&&r.startsWith(`${i}/`)}export{t as isParentPath};
|
|
1
|
+
import{slash as e}from"./slash.mjs";function t(t,n){let r=e(t.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase(),i=e(n.replaceAll(/\\/g,`/`).replace(/\/*$/,``))?.toLowerCase();return t!==n&&r!==i&&r.startsWith(`${i}/`)}export{t as isParentPath};
|
|
2
2
|
//# sourceMappingURL=is-parent-path.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-parent-path.mjs","names":[],"sources":["../src/is-parent-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { slash } from \"./slash\";\n\n/**\n * Check if a given path is a parent of another path.\n *\n * @example\n * ```ts\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src\");\n * // returns true\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n * // returns true\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/other\");\n * // returns false\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/other\");\n * // returns false\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/index.ts\");\n * // returns false\n * ```\n *\n * @param childPath - The path to check if it is a child of the parent path.\n * @param parentPath - The path to check if it is a parent of the child path.\n * @returns `true` if `childPath` is a child of `parentPath`, otherwise `false`.\n */\nexport function isParentPath(childPath: string, parentPath: string): boolean {\n const normalizedChild = slash(\n childPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\")\n )?.toLowerCase();\n const normalizedParent = slash(\n parentPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\")\n )?.toLowerCase();\n\n return (\n normalizedChild !== normalizedParent &&\n normalizedChild.startsWith(`${normalizedParent}/`)\n );\n}\n"],"mappings":"oCAyCA,SAAgB,EAAa,EAAmB,EAA6B,CAC3E,IAAM,EAAkB,EACtB,EAAU,WAAW,MAAO,IAAI,CAAC,QAAQ,OAAQ,GAAG,CACrD,EAAE,aAAa,CACV,EAAmB,EACvB,EAAW,WAAW,MAAO,IAAI,CAAC,QAAQ,OAAQ,GAAG,CACtD,EAAE,aAAa,CAEhB,OACE,IAAoB,GACpB,EAAgB,WAAW,GAAG,EAAiB,GAAG"}
|
|
1
|
+
{"version":3,"file":"is-parent-path.mjs","names":[],"sources":["../src/is-parent-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { slash } from \"./slash\";\n\n/**\n * Check if a given path is a parent of another path.\n *\n * @example\n * ```ts\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src\");\n * // returns true\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n * // returns true\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/other\");\n * // returns false\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/other\");\n * // returns false\n * isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/index.ts\");\n * // returns false\n * ```\n *\n * @param childPath - The path to check if it is a child of the parent path.\n * @param parentPath - The path to check if it is a parent of the child path.\n * @returns `true` if `childPath` is a child of `parentPath`, otherwise `false`.\n */\nexport function isParentPath(childPath: string, parentPath: string): boolean {\n const normalizedChild = slash(\n childPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\")\n )?.toLowerCase();\n const normalizedParent = slash(\n parentPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\")\n )?.toLowerCase();\n\n return (\n childPath !== parentPath &&\n normalizedChild !== normalizedParent &&\n normalizedChild.startsWith(`${normalizedParent}/`)\n );\n}\n"],"mappings":"oCAyCA,SAAgB,EAAa,EAAmB,EAA6B,CAC3E,IAAM,EAAkB,EACtB,EAAU,WAAW,MAAO,IAAI,CAAC,QAAQ,OAAQ,GAAG,CACrD,EAAE,aAAa,CACV,EAAmB,EACvB,EAAW,WAAW,MAAO,IAAI,CAAC,QAAQ,OAAQ,GAAG,CACtD,EAAE,aAAa,CAEhB,OACE,IAAc,GACd,IAAoB,GACpB,EAAgB,WAAW,GAAG,EAAiB,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/path",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.2",
|
|
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": {
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
},
|
|
71
71
|
"types": "./dist/index.d.cts",
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@storm-software/testing-tools": "^1.119.
|
|
74
|
-
"@stryke/convert": "^0.6.
|
|
75
|
-
"@stryke/type-checks": "^0.5.
|
|
76
|
-
"@stryke/types": "^0.10.
|
|
73
|
+
"@storm-software/testing-tools": "^1.119.71",
|
|
74
|
+
"@stryke/convert": "^0.6.28",
|
|
75
|
+
"@stryke/type-checks": "^0.5.13",
|
|
76
|
+
"@stryke/types": "^0.10.27",
|
|
77
77
|
"tsdown": "^0.17.2"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": { "access": "public" },
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "562e4b64add5e6c076ae803315d2768582148620"
|
|
81
81
|
}
|