@stryke/env 0.20.67 → 0.20.71

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 CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  # Changelog for Stryke - Env
4
4
 
5
+ ## [0.20.71](https://github.com/storm-software/stryke/releases/tag/env%400.20.71) (03/08/2026)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **string-format** to **v0.17.0**
10
+ - Updated **convert** to **v0.6.50**
11
+ - Updated **path** to **v0.26.16**
12
+ - Updated **fs** to **v0.33.54**
13
+
14
+ ## [0.20.70](https://github.com/storm-software/stryke/releases/tag/env%400.20.70) (03/06/2026)
15
+
16
+ ### Updated Dependencies
17
+
18
+ - Updated **string-format** to **v0.16.0**
19
+ - Updated **convert** to **v0.6.49**
20
+ - Updated **path** to **v0.26.15**
21
+ - Updated **fs** to **v0.33.53**
22
+
23
+ ## [0.20.69](https://github.com/storm-software/stryke/releases/tag/env%400.20.69) (03/06/2026)
24
+
25
+ ### Updated Dependencies
26
+
27
+ - Updated **string-format** to **v0.15.1**
28
+ - Updated **convert** to **v0.6.48**
29
+ - Updated **path** to **v0.26.14**
30
+ - Updated **fs** to **v0.33.52**
31
+
32
+ ## [0.20.68](https://github.com/storm-software/stryke/releases/tag/env%400.20.68) (03/06/2026)
33
+
34
+ ### Updated Dependencies
35
+
36
+ - Updated **string-format** to **v0.15.0**
37
+ - Updated **convert** to **v0.6.47**
38
+ - Updated **path** to **v0.26.13**
39
+ - Updated **fs** to **v0.33.51**
40
+
41
+ ## [0.20.67](https://github.com/storm-software/stryke/releases/tag/env%400.20.67) (03/03/2026)
42
+
43
+ ### Updated Dependencies
44
+
45
+ - Updated **fs** to **v0.33.50**
46
+
5
47
  ## [0.20.66](https://github.com/storm-software/stryke/releases/tag/env%400.20.66) (03/03/2026)
6
48
 
7
49
  ### Updated Dependencies
@@ -1,3 +1,4 @@
1
+ const require_acronyms = require('./acronyms.cjs');
1
2
  const require_combine = require('./combine.cjs');
2
3
  const require_decamelize = require('./decamelize.cjs');
3
4
  const require_format_special_cases = require('./format-special-cases.cjs');
@@ -12,7 +13,7 @@ const require_upper_case_first = require('./upper-case-first.cjs');
12
13
  * @returns The title cased string.
13
14
  */
14
15
  function titleCase(input, options) {
15
- return input?.split(/\s+-\s+/).map((segment) => require_decamelize.decamelize(segment).split(/[\s\-_]/).map(require_upper_case_first.upperCaseFirst).map((value, index, array) => require_format_special_cases.formatSpecialCases(value, index, array, options)).reduce(require_combine.combine)).join(" - ");
16
+ return input?.split(/\s+-\s+/).map((segment) => require_decamelize.decamelize(segment).split(/[\s\-_]/).map(require_upper_case_first.upperCaseFirst).map((value) => options?.expandAcronyms ? require_acronyms.ACRONYMS[value]?.description || value : value).map((value, index, array) => require_format_special_cases.formatSpecialCases(value, index, array, options)).reduce(require_combine.combine)).join(" - ");
16
17
  }
17
18
 
18
19
  //#endregion
@@ -1,3 +1,4 @@
1
+ import { ACRONYMS } from "./acronyms.mjs";
1
2
  import { combine } from "./combine.mjs";
2
3
  import { decamelize } from "./decamelize.mjs";
3
4
  import { formatSpecialCases } from "./format-special-cases.mjs";
@@ -12,7 +13,7 @@ import { upperCaseFirst } from "./upper-case-first.mjs";
12
13
  * @returns The title cased string.
13
14
  */
14
15
  function titleCase(input, options) {
15
- return input?.split(/\s+-\s+/).map((segment) => decamelize(segment).split(/[\s\-_]/).map(upperCaseFirst).map((value, index, array) => formatSpecialCases(value, index, array, options)).reduce(combine)).join(" - ");
16
+ return input?.split(/\s+-\s+/).map((segment) => decamelize(segment).split(/[\s\-_]/).map(upperCaseFirst).map((value) => options?.expandAcronyms ? ACRONYMS[value]?.description || value : value).map((value, index, array) => formatSpecialCases(value, index, array, options)).reduce(combine)).join(" - ");
16
17
  }
17
18
 
18
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"title-case.mjs","names":[],"sources":["../../../../string-format/src/title-case.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 { combine } from \"./combine\";\nimport { decamelize } from \"./decamelize\";\nimport type { FormatSpecialCasesOptions } from \"./format-special-cases\";\nimport { formatSpecialCases } from \"./format-special-cases\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\n/**\n * Convert a string to title case.\n *\n * @param input - The input string to convert.\n * @param options - Options for formatting special cases.\n * @returns The title cased string.\n */\nexport function titleCase<T extends string | undefined>(\n input: T,\n options?: FormatSpecialCasesOptions\n): T {\n return input\n ?.split(/\\s+-\\s+/)\n .map(segment =>\n decamelize(segment)\n .split(/[\\s\\-_]/)\n .map(upperCaseFirst)\n .map((value: string, index: number, array: string[]) =>\n formatSpecialCases(value, index, array, options)\n )\n .reduce(combine)\n )\n .join(\" - \") as T;\n}\n"],"mappings":";;;;;;;;;;;;;AA+BA,SAAgB,UACd,OACA,SACG;AACH,QAAO,OACH,MAAM,UAAU,CACjB,KAAI,YACH,WAAW,QAAQ,CAChB,MAAM,UAAU,CAChB,IAAI,eAAe,CACnB,KAAK,OAAe,OAAe,UAClC,mBAAmB,OAAO,OAAO,OAAO,QAAQ,CACjD,CACA,OAAO,QAAQ,CACnB,CACA,KAAK,MAAM"}
1
+ {"version":3,"file":"title-case.mjs","names":[],"sources":["../../../../string-format/src/title-case.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 { ACRONYMS } from \"./acronyms\";\nimport { combine } from \"./combine\";\nimport { decamelize } from \"./decamelize\";\nimport type { FormatSpecialCasesOptions } from \"./format-special-cases\";\nimport { formatSpecialCases } from \"./format-special-cases\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\nexport interface TitleCaseOptions extends FormatSpecialCasesOptions {\n /**\n * Whether to expand acronyms in the input string.\n *\n * @remarks\n * If true, acronyms will be expanded to their full form before being converted to title case. For example, \"NASA\" would be expanded to \"National Aeronautics and Space Administration\".\n *\n * @defaultValue false\n */\n expandAcronyms?: boolean;\n}\n\n/**\n * Convert a string to title case.\n *\n * @param input - The input string to convert.\n * @param options - Options for formatting special cases.\n * @returns The title cased string.\n */\nexport function titleCase<T extends string | undefined>(\n input: T,\n options?: TitleCaseOptions\n): T {\n return input\n ?.split(/\\s+-\\s+/)\n .map(segment =>\n decamelize(segment)\n .split(/[\\s\\-_]/)\n .map(upperCaseFirst)\n .map(value =>\n options?.expandAcronyms\n ? ACRONYMS[value]?.description || value\n : value\n )\n .map((value: string, index: number, array: string[]) =>\n formatSpecialCases(value, index, array, options)\n )\n .reduce(combine)\n )\n .join(\" - \") as T;\n}\n"],"mappings":";;;;;;;;;;;;;;AA4CA,SAAgB,UACd,OACA,SACG;AACH,QAAO,OACH,MAAM,UAAU,CACjB,KAAI,YACH,WAAW,QAAQ,CAChB,MAAM,UAAU,CAChB,IAAI,eAAe,CACnB,KAAI,UACH,SAAS,iBACL,SAAS,QAAQ,eAAe,QAChC,MACL,CACA,KAAK,OAAe,OAAe,UAClC,mBAAmB,OAAO,OAAO,OAAO,QAAQ,CACjD,CACA,OAAO,QAAQ,CACnB,CACA,KAAK,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/env",
3
- "version": "0.20.67",
3
+ "version": "0.20.71",
4
4
  "type": "module",
5
5
  "description": "A package containing utility functions to handle environment specific processes",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "types": "./dist/index.d.cts",
44
44
  "dependencies": {
45
45
  "@dotenvx/dotenvx": "1.35.0",
46
- "@stryke/convert": "^0.6.46",
47
- "@stryke/fs": "^0.33.50",
48
- "@stryke/path": "^0.26.12",
49
- "@stryke/string-format": "^0.14.8",
46
+ "@stryke/convert": "^0.6.50",
47
+ "@stryke/fs": "^0.33.54",
48
+ "@stryke/path": "^0.26.16",
49
+ "@stryke/string-format": "^0.17.0",
50
50
  "defu": "^6.1.4"
51
51
  },
52
- "devDependencies": { "@types/node": "^24.11.0", "tsdown": "^0.17.2" },
52
+ "devDependencies": { "@types/node": "^24.12.0", "tsdown": "^0.17.2" },
53
53
  "publishConfig": { "access": "public" },
54
- "gitHead": "1405021e71e320bcc0d7800ec36947f69055e91a"
54
+ "gitHead": "ddf54318bd81f6321233db8cfef8b991eb161413"
55
55
  }