<p dir="auto">They should be executed only once - their exports cached.</p>
<p dir="auto">Node behavior</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/src/deno&gt; cat test.js
require(&quot;./foo&quot;);
require(&quot;./foo&quot;);
~/src/deno&gt; cat foo.js
console.log(&quot;HELLO&quot;);
~/src/deno&gt; node test.js
HELLO
~/src/deno&gt;"><pre class="notranslate"><code class="notranslate">~/src/deno&gt; cat test.js
require("./foo");
require("./foo");
~/src/deno&gt; cat foo.js
console.log("HELLO");
~/src/deno&gt; node test.js
HELLO
~/src/deno&gt;
</code></pre></div>
<p dir="auto">Current deno behavior</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/src/deno&gt; cat test.ts
import &quot;./foo.ts&quot;;
import &quot;./foo.ts&quot;;
~/src/deno&gt; cat foo.ts
console.log(&quot;HELLO&quot;);
~/src/deno&gt; ./out/debug/deno test.ts
HELLO
HELLO
~/src/deno&gt;"><pre class="notranslate"><code class="notranslate">~/src/deno&gt; cat test.ts
import "./foo.ts";
import "./foo.ts";
~/src/deno&gt; cat foo.ts
console.log("HELLO");
~/src/deno&gt; ./out/debug/deno test.ts
HELLO
HELLO
~/src/deno&gt;
</code></pre></div>
<p dir="auto"><a href="https://embarkstudios.github.io/cargo-deny/index.html" rel="nofollow">https://embarkstudios.github.io/cargo-deny/index.html</a></p>
<p dir="auto"><code class="notranslate">cargo-deny</code> provides checks for security advisories and licence checks.</p>
<p dir="auto">It'd be very useful to add it to CI to ensure all dependencies have proper licenses and we're up to date with dependencies.</p>