@ark/fs 0.45.10 → 0.47.0

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/out/caller.js CHANGED
@@ -22,8 +22,9 @@ export const formatFilePath = (original, { relative, separator }) => {
22
22
  if (relative) {
23
23
  formatted = path.relative(typeof relative === "string" ? relative : process.cwd(), formatted);
24
24
  }
25
- if (separator)
26
- formatted = formatted.replace(new RegExp(`\\${path.sep}`, "g"), separator);
25
+ if (separator) {
26
+ formatted = formatted.replaceAll(new RegExp(`\\${path.sep}`, "g"), separator);
27
+ }
27
28
  return formatted;
28
29
  };
29
30
  export const caller = (options = {}) => {
package/out/fs.js CHANGED
@@ -128,9 +128,10 @@ const findReplace = matchers => input => matchers.reduce((acc, m) => acc.replace
128
128
  * each file's contents according to the provided `Matcher["find"]`
129
129
  * and `Matcher["replace"]`.
130
130
  */
131
- const findReplaceMany = (matchers) => (files = []) => void files.forEach(file => {
132
- writeFile(file, findReplace(matchers)(readFile(file)));
133
- });
131
+ const findReplaceMany = (matchers) => (files = []) => {
132
+ for (const file of files)
133
+ writeFile(file, findReplace(matchers)(readFile(file)));
134
+ };
134
135
  /**
135
136
  * Given a directory and a set of {@link Matchers}, recursively walks
136
137
  * the directory and applies every set of changes in the dictionary
@@ -23,12 +23,8 @@ export const getFramesFromError = (error) => {
23
23
  }
24
24
  }
25
25
  // Handle different stack formats
26
- if (stack) {
27
- if (Array.isArray(stack))
28
- frames = Array(stack);
29
- else
30
- frames = stack.toString().split("\n");
31
- }
26
+ if (stack)
27
+ frames = Array.isArray(stack) ? Array(stack) : stack.toString().split("\n");
32
28
  else
33
29
  frames = [];
34
30
  // Parse our frames
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ark/fs",
3
- "version": "0.45.10",
3
+ "version": "0.47.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "David Blass",