Merge branch 'renovate/league-of-foundry-developers-foundry-vtt-types-0.x' into 'master'

Update dependency @league-of-foundry-developers/foundry-vtt-types to v0.8.8-9

See merge request dungeonslayers/ds4!131
This commit is contained in:
Johannes Loher 2021-08-19 02:07:36 +00:00
commit 0845b5d4b7
3 changed files with 21 additions and 15 deletions

View file

@ -49,10 +49,11 @@
"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": {
"@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",

View file

@ -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<Parameters<foundry.data.SceneData["_initializeSource"]>[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<TokenDocument>).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<Parameters<foundry.data.SceneData["_initializeSource"]>[0]>,
));
}
} catch (err) {
err.message = `Error during migration of document ${doc.name} (${doc.id}) in compendium ${compendium.collection}, continuing anyways.`;

View file

@ -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
@ -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