Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Install dependencies
run: npm ci
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,31 @@ on:

jobs:
test:
name: Test
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js 20.x
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 20.x
node-version: ${{ matrix.node-version }}

- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ NodeJS client for the FileMaker Data API, written in TypeScript. This library su

## Requirements

- Node 0.12+
- Node 22+
- @js-joda/core 3.0 or higher

## Upgrading from 3.x to 4.x

Version 4 drops support for Node 18 and 20, and corrects several types that did not match the
Data API specification:

- **`UpdateParams.modId` is now a `string`** rather than a `number`, matching the Data API. The
`modId` returned by a previous response can now be passed straight back in. This is the one
change that can break a call site: a numeric `modId` needs `String(modId)`.
- `layout.get()`, `layout.update()`, `layout.delete()` and `layout.upload()` accept `recordId`
as `string | number`. Record IDs are only ever interpolated into the request URL, so both
forms work, and the `recordId` returned by a response now feeds straight back in without a
cast. Existing numeric call sites are unaffected.
- `GetResponse` now includes `dataInfo`, which the server already returns for `get()` and
`range()`. `dataInfo` also gained the `database`, `layout` and `table` members it always
carried, alongside the existing counts.
- `UpdateResponse` gained an optional `newPortalRecordInfo`.

## Connecting to a server

In order to connect to a server, create a new instance of a client:
Expand Down
58 changes: 58 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.9/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": ["src/**/*.ts", "test/**/*.ts"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 120,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "all",
"arrowParentheses": "asNeeded",
"bracketSpacing": false,
"quoteProperties": "preserve"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"enabled": true,
"domains": {
"types": "all"
},
"rules": {
"recommended": true,
"style": {
"useImportType": "error",
"useExportType": "error",
"useForOf": "error",
"noNonNullAssertion": "error",
"useConsistentMemberAccessibility": {
"level": "error",
"options": {"accessibility": "explicit"}
}
},
"suspicious": {
"noExplicitAny": "error"
}
}
}
}
Loading
Loading