@gjsify/resolve-npm 0.4.36 → 0.4.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.mjs +4 -1
  2. package/package.json +1 -1
package/lib/index.mjs CHANGED
@@ -313,13 +313,16 @@ export const ALIASES_NODE_FOR_NATIVESCRIPT = {
313
313
  'sqlite': '@gjsify/empty',
314
314
  'sys': '@gjsify/empty',
315
315
  'zlib': '@gjsify/empty',
316
- 'module': '@gjsify/empty',
317
316
 
318
317
  // Mobile-tractable Node built-ins → @gjsify/<X>
319
318
  'assert': '@gjsify/assert',
320
319
  'assert/strict': '@gjsify/assert',
321
320
  'async_hooks': '@gjsify/async_hooks',
322
321
  'buffer': '@gjsify/buffer',
322
+ // `@gjsify/module` (not `@gjsify/empty`): provides the named exports
323
+ // `createRequire` / `builtinModules` / `isBuiltin`, so `import { createRequire }
324
+ // from 'module'` in deps (e.g. css-tree) resolves instead of failing the build.
325
+ 'module': '@gjsify/module',
323
326
  'crypto': '@gjsify/crypto',
324
327
  'events': '@gjsify/events',
325
328
  'fs': '@gjsify/fs',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/resolve-npm",
3
- "version": "0.4.36",
3
+ "version": "0.4.38",
4
4
  "description": "Resolve NPM package aliases",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",