Skip to content

Update dependencies and up test coverage#140

Open
johndyer2-mh wants to merge 7 commits intomainfrom
update-dependencies
Open

Update dependencies and up test coverage#140
johndyer2-mh wants to merge 7 commits intomainfrom
update-dependencies

Conversation

@johndyer2-mh
Copy link
Contributor

@johndyer2-mh johndyer2-mh commented Feb 13, 2026

Description

This PR updates dependencies, migrates to ESLint 9 and TypeScript 5, adds the standard financial statements API and endpoint coverage docs, and expands tests.

Dependency upgrades

  • jose → v6 (^6.1.3); Node engine set to >= 18.0.0.
  • TypeScript → v5 (^5.6.3).
  • ESLint → v9 (^9.39.2) with flat config: .eslintrc.json removed and eslint.config.js added, using @mft/eslint-config-momentumft.
  • Other dev/runtime bumps: form-data, query-string, ramda, chai, mocha, ts-node, c8, husky, and related types/config.

Husky

  • Pre-commit: runs npm run lint and npm run build only (no extra shell wrapper).
  • Pre-push: runs npm run lint, npm run build, and npm test.

Code and API changes

  • Ramda: refactored to named imports (e.g. import { prop, path } from "ramda") in src and examples instead of import * as R.
  • Standard financial statements: new module with getStandardFinancialStatements and getStandardFinancialStatement, plus types and schema; wired from src/requests and exported from the client.
  • Unauthenticated: added listLegacyConnections (aligned with Identity .well-known/legacy-connections).
  • Request/token/auth: updates in get-auth-urls.ts, exchange-code-for-token.ts, request.ts, and tokens.ts for new deps and consistency.

Documentation

  • ENDPOINT_COVERAGE.md: document mapping Swagger/API definitions (API Gateway, Identity, CaaS, OSIP) to client methods, including the new standard financial statements and legacy connections, and noting missing client coverage where relevant.

Tests

  • Unit tests added: get-auth-urls.unit.ts, exchange-code-for-token.unit.ts, request.unit.ts, requests.unit.ts, requests-modules.unit.ts, tokens.unit.ts (using mocha + test/opts/unit.json where applicable).
  • Integration-style test coverage extended for: beneficiaries, consent-history, pay-links, recurring-payments, reseller-check, spending-analysis, standard-financial-statements, standing-orders.
  • Test config: test/opts/unit.json added/updated for unit test runs.

Other

  • .npmignore: updated so published package contents match the new layout and ignore list.
  • .gitignore: one additional entry (e.g. for a local or generated path).

Screenshots, Recordings

N/A – dependency, config, and test changes only; no UI or runtime behaviour changes that need screenshots or recordings.


Note

Medium Risk
Medium risk due to the Node runtime requirement jump and broad dependency/tooling upgrades, plus new API surface and stronger test gating that may affect CI and consumers.

Overview
Updates the library to a new major release (7.0.0) that bumps the Node engine to >= 20.20.0, upgrades key deps (notably jose v6, TypeScript 5, ESLint 9), and adjusts examples accordingly (e.g., switching jose usage to dynamic import() and refactoring Ramda usage to named imports).

Modernizes tooling by removing .eslintrc.json in favor of eslint.config.js, expanding ignore files (.gitignore, .npmignore), adding .nvmrc, and tightening Husky hooks: pre-commit now runs lint, build, and test:unit, while pre-push runs the full npm test suite across multiple Node versions when nvm is available.

Adds/records API surface and verification artifacts: introduces ENDPOINT_COVERAGE.md, documents the release in CHANGELOG.md, and includes new client endpoints such as getStandardFinancialStatements/getStandardFinancialStatement plus unauthenticated listLegacyConnections, with accompanying expanded unit/integration tests and coverage scripts enforcing 90% thresholds.

Written by Cursor Bugbot for commit 873ece2. This will update automatically on new commits. Configure here.

@MHxGH-ServiceAccount
Copy link

MHxGH-ServiceAccount commented Feb 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@johndyer2-mh johndyer2-mh changed the title Update dependencies Update dependencies and up test coverage Feb 13, 2026
@johndyer2-mh johndyer2-mh force-pushed the update-dependencies branch 2 times, most recently from f4a02da to 5e2b813 Compare February 16, 2026 10:37
johndyer2-mh and others added 6 commits February 23, 2026 15:27
- Upgrade various dependencies in package.json and package-lock.json, including form-data, query-string, ramda, chai, mocha, and others.
- Modify husky pre-commit and pre-push scripts to remove unnecessary shell script lines.
- Refactor ramda imports in multiple files to use specific functions instead of importing the entire library.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Introduced  to document API definitions and client method mappings.
- Updated  to include coverage directory.
- Enhanced  and  with new dependencies for coverage reporting.
- Added unit tests for beneficiaries, consent history, pay links, and recurring payments.
- Refactored test scripts to include coverage options for unit and integration tests.
- Added .nvmrc file to specify Node.js version v20.
- Updated package.json and package-lock.json to require Node.js version >= 20.20.0.
- Enhanced husky pre-push script to run tests across multiple Node.js versions.
- Refactored TypeScript configuration for improved clarity and added ts-node options.
- Made minor adjustments to documentation comments for consistency.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- Updated version to 7.0.0, dropping support for Node.js 18; now requires Node.js >= 20.20.0.
- Enhanced gateway behavior for URL rewriting and added support for new API features.
- Updated documentation to reflect changes and added upgrade notes for users transitioning from 6.x.
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.

2 participants