Skip to content

Commit

Permalink
Fixed types again
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwf committed Jan 16, 2024
1 parent dd59761 commit 7330f31
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,22 @@
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./*"
"dist/index.d.ts"
],
"presentation-2": [
"dist/presentation-2/index.d.ts"
],
"presentation-3": [
"dist/index.d.ts"
],
"upgrader": [
"dist/upgrader/index.d.ts"
],
"strict": [
"dist/strict/index.d.ts"
],
"image-3": [
"dist/image-3/index.d.ts"
]
}
},
Expand Down
38 changes: 19 additions & 19 deletions scripts/validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@ for (const exportKey of exportKeys) {
}
dedent();

// const typesVersionKeys = Object.keys(pkg.typesVersions);
// logWithIndent(`"typesVersions": {`);
// indent();
// for (const typesVersionKey of typesVersionKeys) {
// const variations = Object.keys(pkg.typesVersions[typesVersionKey]);
// logWithIndent(`"${typesVersionKey}": {`);
// indent();
// for (const variation of variations) {
// const listOfTypes = pkg.typesVersions[typesVersionKey][variation];
// logWithIndent(`"${variation}": [`);
// indent();
// for (const pathToTypescriptFile of listOfTypes) {
// await checkFile(pathToTypescriptFile);
// }
// dedent(true);
// }
// dedent();
// }
// dedent();
const typesVersionKeys = Object.keys(pkg.typesVersions);
logWithIndent(`"typesVersions": {`);
indent();
for (const typesVersionKey of typesVersionKeys) {
const variations = Object.keys(pkg.typesVersions[typesVersionKey]);
logWithIndent(`"${typesVersionKey}": {`);
indent();
for (const variation of variations) {
const listOfTypes = pkg.typesVersions[typesVersionKey][variation];
logWithIndent(`"${variation}": [`);
indent();
for (const pathToTypescriptFile of listOfTypes) {
await checkFile(pathToTypescriptFile);
}
dedent(true);
}
dedent();
}
dedent();

console.log(chalk.greenBright(`\n\n ✓ package.json is valid `));

0 comments on commit 7330f31

Please sign in to comment.