fix(server): memoize facade action wrapping and refine export classification - #1211
Open
vivek7405 wants to merge 1 commit into
Open
fix(server): memoize facade action wrapping and refine export classification#1211vivek7405 wants to merge 1 commit into
vivek7405 wants to merge 1 commit into
Conversation
…ication
Refine export symbol classification in extractExportNames() to properly recognize non-function variables declared locally in export lists (export { a, b }).
Memoize action function resolution in generated buildFacade() via module-scoped variables (_fn_<NAME>), avoiding redundant __w() lookups and Proxy instantiations on repeated calls.
Remove unused import in Bun circular re-export test.
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 #1208
Follow-up to #1209 addressing feedback from the PR review:
let _fn_<NAME>;variables inside generated facades so__w()lookups and Proxy instantiations occur once on first invocation per action function rather than on every call.const a = 1, b = 2;declarations) so non-function values exported viaexport { ... }list syntax are classified intovalNamesrather thanfnNames.installBunSeedPluginimport intest/bun/action-seed-circular.test.mjs.Verification
node --test packages/server/test/seed/action-seed-unit.test.js: 19/19 pass (including new memoization & export classification tests).node --test packages/server/test/seed/seed-hook.test.js: 5/5 pass.bun test test/bun/action-seed-circular.test.mjs: 1/1 pass.node --test packages/server/test/seed/*.test.js: 24/24 pass.