Skip to content
un-tsPublic

About

Unofficial Node-compatible module resolution layers

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

uncompat

Unofficial Node-compatible module resolution layers.

Not affiliated with the projects these packages wrap; oxc-resolver is developed by oxc-project.

Packages

A thin compatibility layer over oxc-resolver that keeps its API and fixes up two Node.js / CommonJS resolution details upstream trades for speed:

  • LOAD_AS_FILE(DIR/X) is tried before LOAD_AS_DIRECTORY(DIR/X) for a bare package name, so a sibling node_modules/X.js wins over node_modules/X/ (unless the package declares exports, which takes precedence over both).
  • the entry directory is canonicalized before resolution, like Node does when symlinks are enabled.

Everything else, including bug fixes, comes from oxc-resolver.

import { ResolverFactory } from '@uncompat/oxc-resolver';

const resolver = new ResolverFactory({ extensions: ['.js', '.ts'] });
resolver.sync(process.cwd(), 'some-package');

Status

Experimental. The shims are intentionally small; upstream fixes should be preferred and the corresponding shim removed once released.

About

Unofficial Node-compatible module resolution layers

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages