Repository navigation
Step 4, first part: the Query class, the query runner and the join loop as ES modules, sharing internals through a second install parameter - #2836
Merged
Conversation
…array helpers from src/utils/helpers.js
…odules share with each other
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.
The first part of step 4 of the ES6 conversion (
context/roadmap-phase-1.md), built as the prototype that settled how one module reaches another's internals.src/25queryclass.jssrc/data/query.jssrc/38query.jssrc/select/queryfn.jssrc/39dojoin.jssrc/select/dojoin.js38query.js and 39dojoin.js are step 6 files by the roadmap, done early because they are where the internals are (
doJoin,queryfn);docs/src-map.mdsays so.The mechanism, decided 2026-10-22
Every
installtakes a second parameter,internal, an object made insrc/index.jsbeside the instance and passed to every install, the generated legacy module included. A module puts what other modules need on it (internal.doJoin = doJoin) and a module installed later reads it at install (var doJoin = internal.doJoin). Nothing is added to the alasql object: the API snapshot is identical to 4.21.0 apart from the names already allowed.Compared on this prototype with
alasql.private(branch deleted): same parity, same suite, same merge behaviour, compile within noise (101 against 98), and no API surface for users to reach.Plain imports for stateless helpers
hash,cloneDeep,deepEqual,arrayUnionDeep,arrayExceptDeepandarrayIntersectDeepmoved out ofinstall()insrc/utils/helpers.jsas exports;install()still puts them onalasql.utils. queryfn.js imports them, as the old code used them by bare name. Calls throughalasql.utils.xstay as they are. As exports the six functions have a.namewhere they had none; those five paths are listed with the reason intest/parity/api-allowed.txt.Checks
alasql.min.jsunder node, Node 1638query.js, merged into this branch: lands insrc/select/queryfn.jswithout a conflicttools/wrap.jstakes--internal name,--bind name=exprand--import "<line>"for these wraps.