We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 986626e commit c760b8aCopy full SHA for c760b8a
packages/svelte/test/parser/update.js
@@ -2,8 +2,12 @@
2
// equivalents. Only use it when you're sure that you haven't
3
// broken anything!
4
import * as fs from 'node:fs';
5
+import { dirname } from 'node:path';
6
+import { fileURLToPath } from 'node:url';
7
import glob from 'tiny-glob/sync.js';
8
9
+const __dirname = dirname(fileURLToPath(import.meta.url));
10
+
11
glob('samples/*/_actual.json', { cwd: __dirname }).forEach((file) => {
12
const actual = fs.readFileSync(`${__dirname}/${file}`, 'utf-8');
13
fs.writeFileSync(`${__dirname}/${file.replace('_actual.json', 'output.json')}`, actual);
0 commit comments