create-harper 0.8.2 → 0.8.3

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/lib/fs/isEmpty.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import fs from 'node:fs';
2
2
 
3
3
  /**
4
- * Checks if a directory is empty or only contains a .git directory.
4
+ * Checks if a directory is empty or only contains dot files/folders.
5
5
  *
6
6
  * @param {string} path - The path to the directory to check.
7
7
  * @returns {boolean} - True if the directory is considered empty, false otherwise.
8
8
  */
9
9
  export function isEmpty(path) {
10
10
  const files = fs.readdirSync(path);
11
- return files.length === 0 || (files.length === 1 && files[0] === '.git');
11
+ const foundNonDitFile = files.some(f => !f.startsWith('.'));
12
+ return files.length === 0 || !foundNonDitFile;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-harper",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "HarperDB",