feat(sdk): bring sdk/javascript/ to parity with codebase #60
Merged
wasabi opened 5 days ago

Summary

Adds documentation, fixes bugs, and improves quality for the JavaScript/TypeScript SDK.

Changes

Documentation

  • sdk/javascript/README.md — install, build, test, usage examples, authentication, pagination, method group reference, and example scripts.

Bug Fixes

  • sdk/javascript/src/__tests__/client.test.ts — fixed broken import path (./client.js../client.js). The old path resolved to __tests__/client.js which doesn't exist.
  • sdk/javascript/src/methods.tsExportMethods was missing update and delete methods, unlike all other method groups. Added them and extended GenericMethods.

Quality Improvements

  • sdk/javascript/package.json — added files: ["dist"] to prevent publishing source/examples; added engines: { "node": ">=18" }.
  • sdk/javascript/src/client.ts — consolidated two redundant Directus client instances into one with both rest() and authentication() plugins.

Verification

  • README covers all 13 method groups with their domain-specific methods
  • ExportMethods now matches GenericMethods interface (list, get, create, createMany, update, delete)
  • Single Directus instance reduces memory overhead
  • No whitespace errors
Commits were merged into target branch
  • feat(sdk): bring sdk/javascript/ to parity with codebase
    - Add sdk/javascript/README.md with install, build, test, usage examples,
      authentication, pagination, and method group reference.
    - Fix package.json: add files field (dist only) to prevent publishing
      source/examples, add engines field (node >= 18).
    - Fix test import path: ./client.js → ../client.js (was resolving to
      __tests__/client.js which doesn't exist).
    - Fix ExportMethods: add update/delete methods and extend GenericMethods
      to match all other method groups.
    - Consolidate Directus client instances: remove redundant second instance
      created for auth, use single instance with both rest() and
      authentication() plugins.
    5 days ago
  • feat(sdk): bring sdk/javascript/ to parity with codebase
    - Add sdk/javascript/README.md with install, build, test, usage examples,
      authentication, pagination, and method group reference.
    - Fix package.json: add files field (dist only) to prevent publishing
      source/examples, add engines field (node >= 18).
    - Fix test import path: ./client.js → ../client.js (was resolving to
      __tests__/client.js which doesn't exist).
    - Fix ExportMethods: add update/delete methods and extend GenericMethods
      to match all other method groups.
    - Consolidate Directus client instances: remove redundant second instance
      created for auth, use single instance with both rest() and
      authentication() plugins.
    5 days ago
  • wasabi merged 5 days ago
1/1
Submitter wasabi
Target main
Source feat/sdk-js-parity
Jobs
Merge Strategy
Create Merge Commit
Watchers (1)
Reference
pull request KI-60
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover