chrome-webstore-upload 5.0.0-0 → 5.0.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.
@@ -1,10 +1,12 @@
1
1
  import { readdir } from 'node:fs/promises';
2
- import { basename, join } from 'node:path';
2
+ import { join, relative } from 'node:path';
3
3
  import { isNotJunk } from 'junk';
4
4
  import yazl from 'yazl';
5
5
  export default async function zipStreamFromDirectory(directory) {
6
- const allFiles = await readdir(directory, { recursive: true });
7
- const files = allFiles.filter(file => isNotJunk(basename(file)));
6
+ const entries = await readdir(directory, { recursive: true, withFileTypes: true });
7
+ const files = entries
8
+ .filter(entry => entry.isFile() && isNotJunk(entry.name))
9
+ .map(entry => relative(directory, join(entry.parentPath, entry.name)));
8
10
  if (!files.includes('manifest.json')) {
9
11
  throw new Error(`manifest.json was not found in ${directory}`);
10
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-webstore-upload",
3
- "version": "5.0.0-0",
3
+ "version": "5.0.0",
4
4
  "description": "Upload Chrome Extensions to the Chrome Web Store",
5
5
  "keywords": [
6
6
  "chrome",