Skip to content

Commit da5b99c

Browse files
authored
Merge pull request #1092 from joshunrau/dependency-hell
Fix a bunch of dependency-related type issues related to bugs in TypeScript and packages trying to support React 19
2 parents bb03156 + c3cfa51 commit da5b99c

File tree

8 files changed

+3092
-3252
lines changed

8 files changed

+3092
-3252
lines changed

apps/api/scripts/dev.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env tsx
22

3-
import nodemon from 'nodemon';
3+
import _nodemon, { type Nodemon, type NodemonSettings } from 'nodemon';
4+
5+
const nodemon = _nodemon as any as (settings: NodemonSettings) => Nodemon;
46

57
import { clean, outfile, watch } from './build.js';
68

apps/api/src/gateway/gateway.service.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { webcrypto } from 'node:crypto';
2+
13
import { HybridCrypto } from '@douglasneuroinformatics/libcrypto';
24
import { LoggingService } from '@douglasneuroinformatics/libnest/logging';
35
import { HttpService } from '@nestjs/axios';
@@ -9,11 +11,8 @@ import type {
911
MutateAssignmentResponseBody,
1012
RemoteAssignment
1113
} from '@opendatacapture/schemas/assignment';
12-
import {
13-
$GatewayHealthcheckSuccessResult,
14-
type GatewayHealthcheckFailureResult,
15-
type GatewayHealthcheckResult
16-
} from '@opendatacapture/schemas/gateway';
14+
import { $GatewayHealthcheckSuccessResult } from '@opendatacapture/schemas/gateway';
15+
import type { GatewayHealthcheckFailureResult, GatewayHealthcheckResult } from '@opendatacapture/schemas/gateway';
1716

1817
import { InstrumentsService } from '@/instruments/instruments.service';
1918

@@ -25,7 +24,10 @@ export class GatewayService {
2524
private readonly loggingService: LoggingService
2625
) {}
2726

28-
async createRemoteAssignment(assignment: Assignment, publicKey: CryptoKey): Promise<MutateAssignmentResponseBody> {
27+
async createRemoteAssignment(
28+
assignment: Assignment,
29+
publicKey: webcrypto.CryptoKey
30+
): Promise<MutateAssignmentResponseBody> {
2931
const instrument = await this.instrumentsService.findBundleById(assignment.instrumentId);
3032
const response = await this.httpService.axiosRef.post(`/api/assignments`, {
3133
...assignment,

apps/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lucide-react": "^0.473.0",
3232
"lz-string": "^1.5.0",
3333
"monaco-editor": "^0.52.2",
34-
"motion": "^11.15.0",
34+
"motion": "catalog:",
3535
"prettier": "^3.4.2",
3636
"react": "workspace:react__18.x@*",
3737
"react-dom": "workspace:react-dom__18.x@*",

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"jwt-decode": "^4.0.0",
4444
"lodash-es": "workspace:lodash-es__4.x@*",
4545
"lucide-react": "^0.473.0",
46-
"motion": "^11.15.0",
46+
"motion": "catalog:",
4747
"papaparse": "workspace:papaparse__5.x@*",
4848
"react": "workspace:react__18.x@*",
4949
"react-dom": "workspace:react-dom__18.x@*",

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opendatacapture",
33
"type": "module",
4-
"version": "1.8.6",
4+
"version": "1.8.7",
55
"private": true,
66
"packageManager": "[email protected]",
77
"license": "Apache-2.0",
@@ -85,5 +85,17 @@
8585
"extends": [
8686
"@commitlint/config-conventional"
8787
]
88+
},
89+
"pnpm": {
90+
"overrides": {
91+
"@mdx-js/react>@types/react": "18.x",
92+
"framer-motion": "11.15.0",
93+
"typescript": "5.6.x"
94+
},
95+
"peerDependencyRules": {
96+
"allowedVersions": {
97+
"@mdx-js/react>@types/react": "18.x"
98+
}
99+
}
88100
}
89101
}

packages/react-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@opendatacapture/runtime-core": "workspace:*",
2727
"http-status-codes": "^2.3.0",
2828
"lucide-react": "^0.473.0",
29-
"motion": "^11.15.0",
29+
"motion": "catalog:",
3030
"serialize-error": "^11.0.3",
3131
"ts-pattern": "workspace:ts-pattern__5.x@*"
3232
},

0 commit comments

Comments
 (0)