Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/nft
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1.1
Choose a base ref
...
head repository: vercel/nft
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.2.0
Choose a head ref
  • 1 commit
  • 25 files changed
  • 2 contributors

Commits on Jan 7, 2026

  1. feat: support module.createRequire when mixedModules: false (#558)

    This PR adds several fixes and tests for various edge cases around
    `module.createRequire`.
    
    ### Null Checks
    
    When `mixedModules: false` and the file is ESM, `knownBindings.require`
    is `undefined` because it's only initialized for CommonJS or when
    `mixedModules: true`. The code was accessing
    `knownBindings.require.shadowDepth` without checking if `require` exists
    first.
    
    ### Blocking variables named `require`
    
    This came up by @timfish in [this
    comment](#543 (comment)),
    we seem to actively block variables named `require`.
    
    This is marked as "known unknown" but I thought we should make an
    exception if the variable was created by `module.createRequire`.
    
    ### Named import tracking
    
    Using:
    
    ```js
    import { createRequire } from 'node:module'
    ```
    
    wasn't being detected, so I added a detection block to support it.
    
    closes #543
    
    ---------
    
    Co-authored-by: Steven <steven@ceriously.com>
    logaretm and styfle authored Jan 7, 2026
    Configuration menu
    Copy the full SHA
    67038d5 View commit details
    Browse the repository at this point in the history
Loading