From 6d5e3b949a45792301b5069dded6110a130829aa Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 19 Aug 2021 00:16:24 +0000 Subject: [PATCH 1/2] Update dependency @league-of-foundry-developers/foundry-vtt-types to v0.8.8-9 --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a2980dac..b9c20902 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "postinstall": "husky install" }, "devDependencies": { - "@league-of-foundry-developers/foundry-vtt-types": "0.8.8-8", + "@league-of-foundry-developers/foundry-vtt-types": "0.8.8-9", "@types/fs-extra": "9.0.12", "@types/jest": "27.0.1", "@typescript-eslint/eslint-plugin": "4.29.2", diff --git a/yarn.lock b/yarn.lock index de15bc27..a6bc6b11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -676,9 +676,9 @@ __metadata: languageName: node linkType: hard -"@league-of-foundry-developers/foundry-vtt-types@npm:0.8.8-8": - version: 0.8.8-8 - resolution: "@league-of-foundry-developers/foundry-vtt-types@npm:0.8.8-8" +"@league-of-foundry-developers/foundry-vtt-types@npm:0.8.8-9": + version: 0.8.8-9 + resolution: "@league-of-foundry-developers/foundry-vtt-types@npm:0.8.8-9" dependencies: "@types/jquery": ~3.5.6 "@types/simple-peer": ~9.11.1 @@ -688,7 +688,7 @@ __metadata: socket.io-client: 4.1.2 tinymce: 5.8.1 typescript: ^4.3.5 - checksum: e327a47b2f0a18ab05bbc8703c596aed4d35f3b12aff3252b5facbcc6b993a88034f233fcf446d0925176c7e8d5b15546ec97e0df10d1e9689e11b4e19ab1e3a + checksum: e94009ac8bc30a6635a4480b819a02061f4df8f4bebcee2e6b4e4c76079f985d66edb4302f23e71b3abd5cc189942ad479d3a272a791e52f56891c542abf8bf9 languageName: node linkType: hard @@ -2878,7 +2878,7 @@ __metadata: version: 0.0.0-use.local resolution: "dungeonslayers4@workspace:." dependencies: - "@league-of-foundry-developers/foundry-vtt-types": 0.8.8-8 + "@league-of-foundry-developers/foundry-vtt-types": 0.8.8-9 "@types/fs-extra": 9.0.12 "@types/jest": 27.0.1 "@typescript-eslint/eslint-plugin": 4.29.2 From 15c74e995aedc04102c5256a91e85e523189ab61 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Thu, 19 Aug 2021 04:01:55 +0200 Subject: [PATCH 2/2] Fix building with new vtt types --- package.json | 1 + src/module/migrations/migrationHelpers.ts | 11 ++++++++--- yarn.lock | 12 ++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index b9c20902..bcd5952f 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "test:watch": "jest --watch", "test:ci": "jest --ci --reporters=default --reporters=jest-junit", "format": "prettier --write \"./**/*.(ts|js|json|scss)\"", + "typecheck": "tsc --noEmit", "postinstall": "husky install" }, "devDependencies": { diff --git a/src/module/migrations/migrationHelpers.ts b/src/module/migrations/migrationHelpers.ts index bb6ecc85..2f94d93d 100644 --- a/src/module/migrations/migrationHelpers.ts +++ b/src/module/migrations/migrationHelpers.ts @@ -55,7 +55,9 @@ export async function migrateScenes(getSceneUpdateData: SceneUpdateDataGetter): const updateData = getSceneUpdateData(scene.data); if (updateData) { logger.info(`Migrating Scene document ${scene.name} (${scene.id})`); - await scene.update(updateData); + await scene.update( + updateData as DeepPartial[0]>, + ); } } catch (err) { err.message = `Error during migration of Scene document ${scene.name} (${scene.id}), continuing anyways.`; @@ -94,7 +96,7 @@ export function getActorUpdateDataGetter(getItemUpdateData: ItemUpdateDataGetter export function getSceneUpdateDataGetter(getActorUpdateData: ActorUpdateDataGetter): SceneUpdateDataGetter { return (sceneData: foundry.documents.BaseScene["data"]) => { - const tokens = (sceneData.tokens as Collection).map((token: TokenDocument) => { + const tokens = sceneData.tokens.map((token: TokenDocument) => { const t = token.toObject(); if (!t.actorId || t.actorLink) { t.actorData = {}; @@ -162,7 +164,10 @@ export function getCompendiumMigrator( updateData && (await doc.update(updateData)); } else if (doc instanceof Scene && getSceneUpdateData) { const updateData = getSceneUpdateData(doc.data); - updateData && (await doc.update(updateData)); + updateData && + (await doc.update( + updateData as DeepPartial[0]>, + )); } } catch (err) { err.message = `Error during migration of document ${doc.name} (${doc.id}) in compendium ${compendium.collection}, continuing anyways.`; diff --git a/yarn.lock b/yarn.lock index a6bc6b11..f4e693bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2930,9 +2930,9 @@ __metadata: linkType: hard "earcut@npm:^2.1.5": - version: 2.2.2 - resolution: "earcut@npm:2.2.2" - checksum: 030e091437c4fae34c4538e0886a1d7c68f67c3ec3ba793210b280df24b329221ed81179e300742abf7aa2c394332a77395133c5163717b1806cebab6aa6c88c + version: 2.2.3 + resolution: "earcut@npm:2.2.3" + checksum: 0aee2e9ab069f93518d20583f4bcf18ea5ba47bcab7147f790394814cdf7820b6b6d80fc9428348b21229dbf564b46f9c70cffa6b72e08c468aa4bfacba20fa9 languageName: node linkType: hard @@ -8101,11 +8101,11 @@ fsevents@^1.2.7: linkType: hard "uglify-js@npm:^3.1.4": - version: 3.13.10 - resolution: "uglify-js@npm:3.13.10" + version: 3.14.1 + resolution: "uglify-js@npm:3.14.1" bin: uglifyjs: bin/uglifyjs - checksum: 2c8467faf68a0ba4da7a9539026dc996804f0e89f184ce0a6ceaa9a9c7e4e2ab78399caee8ebbebcd3df64a45b049585c4125e144f1c5992f9b61e81864d9535 + checksum: 7f8292e9555c7ae9636407c11e76df53232f03783770ec8d920daa20f69f1e820802212685fce4d8a5da1473643a1c0578c34a5c0784c688127fcb83cd592578 languageName: node linkType: hard