Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
},
"scripts": {
"build": "tsc",
"mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec",
"test": "yarn lint && yarn mocha",
"test": "yarn lint && yarn vitest",
"lint": "yarn prettier:check",
"prettier": "prettier \"src/**/*.ts\" \"test/**/*.js\"",
"prettier": "prettier \"src/**/*.ts\" \"test/**/*.ts\"",
"prettier:check": "yarn prettier --check",
"prettier:write": "yarn prettier --write",
"prepare": "tsc"
Expand All @@ -42,15 +41,14 @@
"minimatch": "^3.0.4"
},
"devDependencies": {
"@types/lodash": "^4.17.14",
"@types/minimatch": "^3.0.5",
"@types/node": "^12.0.0",
"electron": "^22.0.0",
"electron-mocha": "^13.0.1",
"@types/rimraf": "^3.0.2",
"lodash": "^4.17.15",
"mocha": "^10.1.0",
"prettier": "^3.3.3",
"rimraf": "^3.0.2",
"typescript": "^5.5.4",
"xvfb-maybe": "^0.2.1"
"vitest": "^3.0.4"
}
}
12 changes: 6 additions & 6 deletions src/asar.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import * as path from 'path';
import minimatch from 'minimatch';
import * as path from 'path';

import fs from './wrapped-fs';
import { crawl as crawlFilesystem, determineFileType } from './crawlfs';
import * as disk from './disk';
import {
Filesystem,
FilesystemDirectoryEntry,
FilesystemEntry,
FilesystemLinkEntry,
} from './filesystem';
import * as disk from './disk';
import { crawl as crawlFilesystem, determineFileType } from './crawlfs';
import { IOptions } from './types/glob';
import fs from './wrapped-fs';

/**
* Whether a directory should be excluded from packing due to the `--unpack-dir" option.
Expand Down Expand Up @@ -219,7 +219,7 @@ export interface ListOptions {
isPack: boolean;
}

export function listPackage(archivePath: string, options: ListOptions) {
export function listPackage(archivePath: string, options?: ListOptions) {
return disk.readFilesystemSync(archivePath).listFiles(options);
}

Expand Down Expand Up @@ -303,8 +303,8 @@ export function uncacheAll() {
// (https://github.com/electron/asar/blob/50b0c62e5b24c3d164687e6470b8658e09b09eea/lib/index.d.ts)
// These don't match perfectly and are technically still a breaking change but they're close enough
// to keep _most_ build pipelines out there from breaking.
export { ArchiveHeader, DirectoryRecord, FileRecord, InputMetadata } from './disk';
export { EntryMetadata } from './filesystem';
export { InputMetadata, DirectoryRecord, FileRecord, ArchiveHeader } from './disk';
export type InputMetadataType = 'directory' | 'file' | 'link';
export type DirectoryMetadata = FilesystemDirectoryEntry;
export type FileMetadata = FilesystemEntry;
Expand Down
Loading
Loading