Feature/v14 migration#274
Merged
JulenBordonaba merged 31 commits intoAnimaBeyondDevelop:mainfrom Apr 15, 2026
Merged
Conversation
- inflateSystemFromTypeMarkers: guard against circular refs (WeakSet) and read-only properties (EmbeddedCollection#documentClass) to fix 'Cannot assign to read only property' and stack overflow errors - ABFActorSheet, ABFItemSheet: extend from foundry.appv1.sheets.* with fallback to global for v13 compatibility - ABFActorDirectory: extend from foundry.applications.sidebar.tabs.ActorDirectory with fallback to global for v13 compatibility - animabf.mjs: use foundry.applications.handlebars.loadTemplates with fallback
- Rename _ActorSheet/_ItemSheet/_ActorDirectory to PascalCase (ActorSheetV1, ItemSheetV1, ActorDirectoryV1) to satisfy @typescript-eslint/naming-convention - Add root tsconfig.json (allowJs, noEmit) required by eslint-config-airbnb-typescript
- animabf.mjs: replace renderChatMessage hook with renderChatMessageHTML, rewrite jQuery DOM ops to native (querySelector, addEventListener, innerHTML) - renderTemplates.js: use foundry.applications.handlebars.renderTemplate with fallback to global for v13 compatibility
- handlebarsPartials.js: use foundry.applications.handlebars.getTemplate with fallback - animabf.mjs: use foundry.documents.collections.Actors/Items and foundry.appv1.sheets.ActorSheet/ItemSheet with fallbacks for sheet registration
- ABFFoundryRoll: strip deprecated 'async' option before passing to super.evaluate - ABFAttackData: use foundry.applications.handlebars.renderTemplate with fallback - ABFAttackData: replace randomID() with foundry.utils.randomID()
getTargetToken throws when no target is selected, but the error was propagating as an uncaught promise rejection. Wrap the call in a try/catch and return early — the dialog prompt is already shown by getTargetToken before throwing.
canvas.grid.measureDistance() was removed in v14 and replaced with measurePath(). The token stored in modalData is a TokenDocument, which does not have a .center property — that belongs to the canvas Token object (tokenDocument.object). Use token.object?.center with a fallback to token.center for compatibility.
Extract handler to _handleChatMessage and register renderChatMessageHTML (v14, HTMLElement) or renderChatMessage (v13, jQuery) based on game.release.generation at init time.
Use foundry.applications?.ux?.ContextMenu?.implementation ?? ContextMenu
fallback. Pass { jQuery: false } option only on v14. Normalize callback
target with instanceof HTMLElement guard.
Replace direct foundry.applications.ux.TextEditor.implementation calls with (foundry.applications?.ux?.TextEditor?.implementation ?? TextEditor) in prepareActor, TechniqueItemConfig, NoteItemConfig, SpellItemConfig, and PsychicPowerItemConfig.
Replace target[0].dataset with (target instanceof HTMLElement ? target : target[0]).dataset in SupernaturalShieldItemConfig and ElanItemConfig callbacks.
canvas.grid.measurePath was added in v14; fall back to
canvas.grid.measureDistance(a, b, { gridSpaces: true }) for v13.
This reverts commit e8dd61e.
JulenBordonaba
approved these changes
Apr 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lo siento @Julen-BZ como tengas que mirarte esto a mano.
Cambios para que funcione todo en foundry v14. Se mantiene la compatibilidad también con v13.
He comprobado con ambas versiones en local.