From 991cec842a92543917958b0d1964b85055f5c598 Mon Sep 17 00:00:00 2001 From: Danya H Date: Mon, 10 Jun 2024 02:12:27 +0100 Subject: [PATCH] resolved local folder as dependency from workspace --- client/package.json | 2 +- client/src/index.ts | 2 +- client/src/types.ts | 2 +- pnpm-lock.yaml | 23 +++++++++++++++++++---- pnpm-workspace.yaml | 8 ++++---- server/package.json | 2 +- server/src/index.ts | 2 +- server/src/types.ts | 2 +- 8 files changed, 29 insertions(+), 14 deletions(-) diff --git a/client/package.json b/client/package.json index b6d51f8..a7c6451 100644 --- a/client/package.json +++ b/client/package.json @@ -9,7 +9,7 @@ "types": "dts-bundle-generator --config dts.config.json" }, "peerDependencies": { - "rage-fw-shared-types": "workspace:shared-types:*" + "rage-fw-shared-types": "workspace:^" }, "keywords": [], "author": "SashaGoncharov19", diff --git a/client/src/index.ts b/client/src/index.ts index f809231..8b215f6 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -1,5 +1,5 @@ import rpc from 'rage-rpc' -import { +import type { RageFW_ClientEventReturn, RageFW_ClientEvent, RageFW_ClientEventArguments, diff --git a/client/src/types.ts b/client/src/types.ts index c13d9ad..58f3077 100644 --- a/client/src/types.ts +++ b/client/src/types.ts @@ -1,6 +1,6 @@ /// -import { RageFW_ICustomClientEvent } from 'rage-fw-shared-types' +import type { RageFW_ICustomClientEvent } from 'rage-fw-shared-types' export type RageFW_ClientEvent = | keyof RageFW_ICustomClientEvent diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04e6b1e..34251ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ importers: esbuild: specifier: ^0.21.5 version: 0.21.5 + lerna: + specifier: ^8.1.3 + version: 8.1.3(encoding@0.1.13) prettier: specifier: ^3.3.1 version: 3.3.1 @@ -32,10 +35,22 @@ importers: typescript: specifier: ^5.4.5 version: 5.4.5 - devDependencies: - lerna: - specifier: ^8.1.3 - version: 8.1.3(encoding@0.1.13) + + client: + dependencies: + rage-fw-shared-types: + specifier: workspace:^ + version: link:../shared-types + + server: + dependencies: + rage-fw-shared-types: + specifier: workspace:^ + version: link:../shared-types + + shared: {} + + shared-types: {} packages: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3127b36..267a017 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: - - "server/*" - - "client/*" - - "shared/*" - - "shared-types/*" \ No newline at end of file + - "server" + - "client" + - "shared" + - "shared-types" \ No newline at end of file diff --git a/server/package.json b/server/package.json index 2cd416e..a20db0a 100644 --- a/server/package.json +++ b/server/package.json @@ -10,7 +10,7 @@ "types": "dts-bundle-generator --config dts.config.json" }, "peerDependencies": { - "rage-fw-shared-types": "workspace:shared-types:*" + "rage-fw-shared-types": "workspace:^" }, "keywords": [], "author": "SashaGoncharov19", diff --git a/server/src/index.ts b/server/src/index.ts index 7148656..bc4a3bd 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -1,5 +1,5 @@ import rpc from 'rage-rpc' -import { RageFW_ServerEvent, RageFW_ServerEventCallback } from './types.js' +import type { RageFW_ServerEvent, RageFW_ServerEventCallback } from './types.js' class Server { public register( diff --git a/server/src/types.ts b/server/src/types.ts index 8a44099..8057194 100644 --- a/server/src/types.ts +++ b/server/src/types.ts @@ -1,6 +1,6 @@ /// -import { RageFW_ICustomServerEvent } from 'rage-fw-shared-types' +import type { RageFW_ICustomServerEvent } from 'rage-fw-shared-types' export type RageFW_ServerEvent = | keyof RageFW_ICustomServerEvent