Skip to content

Fix a bunch of dependency-related type issues related to bugs in TypeScript and packages trying to support React 19 #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 29, 2025
4 changes: 3 additions & 1 deletion apps/api/scripts/dev.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env tsx

import nodemon from 'nodemon';
import _nodemon, { type Nodemon, type NodemonSettings } from 'nodemon';

const nodemon = _nodemon as any as (settings: NodemonSettings) => Nodemon;

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

Expand Down
14 changes: 8 additions & 6 deletions apps/api/src/gateway/gateway.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { webcrypto } from 'node:crypto';

import { HybridCrypto } from '@douglasneuroinformatics/libcrypto';
import { LoggingService } from '@douglasneuroinformatics/libnest/logging';
import { HttpService } from '@nestjs/axios';
Expand All @@ -9,11 +11,8 @@ import type {
MutateAssignmentResponseBody,
RemoteAssignment
} from '@opendatacapture/schemas/assignment';
import {
$GatewayHealthcheckSuccessResult,
type GatewayHealthcheckFailureResult,
type GatewayHealthcheckResult
} from '@opendatacapture/schemas/gateway';
import { $GatewayHealthcheckSuccessResult } from '@opendatacapture/schemas/gateway';
import type { GatewayHealthcheckFailureResult, GatewayHealthcheckResult } from '@opendatacapture/schemas/gateway';

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

Expand All @@ -25,7 +24,10 @@ export class GatewayService {
private readonly loggingService: LoggingService
) {}

async createRemoteAssignment(assignment: Assignment, publicKey: CryptoKey): Promise<MutateAssignmentResponseBody> {
async createRemoteAssignment(
assignment: Assignment,
publicKey: webcrypto.CryptoKey
): Promise<MutateAssignmentResponseBody> {
const instrument = await this.instrumentsService.findBundleById(assignment.instrumentId);
const response = await this.httpService.axiosRef.post(`/api/assignments`, {
...assignment,
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lucide-react": "^0.473.0",
"lz-string": "^1.5.0",
"monaco-editor": "^0.52.2",
"motion": "^11.15.0",
"motion": "catalog:",
"prettier": "^3.4.2",
"react": "workspace:react__18.x@*",
"react-dom": "workspace:react-dom__18.x@*",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"jwt-decode": "^4.0.0",
"lodash-es": "workspace:lodash-es__4.x@*",
"lucide-react": "^0.473.0",
"motion": "^11.15.0",
"motion": "catalog:",
"papaparse": "workspace:papaparse__5.x@*",
"react": "workspace:react__18.x@*",
"react-dom": "workspace:react-dom__18.x@*",
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opendatacapture",
"type": "module",
"version": "1.8.6",
"version": "1.8.7",
"private": true,
"packageManager": "[email protected]",
"license": "Apache-2.0",
Expand Down Expand Up @@ -85,5 +85,17 @@
"extends": [
"@commitlint/config-conventional"
]
},
"pnpm": {
"overrides": {
"@mdx-js/react>@types/react": "18.x",
"framer-motion": "11.15.0",
"typescript": "5.6.x"
},
"peerDependencyRules": {
"allowedVersions": {
"@mdx-js/react>@types/react": "18.x"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/react-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@opendatacapture/runtime-core": "workspace:*",
"http-status-codes": "^2.3.0",
"lucide-react": "^0.473.0",
"motion": "^11.15.0",
"motion": "catalog:",
"serialize-error": "^11.0.3",
"ts-pattern": "workspace:ts-pattern__5.x@*"
},
Expand Down
Loading