<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">package.json :</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
&quot;name&quot;: &quot;xxx&quot;,
&quot;files&quot;: [&quot;./dist/&quot;]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"name"</span>: <span class="pl-s">"xxx"</span><span class="pl-kos">,</span>
<span class="pl-s">"files"</span>: <span class="pl-kos">[</span><span class="pl-s">"./dist/"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">running <code class="notranslate">npm publish</code>, the dist will not be packed.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">the dist should be packed.</p>
<p dir="auto">I just found a workaround: <code class="notranslate">"files": ["dist/"]</code></p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In this environment...</li>
<li>With this config...</li>
<li>Run '...'</li>
<li>See error...</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: 8.5.5</li>
<li>Node.js: v16.15.0</li>
<li>OS Name: macos</li>
<li>System Model Name:</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="; copy and paste output from `npm config ls` here"><pre class="notranslate"><span class="pl-c"><span class="pl-c">;</span> copy and paste output from `npm config ls` here</span></pre></div>
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">When using leading periods in paths within the <code class="notranslate">files</code> section, the path is not included in publishing. This feels very inconsistent from paths in <code class="notranslate">exports</code> maps and other places.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">All relative paths defined in <code class="notranslate">package.json</code> content should consistently allow leading periods.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Create a project to publish with files in a <code class="notranslate">lib</code> folder.</li>
<li>Create a <code class="notranslate">package.json</code> which includes the <code class="notranslate">lib</code> folder in the <code class="notranslate">files</code> section:</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;files&quot;: [
    &quot;./lib&quot;
  ]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"files"</span>: <span class="pl-kos">[</span>
    <span class="pl-s">"./lib"</span>
  <span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<ol start="3" dir="auto">
<li>Run <code class="notranslate">npm publish --dry</code> to see what gets published.</li>
<li>Remove the leading period in the <code class="notranslate">./lib</code> path and re-run the publish dryrun. Notice more files.</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: 8.8.0</li>
<li>Node.js: 14.17.6</li>
<li>OS Name: MacOS</li>
<li>System Model Name: Macbook Pro M1</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="; node bin location = /usr/local/bin/node
; node version = v14.17.6
; npm local prefix = /Users/dzearing/git/ori
; npm version = 8.8.0
; cwd = /Users/dzearing/git/ori/js/packages/api
; HOME = /Users/dzearing"><pre class="notranslate"><span class="pl-c"><span class="pl-c">;</span> node bin location = /usr/local/bin/node</span>
<span class="pl-c"><span class="pl-c">;</span> node version = v14.17.6</span>
<span class="pl-c"><span class="pl-c">;</span> npm local prefix = /Users/dzearing/git/ori</span>
<span class="pl-c"><span class="pl-c">;</span> npm version = 8.8.0</span>
<span class="pl-c"><span class="pl-c">;</span> cwd = /Users/dzearing/git/ori/js/packages/api</span>
<span class="pl-c"><span class="pl-c">;</span> HOME = /Users/dzearing</span></pre></div>