mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
d68059a2d8
Retain exception-handler edges for value-block stores so caught throws do not commit the input/result memo entry. This preserves retries for identical inputs after a transient throw. Adds a sequential-render evaluator fixture covering throw-once behavior. Validated with `env -u NO_COLOR just ready` and a Sprout runtime comparison. AI assistance was used to investigate and implement this change.
33 lines
653 B
JavaScript
33 lines
653 B
JavaScript
// @compilationMode:annotation @panicThreshold:none
|
|
|
|
function Component(params) {
|
|
'use memo';
|
|
const selectedOptions = (() => {
|
|
try {
|
|
const channel = params.parse()?.channel;
|
|
return channel ? [{label: `#${channel}`, value: channel}] : [];
|
|
} catch {
|
|
return [];
|
|
}
|
|
})();
|
|
return selectedOptions;
|
|
}
|
|
|
|
const input = {
|
|
value: 'success',
|
|
shouldThrow: true,
|
|
parse() {
|
|
if (this.shouldThrow) {
|
|
this.shouldThrow = false;
|
|
throw new Error('oops');
|
|
}
|
|
return {channel: this.value};
|
|
},
|
|
};
|
|
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: [input],
|
|
sequentialRenders: [input, input],
|
|
};
|