Skip to content

Commit

Permalink
TEL - Switch from yarn to pnpm (github#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeechey authored Jan 16, 2024
1 parent 7e48536 commit b79fcf0
Show file tree
Hide file tree
Showing 15 changed files with 16,003 additions and 15,437 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/telemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
push:
paths:
- 'telemetry/**'
- '.github/workflows/telemetry.yml'

defaults:
run:
working-directory: telemetry

jobs:
telemetry-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: telemetry
steps:
- uses: actions/checkout@v3

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
To run the telemetry system, run the following command:

```
./docker.sh <yarn_script>
./docker.sh <pnpm_script>
```

where `<yarn_script>` is one of the scripts defined in `package.json`. E.g. `dev` or `build`.
where `<pnpm_script>` is one of the scripts defined in `package.json`. E.g. `dev` or `build`.

> The GUI will now be available on `http://localhost:5173`
Expand Down
9 changes: 7 additions & 2 deletions telemetry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@ FROM node:18.17.0
# Create app directory
WORKDIR /usr/src/app

# Install pnpm
RUN npm install -g pnpm

# Install dependencies
COPY package.json ./
COPY packages/constants/package.json ./packages/constants/
COPY packages/server/package.json ./packages/server/
COPY packages/types/package.json ./packages/types/
COPY packages/ui/package.json ./packages/ui/
COPY yarn.lock ./
COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY patches ./patches
RUN yarn install
RUN pnpm install

# Expose ports
EXPOSE 5173
EXPOSE 3000
EXPOSE 8086

# Entrypoint
COPY entry.sh ./
Expand Down
2 changes: 1 addition & 1 deletion telemetry/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ if [[ -n ${container} ]]; then
fi


docker run -e YARN_SCRIPT=build --name $CONTAINER_NAME -v $(pwd):/usr/src/app \
docker run -e PNPM_SCRIPT=build --name $CONTAINER_NAME -v $(pwd):/usr/src/app \
-v /usr/src/app/node_modules \
-v /usr/src/app/packages/server/node_modules \
-v /usr/src/app/packages/ui/node_modules \
Expand Down
2 changes: 1 addition & 1 deletion telemetry/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- 5173:5173
- 3000:3000
environment:
- YARN_SCRIPT
- PNPM_SCRIPT
volumes:
- ./:/usr/src/app
# Exclude node_modules from being mounted
Expand Down
6 changes: 3 additions & 3 deletions telemetry/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ cp /usr/src/app/packages/server/.env.docker /usr/src/app/packages/server/.env

cp /usr/src/app/packages/ui/.env.docker /usr/src/app/packages/ui/.env

yarn build
pnpm build

if [ "$YARN_SCRIPT" = "build" ]; then
if [ "$PNPM_SCRIPT" = "build" ]; then
echo "Build complete"
exit 0
fi

yarn "$YARN_SCRIPT"
pnpm "$PNPM_SCRIPT"
21 changes: 8 additions & 13 deletions telemetry/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
{
"name": "@hyped/telemetry",
"private": true,
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"packages/*"
]
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"Run": "===========================================================================================================",
"start": "turbo run start --parallel",
"Development": "===================================================================================================",
Expand All @@ -21,8 +14,7 @@
"fix": "turbo run fix --parallel",
"flightcheck": "turbo run flightcheck",
"Build": "=========================================================================================================",
"build": "turbo run build",
"postinstall": "patch-package"
"build": "turbo run build"
},
"devDependencies": {
"@types/is-ci": "^3.0.0",
Expand All @@ -36,8 +28,11 @@
"turbo": "^1.7.0",
"typescript": "^5.1.6"
},
"dependencies": {
"patch-package": "^6.5.1",
"postinstall-postinstall": "^2.1.0"
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"@nestjs/[email protected]": "patches/@[email protected]",
"[email protected]": "patches/[email protected]"
}
}
}
3 changes: 1 addition & 2 deletions telemetry/packages/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
],
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"prepare": "tsdx build"
"build": "tsdx build"
},
"devDependencies": {
"@hyped/telemetry-types": "*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/@nestjs/common/services/logger.service.d.ts b/node_modules/@nestjs/common/services/logger.service.d.ts
index 8e52c68..89ab4f1 100644
--- a/node_modules/@nestjs/common/services/logger.service.d.ts
+++ b/node_modules/@nestjs/common/services/logger.service.d.ts
diff --git a/services/logger.service.d.ts b/services/logger.service.d.ts
index 8e52c6852b6f4be2d3bbe39ea0296aff95c6808d..89ab4f1a9ad0c8641736d1f9610d79a6b55c8b40 100644
--- a/services/logger.service.d.ts
+++ b/services/logger.service.d.ts
@@ -21,11 +21,11 @@ export interface LoggerService {
/**
* Write a 'debug' level log.
Expand All @@ -15,4 +15,4 @@ index 8e52c68..89ab4f1 100644
+ verbose(message: any, ...optionalParams: any[]): any;
/**
* Set log levels.
* @param levels log levels
* @param levels log levels
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/nest-mqtt/package.json b/node_modules/nest-mqtt/package.json
index d618c5b..0ce26cf 100644
--- a/node_modules/nest-mqtt/package.json
+++ b/node_modules/nest-mqtt/package.json
diff --git a/package.json b/package.json
index d618c5b39872a64b809eac6c27402241d77f79f7..0ce26cf2e52786645c5b8fe528df38cda55f969d 100644
--- a/package.json
+++ b/package.json
@@ -32,8 +32,8 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
Expand All @@ -12,4 +12,4 @@ index d618c5b..0ce26cf 100644
+ "@nestjs/core": "^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"mqtt": "^3.0.0"
},
"devDependencies": {
"devDependencies": {
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/node_modules/openmct/dist/openmct.d.ts b/node_modules/openmct/dist/openmct.d.ts
index ce404b2..5594ef7 100644
--- a/node_modules/openmct/dist/openmct.d.ts
+++ b/node_modules/openmct/dist/openmct.d.ts
diff --git a/dist/openmct.d.ts b/dist/openmct.d.ts
index ce404b2dd2881abdbeb3ef6e5cbaa877c3f124d7..ef1ba3e7ceb42f8a5b57eeb2b512556dbb5bbb60 100644
--- a/dist/openmct.d.ts
+++ b/dist/openmct.d.ts
@@ -34,14 +34,17 @@ type OpenMCT = {
getAssetPath: {
(): string;
};
- start: (domElement: HTMLElement, isHeadlessMode: boolean) => void;
+ setAssetPath: {
+ (path: string): void;
+ };
+ }
+ start: (domElement?: HTMLElement, isHeadlessMode?: boolean) => void;
startHeadless: {
(): void;
Expand All @@ -22,10 +22,10 @@ index ce404b2..5594ef7 100644
components: OpenMCTComponent[];
};
type BuildInfo = {
diff --git a/node_modules/openmct/dist/src/api/time/TimeContext.d.ts b/node_modules/openmct/dist/src/api/time/TimeContext.d.ts
index b87f325..e56366e 100644
--- a/node_modules/openmct/dist/src/api/time/TimeContext.d.ts
+++ b/node_modules/openmct/dist/src/api/time/TimeContext.d.ts
diff --git a/dist/src/api/time/TimeContext.d.ts b/dist/src/api/time/TimeContext.d.ts
index b87f3254b37d51cd1ce6ef3e13210a1f00d96e83..e56366e686f551ca497ec1032c7e2eb08cb69ca8 100644
--- a/dist/src/api/time/TimeContext.d.ts
+++ b/dist/src/api/time/TimeContext.d.ts
@@ -43,7 +43,7 @@ declare class TimeContext {
* @memberof module:openmct.TimeAPI#
* @method timeSystem
Expand All @@ -34,4 +34,4 @@ index b87f325..e56366e 100644
+ timeSystem(timeSystemOrKey: TimeSystem | string, bounds?: any, ...args: any[]): TimeSystem;
/**
* Clock offsets are used to calculate temporal bounds when the system is
* ticking on a clock source.
* ticking on a clock source.
Loading

0 comments on commit b79fcf0

Please sign in to comment.