2 Commits fcd95a24c7 ... 68d05b0a5d

Author SHA1 Message Date
  Owen Diffey 68d05b0a5d fix: Station undefined in autorequestExcludedMediaSources 1 week ago
  Owen Diffey dacdf129b2 chore: Update to node 22 1 week ago
6 changed files with 20 additions and 7 deletions
  1. 1 1
      Dockerfile
  2. 1 1
      Dockerfile.dev
  3. 1 1
      backend/index.js
  4. 12 0
      backend/package-lock.json
  5. 4 3
      backend/package.json
  6. 1 1
      frontend/src/stores/station.ts

+ 1 - 1
Dockerfile

@@ -1,5 +1,5 @@
 # Common base image
-FROM node:18-alpine AS common_base
+FROM node:22-alpine AS common_base
 
 ARG UID=1000
 ARG GID=1000

+ 1 - 1
Dockerfile.dev

@@ -1,5 +1,5 @@
 # Common base image
-FROM node:18-alpine AS common_base
+FROM node:22-alpine AS common_base
 
 ARG UID=1000
 ARG GID=1000

+ 1 - 1
backend/index.js

@@ -5,7 +5,7 @@ import config from "config";
 import fs from "fs";
 
 import * as readline from "node:readline";
-import packageJson from "./package.json" assert { type: "json" };
+import packageJson from "./package.json" with { type: "json" };
 
 const REQUIRED_CONFIG_VERSION = 12;
 

+ 12 - 0
backend/package-lock.json

@@ -18,6 +18,7 @@
         "cookie-parser": "^1.4.7",
         "cors": "^2.8.5",
         "express": "^4.21.1",
+        "extensionless": "^1.9.9",
         "moment": "^2.30.1",
         "mongoose": "^6.13.3",
         "nodemailer": "^6.9.16",
@@ -2361,6 +2362,12 @@
         "node": ">= 0.6"
       }
     },
+    "node_modules/extensionless": {
+      "version": "1.9.9",
+      "resolved": "https://registry.npmjs.org/extensionless/-/extensionless-1.9.9.tgz",
+      "integrity": "sha512-fz0cWfLA4pgc2nwmg6lc2UH+g+NlFuD63VWqp8n1wGAZSSbPNoARkA54BxXRjYCYW9LvhBnA3NyJaGS2KudkWw==",
+      "license": "MIT"
+    },
     "node_modules/fast-deep-equal": {
       "version": "3.1.3",
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
@@ -7040,6 +7047,11 @@
         }
       }
     },
+    "extensionless": {
+      "version": "1.9.9",
+      "resolved": "https://registry.npmjs.org/extensionless/-/extensionless-1.9.9.tgz",
+      "integrity": "sha512-fz0cWfLA4pgc2nwmg6lc2UH+g+NlFuD63VWqp8n1wGAZSSbPNoARkA54BxXRjYCYW9LvhBnA3NyJaGS2KudkWw=="
+    },
     "fast-deep-equal": {
       "version": "3.1.3",
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",

+ 4 - 3
backend/package.json

@@ -9,8 +9,8 @@
   "license": "GPL-3.0",
   "repository": "https://github.com/Musare/Musare",
   "scripts": {
-    "dev": "nodemon --es-module-specifier-resolution=node --legacy-watch --no-stdin /opt/app",
-    "prod": "node --es-module-specifier-resolution=node /opt/app",
+    "dev": "nodemon --import=extensionless/register --legacy-watch --no-stdin /opt/app",
+    "prod": "node --import=extensionless/register /opt/app",
     "lint": "eslint . --ext .js",
     "typescript": "tsc --noEmit --skipLibCheck"
   },
@@ -24,6 +24,7 @@
     "cookie-parser": "^1.4.7",
     "cors": "^2.8.5",
     "express": "^4.21.1",
+    "extensionless": "^1.9.9",
     "moment": "^2.30.1",
     "mongoose": "^6.13.3",
     "nodemailer": "^6.9.16",
@@ -54,4 +55,4 @@
   "overrides": {
     "@aws-sdk/credential-providers": "npm:dry-uninstall"
   }
-}
+}

+ 1 - 1
frontend/src/stores/station.ts

@@ -93,7 +93,7 @@ export const useStationStore = defineStore("station", {
 			const {
 				autorequestDisallowRecentlyPlayedEnabled,
 				autorequestDisallowRecentlyPlayedNumber
-			} = this.station.requests;
+			} = this.station?.requests ?? {};
 
 			// If the station is set to disallow recently played songs, and station history is enabled, exclude the last X history songs
 			if (