-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Check pnpm overrides 2. Remove done TODOs, or long-term ones that are now recorded in #751 3. Clean up some unused code. 4. Rename some properties to be shorter.
- Loading branch information
Showing
17 changed files
with
140 additions
and
115 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,12 +136,9 @@ export class AllPackages { | |
return this.notNeeded; | ||
} | ||
|
||
/** Returns all of the dependences *that have typings*, ignoring others, and including test dependencies. | ||
* I have NO idea why it's an iterator. Surely not for efficiency. */ | ||
/** Returns all of the dependencies *that are typed on DT*, ignoring others, and including test dependencies. */ | ||
*allDependencyTypings(pkg: TypingsData): Iterable<TypingsData> { | ||
for (const [name, version] of pkg.allPackageJsonDependencies()) { | ||
// TODO: chart.js@3 has types; @types/[email protected] is the last version on DT. | ||
// It shouldn't be an error to depend on chart.js@3 but it's currently ambiguous with @types/chart.js. | ||
if (!name.startsWith(`@${scopeName}/`)) continue; | ||
if (pkg.name === name) continue; | ||
const typesDirectoryName = removeTypesScope(name); | ||
|
@@ -336,12 +333,12 @@ export interface TypingsDataRaw { | |
* Packages that provide definitions that this package depends on. | ||
* NOTE: Includes `@types/` packages. | ||
*/ | ||
readonly packageJsonDependencies: PackageJsonDependencies; | ||
readonly dependencies: PackageJsonDependencies; | ||
|
||
/** | ||
* Packages that this package's tests or other development depends on. | ||
*/ | ||
readonly packageJsonDevDependencies: PackageJsonDependencies; | ||
readonly devDependencies: PackageJsonDependencies; | ||
|
||
/** | ||
* The [older] version of the library that this definition package refers to, as represented *on-disk*. | ||
|
@@ -493,18 +490,17 @@ export class TypingsData extends PackageBase { | |
get license(): License { | ||
return this.data.license; | ||
} | ||
// TODO: Rename this back to dependencies/devDependencies | ||
get packageJsonDependencies(): PackageJsonDependencies { | ||
return this.data.packageJsonDependencies ?? {}; | ||
get dependencies(): PackageJsonDependencies { | ||
return this.data.dependencies ?? {}; | ||
} | ||
get packageJsonDevDependencies(): PackageJsonDependencies { | ||
return this.data.packageJsonDevDependencies ?? {}; | ||
get devDependencies(): PackageJsonDependencies { | ||
return this.data.devDependencies ?? {}; | ||
} | ||
*allPackageJsonDependencies(): Iterable<[string, string]> { | ||
for (const [name, version] of Object.entries(this.packageJsonDependencies)) { | ||
for (const [name, version] of Object.entries(this.dependencies)) { | ||
yield [name, version]; | ||
} | ||
for (const [name, version] of Object.entries(this.packageJsonDevDependencies)) { | ||
for (const [name, version] of Object.entries(this.devDependencies)) { | ||
yield [name, version]; | ||
} | ||
} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,5 @@ export function checkParseResults(allPackages: AllPackages): string[] { | |
} | ||
} | ||
} | ||
return errors; | ||
return errors | ||
} |
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
Oops, something went wrong.