Skip to content

Commit 1945edf

Browse files
committed
Fix local-linking build
1 parent f9eab9d commit 1945edf

7 files changed

Lines changed: 240 additions & 95 deletions

File tree

demos/powersync-react-native-demo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit a97a154da9ee35b61fa72c2563306387d915f8f4

pnpm-lock.yaml

Lines changed: 226 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/demos-inject-local.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const injectPackages = async (demo: string, options: OptionValues) => {
5555
try {
5656
const pnpmfileContent = await fs.readFile(PNPMFILE_DIST_PATH, 'utf-8');
5757
await fs.writeFile(pnpmFilePath, pnpmfileContent);
58-
} catch (e) {
58+
} catch (e: any) {
5959
throw new Error(`Failed to copy pnpmfile to ${pnpmFilePath}: ${e.message}`);
6060
}
6161
};
@@ -74,7 +74,7 @@ const installDemos = async (demo: string, options: OptionValues) => {
7474
cwd: demoSrc,
7575
stdio: 'inherit'
7676
});
77-
} catch (e) {
77+
} catch (e: any) {
7878
console.warn(`Warning: 'pnpm install' failed for ${demo}: ${e.message}`);
7979
}
8080
};

scripts/isolated-demo-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const processDemo = async (demoName: string): Promise<DemoResult> => {
7878
try {
7979
execSync('pnpm install', { cwd: demoDest, stdio: 'inherit' });
8080
result.installResult.state = TestState.PASSED;
81-
} catch (ex) {
81+
} catch (ex: any) {
8282
console.error(ex);
8383
result.installResult.state = TestState.FAILED;
8484
result.installResult.error = ex.message;
@@ -100,7 +100,7 @@ const processDemo = async (demoName: string): Promise<DemoResult> => {
100100

101101
execSync('pnpm run test:build', { cwd: demoDest, stdio: 'inherit' });
102102
result.buildResult.state = TestState.PASSED;
103-
} catch (ex) {
103+
} catch (ex: any) {
104104
console.error(ex);
105105
result.buildResult.state = TestState.FAILED;
106106
result.buildResult.error = ex.message;
@@ -120,7 +120,7 @@ const main = async () => {
120120
for (const demoName of demoNames) {
121121
try {
122122
results.push(await processDemo(demoName));
123-
} catch (ex) {
123+
} catch (ex: any) {
124124
results.push({
125125
name: demoName,
126126
installResult: {

tools/local-linking/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build": "tsc -p tsconfig.json"
1212
},
1313
"devDependencies": {
14-
"typescript": "catalog:"
14+
"typescript": "catalog:",
15+
"@types/node": "^25.9.1"
1516
}
1617
}

tools/local-linking/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"compilerOptions": {
33
"target": "ES2020",
4-
"module": "commonjs",
4+
"module": "nodenext",
5+
"types": ["node"],
56
"lib": ["ES2020"],
6-
"moduleResolution": "node",
7+
"moduleResolution": "nodenext",
78
"outDir": "dist",
89
"rootDir": "src",
910
"esModuleInterop": true,

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
{
5353
"path": "./tools/diagnostics-app"
5454
},
55+
{
56+
"path": "./tools/local-linking"
57+
},
5558
{
5659
"path": "./tools/powersynctests"
5760
},

0 commit comments

Comments
 (0)