@jakubmazanec/fs-utils 0.1.0-265acad → 0.1.0-2f12db0

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.
@@ -7,7 +7,7 @@ import { isEmptyDirectory } from './isEmptyDirectory.js';
7
7
  */ export async function ensureEmptyDirectory(targetPath) {
8
8
  await fs.ensureDir(targetPath);
9
9
  if (!await isEmptyDirectory(targetPath)) {
10
- throw new Error(`Directory "${targetPath}" must be empty`);
10
+ throw new Error(`Directory "${targetPath}" must be empty.`);
11
11
  }
12
12
  }
13
13
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ensureEmptyDirectory.ts"],"sourcesContent":["import fs from 'fs-extra';\n\nimport {isEmptyDirectory} from './isEmptyDirectory.js';\n\n/**\n * Ensures that a path is actually an empty directory. If the path doesn't exist, the directory is created; if the path exists but isn't an ampty directory, error is thrown.\n *\n * @param path The target path.\n */\nexport async function ensureEmptyDirectory(targetPath: string) {\n await fs.ensureDir(targetPath);\n\n if (!(await isEmptyDirectory(targetPath))) {\n throw new Error(`Directory \"${targetPath}\" must be empty`);\n }\n}\n"],"names":["fs","isEmptyDirectory","ensureEmptyDirectory","targetPath","ensureDir","Error"],"mappings":"AAAA,OAAOA,QAAQ,WAAW;AAE1B,SAAQC,gBAAgB,QAAO,wBAAwB;AAEvD;;;;CAIC,GACD,OAAO,eAAeC,qBAAqBC,UAAkB;IAC3D,MAAMH,GAAGI,SAAS,CAACD;IAEnB,IAAI,CAAE,MAAMF,iBAAiBE,aAAc;QACzC,MAAM,IAAIE,MAAM,CAAC,WAAW,EAAEF,WAAW,eAAe,CAAC;IAC3D;AACF"}
1
+ {"version":3,"sources":["../src/ensureEmptyDirectory.ts"],"sourcesContent":["import fs from 'fs-extra';\n\nimport {isEmptyDirectory} from './isEmptyDirectory.js';\n\n/**\n * Ensures that a path is actually an empty directory. If the path doesn't exist, the directory is created; if the path exists but isn't an ampty directory, error is thrown.\n *\n * @param path The target path.\n */\nexport async function ensureEmptyDirectory(targetPath: string) {\n await fs.ensureDir(targetPath);\n\n if (!(await isEmptyDirectory(targetPath))) {\n throw new Error(`Directory \"${targetPath}\" must be empty.`);\n }\n}\n"],"names":["fs","isEmptyDirectory","ensureEmptyDirectory","targetPath","ensureDir","Error"],"mappings":"AAAA,OAAOA,QAAQ,WAAW;AAE1B,SAAQC,gBAAgB,QAAO,wBAAwB;AAEvD;;;;CAIC,GACD,OAAO,eAAeC,qBAAqBC,UAAkB;IAC3D,MAAMH,GAAGI,SAAS,CAACD;IAEnB,IAAI,CAAE,MAAMF,iBAAiBE,aAAc;QACzC,MAAM,IAAIE,MAAM,CAAC,WAAW,EAAEF,WAAW,gBAAgB,CAAC;IAC5D;AACF"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@jakubmazanec/fs-utils",
3
- "version": "0.1.0-265acad",
3
+ "version": "0.1.0-2f12db0",
4
4
  "description": "Collection of utilities for working with file system.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "https://github.com/jakubmazanec/js-tools",
7
+ "url": "git@github.com:jakubmazanec/js-tools.git",
8
8
  "directory": "packages/fs-utils"
9
9
  },
10
10
  "license": "LGPL-3.0-only",
@@ -11,6 +11,6 @@ export async function ensureEmptyDirectory(targetPath: string) {
11
11
  await fs.ensureDir(targetPath);
12
12
 
13
13
  if (!(await isEmptyDirectory(targetPath))) {
14
- throw new Error(`Directory "${targetPath}" must be empty`);
14
+ throw new Error(`Directory "${targetPath}" must be empty.`);
15
15
  }
16
16
  }