Skip to content

Commit

Permalink
fix: pnpm安装时,相同的文件会使用同一个inode变成硬链接
Browse files Browse the repository at this point in the history
  • Loading branch information
geekact committed Oct 7, 2024
1 parent 1fc3035 commit f1ce15f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions scripts/build-success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ echo '{"type":"module"}' > dist/esm/package.json
cp dist/index.js dist/backup-index.js
cp dist/index.d.ts dist/backup-index.d.ts
cp dist/esm/index.js dist/esm/backup-index.js

echo '\n// backup' >> dist/backup-index.js
echo '\n// backup' >> dist/esm/backup-index.js
echo '\n// backup' >> dist/backup-index.d.ts
8 changes: 7 additions & 1 deletion test/lib/rebuild-dist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ test('内容写入文件', async () => {
foo,
aaaaa
});
//# sourceMappingURL=index.js.map"
//# sourceMappingURL=index.js.map
// backup
"
`);

await expect(readFile(path.join(distDir, 'index.d.ts'), 'utf8')).resolves
Expand All @@ -72,6 +74,8 @@ test('内容写入文件', async () => {
export { aaaaa };
// backup
declare const foo = { bar: "baz" };
export { foo };"
`);
Expand All @@ -84,6 +88,8 @@ test('内容写入文件', async () => {
aaaaa
};
//# sourceMappingURL=index.js.map
// backup
var foo = { bar: "baz" }
export { foo };"
`);
Expand Down

0 comments on commit f1ce15f

Please sign in to comment.