Skip to content

Commit 0951a42

Browse files
Skip node:sqlite test on older node. Manually cleanup pnpm approves
1 parent f091a94 commit 0951a42

File tree

2 files changed

+22
-34
lines changed

2 files changed

+22
-34
lines changed

packages/node/tests/PowerSyncDatabase.test.ts

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,28 @@ databaseTest('getCrudTransactions', async ({ database }) => {
205205
expect(remainingTransaction?.crud).toHaveLength(15);
206206
});
207207

208-
tempDirectoryTest('should not present database is locked errors on startup', async ({ tmpdir }) => {
209-
for (let i = 0; i < 10; i++) {
210-
const database = new PowerSyncDatabase({
211-
schema: AppSchema,
212-
database: {
213-
dbFilename: `${randomUUID()}.sqlite`,
214-
dbLocation: tmpdir,
215-
implementation: {
216-
type: 'node:sqlite'
208+
tempDirectoryTest(
209+
'should not present database is locked errors on startup',
210+
{
211+
// This is not a SemVer check, but is basic enough to skip this test on older versions of Node.js
212+
skip: process.versions.node < '22.5.0'
213+
},
214+
async ({ tmpdir }) => {
215+
for (let i = 0; i < 10; i++) {
216+
const database = new PowerSyncDatabase({
217+
schema: AppSchema,
218+
database: {
219+
dbFilename: `${randomUUID()}.sqlite`,
220+
dbLocation: tmpdir,
221+
implementation: {
222+
type: 'node:sqlite'
223+
}
217224
}
218-
}
219-
});
225+
});
220226

221-
// This should not throw
222-
await database.waitForReady();
223-
await database.close();
227+
// This should not throw
228+
await database.waitForReady();
229+
await database.close();
230+
}
224231
}
225-
});
232+
);

pnpm-workspace.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,6 @@ packages:
44
- tools/*
55
- docs/
66

7-
ignoredBuiltDependencies:
8-
- '@journeyapps/wa-sqlite'
9-
- '@parcel/watcher'
10-
- '@swc/core'
11-
- core-js
12-
- core-js-pure
13-
- detox
14-
- dtrace-provider
15-
- electron
16-
- electron-winstaller
17-
- esbuild
18-
- lmdb
19-
- lzma-native
20-
- msgpackr-extract
21-
- react-native-elements
22-
- supabase
23-
- unrs-resolver
24-
- vue-demi
25-
267
onlyBuiltDependencies:
278
- better-sqlite3
289
- better-sqlite3-multiple-ciphers

0 commit comments

Comments
 (0)