@jsenv/snapshot 1.2.3 → 1.2.5

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 (2) hide show
  1. package/package.json +4 -4
  2. package/src/cli.mjs +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/snapshot",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Snapshot testing",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -35,11 +35,11 @@
35
35
  "test": "node --conditions=development ./scripts/test.mjs"
36
36
  },
37
37
  "dependencies": {
38
- "@jsenv/filesystem": "4.6.3",
38
+ "@jsenv/filesystem": "4.6.4",
39
39
  "@jsenv/urls": "2.2.2",
40
40
  "@jsenv/utils": "2.1.1",
41
- "@jsenv/assert": "3.0.1",
42
- "prettier": "3.1.1"
41
+ "@jsenv/assert": "3.0.2",
42
+ "prettier": "3.2.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "strip-ansi": "7.1.0"
package/src/cli.mjs CHANGED
@@ -28,7 +28,8 @@ pattern: files matching this pattern will be removed; can use "*" and "**"
28
28
 
29
29
  const commandHandlers = {
30
30
  clear: async (pattern) => {
31
- const currentDirectoryUrl = pathToFileURL(`${process.cwd()}/`);
31
+ const currentDirectoryPath = process.cwd();
32
+ const currentDirectoryUrl = pathToFileURL(`${currentDirectoryPath}/`);
32
33
  clearDirectorySync(currentDirectoryUrl, pattern);
33
34
  },
34
35
  };
@@ -41,4 +42,4 @@ if (!commandHandler) {
41
42
  process.exit(1);
42
43
  }
43
44
 
44
- await commandHandler(positionals.slice(1));
45
+ await commandHandler(...positionals.slice(1));