Skip to content

Commit

Permalink
Ignore TS issue with Bun for now
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 27, 2024
1 parent 4b314e2 commit 2a36139
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/knip/src/util/file-entry-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class FileEntryCache<T> {
try {
const dir = dirname(this.filePath);
if (!isDirectory(dir)) fs.mkdirSync(dir, { recursive: true });
// @ts-ignore please bun
fs.writeFileSync(this.filePath, serialize(this.cache));
} catch (_err) {
debugLog('*', `Error writing cache to ${this.filePath}`);
Expand Down
1 change: 1 addition & 0 deletions packages/knip/src/util/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if (typeof Bun !== 'undefined') {
} else {
const { serialize, deserialize } = await import('node:v8');
s = serialize;
// @ts-ignore please bun
d = deserialize;
}

Expand Down

0 comments on commit 2a36139

Please sign in to comment.