Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: unreleased changes #110

Merged
merged 19 commits into from
Jul 7, 2023
Merged

chore: unreleased changes #110

merged 19 commits into from
Jul 7, 2023

Conversation

This commit contains the following changes:
fix(form-data): strip out undefined properties
build: add `.github` folder to `.npmignore`
fix(internal): improve stream cancellation handling of abort controllers
refactor: move error type definitions to error.ts
chore(internal): improve SSE decoding of lines
docs: point to github repo instead of email contact
docs: slight improvement to file uploads example
docs!: drop official support for EOL Node versions (Node 12, 13, 14, 15)
# Migration
We no longer officially support Node 12+, as our policy is to support only [non-EOL](https://endoflife.date/nodejs) language runtime versions.
We have not made any code changes that would cause the library to break on older versions of node; this is a documentation-only change.
Note that we expect to move to Node 18+ in a few months, when Node 16 reaches EOL.
We recommend upgrading your Node version to the latest LTS.
# Migration
Rename the following types:
- `AccountDetails` -> `AccountDetail`
- `Accounts` -> `Account`
- `Balances` -> `Balance`
- `ContactDetails` -> `ContactDetail`
- `DocumentDetails` -> `DocumentDetail`
- `Documents` -> `Document`
- `LedgerEntries` -> `LedgerEntry`
- `LineItems` -> `LineItem`
- `ReferenceNumbers` -> `ReferenceNumber`
- `RoutingDetails` -> `RoutingDetail`
…#114)

- Add LedgerableEvents, LedgerEventHandlers, and LedgerAccountStatements resources
- Add ability to create ledger transaction reversals
- Add metadata to LedgerEntries
- Add verification_status to Counterparties
- Make document_type optional for Documents and add documentable_type of 'connection'
- Add reconciliation_filters and reconciliation_groups to ExpectedPayments
- Change ledger_entries to LedgerEntry for LedgerEventHandlers
- Add source to Documents
- Add vendor_id filter for Transactions
# Migration
The documentable type and documentable id params in the `client.documents` methods are now named arguments, for example:
`client.documents.create('<documentable type>', '<documentable id>')` now becomes `client.documents.create({ documentable_id: '<documentable id>', documentable_type: 'cases' })`. This transition is the same for all methods in the documents resource except `retrieve()` as that contains a positional `id` param.
The `client.ledger_transactions.versions.list()` method now only accepts named params, for example:
`client.ledger_transactions.versions.list('<id>')` now becomes `client.ledger_transactions.versions.list({ ledger_transaction_id: '<id>' })`
The deprecated `client.ledger_transactions.versions.versions()` alias has also been removed.
We have added or improved support for:
- EcmaScript Modules (ESM) for Node and others (in addition to CJS)
- Cloudflare Workers
- Vercel Edge Runtime
- Deno
- Browser (tested with webpack) - though you should not expose your secret key.
In Node, we still use libraries like `node-fetch` and `formdata-node`; in others, we use the native APIs.
File upload params can now accept the following types:
- `File` (or an object with the same structure)
- a `fetch` `Response` (or an object with the same structure)
- an `fs.ReadStream`
- the return value of our `toFile` helper
  - example usage: `await toFile(Buffer.from('my bytes'), 'input.jsonl')`
…pes (#119)

The return types for the following methods have been updated to match the runtime type:
- `counterparties.del`
- `externalAccounts.del`
- `accountDetails.del`
- `routingDetails.del`
- `ledgerAccountCategories.addLedgerAccount`
- `ledgerAccountCategories.addNestedCategory`
- `ledgerAccountCategories.removeLedgerAccount`
- `ledgerAccountCategories.removeNestedCategory`
The TypeScript definitions are now compatible with a wider variety of environments,
and go to definition in VSCode now takes you straight to the source code, which is
now included in the published package.
This change involves removing runtime exports for nested page class exports, which were only recently added
so we don't expect this breakage to affect anyone.
# Migration
You can directly import the class instead of referencing it, e.g. `import { FooPage } from 'pkg/resources/foo'`
Copy link

@cleb11 cleb11 left a comment

Choose a reason for hiding this comment

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

will adjust tests after merging this

@cleb11 cleb11 merged commit b409bd3 into main Jul 7, 2023
@cleb11 cleb11 deleted the next branch July 7, 2023 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants