Skip to content

Commit e243689

Browse files
Hugo PerezHugo Perez
authored andcommitted
refactor(scripts): migrate from CommonJS to ES modules in fix-imports
1 parent de25e98 commit e243689

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/fix-imports.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/usr/bin/env node
22

3-
const fs = require('fs');
4-
const path = require('path');
3+
import fs from 'fs';
4+
import path from 'path';
5+
import { fileURLToPath } from 'url';
6+
7+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
58

69
function fixImports(dir) {
710
const files = fs.readdirSync(dir);

0 commit comments

Comments
 (0)