Skip to content

Commit c9f4b98

Browse files
committed
Added support to run release notes using Windows
1 parent 53b3503 commit c9f4b98

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/release-notes.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import pkg from 'fs-extra';
22
import fetch from 'node-fetch';
3-
import { resolve } from 'path';
3+
import { resolve, dirname } from 'path';
44
import { compare } from 'semver';
5-
import { URL } from 'url';
5+
import { URL, fileURLToPath } from 'url';
66

77
import { renderMarkdown } from './utils.mjs';
88

9-
const __dirname = new URL('.', import.meta.url).pathname;
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = dirname(__filename);
1011
const OUTPUT_PATH = resolve(__dirname, '../src/components/page/reference/ReleaseNotes/release-notes.json');
1112

1213
// export default {

0 commit comments

Comments
 (0)