Upgrade for axios 1.15.x#8790
Open
AugustoLopezProcess wants to merge 2 commits intotask/FOUR-28803-L13from
Open
Upgrade for axios 1.15.x#8790AugustoLopezProcess wants to merge 2 commits intotask/FOUR-28803-L13from
AugustoLopezProcess wants to merge 2 commits intotask/FOUR-28803-L13from
Conversation
|
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.




Issue & Reproduction Steps
cacheAdapterEnhancer/app.js).@processmaker/screen-builder’s initializeScreenCache()wrapsapiClient.defaults.adapterwithaxios-extensions’ cacheAdapterEnhancer. In Axios 1.x, defaults.adapter is often a list of adapter names (e.g. ['xhr','http','fetch']), not a callable adapter. The enhancer must receive the resolved adapter fromapiClient.getAdapter(...).axios-extensionstriggeredModule not found: Package path./lib/helpers/buildURLis not exported because Axios 1 no longer exports the old deep pathaxios/lib/helpers/buildURL.LRUCacheis not a constructor because the app resolved hoistedlru-cache@5(default export only) while the code used a named{ LRUCache }import (v10 style).Solution
resources/js/common/attachScreenCacheAdapter.js: resolves the real HTTP adapter withapiClient.getAdapter(apiClient.defaults.adapter)whendefaults.adapteris not a function, then appliescacheAdapterEnhancerwith the same options as screen-builder (cache flag, LRU defaults, screen config).resources/js/bootstrap.js: stopped callinginitializeScreenCachefrom screen-builder; callsattachScreenCacheAdapter(apiClient, window.ProcessMaker.screen)afterProcessMaker.screenis defined.resources/js/next/screenBuilder.js: same behavior for the dynamic screen-builder path, passing the local screen object.webpack.mix.js: Resolve.alias foraxios/lib/helpers/buildURL→node_modules/axios/lib/helpers/buildURL.jsso axios-extensions builds against Axios 1 exports.How to Test
npm ci(ornpm install), thennpm run development— confirm webpack completes with noaxios/lib/helpers/buildURLerror.bootstrap.js): confirm no t is not a function and noLRUCacheis not a constructor in the console on load and on normal navigation/API use.resources/js/next/screenBuilder.jsand repeat smoke checks.Related Tickets & Packages
@processmaker/screen-builder(upstream still exportsinitializeScreenCachewith Axios 0.x assumptions), axios, axios-extensions, lru-cache.Code Review Checklist