@powersync/service-module-postgres 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @powersync/service-module-postgres
2
2
 
3
+ ## 0.19.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [224c35e]
8
+ - Updated dependencies [acf1486]
9
+ - Updated dependencies [391c5ef]
10
+ - Updated dependencies [7ee87d4]
11
+ - Updated dependencies [99de8be]
12
+ - Updated dependencies [9daf965]
13
+ - Updated dependencies [4c92c24]
14
+ - Updated dependencies [3d230c2]
15
+ - Updated dependencies [206633f]
16
+ - Updated dependencies [3a0627e]
17
+ - Updated dependencies [275fd5f]
18
+ - Updated dependencies [7ce1b8e]
19
+ - @powersync/service-sync-rules@0.34.0
20
+ - @powersync/service-core@1.20.2
21
+ - @powersync/lib-services-framework@0.9.1
22
+ - @powersync/service-jpgwire@0.21.15
23
+ - @powersync/lib-service-postgres@0.4.24
24
+
3
25
  ## 0.19.0
4
26
 
5
27
  ### Minor Changes
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "version": "0.19.0",
8
+ "version": "0.19.1",
9
9
  "main": "dist/index.js",
10
10
  "license": "FSL-1.1-ALv2",
11
11
  "type": "module",
@@ -25,20 +25,20 @@
25
25
  "semver": "^7.5.4",
26
26
  "ts-codec": "^1.3.0",
27
27
  "uuid": "^11.1.0",
28
- "@powersync/lib-service-postgres": "0.4.23",
29
- "@powersync/lib-services-framework": "0.9.0",
30
- "@powersync/service-core": "1.20.1",
31
- "@powersync/service-jpgwire": "0.21.14",
28
+ "@powersync/lib-service-postgres": "0.4.24",
29
+ "@powersync/lib-services-framework": "0.9.1",
30
+ "@powersync/service-core": "1.20.2",
31
+ "@powersync/service-jpgwire": "0.21.15",
32
32
  "@powersync/service-jsonbig": "0.17.12",
33
- "@powersync/service-sync-rules": "0.33.0",
33
+ "@powersync/service-sync-rules": "0.34.0",
34
34
  "@powersync/service-types": "0.15.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/semver": "^7.5.4",
38
- "@powersync/lib-service-postgres": "0.4.23",
39
- "@powersync/service-core-tests": "0.15.0",
40
- "@powersync/service-module-mongodb-storage": "0.15.0",
41
- "@powersync/service-module-postgres-storage": "0.13.0"
38
+ "@powersync/lib-service-postgres": "0.4.24",
39
+ "@powersync/service-core-tests": "0.15.1",
40
+ "@powersync/service-module-mongodb-storage": "0.15.1",
41
+ "@powersync/service-module-postgres-storage": "0.13.1"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsc -b",
package/test/src/env.ts CHANGED
@@ -2,7 +2,7 @@ import { utils } from '@powersync/lib-services-framework';
2
2
 
3
3
  export const env = utils.collectEnvironmentVariables({
4
4
  PG_TEST_URL: utils.type.string.default('postgres://postgres:postgres@localhost:5432/powersync_test'),
5
- PG_STORAGE_TEST_URL: utils.type.string.default('postgres://postgres:postgres@localhost:5431/powersync_storage_test'),
5
+ PG_STORAGE_TEST_URL: utils.type.string.default('postgres://postgres:postgres@localhost:5432/powersync_storage_test'),
6
6
  MONGO_TEST_URL: utils.type.string.default('mongodb://localhost:27017/powersync_test'),
7
7
  CI: utils.type.boolean.default('false'),
8
8
  SLOW_TESTS: utils.type.boolean.default('false'),
@@ -3,9 +3,17 @@ import { populateData } from '../../dist/utils/populate_test_data.js';
3
3
  import { env } from './env.js';
4
4
  import { describeWithStorage, StorageVersionTestContext, TEST_CONNECTION_OPTIONS } from './util.js';
5
5
  import { WalStreamTestContext } from './wal_stream_utils.js';
6
+ import { CURRENT_STORAGE_VERSION } from '@powersync/service-core';
6
7
 
7
8
  describe.skipIf(!(env.CI || env.SLOW_TESTS))('batch replication', function () {
8
- describeWithStorage({ timeout: 240_000 }, defineBatchTests);
9
+ describeWithStorage(
10
+ {
11
+ timeout: 240_000,
12
+ // These tests are slow, so only test the current storage version
13
+ storageVersions: [CURRENT_STORAGE_VERSION]
14
+ },
15
+ defineBatchTests
16
+ );
9
17
  });
10
18
 
11
19
  const BASIC_SYNC_RULES = `bucket_definitions:
@@ -18,6 +18,7 @@ import { PgManager } from '@module/replication/PgManager.js';
18
18
  import { ReplicationAbortedError } from '@powersync/lib-services-framework';
19
19
  import {
20
20
  createCoreReplicationMetrics,
21
+ CURRENT_STORAGE_VERSION,
21
22
  initializeCoreReplicationMetrics,
22
23
  reduceBucket,
23
24
  updateSyncRulesFromYaml
@@ -29,9 +30,16 @@ import * as timers from 'node:timers/promises';
29
30
  import { WalStreamTestContext } from './wal_stream_utils.js';
30
31
 
31
32
  describe.skipIf(!(env.CI || env.SLOW_TESTS))('slow tests', function () {
32
- describeWithStorage({ timeout: 120_000 }, function ({ factory, storageVersion }) {
33
- defineSlowTests({ factory, storageVersion });
34
- });
33
+ describeWithStorage(
34
+ {
35
+ timeout: 120_000,
36
+ // These tests are slow, so only test the current storage version
37
+ storageVersions: [CURRENT_STORAGE_VERSION]
38
+ },
39
+ function ({ factory, storageVersion }) {
40
+ defineSlowTests({ factory, storageVersion });
41
+ }
42
+ );
35
43
  });
36
44
 
37
45
  function defineSlowTests({ factory, storageVersion }: StorageVersionTestContext) {
package/test/src/util.ts CHANGED
@@ -35,10 +35,14 @@ export interface StorageVersionTestContext {
35
35
  storageVersion: number;
36
36
  }
37
37
 
38
- export function describeWithStorage(options: TestOptions, fn: (context: StorageVersionTestContext) => void) {
38
+ export function describeWithStorage(
39
+ options: TestOptions & { storageVersions?: number[] },
40
+ fn: (context: StorageVersionTestContext) => void
41
+ ) {
42
+ const storageVersions = options.storageVersions ?? TEST_STORAGE_VERSIONS;
39
43
  const describeFactory = (storageName: string, config: TestStorageConfig) => {
40
44
  describe(`${storageName} storage`, options, function () {
41
- for (const storageVersion of TEST_STORAGE_VERSIONS) {
45
+ for (const storageVersion of storageVersions) {
42
46
  describe(`storage v${storageVersion}`, function () {
43
47
  fn({
44
48
  factory: config.factory,
@@ -140,7 +144,7 @@ export async function getClientCheckpoint(
140
144
  return cp.checkpoint;
141
145
  }
142
146
 
143
- await new Promise((resolve) => setTimeout(resolve, 30));
147
+ await new Promise((resolve) => setTimeout(resolve, 5));
144
148
  }
145
149
 
146
150
  throw new Error('Timeout while waiting for checkpoint');