Skip to content

Commit

Permalink
chore: upgrade node dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cpvalente committed Jul 10, 2024
1 parent e90e948 commit 8a8ce14
Show file tree
Hide file tree
Showing 14 changed files with 6,719 additions and 5,455 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -56,12 +56,12 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -89,12 +89,12 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -73,12 +73,12 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.18.2
v20.15.1
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Ontime consists of 3 distinct parts
The steps below will assume you have locally installed the necessary dependencies.
Other dependencies will be installed as part of the setup

- __node__ (~18.18.2)
- __pnpm__ (>=8)
- __node__ (~20)
- __pnpm__ (~9)
- __docker__ (only necessary to run and build docker images)

## LOCAL DEVELOPMENT
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.18-alpine AS builder
FROM node:20-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -7,7 +7,7 @@ WORKDIR /app
RUN pnpm --filter=ontime-ui --filter=ontime-server --filter=ontime-utils install --config.dedupe-peer-dependents=false --frozen-lockfile
RUN pnpm --filter=ontime-ui --filter=ontime-server run build:docker

FROM node:18.18-alpine
FROM node:20-alpine

# Set environment variables
# Environment Variable to signal that we are running production
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/common/hooks/useLongPress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function useLongPress(callback: () => void, options: LongPressOpt
const { threshold = 400, onStart, onFinish, onCancel } = options;
const isLongPressActive = useRef(false);
const isPressed = useRef(false);
const timerId = useRef<NodeJS.Timer>();
const timerId = useRef<NodeJS.Timeout>();

return useMemo(() => {
const start = (event: SyntheticEvent) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "AGPL-3.0-only",
"main": "main.js",
"devDependencies": {
"electron": "^28.3.3",
"electron": "^31.2.0",
"electron-builder": "^24.13.3",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
13 changes: 6 additions & 7 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/cors": "^2.8.17",
"@types/express": "^4.17.17",
"@types/multer": "^1.4.11",
"@types/node": "^18.11.18",
"@types/node": "^20.14.10",
"@types/node-osc": "^6.0.2",
"@types/websocket": "^1.0.5",
"@types/ws": "^8.5.10",
Expand All @@ -36,24 +36,23 @@
"esbuild": "^0.19.10",
"eslint": "^8.56.0",
"eslint-plugin-prettier": "^5.1.3",
"nodemon": "^2.0.20",
"ontime-types": "workspace:*",
"prettier": "^3.3.1",
"server-timing": "^3.3.3",
"shx": "^0.3.4",
"ts-node": "^10.9.1",
"typescript": "^5.4.3",
"ts-essentials": "^9.4.1",
"tsx": "^4.16.2",
"typescript": "^5.4.3",
"vitest": "^1.6.0"
},
"scripts": {
"addversion": "node -p \"'export const ONTIME_VERSION = ' + JSON.stringify(require('../../package.json').version) + ';'\" > src/ONTIME_VERSION.js",
"set:demoproject": "shx cp ../../demo-db/db.json src/preloaded-db/db.json",
"set:testproject": "shx cp ../../demo-db/db.json test-db/db.json",
"postinstall": "pnpm addversion && pnpm set:demoproject && pnpm set:testproject",
"dev": "cross-env NODE_ENV=development nodemon --exec \"ts-node-esm\" ./src/index.ts",
"dev:inspect": "cross-env NODE_ENV=development nodemon --exec \"node --inspect --loader ts-node/esm\" ./src/index.ts",
"dev:test": "cross-env IS_TEST=true nodemon --exec \"ts-node-esm\" ./src/index.ts",
"dev": "cross-env NODE_ENV=development tsx ./src/index.ts",
"dev:inspect": "cross-env NODE_ENV=development tsx --inspect ./src/index.ts",
"dev:test": "cross-env IS_TEST=true tsx ./src/index.ts",
"prebuild": "pnpm set:demoproject",
"build": "pnpm prebuild && esbuild src/app.ts --log-level=error --platform=node --format=cjs --bundle --minify --legal-comments=external --outfile=dist/index.cjs",
"build:electron": "pnpm prebuild && esbuild src/app.ts --log-level=error --platform=node --format=cjs --bundle --minify --legal-comments=external --outfile=dist/index.cjs",
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/services/TimerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { timerConfig } from '../config/config.js';
* Service manages Ontime's main timer
*/
export class TimerService {
private readonly _interval: NodeJS.Timer;
private readonly _interval: NodeJS.Timeout;
/** how often we recalculate */
static _refreshInterval: number;

/** when timer will be finished */
private endCallback: NodeJS.Timer;
private endCallback: NodeJS.Timeout;

private onUpdateCallback: (updateResult: UpdateResult) => void;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type GetTimeFn = () => number;

export class AuxTimerService {
private timer: SimpleTimer;
private interval: NodeJS.Timer | null = null;
private interval: NodeJS.Timeout | null = null;
private emit: EmitFn;
private getTime: GetTimeFn;

Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/services/sheet-service/SheetService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let currentAuthCode: MaybeString = null;

let currentSheetId: MaybeString = null;

let pollInterval: NodeJS.Timer | null = null;
let pollInterval: NodeJS.Timeout | null = null;
let cleanupTimeout: NodeJS.Timeout | null = null;

function reset() {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"license": "AGPL-3.0-only",
"engines": {
"node": "~18.18.2",
"pnpm": ">=8"
"node": "~20",
"pnpm": "~9"
},
"type": "module",
"scripts": {
Expand All @@ -40,7 +40,7 @@
},
"devDependencies": {
"@playwright/test": "^1.42.1",
"@types/node": "^18.11.18",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^v7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"cross-env": "^7.0.3",
Expand Down
Loading

0 comments on commit 8a8ce14

Please sign in to comment.