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 f6c7596 commit 5fc3343
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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 ' ' >> dist/backup-index.js
echo ' ' >> dist/esm/backup-index.js
echo ' ' >> dist/backup-index.d.ts
7 changes: 5 additions & 2 deletions test/lib/rebuild-dist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ test('内容写入文件', async () => {
foo,
aaaaa
});
//# sourceMappingURL=index.js.map"
//# sourceMappingURL=index.js.map
"
`);

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

0 comments on commit 5fc3343

Please sign in to comment.