Skip to content

Fix SDK query builder contract for 0.2.1 - #2

Merged
singaraiona merged 1 commit into
masterfrom
agent/fix-sdk-query-api-0.2.1
Aug 11, 2026
Merged

Fix SDK query builder contract for 0.2.1#2
singaraiona merged 1 commit into
masterfrom
agent/fix-sdk-query-api-0.2.1

Conversation

@singaraiona

Copy link
Copy Markdown
Contributor

What changed

  • implement the documented RayforceSDK.col() runtime method
  • generate Rayforce v2 quoted column symbols and use the v2 == / != comparison operators
  • validate query-builder column names and expression arguments before rendering Rayfall
  • make the browser query demo execute the same fluent API it displays
  • bump the package and CDN examples to 0.2.1
  • add PR CI that builds the WASM package and runs API-contract checks before merge

Root cause

The 0.2.0 TypeScript declarations and README documented rf.col(), but RayforceSDK did not implement it. The remaining expression builder also retained v1 syntax: backtick column references plus = and <> operators. The browser demo hid the problem by showing fluent query code while executing Array.filter() instead.

Release safeguards

The new contract test compares:

  • JavaScript module exports against TypeScript declarations
  • all 24 declared classes and their public runtime members in both directions
  • documented rf.*, table.*, vec.*, col.*, result, and row usage against live objects
  • every documented comparison and aggregation builder through real Rayforce v2 queries

These checks run in PR CI, the Pages build, and prepublishOnly, so a mismatch blocks publication.

Validation

  • clean Emscripten 6.0.6 build from Rayforce v2.5.13
  • runtime smoke tests and all README fluent query examples
  • TypeScript/runtime/module-export contract audit
  • exact npm publish --dry-run lifecycle
  • installed rayforce-wasm-0.2.1.tgz import and rf.col() query
  • strict TypeScript NodeNext consumer compile
  • headless Chrome query demo with the expected two filtered rows
  • workflow YAML validation

The npm tarball contains 10 files and is 672.0 kB compressed.

@singaraiona
singaraiona marked this pull request as ready for review August 11, 2026 16:42
@singaraiona
singaraiona merged commit 7a90277 into master Aug 11, 2026
1 check 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