@stryke/fs 0.33.83 → 0.33.85

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.
Files changed (204) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/_virtual/_rolldown/runtime.cjs +0 -14
  3. package/dist/buffer.cjs +0 -12
  4. package/dist/buffer.mjs +1 -8
  5. package/dist/buffer.mjs.map +1 -1
  6. package/dist/chmod-x.cjs +0 -14
  7. package/dist/chmod-x.mjs +1 -10
  8. package/dist/chmod-x.mjs.map +1 -1
  9. package/dist/command-exists.cjs +1 -11
  10. package/dist/command-exists.mjs +1 -6
  11. package/dist/command-exists.mjs.map +1 -1
  12. package/dist/compress.cjs +1 -8
  13. package/dist/compress.mjs +1 -3
  14. package/dist/compress.mjs.map +1 -1
  15. package/dist/constants.cjs +0 -13
  16. package/dist/constants.mjs +1 -8
  17. package/dist/copy-file.cjs +1 -13
  18. package/dist/copy-file.mjs +1 -8
  19. package/dist/copy-file.mjs.map +1 -1
  20. package/dist/exists.cjs +1 -11
  21. package/dist/exists.mjs +1 -6
  22. package/dist/exists.mjs.map +1 -1
  23. package/dist/get-parent-path.cjs +1 -8
  24. package/dist/get-parent-path.mjs +1 -3
  25. package/dist/get-parent-path.mjs.map +1 -1
  26. package/dist/get-workspace-root.cjs +0 -16
  27. package/dist/get-workspace-root.mjs +1 -12
  28. package/dist/get-workspace-root.mjs.map +1 -1
  29. package/dist/helpers.cjs +0 -14
  30. package/dist/helpers.mjs +1 -10
  31. package/dist/helpers.mjs.map +1 -1
  32. package/dist/index.cjs +0 -111
  33. package/dist/index.mjs +1 -107
  34. package/dist/install.cjs +0 -10
  35. package/dist/install.mjs +1 -6
  36. package/dist/install.mjs.map +1 -1
  37. package/dist/is-file.cjs +1 -13
  38. package/dist/is-file.mjs +1 -8
  39. package/dist/is-file.mjs.map +1 -1
  40. package/dist/json.cjs +0 -12
  41. package/dist/json.mjs +1 -8
  42. package/dist/json.mjs.map +1 -1
  43. package/dist/list-files.cjs +1 -15
  44. package/dist/list-files.mjs +1 -10
  45. package/dist/list-files.mjs.map +1 -1
  46. package/dist/package-fns.cjs +1 -16
  47. package/dist/package-fns.mjs +1 -11
  48. package/dist/package-fns.mjs.map +1 -1
  49. package/dist/read-file.cjs +1 -13
  50. package/dist/read-file.mjs +1 -8
  51. package/dist/read-file.mjs.map +1 -1
  52. package/dist/registry.cjs +0 -13
  53. package/dist/registry.mjs +1 -9
  54. package/dist/registry.mjs.map +1 -1
  55. package/dist/remove-file.cjs +1 -11
  56. package/dist/remove-file.mjs +1 -6
  57. package/dist/remove-file.mjs.map +1 -1
  58. package/dist/resolve.cjs +1 -20
  59. package/dist/resolve.mjs +1 -15
  60. package/dist/resolve.mjs.map +1 -1
  61. package/dist/semver-fns.cjs +1 -20
  62. package/dist/semver-fns.mjs +1 -15
  63. package/dist/semver-fns.mjs.map +1 -1
  64. package/dist/toml.cjs +0 -12
  65. package/dist/toml.mjs +1 -8
  66. package/dist/toml.mjs.map +1 -1
  67. package/dist/tsconfig.cjs +1 -8
  68. package/dist/tsconfig.mjs +1 -3
  69. package/dist/tsconfig.mjs.map +1 -1
  70. package/dist/write-file.cjs +1 -11
  71. package/dist/write-file.mjs +1 -6
  72. package/dist/write-file.mjs.map +1 -1
  73. package/dist/yaml.cjs +1 -11
  74. package/dist/yaml.mjs +1 -6
  75. package/dist/yaml.mjs.map +1 -1
  76. package/package.json +10 -110
  77. package/dist/_virtual/_rolldown/runtime.mjs +0 -18
  78. package/dist/buffer.test.cjs +0 -13
  79. package/dist/buffer.test.d.cts +0 -1
  80. package/dist/buffer.test.d.mts +0 -1
  81. package/dist/buffer.test.mjs +0 -14
  82. package/dist/buffer.test.mjs.map +0 -1
  83. package/dist/chmod-x.test.cjs +0 -13
  84. package/dist/chmod-x.test.d.cts +0 -1
  85. package/dist/chmod-x.test.d.mts +0 -1
  86. package/dist/chmod-x.test.mjs +0 -14
  87. package/dist/chmod-x.test.mjs.map +0 -1
  88. package/dist/command-exists.test.cjs +0 -13
  89. package/dist/command-exists.test.d.cts +0 -1
  90. package/dist/command-exists.test.d.mts +0 -1
  91. package/dist/command-exists.test.mjs +0 -14
  92. package/dist/command-exists.test.mjs.map +0 -1
  93. package/dist/compress.test.cjs +0 -13
  94. package/dist/compress.test.d.cts +0 -1
  95. package/dist/compress.test.d.mts +0 -1
  96. package/dist/compress.test.mjs +0 -14
  97. package/dist/compress.test.mjs.map +0 -1
  98. package/dist/constants.mjs.map +0 -1
  99. package/dist/constants.test.cjs +0 -13
  100. package/dist/constants.test.d.cts +0 -1
  101. package/dist/constants.test.d.mts +0 -1
  102. package/dist/constants.test.mjs +0 -14
  103. package/dist/constants.test.mjs.map +0 -1
  104. package/dist/copy-file.test.cjs +0 -13
  105. package/dist/copy-file.test.d.cts +0 -1
  106. package/dist/copy-file.test.d.mts +0 -1
  107. package/dist/copy-file.test.mjs +0 -14
  108. package/dist/copy-file.test.mjs.map +0 -1
  109. package/dist/exists.test.cjs +0 -13
  110. package/dist/exists.test.d.cts +0 -1
  111. package/dist/exists.test.d.mts +0 -1
  112. package/dist/exists.test.mjs +0 -14
  113. package/dist/exists.test.mjs.map +0 -1
  114. package/dist/get-parent-path.test.cjs +0 -13
  115. package/dist/get-parent-path.test.d.cts +0 -1
  116. package/dist/get-parent-path.test.d.mts +0 -1
  117. package/dist/get-parent-path.test.mjs +0 -14
  118. package/dist/get-parent-path.test.mjs.map +0 -1
  119. package/dist/get-workspace-root.test.cjs +0 -13
  120. package/dist/get-workspace-root.test.d.cts +0 -1
  121. package/dist/get-workspace-root.test.d.mts +0 -1
  122. package/dist/get-workspace-root.test.mjs +0 -14
  123. package/dist/get-workspace-root.test.mjs.map +0 -1
  124. package/dist/helpers.test.cjs +0 -13
  125. package/dist/helpers.test.d.cts +0 -1
  126. package/dist/helpers.test.d.mts +0 -1
  127. package/dist/helpers.test.mjs +0 -14
  128. package/dist/helpers.test.mjs.map +0 -1
  129. package/dist/index.mjs.map +0 -1
  130. package/dist/index.test.cjs +0 -13
  131. package/dist/index.test.d.cts +0 -1
  132. package/dist/index.test.d.mts +0 -1
  133. package/dist/index.test.mjs +0 -14
  134. package/dist/index.test.mjs.map +0 -1
  135. package/dist/install.test.cjs +0 -13
  136. package/dist/install.test.d.cts +0 -1
  137. package/dist/install.test.d.mts +0 -1
  138. package/dist/install.test.mjs +0 -14
  139. package/dist/install.test.mjs.map +0 -1
  140. package/dist/is-file.test.cjs +0 -13
  141. package/dist/is-file.test.d.cts +0 -1
  142. package/dist/is-file.test.d.mts +0 -1
  143. package/dist/is-file.test.mjs +0 -14
  144. package/dist/is-file.test.mjs.map +0 -1
  145. package/dist/json.test.cjs +0 -13
  146. package/dist/json.test.d.cts +0 -1
  147. package/dist/json.test.d.mts +0 -1
  148. package/dist/json.test.mjs +0 -14
  149. package/dist/json.test.mjs.map +0 -1
  150. package/dist/list-files.test.cjs +0 -13
  151. package/dist/list-files.test.d.cts +0 -1
  152. package/dist/list-files.test.d.mts +0 -1
  153. package/dist/list-files.test.mjs +0 -14
  154. package/dist/list-files.test.mjs.map +0 -1
  155. package/dist/package-fns.test.cjs +0 -13
  156. package/dist/package-fns.test.d.cts +0 -1
  157. package/dist/package-fns.test.d.mts +0 -1
  158. package/dist/package-fns.test.mjs +0 -14
  159. package/dist/package-fns.test.mjs.map +0 -1
  160. package/dist/read-file.test.cjs +0 -13
  161. package/dist/read-file.test.d.cts +0 -1
  162. package/dist/read-file.test.d.mts +0 -1
  163. package/dist/read-file.test.mjs +0 -14
  164. package/dist/read-file.test.mjs.map +0 -1
  165. package/dist/registry.test.cjs +0 -13
  166. package/dist/registry.test.d.cts +0 -1
  167. package/dist/registry.test.d.mts +0 -1
  168. package/dist/registry.test.mjs +0 -14
  169. package/dist/registry.test.mjs.map +0 -1
  170. package/dist/remove-file.test.cjs +0 -13
  171. package/dist/remove-file.test.d.cts +0 -1
  172. package/dist/remove-file.test.d.mts +0 -1
  173. package/dist/remove-file.test.mjs +0 -14
  174. package/dist/remove-file.test.mjs.map +0 -1
  175. package/dist/resolve.test.cjs +0 -13
  176. package/dist/resolve.test.d.cts +0 -1
  177. package/dist/resolve.test.d.mts +0 -1
  178. package/dist/resolve.test.mjs +0 -14
  179. package/dist/resolve.test.mjs.map +0 -1
  180. package/dist/semver-fns.test.cjs +0 -13
  181. package/dist/semver-fns.test.d.cts +0 -1
  182. package/dist/semver-fns.test.d.mts +0 -1
  183. package/dist/semver-fns.test.mjs +0 -14
  184. package/dist/semver-fns.test.mjs.map +0 -1
  185. package/dist/toml.test.cjs +0 -13
  186. package/dist/toml.test.d.cts +0 -1
  187. package/dist/toml.test.d.mts +0 -1
  188. package/dist/toml.test.mjs +0 -14
  189. package/dist/toml.test.mjs.map +0 -1
  190. package/dist/tsconfig.test.cjs +0 -13
  191. package/dist/tsconfig.test.d.cts +0 -1
  192. package/dist/tsconfig.test.d.mts +0 -1
  193. package/dist/tsconfig.test.mjs +0 -14
  194. package/dist/tsconfig.test.mjs.map +0 -1
  195. package/dist/write-file.test.cjs +0 -13
  196. package/dist/write-file.test.d.cts +0 -1
  197. package/dist/write-file.test.d.mts +0 -1
  198. package/dist/write-file.test.mjs +0 -14
  199. package/dist/write-file.test.mjs.map +0 -1
  200. package/dist/yaml.test.cjs +0 -13
  201. package/dist/yaml.test.d.cts +0 -1
  202. package/dist/yaml.test.d.mts +0 -1
  203. package/dist/yaml.test.mjs +0 -14
  204. package/dist/yaml.test.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"semver-fns.mjs","names":[],"sources":["../src/semver-fns.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 { isObject } from \"@stryke/type-checks/is-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { CoerceOptions, Range, SemVer } from \"semver\";\nimport { coerce, inc, parse, satisfies, valid, validRange } from \"semver\";\n\nexport type ReleaseType =\n | \"major\"\n | \"premajor\"\n | \"minor\"\n | \"preminor\"\n | \"patch\"\n | \"prepatch\"\n | \"prerelease\"\n | \"release\";\n\nexport const RELEASE_TYPES: ReleaseType[] = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\",\n \"release\"\n];\n\n/**\n * Parse a semver string into a SemVer object\n *\n * @param semver - The semver string to parse\n * @param loose - Whether to use loose parsing\n * @returns The parsed SemVer object\n */\nexport const parseVersion = (semver: string, loose = true) =>\n parse(semver, loose);\n\n/**\n * Coerce a version string into a valid SemVer string\n *\n * @param version - The version string or number or {@link SemVer} to coerce\n * @param options - Options to use when coercing the version\n * @returns The coerced SemVer string or null if invalid\n */\nexport const coerceVersion = (\n version: string | number | SemVer | null | undefined,\n options?: CoerceOptions\n): SemVer | null => {\n return coerce(version, options);\n};\n\n/**\n * Type check for {@link SemVer}\n *\n * @param val - The value to check\n * @returns Whether the value is a valid {@link SemVer}\n */\nexport const isSemver = (val: any): val is SemVer => {\n return isObject(val) && \"version\" in val;\n};\n\n/**\n * Type check for {@link Range}\n *\n * @param val - The value to check\n * @returns Whether the value is a valid {@link Range}\n */\nexport const isRange = (val: any): val is Range => {\n return isObject(val) && \"range\" in val;\n};\n\n/**\n * Check if a {@link SemVer} string is valid\n *\n * @remarks\n * If you're looking for type checking, please use the {@link isSemver} function.\n *\n * @param semver - The semver string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string is valid\n */\nexport const isValidSemver = (semver: any, loose = true): boolean => {\n return (\n (isString(semver) || isSemver(semver)) && valid(semver, loose) !== null\n );\n};\n\n/**\n * Check if a {@link Range} string is valid\n *\n * @remarks\n * If you're looking for type checking, please use the {@link isRange} function.\n *\n * @param range - The range string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the range string is valid\n */\nexport const isValidRange = (range: any, loose = true): boolean => {\n return (\n (isString(range) || isRange(range)) && validRange(range, loose) !== null\n );\n};\n\n/**\n * Check if a {@link SemVer} or {@link Range} string is valid\n *\n * @param version - The semver string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string is valid\n */\nexport const isValidVersion = (\n version: string | SemVer | Range | null | undefined,\n loose = true\n) => {\n return isValidSemver(version, loose) || isValidRange(version, loose);\n};\n\n/**\n * Check if a semver string satisfies a range\n *\n * @param version - The semver string to check\n * @param range - The range to check against\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string satisfies the range\n */\nexport const satisfiesVersion = (\n version: string | SemVer | null | undefined,\n range: string | Range | null | undefined,\n loose = true\n) => {\n if (\n !version ||\n !range ||\n !isValidSemver(version, loose) ||\n !isValidRange(range, loose)\n ) {\n return false;\n }\n\n return satisfies(version, range, { loose });\n};\n\n/**\n * Check if a string is a valid relative version keyword\n *\n * @param val - The string to check\n * @returns Whether the string is a valid relative version keyword\n */\nexport const isRelativeVersionKeyword = (val: string): val is ReleaseType => {\n return RELEASE_TYPES.includes(val as ReleaseType);\n};\n\n/**\n * Derive a new semver version from the current version and a version specifier\n *\n * @param currentSemverVersion - The current semver version\n * @param semverSpecifier - The semver specifier to use\n * @param preid - The pre-release identifier to use\n * @returns The derived new semver version\n */\nexport const deriveNewSemverVersion = (\n currentSemverVersion: string,\n semverSpecifier: string,\n preid?: string\n) => {\n if (!valid(currentSemverVersion)) {\n throw new Error(\n `Invalid semver version \"${currentSemverVersion}\" provided.`\n );\n }\n\n let newVersion = semverSpecifier;\n\n if (isRelativeVersionKeyword(semverSpecifier)) {\n // Derive the new version from the current version combined with the new version specifier.\n const derivedVersion = inc(currentSemverVersion, semverSpecifier, preid!);\n\n if (!derivedVersion) {\n throw new Error(\n `Unable to derive new version from current version \"${currentSemverVersion}\" and version specifier \"${semverSpecifier}\"`\n );\n }\n newVersion = derivedVersion;\n } else if (!valid(semverSpecifier)) {\n // Ensure the new version specifier is a valid semver version, given it is not a valid semver keyword\n throw new Error(\n `Invalid semver version specifier \"${semverSpecifier}\" provided. Please provide either a valid semver version or a valid semver version keyword.`\n );\n }\n\n return newVersion;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,MAAa,gBAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;;;AASD,MAAa,gBAAgB,QAAgB,QAAQ,SACnD,MAAM,QAAQ,MAAM;;;;;;;;AAStB,MAAa,iBACX,SACA,YACkB;AAClB,QAAO,OAAO,SAAS,QAAQ;;;;;;;;AASjC,MAAa,YAAY,QAA4B;AACnD,QAAO,SAAS,IAAI,IAAI,aAAa;;;;;;;;AASvC,MAAa,WAAW,QAA2B;AACjD,QAAO,SAAS,IAAI,IAAI,WAAW;;;;;;;;;;;;AAarC,MAAa,iBAAiB,QAAa,QAAQ,SAAkB;AACnE,SACG,SAAS,OAAO,IAAI,SAAS,OAAO,KAAK,MAAM,QAAQ,MAAM,KAAK;;;;;;;;;;;;AAcvE,MAAa,gBAAgB,OAAY,QAAQ,SAAkB;AACjE,SACG,SAAS,MAAM,IAAI,QAAQ,MAAM,KAAK,WAAW,OAAO,MAAM,KAAK;;;;;;;;;AAWxE,MAAa,kBACX,SACA,QAAQ,SACL;AACH,QAAO,cAAc,SAAS,MAAM,IAAI,aAAa,SAAS,MAAM;;;;;;;;;;AAWtE,MAAa,oBACX,SACA,OACA,QAAQ,SACL;AACH,KACE,CAAC,WACD,CAAC,SACD,CAAC,cAAc,SAAS,MAAM,IAC9B,CAAC,aAAa,OAAO,MAAM,CAE3B,QAAO;AAGT,QAAO,UAAU,SAAS,OAAO,EAAE,OAAO,CAAC;;;;;;;;AAS7C,MAAa,4BAA4B,QAAoC;AAC3E,QAAO,cAAc,SAAS,IAAmB;;;;;;;;;;AAWnD,MAAa,0BACX,sBACA,iBACA,UACG;AACH,KAAI,CAAC,MAAM,qBAAqB,CAC9B,OAAM,IAAI,MACR,2BAA2B,qBAAqB,aACjD;CAGH,IAAI,aAAa;AAEjB,KAAI,yBAAyB,gBAAgB,EAAE;EAE7C,MAAM,iBAAiB,IAAI,sBAAsB,iBAAiB,MAAO;AAEzE,MAAI,CAAC,eACH,OAAM,IAAI,MACR,sDAAsD,qBAAqB,2BAA2B,gBAAgB,GACvH;AAEH,eAAa;YACJ,CAAC,MAAM,gBAAgB,CAEhC,OAAM,IAAI,MACR,qCAAqC,gBAAgB,6FACtD;AAGH,QAAO"}
1
+ {"version":3,"file":"semver-fns.mjs","names":[],"sources":["../src/semver-fns.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 { isObject } from \"@stryke/type-checks/is-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { CoerceOptions, Range, SemVer } from \"semver\";\nimport { coerce, inc, parse, satisfies, valid, validRange } from \"semver\";\n\nexport type ReleaseType =\n | \"major\"\n | \"premajor\"\n | \"minor\"\n | \"preminor\"\n | \"patch\"\n | \"prepatch\"\n | \"prerelease\"\n | \"release\";\n\nexport const RELEASE_TYPES: ReleaseType[] = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\",\n \"release\"\n];\n\n/**\n * Parse a semver string into a SemVer object\n *\n * @param semver - The semver string to parse\n * @param loose - Whether to use loose parsing\n * @returns The parsed SemVer object\n */\nexport const parseVersion = (semver: string, loose = true) =>\n parse(semver, loose);\n\n/**\n * Coerce a version string into a valid SemVer string\n *\n * @param version - The version string or number or {@link SemVer} to coerce\n * @param options - Options to use when coercing the version\n * @returns The coerced SemVer string or null if invalid\n */\nexport const coerceVersion = (\n version: string | number | SemVer | null | undefined,\n options?: CoerceOptions\n): SemVer | null => {\n return coerce(version, options);\n};\n\n/**\n * Type check for {@link SemVer}\n *\n * @param val - The value to check\n * @returns Whether the value is a valid {@link SemVer}\n */\nexport const isSemver = (val: any): val is SemVer => {\n return isObject(val) && \"version\" in val;\n};\n\n/**\n * Type check for {@link Range}\n *\n * @param val - The value to check\n * @returns Whether the value is a valid {@link Range}\n */\nexport const isRange = (val: any): val is Range => {\n return isObject(val) && \"range\" in val;\n};\n\n/**\n * Check if a {@link SemVer} string is valid\n *\n * @remarks\n * If you're looking for type checking, please use the {@link isSemver} function.\n *\n * @param semver - The semver string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string is valid\n */\nexport const isValidSemver = (semver: any, loose = true): boolean => {\n return (\n (isString(semver) || isSemver(semver)) && valid(semver, loose) !== null\n );\n};\n\n/**\n * Check if a {@link Range} string is valid\n *\n * @remarks\n * If you're looking for type checking, please use the {@link isRange} function.\n *\n * @param range - The range string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the range string is valid\n */\nexport const isValidRange = (range: any, loose = true): boolean => {\n return (\n (isString(range) || isRange(range)) && validRange(range, loose) !== null\n );\n};\n\n/**\n * Check if a {@link SemVer} or {@link Range} string is valid\n *\n * @param version - The semver string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string is valid\n */\nexport const isValidVersion = (\n version: string | SemVer | Range | null | undefined,\n loose = true\n) => {\n return isValidSemver(version, loose) || isValidRange(version, loose);\n};\n\n/**\n * Check if a semver string satisfies a range\n *\n * @param version - The semver string to check\n * @param range - The range to check against\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string satisfies the range\n */\nexport const satisfiesVersion = (\n version: string | SemVer | null | undefined,\n range: string | Range | null | undefined,\n loose = true\n) => {\n if (\n !version ||\n !range ||\n !isValidSemver(version, loose) ||\n !isValidRange(range, loose)\n ) {\n return false;\n }\n\n return satisfies(version, range, { loose });\n};\n\n/**\n * Check if a string is a valid relative version keyword\n *\n * @param val - The string to check\n * @returns Whether the string is a valid relative version keyword\n */\nexport const isRelativeVersionKeyword = (val: string): val is ReleaseType => {\n return RELEASE_TYPES.includes(val as ReleaseType);\n};\n\n/**\n * Derive a new semver version from the current version and a version specifier\n *\n * @param currentSemverVersion - The current semver version\n * @param semverSpecifier - The semver specifier to use\n * @param preid - The pre-release identifier to use\n * @returns The derived new semver version\n */\nexport const deriveNewSemverVersion = (\n currentSemverVersion: string,\n semverSpecifier: string,\n preid?: string\n) => {\n if (!valid(currentSemverVersion)) {\n throw new Error(\n `Invalid semver version \"${currentSemverVersion}\" provided.`\n );\n }\n\n let newVersion = semverSpecifier;\n\n if (isRelativeVersionKeyword(semverSpecifier)) {\n // Derive the new version from the current version combined with the new version specifier.\n const derivedVersion = inc(currentSemverVersion, semverSpecifier, preid!);\n\n if (!derivedVersion) {\n throw new Error(\n `Unable to derive new version from current version \"${currentSemverVersion}\" and version specifier \"${semverSpecifier}\"`\n );\n }\n newVersion = derivedVersion;\n } else if (!valid(semverSpecifier)) {\n // Ensure the new version specifier is a valid semver version, given it is not a valid semver keyword\n throw new Error(\n `Invalid semver version specifier \"${semverSpecifier}\" provided. Please provide either a valid semver version or a valid semver version keyword.`\n );\n }\n\n return newVersion;\n};\n"],"mappings":";;;;;AAiCA,MAAa,gBAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;;;AASD,MAAa,gBAAgB,QAAgB,QAAQ,SACnD,MAAM,QAAQ,MAAM;;;;;;;;AAStB,MAAa,iBACX,SACA,YACkB;AAClB,QAAO,OAAO,SAAS,QAAQ;;;;;;;;AASjC,MAAa,YAAY,QAA4B;AACnD,QAAO,SAAS,IAAI,IAAI,aAAa;;;;;;;;AASvC,MAAa,WAAW,QAA2B;AACjD,QAAO,SAAS,IAAI,IAAI,WAAW;;;;;;;;;;;;AAarC,MAAa,iBAAiB,QAAa,QAAQ,SAAkB;AACnE,SACG,SAAS,OAAO,IAAI,SAAS,OAAO,KAAK,MAAM,QAAQ,MAAM,KAAK;;;;;;;;;;;;AAcvE,MAAa,gBAAgB,OAAY,QAAQ,SAAkB;AACjE,SACG,SAAS,MAAM,IAAI,QAAQ,MAAM,KAAK,WAAW,OAAO,MAAM,KAAK;;;;;;;;;AAWxE,MAAa,kBACX,SACA,QAAQ,SACL;AACH,QAAO,cAAc,SAAS,MAAM,IAAI,aAAa,SAAS,MAAM;;;;;;;;;;AAWtE,MAAa,oBACX,SACA,OACA,QAAQ,SACL;AACH,KACE,CAAC,WACD,CAAC,SACD,CAAC,cAAc,SAAS,MAAM,IAC9B,CAAC,aAAa,OAAO,MAAM,CAE3B,QAAO;AAGT,QAAO,UAAU,SAAS,OAAO,EAAE,OAAO,CAAC;;;;;;;;AAS7C,MAAa,4BAA4B,QAAoC;AAC3E,QAAO,cAAc,SAAS,IAAmB;;;;;;;;;;AAWnD,MAAa,0BACX,sBACA,iBACA,UACG;AACH,KAAI,CAAC,MAAM,qBAAqB,CAC9B,OAAM,IAAI,MACR,2BAA2B,qBAAqB,aACjD;CAGH,IAAI,aAAa;AAEjB,KAAI,yBAAyB,gBAAgB,EAAE;EAE7C,MAAM,iBAAiB,IAAI,sBAAsB,iBAAiB,MAAO;AAEzE,MAAI,CAAC,eACH,OAAM,IAAI,MACR,sDAAsD,qBAAqB,2BAA2B,gBAAgB,GACvH;AAEH,eAAa;YACJ,CAAC,MAAM,gBAAgB,CAEhC,OAAM,IAAI,MACR,qCAAqC,gBAAgB,6FACtD;AAGH,QAAO"}
package/dist/toml.cjs CHANGED
@@ -6,12 +6,6 @@ let smol_toml = require("smol-toml");
6
6
  smol_toml = require_runtime.__toESM(smol_toml, 1);
7
7
 
8
8
  //#region src/toml.ts
9
- var toml_exports = /* @__PURE__ */ require_runtime.__exportAll({
10
- readTomlFile: () => readTomlFile,
11
- readTomlFileSync: () => readTomlFileSync,
12
- writeTomlFile: () => writeTomlFile,
13
- writeTomlFileSync: () => writeTomlFileSync
14
- });
15
9
  /**
16
10
  * Reads a TOML file and returns the object the TOML content represents.
17
11
  *
@@ -58,11 +52,5 @@ async function writeTomlFile(path, data, options) {
58
52
  //#endregion
59
53
  exports.readTomlFile = readTomlFile;
60
54
  exports.readTomlFileSync = readTomlFileSync;
61
- Object.defineProperty(exports, 'toml_exports', {
62
- enumerable: true,
63
- get: function () {
64
- return toml_exports;
65
- }
66
- });
67
55
  exports.writeTomlFile = writeTomlFile;
68
56
  exports.writeTomlFileSync = writeTomlFileSync;
package/dist/toml.mjs CHANGED
@@ -1,15 +1,8 @@
1
- import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
2
1
  import { readFile, readFileSync } from "./read-file.mjs";
3
2
  import { writeFile, writeFileSync } from "./write-file.mjs";
4
3
  import TOML from "smol-toml";
5
4
 
6
5
  //#region src/toml.ts
7
- var toml_exports = /* @__PURE__ */ __exportAll({
8
- readTomlFile: () => readTomlFile,
9
- readTomlFileSync: () => readTomlFileSync,
10
- writeTomlFile: () => writeTomlFile,
11
- writeTomlFileSync: () => writeTomlFileSync
12
- });
13
6
  /**
14
7
  * Reads a TOML file and returns the object the TOML content represents.
15
8
  *
@@ -54,5 +47,5 @@ async function writeTomlFile(path, data, options) {
54
47
  }
55
48
 
56
49
  //#endregion
57
- export { readTomlFile, readTomlFileSync, toml_exports, writeTomlFile, writeTomlFileSync };
50
+ export { readTomlFile, readTomlFileSync, writeTomlFile, writeTomlFileSync };
58
51
  //# sourceMappingURL=toml.mjs.map
package/dist/toml.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"toml.mjs","names":[],"sources":["../src/toml.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 TOML from \"smol-toml\";\nimport { readFile, readFileSync } from \"./read-file\";\nimport { writeFile, writeFileSync } from \"./write-file\";\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param options - TOML parse options\n * @returns Object the TOML content of the file represents\n */\nexport function readTomlFileSync(\n path: string,\n options?: Parameters<typeof TOML.parse>[1]\n) {\n const content = readFileSync(path);\n\n return TOML.parse(content, options);\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param options - TOML parse options\n * @returns Object the TOML content of the file represents\n */\nexport async function readTomlFile(\n path: string,\n options?: Parameters<typeof TOML.parse>[1]\n) {\n const content = await readFile(path);\n\n return TOML.parse(content, options);\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized/formatted to TOML and written to the file\n * @param options - TOML parse options\n */\nexport function writeTomlFileSync(\n path: string,\n data: object,\n options?: Parameters<typeof TOML.stringify>[1]\n): void {\n return writeFileSync(path, TOML.stringify(data, options));\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized/formatted to TOML and written to the file\n * @param options - TOML parse options\n */\nexport async function writeTomlFile(\n path: string,\n data: object,\n options?: Parameters<typeof TOML.stringify>[1]\n): Promise<void> {\n return writeFile(path, TOML.stringify(data, options));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,iBACd,MACA,SACA;CACA,MAAM,UAAU,aAAa,KAAK;AAElC,QAAO,KAAK,MAAM,SAAS,QAAQ;;;;;;;;;AAUrC,eAAsB,aACpB,MACA,SACA;CACA,MAAM,UAAU,MAAM,SAAS,KAAK;AAEpC,QAAO,KAAK,MAAM,SAAS,QAAQ;;;;;;;;;AAUrC,SAAgB,kBACd,MACA,MACA,SACM;AACN,QAAO,cAAc,MAAM,KAAK,UAAU,MAAM,QAAQ,CAAC;;;;;;;;;AAU3D,eAAsB,cACpB,MACA,MACA,SACe;AACf,QAAO,UAAU,MAAM,KAAK,UAAU,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"toml.mjs","names":[],"sources":["../src/toml.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 TOML from \"smol-toml\";\nimport { readFile, readFileSync } from \"./read-file\";\nimport { writeFile, writeFileSync } from \"./write-file\";\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param options - TOML parse options\n * @returns Object the TOML content of the file represents\n */\nexport function readTomlFileSync(\n path: string,\n options?: Parameters<typeof TOML.parse>[1]\n) {\n const content = readFileSync(path);\n\n return TOML.parse(content, options);\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param options - TOML parse options\n * @returns Object the TOML content of the file represents\n */\nexport async function readTomlFile(\n path: string,\n options?: Parameters<typeof TOML.parse>[1]\n) {\n const content = await readFile(path);\n\n return TOML.parse(content, options);\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized/formatted to TOML and written to the file\n * @param options - TOML parse options\n */\nexport function writeTomlFileSync(\n path: string,\n data: object,\n options?: Parameters<typeof TOML.stringify>[1]\n): void {\n return writeFileSync(path, TOML.stringify(data, options));\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized/formatted to TOML and written to the file\n * @param options - TOML parse options\n */\nexport async function writeTomlFile(\n path: string,\n data: object,\n options?: Parameters<typeof TOML.stringify>[1]\n): Promise<void> {\n return writeFile(path, TOML.stringify(data, options));\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,SAAgB,iBACd,MACA,SACA;CACA,MAAM,UAAU,aAAa,KAAK;AAElC,QAAO,KAAK,MAAM,SAAS,QAAQ;;;;;;;;;AAUrC,eAAsB,aACpB,MACA,SACA;CACA,MAAM,UAAU,MAAM,SAAS,KAAK;AAEpC,QAAO,KAAK,MAAM,SAAS,QAAQ;;;;;;;;;AAUrC,SAAgB,kBACd,MACA,MACA,SACM;AACN,QAAO,cAAc,MAAM,KAAK,UAAU,MAAM,QAAQ,CAAC;;;;;;;;;AAU3D,eAAsB,cACpB,MACA,MACA,SACe;AACf,QAAO,UAAU,MAAM,KAAK,UAAU,MAAM,QAAQ,CAAC"}
package/dist/tsconfig.cjs CHANGED
@@ -12,7 +12,6 @@ let _stryke_path_cwd = require("@stryke/path/cwd");
12
12
  let _stryke_path_is_type = require("@stryke/path/is-type");
13
13
 
14
14
  //#region src/tsconfig.ts
15
- var tsconfig_exports = /* @__PURE__ */ require_runtime.__exportAll({ loadTsConfig: () => loadTsConfig });
16
15
  /**
17
16
  * Loads a tsconfig.json file and returns the parsed JSON object.
18
17
  *
@@ -36,10 +35,4 @@ async function loadTsConfig(filePath = (0, _stryke_path_cwd.cwd)()) {
36
35
  }
37
36
 
38
37
  //#endregion
39
- exports.loadTsConfig = loadTsConfig;
40
- Object.defineProperty(exports, 'tsconfig_exports', {
41
- enumerable: true,
42
- get: function () {
43
- return tsconfig_exports;
44
- }
45
- });
38
+ exports.loadTsConfig = loadTsConfig;
package/dist/tsconfig.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
2
1
  import { existsSync } from "./exists.mjs";
3
2
  import { resolve } from "./resolve.mjs";
4
3
  import { readJsonFile } from "./json.mjs";
@@ -10,7 +9,6 @@ import { cwd } from "@stryke/path/cwd";
10
9
  import { isNpmScopedPackage } from "@stryke/path/is-type";
11
10
 
12
11
  //#region src/tsconfig.ts
13
- var tsconfig_exports = /* @__PURE__ */ __exportAll({ loadTsConfig: () => loadTsConfig });
14
12
  /**
15
13
  * Loads a tsconfig.json file and returns the parsed JSON object.
16
14
  *
@@ -34,5 +32,5 @@ async function loadTsConfig(filePath = cwd()) {
34
32
  }
35
33
 
36
34
  //#endregion
37
- export { loadTsConfig, tsconfig_exports };
35
+ export { loadTsConfig };
38
36
  //# sourceMappingURL=tsconfig.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig.mjs","names":[],"sources":["../src/tsconfig.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 { toArray } from \"@stryke/convert/to-array\";\nimport { cwd } from \"@stryke/path/cwd\";\nimport { findFileExtension, findFilePath } from \"@stryke/path/file-path-fns\";\nimport { isNpmScopedPackage } from \"@stryke/path/is-type\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport { existsSync } from \"./exists\";\nimport { readJsonFile } from \"./json\";\nimport { resolve } from \"./resolve\";\n\n/**\n * Loads a tsconfig.json file and returns the parsed JSON object.\n *\n * @param filePath - The directory to start searching for the tsconfig.json file.\n * @returns The parsed tsconfig.json object or null if not found.\n */\nexport async function loadTsConfig(\n filePath: string = cwd()\n): Promise<TsConfigJson> {\n let tsconfigFilePath =\n findFileExtension(filePath) === \"json\"\n ? filePath\n : joinPaths(filePath, \"tsconfig.json\");\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = await resolve(filePath, { extensions: [\"json\"] });\n if (!existsSync(tsconfigFilePath)) {\n throw new Error(\n `tsconfig.json not found at ${tsconfigFilePath}. Please ensure the file exists.`\n );\n }\n }\n\n let config = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n if (config?.compilerOptions?.rootDir) {\n config.compilerOptions.rootDir = joinPaths(\n findFilePath(tsconfigFilePath),\n config.compilerOptions.rootDir\n );\n }\n\n if (config?.extends) {\n for (const extendsName of toArray(config.extends)) {\n const parentConfig = await loadTsConfig(\n isNpmScopedPackage(extendsName)\n ? extendsName\n : joinPaths(findFilePath(tsconfigFilePath), extendsName)\n );\n if (parentConfig) {\n config = defu(config, parentConfig ?? {});\n }\n }\n }\n\n config.extends = undefined;\n return config;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA,eAAsB,aACpB,WAAmB,KAAK,EACD;CACvB,IAAI,mBACF,kBAAkB,SAAS,KAAK,SAC5B,WACA,UAAU,UAAU,gBAAgB;AAC1C,KAAI,CAAC,WAAW,iBAAiB,EAAE;AACjC,qBAAmB,MAAM,QAAQ,UAAU,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;AACpE,MAAI,CAAC,WAAW,iBAAiB,CAC/B,OAAM,IAAI,MACR,8BAA8B,iBAAiB,kCAChD;;CAIL,IAAI,SAAS,MAAM,aAA2B,iBAAiB;AAC/D,KAAI,QAAQ,iBAAiB,QAC3B,QAAO,gBAAgB,UAAU,UAC/B,aAAa,iBAAiB,EAC9B,OAAO,gBAAgB,QACxB;AAGH,KAAI,QAAQ,QACV,MAAK,MAAM,eAAe,QAAQ,OAAO,QAAQ,EAAE;EACjD,MAAM,eAAe,MAAM,aACzB,mBAAmB,YAAY,GAC3B,cACA,UAAU,aAAa,iBAAiB,EAAE,YAAY,CAC3D;AACD,MAAI,aACF,UAAS,KAAK,QAAQ,gBAAgB,EAAE,CAAC;;AAK/C,QAAO,UAAU;AACjB,QAAO"}
1
+ {"version":3,"file":"tsconfig.mjs","names":[],"sources":["../src/tsconfig.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 { toArray } from \"@stryke/convert/to-array\";\nimport { cwd } from \"@stryke/path/cwd\";\nimport { findFileExtension, findFilePath } from \"@stryke/path/file-path-fns\";\nimport { isNpmScopedPackage } from \"@stryke/path/is-type\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport { existsSync } from \"./exists\";\nimport { readJsonFile } from \"./json\";\nimport { resolve } from \"./resolve\";\n\n/**\n * Loads a tsconfig.json file and returns the parsed JSON object.\n *\n * @param filePath - The directory to start searching for the tsconfig.json file.\n * @returns The parsed tsconfig.json object or null if not found.\n */\nexport async function loadTsConfig(\n filePath: string = cwd()\n): Promise<TsConfigJson> {\n let tsconfigFilePath =\n findFileExtension(filePath) === \"json\"\n ? filePath\n : joinPaths(filePath, \"tsconfig.json\");\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = await resolve(filePath, { extensions: [\"json\"] });\n if (!existsSync(tsconfigFilePath)) {\n throw new Error(\n `tsconfig.json not found at ${tsconfigFilePath}. Please ensure the file exists.`\n );\n }\n }\n\n let config = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n if (config?.compilerOptions?.rootDir) {\n config.compilerOptions.rootDir = joinPaths(\n findFilePath(tsconfigFilePath),\n config.compilerOptions.rootDir\n );\n }\n\n if (config?.extends) {\n for (const extendsName of toArray(config.extends)) {\n const parentConfig = await loadTsConfig(\n isNpmScopedPackage(extendsName)\n ? extendsName\n : joinPaths(findFilePath(tsconfigFilePath), extendsName)\n );\n if (parentConfig) {\n config = defu(config, parentConfig ?? {});\n }\n }\n }\n\n config.extends = undefined;\n return config;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,eAAsB,aACpB,WAAmB,KAAK,EACD;CACvB,IAAI,mBACF,kBAAkB,SAAS,KAAK,SAC5B,WACA,UAAU,UAAU,gBAAgB;AAC1C,KAAI,CAAC,WAAW,iBAAiB,EAAE;AACjC,qBAAmB,MAAM,QAAQ,UAAU,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;AACpE,MAAI,CAAC,WAAW,iBAAiB,CAC/B,OAAM,IAAI,MACR,8BAA8B,iBAAiB,kCAChD;;CAIL,IAAI,SAAS,MAAM,aAA2B,iBAAiB;AAC/D,KAAI,QAAQ,iBAAiB,QAC3B,QAAO,gBAAgB,UAAU,UAC/B,aAAa,iBAAiB,EAC9B,OAAO,gBAAgB,QACxB;AAGH,KAAI,QAAQ,QACV,MAAK,MAAM,eAAe,QAAQ,OAAO,QAAQ,EAAE;EACjD,MAAM,eAAe,MAAM,aACzB,mBAAmB,YAAY,GAC3B,cACA,UAAU,aAAa,iBAAiB,EAAE,YAAY,CAC3D;AACD,MAAI,aACF,UAAS,KAAK,QAAQ,gBAAgB,EAAE,CAAC;;AAK/C,QAAO,UAAU;AACjB,QAAO"}
@@ -8,10 +8,6 @@ let _stryke_path_correct_path = require("@stryke/path/correct-path");
8
8
  let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
9
9
 
10
10
  //#region src/write-file.ts
11
- var write_file_exports = /* @__PURE__ */ require_runtime.__exportAll({
12
- writeFile: () => writeFile,
13
- writeFileSync: () => writeFileSync
14
- });
15
11
  /**
16
12
  * Write the given content to the given file path
17
13
  *
@@ -42,10 +38,4 @@ const writeFile = async (filePath, content = "", options = {}) => {
42
38
 
43
39
  //#endregion
44
40
  exports.writeFile = writeFile;
45
- exports.writeFileSync = writeFileSync;
46
- Object.defineProperty(exports, 'write_file_exports', {
47
- enumerable: true,
48
- get: function () {
49
- return write_file_exports;
50
- }
51
- });
41
+ exports.writeFileSync = writeFileSync;
@@ -1,4 +1,3 @@
1
- import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
2
1
  import { existsSync as existsSync$1 } from "./exists.mjs";
3
2
  import { createDirectory, createDirectorySync } from "./helpers.mjs";
4
3
  import { writeFileSync as writeFileSync$1 } from "node:fs";
@@ -7,10 +6,6 @@ import { correctPath } from "@stryke/path/correct-path";
7
6
  import { findFilePath } from "@stryke/path/file-path-fns";
8
7
 
9
8
  //#region src/write-file.ts
10
- var write_file_exports = /* @__PURE__ */ __exportAll({
11
- writeFile: () => writeFile,
12
- writeFileSync: () => writeFileSync
13
- });
14
9
  /**
15
10
  * Write the given content to the given file path
16
11
  *
@@ -40,5 +35,5 @@ const writeFile = async (filePath, content = "", options = {}) => {
40
35
  };
41
36
 
42
37
  //#endregion
43
- export { writeFile, writeFileSync, write_file_exports };
38
+ export { writeFile, writeFileSync };
44
39
  //# sourceMappingURL=write-file.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"write-file.mjs","names":["existsSync","writeFileFs"],"sources":["../src/write-file.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 { correctPath } from \"@stryke/path/correct-path\";\nimport { findFilePath } from \"@stryke/path/file-path-fns\";\nimport type { Abortable } from \"node:events\";\nimport type {\n WriteFileOptions as FSWriteFileOptions,\n Mode,\n ObjectEncodingOptions,\n OpenMode\n} from \"node:fs\";\nimport { writeFileSync as writeFileSyncFs } from \"node:fs\";\nimport { writeFile as writeFileFs } from \"node:fs/promises\";\nimport type { Encoding } from \"./constants\";\nimport { existsSync } from \"./exists\";\nimport { createDirectory, createDirectorySync } from \"./helpers\";\n\nexport interface WriteFileOptions {\n /**\n * Whether to create the directory if it does not exist\n *\n * @defaultValue true\n */\n createDirectory?: boolean;\n}\n\n/**\n * Write the given content to the given file path\n *\n * @param filePath - The file path to write to\n * @param content - The content to write to the file\n */\nexport const writeFileSync = (\n filePath: string,\n content = \"\",\n options: WriteFileOptions & FSWriteFileOptions = {}\n): void => {\n if (!filePath) {\n throw new Error(\"No file path provided to write data\");\n }\n\n const directory = findFilePath(correctPath(filePath));\n if (!existsSync(directory)) {\n if (options.createDirectory !== false) {\n createDirectorySync(directory);\n } else {\n throw new Error(`Directory ${directory} does not exist`);\n }\n }\n\n writeFileSyncFs(filePath, content || \"\", options);\n};\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to read to\n * @param content - The content to write to the file\n * @returns The content of the file\n */\nexport const writeFile = async (\n filePath: string,\n content = \"\",\n options: WriteFileOptions &\n (\n | (ObjectEncodingOptions & {\n mode?: Mode | undefined;\n flag?: OpenMode | undefined;\n flush?: boolean | undefined;\n } & Abortable)\n | Encoding\n ) = {}\n): Promise<void> => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n const directory = findFilePath(correctPath(filePath));\n if (!existsSync(directory)) {\n if (options.createDirectory !== false) {\n await createDirectory(directory);\n } else {\n throw new Error(`Directory ${directory} does not exist`);\n }\n }\n\n return writeFileFs(filePath, content || \"\", options);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgDA,MAAa,iBACX,UACA,UAAU,IACV,UAAiD,EAAE,KAC1C;AACT,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,sCAAsC;CAGxD,MAAM,YAAY,aAAa,YAAY,SAAS,CAAC;AACrD,KAAI,CAACA,aAAW,UAAU,CACxB,KAAI,QAAQ,oBAAoB,MAC9B,qBAAoB,UAAU;KAE9B,OAAM,IAAI,MAAM,aAAa,UAAU,iBAAiB;AAI5D,iBAAgB,UAAU,WAAW,IAAI,QAAQ;;;;;;;;;AAUnD,MAAa,YAAY,OACvB,UACA,UAAU,IACV,UAQM,EAAE,KACU;AAClB,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,qCAAqC;CAGvD,MAAM,YAAY,aAAa,YAAY,SAAS,CAAC;AACrD,KAAI,CAACA,aAAW,UAAU,CACxB,KAAI,QAAQ,oBAAoB,MAC9B,OAAM,gBAAgB,UAAU;KAEhC,OAAM,IAAI,MAAM,aAAa,UAAU,iBAAiB;AAI5D,QAAOC,YAAY,UAAU,WAAW,IAAI,QAAQ"}
1
+ {"version":3,"file":"write-file.mjs","names":["existsSync","writeFileFs"],"sources":["../src/write-file.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 { correctPath } from \"@stryke/path/correct-path\";\nimport { findFilePath } from \"@stryke/path/file-path-fns\";\nimport type { Abortable } from \"node:events\";\nimport type {\n WriteFileOptions as FSWriteFileOptions,\n Mode,\n ObjectEncodingOptions,\n OpenMode\n} from \"node:fs\";\nimport { writeFileSync as writeFileSyncFs } from \"node:fs\";\nimport { writeFile as writeFileFs } from \"node:fs/promises\";\nimport type { Encoding } from \"./constants\";\nimport { existsSync } from \"./exists\";\nimport { createDirectory, createDirectorySync } from \"./helpers\";\n\nexport interface WriteFileOptions {\n /**\n * Whether to create the directory if it does not exist\n *\n * @defaultValue true\n */\n createDirectory?: boolean;\n}\n\n/**\n * Write the given content to the given file path\n *\n * @param filePath - The file path to write to\n * @param content - The content to write to the file\n */\nexport const writeFileSync = (\n filePath: string,\n content = \"\",\n options: WriteFileOptions & FSWriteFileOptions = {}\n): void => {\n if (!filePath) {\n throw new Error(\"No file path provided to write data\");\n }\n\n const directory = findFilePath(correctPath(filePath));\n if (!existsSync(directory)) {\n if (options.createDirectory !== false) {\n createDirectorySync(directory);\n } else {\n throw new Error(`Directory ${directory} does not exist`);\n }\n }\n\n writeFileSyncFs(filePath, content || \"\", options);\n};\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to read to\n * @param content - The content to write to the file\n * @returns The content of the file\n */\nexport const writeFile = async (\n filePath: string,\n content = \"\",\n options: WriteFileOptions &\n (\n | (ObjectEncodingOptions & {\n mode?: Mode | undefined;\n flag?: OpenMode | undefined;\n flush?: boolean | undefined;\n } & Abortable)\n | Encoding\n ) = {}\n): Promise<void> => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n const directory = findFilePath(correctPath(filePath));\n if (!existsSync(directory)) {\n if (options.createDirectory !== false) {\n await createDirectory(directory);\n } else {\n throw new Error(`Directory ${directory} does not exist`);\n }\n }\n\n return writeFileFs(filePath, content || \"\", options);\n};\n"],"mappings":";;;;;;;;;;;;;;AAgDA,MAAa,iBACX,UACA,UAAU,IACV,UAAiD,EAAE,KAC1C;AACT,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,sCAAsC;CAGxD,MAAM,YAAY,aAAa,YAAY,SAAS,CAAC;AACrD,KAAI,CAACA,aAAW,UAAU,CACxB,KAAI,QAAQ,oBAAoB,MAC9B,qBAAoB,UAAU;KAE9B,OAAM,IAAI,MAAM,aAAa,UAAU,iBAAiB;AAI5D,iBAAgB,UAAU,WAAW,IAAI,QAAQ;;;;;;;;;AAUnD,MAAa,YAAY,OACvB,UACA,UAAU,IACV,UAQM,EAAE,KACU;AAClB,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,qCAAqC;CAGvD,MAAM,YAAY,aAAa,YAAY,SAAS,CAAC;AACrD,KAAI,CAACA,aAAW,UAAU,CACxB,KAAI,QAAQ,oBAAoB,MAC9B,OAAM,gBAAgB,UAAU;KAEhC,OAAM,IAAI,MAAM,aAAa,UAAU,iBAAiB;AAI5D,QAAOC,YAAY,UAAU,WAAW,IAAI,QAAQ"}
package/dist/yaml.cjs CHANGED
@@ -4,10 +4,6 @@ const require_read_file = require('./read-file.cjs');
4
4
  let yaml = require("yaml");
5
5
 
6
6
  //#region src/yaml.ts
7
- var yaml_exports = /* @__PURE__ */ require_runtime.__exportAll({
8
- readYamlFile: () => readYamlFile,
9
- readYamlFileSync: () => readYamlFileSync
10
- });
11
7
  /**
12
8
  * Reads a YAML file and returns the object the YAML content represents.
13
9
  *
@@ -31,10 +27,4 @@ async function readYamlFile(path, options = {}) {
31
27
 
32
28
  //#endregion
33
29
  exports.readYamlFile = readYamlFile;
34
- exports.readYamlFileSync = readYamlFileSync;
35
- Object.defineProperty(exports, 'yaml_exports', {
36
- enumerable: true,
37
- get: function () {
38
- return yaml_exports;
39
- }
40
- });
30
+ exports.readYamlFileSync = readYamlFileSync;
package/dist/yaml.mjs CHANGED
@@ -1,12 +1,7 @@
1
- import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
2
1
  import { readFile, readFileSync } from "./read-file.mjs";
3
2
  import { parse } from "yaml";
4
3
 
5
4
  //#region src/yaml.ts
6
- var yaml_exports = /* @__PURE__ */ __exportAll({
7
- readYamlFile: () => readYamlFile,
8
- readYamlFileSync: () => readYamlFileSync
9
- });
10
5
  /**
11
6
  * Reads a YAML file and returns the object the YAML content represents.
12
7
  *
@@ -29,5 +24,5 @@ async function readYamlFile(path, options = {}) {
29
24
  }
30
25
 
31
26
  //#endregion
32
- export { readYamlFile, readYamlFileSync, yaml_exports };
27
+ export { readYamlFile, readYamlFileSync };
33
28
  //# sourceMappingURL=yaml.mjs.map
package/dist/yaml.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"yaml.mjs","names":[],"sources":["../src/yaml.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 type {\n DocumentOptions,\n ParseOptions,\n SchemaOptions,\n ToJSOptions\n} from \"yaml\";\nimport { parse } from \"yaml\";\nimport { readFile, readFileSync } from \"./read-file\";\n\nexport type YamlReadOptions = ParseOptions &\n DocumentOptions &\n SchemaOptions &\n ToJSOptions;\n\n/**\n * Reads a YAML file and returns the object the YAML content represents.\n *\n * @param path - A path to a file.\n * @param options - YAML parse options\n * @returns Object the YAML content of the file represents\n */\nexport function readYamlFileSync<T extends object = any>(\n path: string,\n options?: YamlReadOptions\n): T {\n return parse(readFileSync(path), options) as T;\n}\n\n/**\n * Reads a YAML file and returns the object the YAML content represents.\n *\n * @param path - A path to a file.\n * @param options - YAML parse options\n * @returns Object the YAML content of the file represents\n */\nexport async function readYamlFile<T extends object = any>(\n path: string,\n options: YamlReadOptions = {}\n): Promise<T> {\n return parse(await readFile(path), options) as T;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuCA,SAAgB,iBACd,MACA,SACG;AACH,QAAO,MAAM,aAAa,KAAK,EAAE,QAAQ;;;;;;;;;AAU3C,eAAsB,aACpB,MACA,UAA2B,EAAE,EACjB;AACZ,QAAO,MAAM,MAAM,SAAS,KAAK,EAAE,QAAQ"}
1
+ {"version":3,"file":"yaml.mjs","names":[],"sources":["../src/yaml.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 type {\n DocumentOptions,\n ParseOptions,\n SchemaOptions,\n ToJSOptions\n} from \"yaml\";\nimport { parse } from \"yaml\";\nimport { readFile, readFileSync } from \"./read-file\";\n\nexport type YamlReadOptions = ParseOptions &\n DocumentOptions &\n SchemaOptions &\n ToJSOptions;\n\n/**\n * Reads a YAML file and returns the object the YAML content represents.\n *\n * @param path - A path to a file.\n * @param options - YAML parse options\n * @returns Object the YAML content of the file represents\n */\nexport function readYamlFileSync<T extends object = any>(\n path: string,\n options?: YamlReadOptions\n): T {\n return parse(readFileSync(path), options) as T;\n}\n\n/**\n * Reads a YAML file and returns the object the YAML content represents.\n *\n * @param path - A path to a file.\n * @param options - YAML parse options\n * @returns Object the YAML content of the file represents\n */\nexport async function readYamlFile<T extends object = any>(\n path: string,\n options: YamlReadOptions = {}\n): Promise<T> {\n return parse(await readFile(path), options) as T;\n}\n"],"mappings":";;;;;;;;;;;AAuCA,SAAgB,iBACd,MACA,SACG;AACH,QAAO,MAAM,aAAa,KAAK,EAAE,QAAQ;;;;;;;;;AAU3C,eAAsB,aACpB,MACA,UAA2B,EAAE,EACjB;AACZ,QAAO,MAAM,MAAM,SAAS,KAAK,EAAE,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/fs",
3
- "version": "0.33.83",
3
+ "version": "0.33.85",
4
4
  "private": false,
5
5
  "description": "A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.",
6
6
  "repository": {
@@ -15,189 +15,89 @@
15
15
  "import": "./dist/buffer.mjs",
16
16
  "require": "./dist/buffer.cjs"
17
17
  },
18
- "./buffer.test": {
19
- "import": "./dist/buffer.test.mjs",
20
- "require": "./dist/buffer.test.cjs"
21
- },
22
18
  "./chmod-x": {
23
19
  "import": "./dist/chmod-x.mjs",
24
20
  "require": "./dist/chmod-x.cjs"
25
21
  },
26
- "./chmod-x.test": {
27
- "import": "./dist/chmod-x.test.mjs",
28
- "require": "./dist/chmod-x.test.cjs"
29
- },
30
22
  "./command-exists": {
31
23
  "import": "./dist/command-exists.mjs",
32
24
  "require": "./dist/command-exists.cjs"
33
25
  },
34
- "./command-exists.test": {
35
- "import": "./dist/command-exists.test.mjs",
36
- "require": "./dist/command-exists.test.cjs"
37
- },
38
26
  "./compress": {
39
27
  "import": "./dist/compress.mjs",
40
28
  "require": "./dist/compress.cjs"
41
29
  },
42
- "./compress.test": {
43
- "import": "./dist/compress.test.mjs",
44
- "require": "./dist/compress.test.cjs"
45
- },
46
30
  "./constants": {
47
31
  "import": "./dist/constants.mjs",
48
32
  "require": "./dist/constants.cjs"
49
33
  },
50
- "./constants.test": {
51
- "import": "./dist/constants.test.mjs",
52
- "require": "./dist/constants.test.cjs"
53
- },
54
34
  "./copy-file": {
55
35
  "import": "./dist/copy-file.mjs",
56
36
  "require": "./dist/copy-file.cjs"
57
37
  },
58
- "./copy-file.test": {
59
- "import": "./dist/copy-file.test.mjs",
60
- "require": "./dist/copy-file.test.cjs"
61
- },
62
38
  "./exists": {
63
39
  "import": "./dist/exists.mjs",
64
40
  "require": "./dist/exists.cjs"
65
41
  },
66
- "./exists.test": {
67
- "import": "./dist/exists.test.mjs",
68
- "require": "./dist/exists.test.cjs"
69
- },
70
42
  "./get-parent-path": {
71
43
  "import": "./dist/get-parent-path.mjs",
72
44
  "require": "./dist/get-parent-path.cjs"
73
45
  },
74
- "./get-parent-path.test": {
75
- "import": "./dist/get-parent-path.test.mjs",
76
- "require": "./dist/get-parent-path.test.cjs"
77
- },
78
46
  "./get-workspace-root": {
79
47
  "import": "./dist/get-workspace-root.mjs",
80
48
  "require": "./dist/get-workspace-root.cjs"
81
49
  },
82
- "./get-workspace-root.test": {
83
- "import": "./dist/get-workspace-root.test.mjs",
84
- "require": "./dist/get-workspace-root.test.cjs"
85
- },
86
50
  "./helpers": {
87
51
  "import": "./dist/helpers.mjs",
88
52
  "require": "./dist/helpers.cjs"
89
53
  },
90
- "./helpers.test": {
91
- "import": "./dist/helpers.test.mjs",
92
- "require": "./dist/helpers.test.cjs"
93
- },
94
- "./index.test": {
95
- "import": "./dist/index.test.mjs",
96
- "require": "./dist/index.test.cjs"
97
- },
98
54
  "./install": {
99
55
  "import": "./dist/install.mjs",
100
56
  "require": "./dist/install.cjs"
101
57
  },
102
- "./install.test": {
103
- "import": "./dist/install.test.mjs",
104
- "require": "./dist/install.test.cjs"
105
- },
106
58
  "./is-file": {
107
59
  "import": "./dist/is-file.mjs",
108
60
  "require": "./dist/is-file.cjs"
109
61
  },
110
- "./is-file.test": {
111
- "import": "./dist/is-file.test.mjs",
112
- "require": "./dist/is-file.test.cjs"
113
- },
114
62
  "./json": { "import": "./dist/json.mjs", "require": "./dist/json.cjs" },
115
- "./json.test": {
116
- "import": "./dist/json.test.mjs",
117
- "require": "./dist/json.test.cjs"
118
- },
119
63
  "./list-files": {
120
64
  "import": "./dist/list-files.mjs",
121
65
  "require": "./dist/list-files.cjs"
122
66
  },
123
- "./list-files.test": {
124
- "import": "./dist/list-files.test.mjs",
125
- "require": "./dist/list-files.test.cjs"
126
- },
127
67
  "./package-fns": {
128
68
  "import": "./dist/package-fns.mjs",
129
69
  "require": "./dist/package-fns.cjs"
130
70
  },
131
- "./package-fns.test": {
132
- "import": "./dist/package-fns.test.mjs",
133
- "require": "./dist/package-fns.test.cjs"
134
- },
135
71
  "./read-file": {
136
72
  "import": "./dist/read-file.mjs",
137
73
  "require": "./dist/read-file.cjs"
138
74
  },
139
- "./read-file.test": {
140
- "import": "./dist/read-file.test.mjs",
141
- "require": "./dist/read-file.test.cjs"
142
- },
143
75
  "./registry": {
144
76
  "import": "./dist/registry.mjs",
145
77
  "require": "./dist/registry.cjs"
146
78
  },
147
- "./registry.test": {
148
- "import": "./dist/registry.test.mjs",
149
- "require": "./dist/registry.test.cjs"
150
- },
151
79
  "./remove-file": {
152
80
  "import": "./dist/remove-file.mjs",
153
81
  "require": "./dist/remove-file.cjs"
154
82
  },
155
- "./remove-file.test": {
156
- "import": "./dist/remove-file.test.mjs",
157
- "require": "./dist/remove-file.test.cjs"
158
- },
159
83
  "./resolve": {
160
84
  "import": "./dist/resolve.mjs",
161
85
  "require": "./dist/resolve.cjs"
162
86
  },
163
- "./resolve.test": {
164
- "import": "./dist/resolve.test.mjs",
165
- "require": "./dist/resolve.test.cjs"
166
- },
167
87
  "./semver-fns": {
168
88
  "import": "./dist/semver-fns.mjs",
169
89
  "require": "./dist/semver-fns.cjs"
170
90
  },
171
- "./semver-fns.test": {
172
- "import": "./dist/semver-fns.test.mjs",
173
- "require": "./dist/semver-fns.test.cjs"
174
- },
175
91
  "./toml": { "import": "./dist/toml.mjs", "require": "./dist/toml.cjs" },
176
- "./toml.test": {
177
- "import": "./dist/toml.test.mjs",
178
- "require": "./dist/toml.test.cjs"
179
- },
180
92
  "./tsconfig": {
181
93
  "import": "./dist/tsconfig.mjs",
182
94
  "require": "./dist/tsconfig.cjs"
183
95
  },
184
- "./tsconfig.test": {
185
- "import": "./dist/tsconfig.test.mjs",
186
- "require": "./dist/tsconfig.test.cjs"
187
- },
188
96
  "./write-file": {
189
97
  "import": "./dist/write-file.mjs",
190
98
  "require": "./dist/write-file.cjs"
191
99
  },
192
- "./write-file.test": {
193
- "import": "./dist/write-file.test.mjs",
194
- "require": "./dist/write-file.test.cjs"
195
- },
196
100
  "./yaml": { "import": "./dist/yaml.mjs", "require": "./dist/yaml.cjs" },
197
- "./yaml.test": {
198
- "import": "./dist/yaml.test.mjs",
199
- "require": "./dist/yaml.test.cjs"
200
- },
201
101
  "./package.json": "./package.json"
202
102
  },
203
103
  "main": "./dist/index.cjs",
@@ -205,14 +105,14 @@
205
105
  "types": "./dist/index.d.cts",
206
106
  "dependencies": {
207
107
  "@antfu/install-pkg": "^1.1.0",
208
- "@storm-software/config-tools": "^1.190.37",
209
- "@stryke/convert": "^0.7.13",
210
- "@stryke/helpers": "^0.10.22",
211
- "@stryke/json": "^0.15.6",
212
- "@stryke/path": "^0.29.9",
213
- "@stryke/string-format": "^0.17.24",
214
- "@stryke/type-checks": "^0.6.15",
215
- "@stryke/types": "^0.12.10",
108
+ "@storm-software/config-tools": "^1.190.40",
109
+ "@stryke/convert": "^0.7.15",
110
+ "@stryke/helpers": "^0.10.24",
111
+ "@stryke/json": "^0.15.8",
112
+ "@stryke/path": "^0.29.11",
113
+ "@stryke/string-format": "^0.17.26",
114
+ "@stryke/type-checks": "^0.6.17",
115
+ "@stryke/types": "^0.12.12",
216
116
  "chalk": "^5.6.2",
217
117
  "defu": "^6.1.7",
218
118
  "glob": "^11.1.0",
@@ -229,5 +129,5 @@
229
129
  "tsdown": "^0.21.10"
230
130
  },
231
131
  "publishConfig": { "access": "public" },
232
- "gitHead": "382b4bec8c654cae2ab6503f33515f8958d8468e"
132
+ "gitHead": "bd69eed49ebce911858f4439a92b2d4e6e20c6df"
233
133
  }
@@ -1,18 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) {
6
- __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- }
11
- if (!no_symbols) {
12
- __defProp(target, Symbol.toStringTag, { value: "Module" });
13
- }
14
- return target;
15
- };
16
-
17
- //#endregion
18
- export { __exportAll };
@@ -1,13 +0,0 @@
1
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
- const require_buffer = require('./buffer.cjs');
3
- let vitest = require("vitest");
4
-
5
- //#region src/buffer.test.ts
6
- (0, vitest.describe)("buffer.ts exports", () => {
7
- (0, vitest.it)("loads module exports", () => {
8
- (0, vitest.expect)(require_buffer.buffer_exports).toBeDefined();
9
- (0, vitest.expect)(typeof require_buffer.buffer_exports).toBe("object");
10
- });
11
- });
12
-
13
- //#endregion
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,14 +0,0 @@
1
- import { buffer_exports } from "./buffer.mjs";
2
- import { describe, expect, it } from "vitest";
3
-
4
- //#region src/buffer.test.ts
5
- describe("buffer.ts exports", () => {
6
- it("loads module exports", () => {
7
- expect(buffer_exports).toBeDefined();
8
- expect(typeof buffer_exports).toBe("object");
9
- });
10
- });
11
-
12
- //#endregion
13
- export { };
14
- //# sourceMappingURL=buffer.test.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer.test.mjs","names":["moduleExports"],"sources":["../src/buffer.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./buffer.ts\";\n\ndescribe(\"buffer.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,2BAA2B;AAClC,IAAG,8BAA8B;AAC/B,SAAOA,eAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,eAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
@@ -1,13 +0,0 @@
1
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
- const require_chmod_x = require('./chmod-x.cjs');
3
- let vitest = require("vitest");
4
-
5
- //#region src/chmod-x.test.ts
6
- (0, vitest.describe)("chmod-x.ts exports", () => {
7
- (0, vitest.it)("loads module exports", () => {
8
- (0, vitest.expect)(require_chmod_x.chmod_x_exports).toBeDefined();
9
- (0, vitest.expect)(typeof require_chmod_x.chmod_x_exports).toBe("object");
10
- });
11
- });
12
-
13
- //#endregion
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,14 +0,0 @@
1
- import { chmod_x_exports } from "./chmod-x.mjs";
2
- import { describe, expect, it } from "vitest";
3
-
4
- //#region src/chmod-x.test.ts
5
- describe("chmod-x.ts exports", () => {
6
- it("loads module exports", () => {
7
- expect(chmod_x_exports).toBeDefined();
8
- expect(typeof chmod_x_exports).toBe("object");
9
- });
10
- });
11
-
12
- //#endregion
13
- export { };
14
- //# sourceMappingURL=chmod-x.test.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chmod-x.test.mjs","names":["moduleExports"],"sources":["../src/chmod-x.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./chmod-x.ts\";\n\ndescribe(\"chmod-x.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,4BAA4B;AACnC,IAAG,8BAA8B;AAC/B,SAAOA,gBAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,gBAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
@@ -1,13 +0,0 @@
1
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
- const require_command_exists = require('./command-exists.cjs');
3
- let vitest = require("vitest");
4
-
5
- //#region src/command-exists.test.ts
6
- (0, vitest.describe)("command-exists.ts exports", () => {
7
- (0, vitest.it)("loads module exports", () => {
8
- (0, vitest.expect)(require_command_exists.command_exists_exports).toBeDefined();
9
- (0, vitest.expect)(typeof require_command_exists.command_exists_exports).toBe("object");
10
- });
11
- });
12
-
13
- //#endregion
@@ -1 +0,0 @@
1
- export { };