Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disables auto types removal if tsEnableAutoTypes is set
  • Loading branch information
arcanis committed Mar 25, 2022
commit 2ee923d1a0d41777575663ba53fc62261b95ddfc
9 changes: 9 additions & 0 deletions packages/plugin-typescript/sources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ const afterWorkspaceDependencyRemoval = async (
if (descriptor.scope === `types`)
return;

const {project} = workspace;
const {configuration} = project;

const tsEnableAutoTypes = configuration.get(`tsEnableAutoTypes`)
?? xfs.existsSync(ppath.join(project.cwd, `tsconfig.json` as Filename));

if (!tsEnableAutoTypes)
return;

const typesName = getTypesName(descriptor);

const ident = structUtils.makeIdent(`types`, typesName);
Expand Down