fix: add JSDoc to all namespaces and public API methods (v0.1.8-beta) - #11
Merged
Conversation
Every module namespace (maps, strings, numbers, json, base64, xml, dates, intelligence) and all public methods now have JSDoc blocks so that IDE autocomplete shows descriptions and parameter hints at every step of a chained call, not just at the terminal function. The intelligence namespace declaration is also split into two separate assignments so that phantom.intelligence and phantom.intelligence.dates each carry their own @namespace doc — fixing the root cause of the missing tooltip during intermediate autocompletion.
vm.createContext(global) sandbox behaviour changed in Node 18→20 and causes the channelMap mock to be invisible inside the phantom IIFE. Phantom targets OIE/Rhino in production, not Node 18. Align the matrix with the versions used in main.yml (20.x) and add 22.x for coverage.
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.
Summary
phantom.jshad only one/** */JSDoc block (onphantom.intelligence.dates.detect). All namespace objects and every other method were completely undocumented, so the IDE showed no tooltips at intermediate chain steps likephantom.intelligence.orphantom.intelligence.dates..maps,strings,numbers,json,base64,xml,dates,intelligence— every namespace declaration and every public method now has a@namespaceor/** */block.phantom.intelligencerestructured: wasphantom.intelligence = { dates: {} }(one opaque object). Now split into two separate declarations, each with its own@namespaceJSDoc, so autocomplete docs appear at every level of the chain.vm.createContextsandbox issue unrelated to this change, not applicable to OIE/Rhino target runtime), added Node 22.x.package.jsonandscripts/package.jsonsynced to0.1.7-betato matchphantom.jsand the latest tag — the release pipeline will auto-bump to0.1.8-beta.Test plan
main.yml→ auto-bumps to0.1.8-beta→ creates tag + GitHub Release