diff --git a/lib/download/npm.js b/lib/download/npm.js index 71414cad..62362e93 100644 --- a/lib/download/npm.js +++ b/lib/download/npm.js @@ -529,7 +529,6 @@ const defaultExtensions = toMap([ '.markdown', '.md', '.mkd', - '.ts', '.jst', '.coffee', '.tgz', diff --git a/test/install-enable-prune.test.js b/test/install-enable-prune.test.js index 9d6a15be..9b91b873 100644 --- a/test/install-enable-prune.test.js +++ b/test/install-enable-prune.test.js @@ -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'))); }); }); });