@jsenv/navi 0.29.309 → 0.29.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/jsenv_navi.js +18 -7
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +18 -0
- package/dist/jsenv_navi.js.map +2 -2
- package/package.json +1 -1
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -2866,7 +2866,17 @@ const updateActions = ({
|
|
|
2866
2866
|
* - willRunSet: actions that will be run
|
|
2867
2867
|
* - willPromoteSet: prerun actions that become run-requested
|
|
2868
2868
|
* - stays*Set: actions that remain in their current state
|
|
2869
|
+
*
|
|
2870
|
+
* A proxy in any of the sets stands for the action it currently targets,
|
|
2871
|
+
* exactly as proxy.run()/rerun()/reset() do: what enters activationWeakSet
|
|
2872
|
+
* is always the target. A proxy kept in there would retarget on its own —
|
|
2873
|
+
* to a never-run child once its params go falsy — and getActivationInfo
|
|
2874
|
+
* would then meet an IDLE member on every later update of the document.
|
|
2869
2875
|
*/
|
|
2876
|
+
prerunSet = resolveActionProxies(prerunSet);
|
|
2877
|
+
runSet = resolveActionProxies(runSet);
|
|
2878
|
+
rerunSet = resolveActionProxies(rerunSet);
|
|
2879
|
+
resetSet = resolveActionProxies(resetSet);
|
|
2870
2880
|
|
|
2871
2881
|
const { runningSet, settledSet } = getActivationInfo();
|
|
2872
2882
|
|
|
@@ -3088,13 +3098,6 @@ ${lines.join("\n")}`);
|
|
|
3088
3098
|
// Step 5: Execute preruns and runs
|
|
3089
3099
|
{
|
|
3090
3100
|
const onActionToRunOrPrerun = (actionToPrerunOrRun, isPrerun) => {
|
|
3091
|
-
if (actionToPrerunOrRun.isProxy) {
|
|
3092
|
-
// maybe remove this check once the API is stable because
|
|
3093
|
-
// nothing in the API should allow this to happen
|
|
3094
|
-
throw new Error(
|
|
3095
|
-
`Proxy should not be reach this point, use the underlying action instead`,
|
|
3096
|
-
);
|
|
3097
|
-
}
|
|
3098
3101
|
const actionSpecificSignal = abortSignalMap.get(actionToPrerunOrRun);
|
|
3099
3102
|
const effectiveSignal = actionSpecificSignal || abortSignal;
|
|
3100
3103
|
|
|
@@ -3222,6 +3225,14 @@ ${lines.join("\n")}`);
|
|
|
3222
3225
|
};
|
|
3223
3226
|
};
|
|
3224
3227
|
|
|
3228
|
+
const resolveActionProxies = (actionSet) => {
|
|
3229
|
+
const resolvedSet = new Set();
|
|
3230
|
+
for (const action of actionSet) {
|
|
3231
|
+
resolvedSet.add(action.isProxy ? action.getCurrentAction() : action);
|
|
3232
|
+
}
|
|
3233
|
+
return resolvedSet;
|
|
3234
|
+
};
|
|
3235
|
+
|
|
3225
3236
|
const NO_PARAMS = { __no_params__: true };
|
|
3226
3237
|
const mergeActionParams = (currentParams, newParams) => {
|
|
3227
3238
|
// The order of these two checks is load-bearing. Checking `undefined` first
|