Skip to content

Commit

Permalink
fix: prune don't filter ts files (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 10, 2019
1 parent 2eb3b1d commit 085c458
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/download/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ const defaultExtensions = toMap([
'.markdown',
'.md',
'.mkd',
'.ts',
'.jst',
'.coffee',
'.tgz',
Expand Down
2 changes: 2 additions & 0 deletions test/install-enable-prune.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ describe('test/install-enable-prune.test.js', () => {
.end();
const exists = await fs.exists(path.join(cwd, 'node_modules/egg/README.md'));
assert(!exists);
// should keep ts file
assert(await fs.exists(path.join(cwd, 'node_modules/egg/index.d.ts')));
});
});
});

0 comments on commit 085c458

Please sign in to comment.