title: How to update project when a dependency switches to pure ESM
body: <p>We are developing a project that uses commonjs. When <code>node-fetch</code> is updated to v3.x, jest complains that:</p>
  <pre class="lang-js prettyprint-override"><code>import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch';
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code>SyntaxError: Cannot use import statement outside a module
  </code></pre>
  <p><code>npm run build</code> succeeds.</p>
  <p>If I use <code>node --experimental-vm-modules node_modules/.bin/jest</code> instead of <code>jest</code>, I get:</p>
  <pre class="lang-sh prettyprint-override"><code>Must use import to load ES Module
  </code></pre>
  <p>I did some reading, it appears that we need to migrate our project to be an ESM as well. But it does not appear to be easy.</p>
  <p>So the question is: when a dependency becomes pure ESM, how do we handle that in our code?</p>
  <p>FYI, our project is: <a href="https://gitlab.com/tezgraph/tezgraph" rel="nofollow noreferrer">https://gitlab.com/tezgraph/tezgraph</a></p>