Skip to content

Commit 8dbc180

Browse files
committed
fix(scrips): __dirname is undefined
1 parent 267ebe8 commit 8dbc180

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/release.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import fs from "fs";
22
import process from "process";
33
import archiver from "archiver";
4-
import path from "path";
4+
import { fileURLToPath } from "url";
5+
import path, { dirname } from "path";
56
import { releaseDirectories, releaseFiles, updateFile } from "./commons.mjs";
67

8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
711
const tarballReleaseFiles = () =>
812
new Promise((resolve, reject) => {
913
// create a file to stream archive data to.

0 commit comments

Comments
 (0)