Repository navigation
build(deps): update all dependencies to latest and migrate to zotero-plugin-toolkit v6 - #323
Merged
Merged
Conversation
- zotero-plugin-toolkit 5.1.0-beta.13 -> 6.0.0 - zotero-plugin-scaffold 0.8.2 -> 0.9.3 - zotero-types 4.1.0-beta.4 -> 4.1.3 - eslint 9 -> 10, @zotero-plugin/eslint-config 0.6.10 - typescript 5.9 -> 7.0.2 - mocha 11 -> 12, chai 6.3, prettier 3.9, @types/node 26 typescript-eslint does not support the TypeScript 7 native compiler yet (it no longer exposes the compiler API), so pin typescript@6.0.3 for its dependency subtree via package.json overrides while tsc keeps using 7.x. npm 12 blocks git dependencies by default and zotero-types depends on git-hosted packages (epubjs, pdfjs-dist), so set allow-git=all in .npmrc.
toolkit v6 removed the deprecated global modules: - ZoteroToolkit is no longer exported from the package root, use on-demand module imports instead and only bundle what the plugin uses. - PromptManager was removed. Zotero has no native command palette equivalent, so drop PromptExampleFactory and its registrations. - MenuManager was removed in favor of the native Zotero.MenuManager API, which only exists in Zotero 8. Rewrite the three menu examples with Zotero.MenuManager.registerMenu() and bump strict_min_version to 8.0. - Move the menu l10n messages from addon.ftl to mainWindow.ftl, since they are resolved from the main window's FTL bundle.
- remove the PromptExamples section from all READMEs - note that registerRightClickMenuItem uses the native Zotero.MenuManager - reformat doc/README-frFR.md for prettier 3.9 (blockquote indentation)
northword
force-pushed
the
chore/update-deps-to-latest
branch
from
November 7, 2026 16:42
2877897 to
ed85840
Compare
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.
closes: #321
Updates every dependency to its latest version and adapts the template to the breaking changes.
Dependency updates
zotero-plugin-toolkit^5.1.0-beta.13^6.0.0zotero-plugin-scaffold^0.8.2^0.9.3zotero-types^4.1.0-beta.4^4.1.3@zotero-plugin/eslint-config^0.6.7^0.6.10eslint^9.39.2^10.14.0typescript^5.9.3^7.0.2mocha^11.7.5^12.0.3@types/node^24.10.0^26.6.6chai/prettier^6.2.1/^3.7.4^6.3.0/^3.9.10npm outdatedis clean afterwards.Breaking changes handled
toolkit v6:
ZoteroToolkitno longer exported from the package rootsrc/utils/ztoolkit.tsnow uses on-demand module imports (BasicTool,UITool,KeyboardManager,ClipboardHelper,FilePickerHelper,ProgressWindowHelper,VirtualizedTableHelper,DialogHelper,makeHelperTool,unregister) and only instantiates what the template uses. Helpers are bound withmakeHelperTool(cls, this)sobasicOptionssharing andunregisterAll()behave exactly as before.addontemplate.js115,727 B → 88,014 B;ReaderTool/ExtraFieldTool/FieldHookManagerare no longer bundled (andFieldHookManager's constructor-timeZotero.Item.prototypepatching is gone).toolkit v6:
PromptManagerremovedPromptExampleFactoryand its three registrations are removed, together with the corresponding README sections in all three languages.toolkit v6:
MenuManagerremoved (deprecated in favor of native API)Zotero.MenuManager.registerMenu()withmain/library/itemandmain/menubar/filetargets.Zotero.MenuManageronly exists in Zotero 8 (zotero-types 4.x), sostrict_min_versionis bumped to8.0inaddon/manifest.json.addon.ftltomainWindow.ftl(en-US + zh-CN), resolved by the already-loaded main-window FTL bundle instead of injectingaddon.ftlinto the main window again.TypeScript 7 (native compiler) vs. type-aware ESLint
Cannot read properties of undefined (reading 'Intrinsic').typescriptstays at^7.0.2fortsc, whilepackage.jsonoverridespinstypescript@6.0.3for thetypescript-eslintsubtree.npm run builduses 7.x,npm run lint:checkuses the pinned 6.x copy.npm 12 blocks git dependencies
zotero-typesdepends on git-hosted packages (epubjs,pdfjs-dist), sonpm cifails withEALLOWGITon npm >= 12. Added.npmrcwithallow-git=all.prettier 3.9 formatting
prettier --checkfailed ondoc/README-frFR.mdafter the upgrade (blockquote indentation); reformatted.Verification
npm ci(clean install, npm 12.0.2 / Node 26)npm run build(scaffold build +tsc --noEmit)npm run lint:check(prettier + eslint 10)npm run testwas not run locally since it launches Zotero.