Skip to content

Commit d0abdbe

Browse files
committed
Fix building packages
1 parent 189fb8e commit d0abdbe

5 files changed

Lines changed: 11 additions & 35 deletions

File tree

packages/common/legacy/sync_protocol.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
// TypeScript definitions for sync lines sent by the PowerSync service. These aren't used in the implementation of
2+
// PowerSync SDKs, but we keep them around for:
3+
//
4+
// 1. Tests mocking the PowerSync service.
5+
// 2. The diagnostic app tracking schema updates and bucket sizes by decoding protocol messages.
6+
// 3. The nuxt SDK offering DevTools doing the same.
7+
//
8+
// Uses 2 and 3 should be replaced with the builtin diagnostic collection of the core extension eventually.
9+
110
export type SyncDataBucketJSON = {
211
bucket: string;
312
has_more?: boolean;

packages/common/src/client/sync/bucket/BucketStorageAdapter.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,6 @@ import { BaseListener, BaseObserverInterface, Disposable } from '../../../utils/
22
import { CrudBatch } from './CrudBatch.js';
33
import { CrudEntry } from './CrudEntry.js';
44

5-
export interface BucketDescription {
6-
name: string;
7-
priority: number;
8-
}
9-
10-
export interface BucketState {
11-
bucket: string;
12-
op_id: string;
13-
}
14-
15-
export type SavedProgress = {
16-
atLast: number;
17-
sinceLast: number;
18-
};
19-
20-
export type BucketOperationProgress = Record<string, SavedProgress>;
21-
225
export enum PSInternalTable {
236
DATA = 'ps_data',
247
CRUD = 'ps_crud',

packages/web/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,13 @@
7777
"devDependencies": {
7878
"@journeyapps/wa-sqlite": "^1.7.0",
7979
"@types/uuid": "catalog:",
80-
"crypto-browserify": "^3.12.0",
80+
"bson": "catalog:",
8181
"glob": "catalog:",
8282
"p-defer": "catalog:",
8383
"source-map-loader": "^5.0.0",
84-
"stream-browserify": "^3.0.0",
8584
"terser-webpack-plugin": "^5.3.9",
8685
"uuid": "catalog:",
8786
"vite": "catalog:",
88-
"vm-browserify": "^1.1.2",
8987
"webpack": "^5.90.1",
9088
"webpack-cli": "^5.1.4",
9189
"webpack-node-externals": "^3.0.0"

packages/web/webpack.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const production = process.env.NODE_ENV === 'production';
2-
import { createRequire } from 'module';
32
import path from 'path';
43
import TerserPlugin from 'terser-webpack-plugin';
54
import { fileURLToPath } from 'url';
@@ -9,7 +8,6 @@ import LimitChunkCountPlugin from 'webpack/lib/optimize/LimitChunkCountPlugin.js
98

109
const __filename = fileURLToPath(import.meta.url);
1110
const __dirname = path.dirname(__filename);
12-
const require = createRequire(import.meta.url);
1311

1412
export default () => {
1513
return {
@@ -34,11 +32,6 @@ export default () => {
3432

3533
resolve: {
3634
extensions: ['.tsx', '.ts', '.js'],
37-
fallback: {
38-
crypto: require.resolve('crypto-browserify'),
39-
stream: require.resolve('stream-browserify'),
40-
vm: require.resolve('vm-browserify')
41-
},
4235
alias: {}
4336
},
4437

packages/web/webpack.workers.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const production = process.env.NODE_ENV === 'production';
2-
import { createRequire } from 'module';
32
import path from 'path';
43
import TerserPlugin from 'terser-webpack-plugin';
54
import { fileURLToPath } from 'url';
65
import DeleteAssetsPlugin from './deletePlugin.plugin.js';
76

87
const __filename = fileURLToPath(import.meta.url);
98
const __dirname = path.dirname(__filename);
10-
const require = createRequire(import.meta.url);
119

1210
export default () => {
1311
return {
@@ -37,12 +35,7 @@ export default () => {
3735
]
3836
},
3937
resolve: {
40-
extensions: ['.tsx', '.ts', '.js'],
41-
fallback: {
42-
crypto: require.resolve('crypto-browserify'),
43-
stream: require.resolve('stream-browserify'),
44-
vm: require.resolve('vm-browserify')
45-
}
38+
extensions: ['.tsx', '.ts', '.js']
4639
},
4740

4841
devtool: production ? 'source-map' : 'cheap-module-source-map',

0 commit comments

Comments
 (0)