-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(exports): remove unused exports (#3415)
resolve utility unused exports: this commit resolves issues found in the `src/utils` directory related to unused exports. 'ts-prune' seems to have issues when a file includes a direct import and an aliased import to the same location: ```typescript import { foo } from '../somewhere'; import * as Foo from '../somewhere'; ``` doing so causes erroneous unused exports (or so it seems). the import of `ParsePackageJsonResult` has been removed in favor of a simple namespaced/aliased import (either would work here, this was an arbitrary decision that minimizes code churn. we could have just as easily directly imported everything from 'util'). cases where helper functions were never used have been removed. otherwise, unnecessary export keywords were removed when a property/function/etc. was used in the file in which it was defined --- remove unused export TERMINAL_INFO --- remove unused transpilerId const this commit removes an unused constant from the `version.ts` file. in addition to verifying that the identifier and its string contents are not used in the codebase, the following was run to look for other commits containing the string: ``` git log -S transpilerId --source --all ``` although commits were found containing 'transpilerId', no existing usages of the string were found --- remove unused host-config this commit began by removing two unused exports from `host-config.ts`, `generateHostConfig` and `DEFAULT_MODE`. from those two deletions, additional functions and constants could be successively deleted, with each deletion begetting another deletion, and another deletion, etc. by the end, a single constant was left, `HOST_CONFIG_FILENAME`. that constant is used in a single file, in a single place. as a result, the filename was inlined
- Loading branch information
1 parent
c0aeac1
commit 23fd1f6
Showing
7 changed files
with
6 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters