Replace path.resolve with pathToFileURL

This commit is contained in:
freearhey 2025-01-05 20:10:11 +03:00
parent e7bbc7db23
commit e15d812750
5 changed files with 10 additions and 9 deletions

View file

@ -1,6 +1,6 @@
import { execSync } from 'child_process'
import fs from 'fs-extra'
import path from 'path'
import { pathToFileURL } from 'node:url'
import os from 'os'
beforeEach(() => {
@ -35,7 +35,7 @@ it('can update SITES.md', () => {
})
function content(filepath: string) {
const data = fs.readFileSync(path.resolve(filepath), {
const data = fs.readFileSync(pathToFileURL(filepath), {
encoding: 'utf8'
})