Skip to content

Commit

Permalink
fix: adjust require usage on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Jan 18, 2024
1 parent 54b18b1 commit f310afe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ecmaScript.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import module from 'module'
import url from 'url'
import clownface from 'clownface'
import { isNamedNode } from 'is-graph-pointer'
import type { LoaderRegistry } from 'rdf-loaders-registry'
Expand Down Expand Up @@ -27,7 +28,7 @@ function parseNamedNode({ term, dataset }: GraphPointerLike, { basePath }: { bas

const { filename, method } = iriResolve(link.value, basePath)

const path = typeof filename === 'string' ? filename : filename.pathname
const path = typeof filename === 'string' ? filename : url.fileURLToPath(filename)
const code = require(path)

if (!method) {
Expand Down

0 comments on commit f310afe

Please sign in to comment.