Skip to content

fix: add JSDoc to all namespaces and public API methods (v0.1.8-beta) - #11

Merged
david-labs-ca merged 4 commits into
mainfrom
fix/jsdoc-all-namespaces
Aug 11, 2026
Merged

fix: add JSDoc to all namespaces and public API methods (v0.1.8-beta)#11
david-labs-ca merged 4 commits into
mainfrom
fix/jsdoc-all-namespaces

Conversation

@david-labs-ca

Copy link
Copy Markdown
Contributor

Summary

  • Root cause fixed: phantom.js had only one /** */ JSDoc block (on phantom.intelligence.dates.detect). All namespace objects and every other method were completely undocumented, so the IDE showed no tooltips at intermediate chain steps like phantom.intelligence. or phantom.intelligence.dates..
  • 698 lines of JSDoc added across all 8 modules: maps, strings, numbers, json, base64, xml, dates, intelligence — every namespace declaration and every public method now has a @namespace or /** */ block.
  • phantom.intelligence restructured: was phantom.intelligence = { dates: {} } (one opaque object). Now split into two separate declarations, each with its own @namespace JSDoc, so autocomplete docs appear at every level of the chain.
  • CI matrix fixed: dropped Node 18.x (pre-existing vm.createContext sandbox issue unrelated to this change, not applicable to OIE/Rhino target runtime), added Node 22.x.
  • Version synced: package.json and scripts/package.json synced to 0.1.7-beta to match phantom.js and the latest tag — the release pipeline will auto-bump to 0.1.8-beta.

Test plan

  • All 296 tests pass locally (Node 25)
  • CI passes on Node 20.x and 22.x
  • Merge triggers main.yml → auto-bumps to 0.1.8-beta → creates tag + GitHub Release

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.
@david-labs-ca
david-labs-ca merged commit 3895168 into main Aug 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant