Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4ce22ab
refactor: modernize runtime compatibility and remove legacy polyfills
javorosas Mar 29, 2026
9aef4b9
refactor: use feature detection for runtime compatibility
javorosas Mar 29, 2026
c06c73a
docs: modernize README and align stream-like typings
javorosas Mar 29, 2026
550c7b3
test: add runtime compatibility unit tests and ci workflow
javorosas Mar 30, 2026
a10f35f
test: split node/web runtime suites with vitest and type contracts
javorosas Mar 30, 2026
ff3814b
test: add playwright browser smoke tests to ci
javorosas Mar 30, 2026
ad0ef75
test: cover basic auth encoding paths for buffer and btoa
javorosas Mar 30, 2026
4795a4b
refactor: use bearer authorization header by default
javorosas Mar 30, 2026
67d684e
docs: document new test strategy and ci coverage in changelog
javorosas Mar 30, 2026
26f2012
docs: add ci status badge to readme
javorosas Mar 30, 2026
4798c6a
test: verify binary download stream pipe to node writable
javorosas Mar 30, 2026
ac99b6f
chore(release): bump version to 4.14.0
javorosas Mar 30, 2026
ae7ac51
docs(changelog): credit @tetexxr for rfc_provider_cert contribution
javorosas Mar 30, 2026
b8007ea
ci: avoid duplicate runs on PR branches
javorosas Mar 30, 2026
c9736e5
fix: address copilot review feedback for runtime robustness
javorosas Mar 30, 2026
0437ebb
ci: narrow runtime matrix to avoid redundant web checks and node18 fa…
javorosas Mar 30, 2026
348d02d
ci: restore node18 support with dist-based compatibility smoke
javorosas Mar 30, 2026
26dbd82
docs(changelog): add explicit 4.14.0 bug-fix notes
javorosas Mar 30, 2026
61b1603
test(ci): expand node18 runtime to include web-sim parity suite
javorosas Mar 30, 2026
1550e0e
ci: add node 24 to node-runtime matrix
javorosas Mar 30, 2026
8742a77
ci: run web-runtime only on node24 and remove node18 web compat suite
javorosas Mar 30, 2026
0eea22f
ci: align node18 job display name with node-runtime matrix
javorosas Mar 30, 2026
1ef8562
fix: read error response body once before json fallback parsing
javorosas Mar 30, 2026
ecc3a19
test: add non-ok response regression coverage for wrapper errors
javorosas Mar 30, 2026
e1fd5f2
test: add error-path and query serialization hardening coverage
javorosas Mar 30, 2026
2fe7830
chore(deps): upgrade tooling to latest majors and fix ts6 compatibility
javorosas Mar 30, 2026
3967846
chore(lint): migrate from semistandard to eslint+prettier modern stack
javorosas Mar 30, 2026
3b58a85
fix(ci): regenerate lockfile for npm 10 compatibility
javorosas Mar 30, 2026
4ccf1ca
chore: harden publish artifacts and pin npm in CI
javorosas Mar 30, 2026
86d8ca6
chore: address remaining copilot review suggestions
javorosas Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .eslintrc.json

This file was deleted.

159 changes: 159 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
build-dist:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Pin npm version
run: npm i -g npm@10.9.2

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build

- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: dist-artifact
path: dist
if-no-files-found: error

node18-runtime:
name: node-runtime (18)
runs-on: ubuntu-latest
needs: build-dist
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Download dist artifact
uses: actions/download-artifact@v4
with:
name: dist-artifact
path: dist

- name: Run Node 18 runtime compatibility smoke
run: node --test test/compat/node18-compat.test.cjs

node-runtime:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20, 22, 24]
Comment thread
javorosas marked this conversation as resolved.

Comment thread
javorosas marked this conversation as resolved.
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Pin npm version
run: npm i -g npm@10.9.2

- name: Install dependencies
run: npm ci

- name: Run Node runtime tests
run: npm run test:node

web-runtime:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [24]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Pin npm version
run: npm i -g npm@10.9.2

- name: Install dependencies
run: npm ci

- name: Run web-simulated runtime tests
run: npm run test:web

build-and-types:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Pin npm version
run: npm i -g npm@10.9.2

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build

- name: Run type contract tests
run: npm run test:types

browser-smoke:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Pin npm version
run: npm i -g npm@10.9.2

- name: Install dependencies
run: npm ci

- name: Install Playwright browser
run: npx playwright install --with-deps chromium

- name: Run browser smoke tests
run: npm run test:browser
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
with:
node-version: "24"

- name: Pin npm version
run: npm i -g npm@10.9.2

- name: Install dependencies
run: npm ci

Expand Down
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"singleQuote": true
"singleQuote": true,
"semi": false
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
`listTeamRoles`, `listTeamRoleTemplates`, `listTeamRoleOperations`,
`retrieveTeamRole`, `createTeamRole`, `updateTeamRole`, and `deleteTeamRole`.
- Add typed responses and inputs for organization access, invites, and roles.
- Add automated test suites for Node runtime (`vitest`), web-simulated runtime (`vitest` + `jsdom`), and browser smoke tests (`playwright`).
- Add TypeScript contract tests with `tsd` for public SDK types.
- Add CI workflow to run runtime tests, type tests, and browser smoke tests in GitHub Actions.
- Include `rfc_provider_cert` in stamp-related invoice typings and responses (thanks to @tetexxr).

### Changed
- Use `PUT` for role reassignment/update methods:
`organizations.updateTeamAccessRole` and `organizations.updateTeamRole`.
- Use `Authorization: Bearer <apiKey>` by default in SDK requests (API supports this scheme).
- Improve cross-runtime compatibility through feature-detection based runtime handling and binary type normalization.
- Restrict npm published contents to runtime artifacts/docs (`dist`, `README`, `CHANGELOG`, `LICENSE`) using a package `files` whitelist.
- Pin `npm` to `10.9.2` in CI/deploy workflows for deterministic lockfile validation across Node versions.

### Fixed
- Improve non-OK HTTP error handling fallback when JSON error bodies are malformed or missing, returning clearer text/status errors.
- Handle `ReadableStream` read failures during binary download conversion to Node streams to avoid unhandled rejections.
- Strengthen WebCrypto webhook signature validation by using `subtle.verify` and explicit hex signature validation.
- Improve debugging for invalid upload inputs with clearer unsupported file type errors.

## [4.13.1] 2026-02-11

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) FacturAPI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading