Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jul 3, 2024
1 parent d7142e7 commit c7111bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
OXC_LOG: 'debug'
DEBUG: '@swc-node:*'

jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions packages/register/esm.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFile } from 'fs/promises'
import { createRequire, type LoadFnOutput, type LoadHook, type ResolveFnOutput, type ResolveHook } from 'node:module'
import { extname, join } from 'path'
import { fileURLToPath, parse as parseUrl, pathToFileURL } from 'url'
import { fileURLToPath, pathToFileURL, URL } from 'url'

import debugFactory from 'debug'
import { ResolverFactory } from 'oxc-resolver'
Expand Down Expand Up @@ -156,7 +156,7 @@ export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
})
}

const parsedUrl = parseUrl(specifier)
const parsedUrl = new URL(specifier)

// as entrypoint, just return specifier
if (!context.parentURL || parsedUrl.protocol === 'file:') {
Expand Down

0 comments on commit c7111bd

Please sign in to comment.