Skip to content

Commit

Permalink
fix: cover data changes
Browse files Browse the repository at this point in the history
Covered until and including "Add Zarude and Celebi events" or
5db71751189ec30153ee07f7dd800499d516cfaf
  • Loading branch information
favna committed Aug 6, 2020
1 parent 91b6c23 commit 1fa2f7f
Show file tree
Hide file tree
Showing 10 changed files with 733 additions and 1,055 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,46 +36,46 @@
"graphql": "^15.3.0"
},
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@commitlint/cli": "^9.1.1",
"@commitlint/config-conventional": "^9.1.1",
"@favware/eslint-config": "^5.1.0",
"@favware/ts-config": "^3.0.2",
"@graphql-codegen/c-sharp": "^1.17.4",
"@graphql-codegen/cli": "^1.17.4",
"@graphql-codegen/schema-ast": "^1.17.4",
"@graphql-codegen/typescript": "^1.17.4",
"@graphql-codegen/typescript-resolvers": "^1.17.4",
"@graphql-codegen/c-sharp": "^1.17.7",
"@graphql-codegen/cli": "^1.17.7",
"@graphql-codegen/schema-ast": "^1.17.7",
"@graphql-codegen/typescript": "^1.17.7",
"@graphql-codegen/typescript-resolvers": "^1.17.7",
"@klasa/cache": "^0.0.3",
"@klasa/console": "^0.0.3",
"@klasa/timestamp": "^0.0.1",
"@types/express": "^4.17.7",
"@types/glob": "^7.1.3",
"@types/jest": "^26.0.7",
"@types/node": "^14.0.26",
"@types/jest": "^26.0.9",
"@types/node": "^14.0.27",
"@types/node-fetch": "^2.5.7",
"apollo-server-express": "^2.16.0",
"apollo-server-express": "^2.16.1",
"class-validator": "^0.12.2",
"cz-conventional-changelog": "^3.2.0",
"express": "^4.17.1",
"fast-xml-parser": "^3.17.4",
"fs-nextra": "^0.5.1",
"fuse.js": "^6.4.0",
"fuse.js": "^6.4.1",
"glob": "^7.1.6",
"graphql-parse-resolve-info": "^4.7.0",
"graphql-type-json": "^0.3.2",
"husky": "^4.2.5",
"jest": "^26.1.0",
"jest-circus": "^26.1.0",
"jest": "^26.2.2",
"jest-circus": "^26.2.2",
"lint-staged": "^10.2.11",
"node-fetch": "^2.6.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"reflect-metadata": "^0.1.13",
"replace-in-file": "^6.1.0",
"standard-version": "^8.0.2",
"ts-jest": "^26.1.3",
"ts-jest": "^26.1.4",
"ts-node": "^8.10.2",
"type-graphql": "^1.0.0-rc.2",
"type-graphql": "^1.0.0-rc.3",
"typescript": "^3.9.7",
"utility-types": "^3.10.0"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/auto/pokemonlearnsets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ const autoUpdateLearnsets = async () => {
return process.exit(0);
}

const { BattleLearnsets } = await importFileFromWeb<SmogonLearnsetData>({
const { Learnsets } = await importFileFromWeb<SmogonLearnsetData>({
url: 'https://raw.githubusercontent.com/smogon/pokemon-showdown/master/data/learnsets.ts',
temporaryFileName: 'learnsets.ts'
});

const output = new Map<string, unknown>();
for (const [pokemon, learnset] of Object.entries(BattleLearnsets)) {
for (const [pokemon, learnset] of Object.entries(Learnsets)) {
if (learnset.eventOnly === undefined && learnset.learnset === undefined) continue;
if (learnset.eventOnly !== undefined && learnset.learnset === undefined)
output.set(pokemon, { eventOnly: ['See base forme of this Pokémon'] });
Expand Down
5 changes: 4 additions & 1 deletion scripts/auto/sha-tracker.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{"tiersLastSha":"38a74d7a9e85f6049f4f7f8d8cf4b9d1204878b5","learnsetsLastSha":"00b88b521d15b7c118053d96284bbdcbe85cfadb"}
{
"tiersLastSha": "5db71751189ec30153ee07f7dd800499d516cfaf",
"learnsetsLastSha": "5db71751189ec30153ee07f7dd800499d516cfaf"
}
6 changes: 3 additions & 3 deletions scripts/auto/smogontiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const autoUpdateSmogonTiers = async () => {
return process.exit(0);
}

const { BattleFormatsData } = await importFileFromWeb<SmogonTiersData>({
const { FormatsData } = await importFileFromWeb<SmogonTiersData>({
url: 'https://raw.githubusercontent.com/smogon/pokemon-showdown/master/data/formats-data.ts',
temporaryFileName: 'tiers.ts'
});

const output: Record<string, string> = {};
for (const mon in BattleFormatsData) {
const tier = BattleFormatsData[mon].isNonstandard || BattleFormatsData[mon].tier;
for (const mon in FormatsData) {
const tier = FormatsData[mon].isNonstandard || FormatsData[mon].tier;
output[mon] = tier || 'Refer to base form / unknown';
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/auto/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export interface DataJSON {
learnsetsLastSha: string;
}

export type SmogonTiersData = Record<'BattleFormatsData', Record<string, SpeciesFormatsData>>;
export type SmogonLearnsetData = Record<'BattleLearnsets', Record<string, LearnsetData>>;
export type SmogonTiersData = Record<'FormatsData', Record<string, SpeciesFormatsData>>;
export type SmogonLearnsetData = Record<'Learnsets', Record<string, LearnsetData>>;

interface SpeciesFormatsData {
comboMoves?: readonly string[];
Expand Down
Loading

0 comments on commit 1fa2f7f

Please sign in to comment.