mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-26 15:54:20 -04:00
chore: Upgrade Node and Nuxt (#6240)
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
// Use -bullseye variants on local on arm64/Apple Silicon.
|
||||
"VARIANT": "3.12-bullseye",
|
||||
// Options
|
||||
"NODE_VERSION": "20"
|
||||
"NODE_VERSION": "22"
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
|
||||
2
.github/workflows/build-package.yml
vendored
2
.github/workflows/build-package.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Setup node env 🏗
|
||||
uses: actions/setup-node@v4.0.0
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
check-latest: true
|
||||
|
||||
- name: Get yarn cache directory path 🛠
|
||||
|
||||
2
.github/workflows/e2e.yml
vendored
2
.github/workflows/e2e.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: ./tests/e2e/yarn.lock
|
||||
- name: Set up Docker Buildx
|
||||
|
||||
2
.github/workflows/test-frontend.yml
vendored
2
.github/workflows/test-frontend.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: Setup node env 🏗
|
||||
uses: actions/setup-node@v4.0.0
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
check-latest: true
|
||||
|
||||
- name: Get yarn cache directory path 🛠
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
###############################################
|
||||
# Frontend Build
|
||||
###############################################
|
||||
FROM node:20@sha256:abcf9c98af22ea2c5d33435143d9d8a5f6f191e1e1938a7650fc8b78c382b5a9 \
|
||||
FROM node:22@sha256:4973262386dc1cb70f7d6fc48a855027d8f12d2d3b1fe559b9db9a4fcb74668f \
|
||||
AS frontend-builder
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
@@ -34,7 +34,7 @@ Make sure the VSCode Dev Containers extension is installed, then select "Dev Con
|
||||
|
||||
- [Python 3.12](https://www.python.org/downloads/)
|
||||
- [Poetry](https://python-poetry.org/docs/#installation)
|
||||
- [Node v16.x](https://nodejs.org/en/)
|
||||
- [Node](https://nodejs.org/en/)
|
||||
- [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
|
||||
- [task](https://taskfile.dev/#/installation)
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import { useAsyncKey } from "../use-utils";
|
||||
import type { AppInfo } from "~/lib/api/types/admin";
|
||||
|
||||
export function useAppInfo(): Ref<AppInfo | null> {
|
||||
const appInfo = ref<null | AppInfo>(null);
|
||||
|
||||
const i18n = useI18n();
|
||||
const { $axios } = useNuxtApp();
|
||||
$axios.defaults.headers.common["Accept-Language"] = i18n.locale.value;
|
||||
|
||||
useAsyncData(useAsyncKey(), async () => {
|
||||
const { data: appInfo } = useAsyncData("app-info", async () => {
|
||||
const data = await $axios.get<AppInfo>("/api/app/about");
|
||||
appInfo.value = data.data;
|
||||
return data.data;
|
||||
});
|
||||
|
||||
return appInfo;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// @ts-check
|
||||
import stylisticJs from "@stylistic/eslint-plugin-js";
|
||||
import stylistic from "@stylistic/eslint-plugin";
|
||||
import withNuxt from "./.nuxt/eslint.config.mjs";
|
||||
|
||||
export default withNuxt({
|
||||
plugins: {
|
||||
"@stylistic/js": stylisticJs,
|
||||
"@stylistic": stylistic,
|
||||
},
|
||||
// Your custom configs here
|
||||
rules: {
|
||||
@@ -14,11 +14,13 @@ export default withNuxt({
|
||||
"object-curly-newline": "off",
|
||||
"consistent-list-newline": "off",
|
||||
"vue/first-attribute-linebreak": "off",
|
||||
"@stylistic/js/no-tabs": ["error", { allowIndentationTabs: true }],
|
||||
"@stylistic/no-tabs": ["error", { allowIndentationTabs: true }],
|
||||
"@stylistic/no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
||||
"vue/max-attributes-per-line": "off",
|
||||
"vue/html-indent": "off",
|
||||
"vue/html-closing-bracket-newline": "off",
|
||||
// TODO: temporarily off to get this PR in without a crazy diff
|
||||
"@stylistic/indent": "off",
|
||||
"@stylistic/operator-linebreak": "off",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mealie",
|
||||
"version": "3.2.1",
|
||||
"version": "3.2.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
@@ -21,17 +21,17 @@
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@nuxt/fonts": "^0.11.4",
|
||||
"@nuxtjs/i18n": "^9.2.1",
|
||||
"@sidebase/nuxt-auth": "0.10.0",
|
||||
"@vite-pwa/nuxt": "0.10.6",
|
||||
"@sidebase/nuxt-auth": "^1.1.0",
|
||||
"@vite-pwa/nuxt": "^0.10.6",
|
||||
"@vueuse/core": "^12.7.0",
|
||||
"axios": "^1.8.1",
|
||||
"date-fns": "^4.1.0",
|
||||
"fuse.js": "^7.1.0",
|
||||
"isomorphic-dompurify": "^2.22.0",
|
||||
"isomorphic-dompurify": "^2.28.0",
|
||||
"json-editor-vue": "^0.18.1",
|
||||
"marked": "^15.0.12",
|
||||
"next-auth": "~4.24.0",
|
||||
"nuxt": "^3.15.4",
|
||||
"nuxt": "^3.19.2",
|
||||
"vite": "^6.2.0",
|
||||
"vue-advanced-cropper": "^2.8.9",
|
||||
"vue-draggable-plus": "^0.6.0",
|
||||
@@ -39,11 +39,11 @@
|
||||
"vuetify-nuxt-module": "^0.18.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/eslint": "1.2.0",
|
||||
"@nuxt/eslint": "^1.2.0",
|
||||
"@nuxt/types": "^2.18.1",
|
||||
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
||||
"@nuxtjs/eslint-module": "^4.1.0",
|
||||
"@stylistic/eslint-plugin-js": "^4.2.0",
|
||||
"@stylistic/eslint-plugin": "^5.4.0",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"eslint": "^9.22.0",
|
||||
"eslint-config-prettier": "^10.0.2",
|
||||
@@ -54,7 +54,7 @@
|
||||
"lint-staged": "^15.4.3",
|
||||
"prettier": "^3.5.2",
|
||||
"sass-embedded": "^1.85.1",
|
||||
"typescript": "5.3",
|
||||
"typescript": "^5.3",
|
||||
"vite-plugin-commonjs": "^0.10.4",
|
||||
"vitest": "^3.0.7"
|
||||
},
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</v-card-actions>
|
||||
|
||||
<div
|
||||
v-if="allowOidc && allowPasswordLogin"
|
||||
v-if="appInfoLoaded && allowOidc && allowPasswordLogin"
|
||||
class="d-flex my-4 justify-center align-center"
|
||||
width="80%"
|
||||
>
|
||||
@@ -126,7 +126,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<v-card-actions
|
||||
v-if="allowOidc"
|
||||
v-if="appInfoLoaded && allowOidc"
|
||||
class="justify-center"
|
||||
>
|
||||
<div class="max-button">
|
||||
@@ -270,6 +270,7 @@ export default defineNuxtComponent({
|
||||
|
||||
const { passwordIcon, inputType, togglePasswordShow } = usePasswordField();
|
||||
|
||||
const appInfoLoaded = computed(() => appInfo.value !== null);
|
||||
const allowSignup = computed(() => appInfo.value?.allowSignup || false);
|
||||
const allowOidc = computed(() => appInfo.value?.enableOidc || false);
|
||||
const oidcRedirect = computed(() => appInfo.value?.oidcRedirect || false);
|
||||
@@ -277,7 +278,7 @@ export default defineNuxtComponent({
|
||||
const allowPasswordLogin = computed(() => appInfo.value?.allowPasswordLogin ?? true);
|
||||
|
||||
whenever(
|
||||
() => allowOidc.value && oidcRedirect.value && !isCallback() && !isDirectLogin() /* && !$auth.check().valid */,
|
||||
() => appInfoLoaded.value && allowOidc.value && oidcRedirect.value && !isCallback() && !isDirectLogin() /* && !$auth.check().valid */,
|
||||
() => oidcAuthenticate(),
|
||||
{ immediate: true },
|
||||
);
|
||||
@@ -359,6 +360,7 @@ export default defineNuxtComponent({
|
||||
isDark,
|
||||
form,
|
||||
loggingIn,
|
||||
appInfoLoaded,
|
||||
allowSignup,
|
||||
allowPasswordLogin,
|
||||
allowOidc,
|
||||
|
||||
@@ -6,16 +6,15 @@ export default defineNuxtPlugin(() => {
|
||||
const axiosInstance = axios.create({
|
||||
// timeout removed to allow backend to handle timeouts
|
||||
baseURL: "/", // api calls already pass with /api
|
||||
headers: {
|
||||
Authorization: "Bearer " + useCookie(tokenName).value,
|
||||
},
|
||||
withCredentials: true,
|
||||
});
|
||||
|
||||
// Add request interceptor
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config) => {
|
||||
// You can add auth tokens or other headers here
|
||||
const token = useCookie(tokenName).value;
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(error) => {
|
||||
|
||||
8032
frontend/yarn.lock
8032
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ test('ldap login', async ({ page }) => {
|
||||
await expect(page).toHaveURL(/\/g\/home/);
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await page.getByText('Settings', { exact: true }).click();
|
||||
await expect(page.getByRole('link', { name: 'Admin Settings' })).not.toBeVisible();
|
||||
await expect(page.getByText('Admin Settings')).not.toBeVisible();
|
||||
});
|
||||
|
||||
test('ldap admin login', async ({ page }) => {
|
||||
@@ -42,7 +42,7 @@ test('ldap admin login', async ({ page }) => {
|
||||
await page.getByRole('link', { name: "I'm already set up, just bring me to the homepage" }).click();
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await page.getByText('Settings', { exact: true }).click();
|
||||
await expect(page.getByRole('link', { name: 'Admin Settings' })).toBeVisible();
|
||||
await expect(page.getByText('Admin Settings')).toBeVisible();
|
||||
});
|
||||
|
||||
test('oidc initial login', async ({ page }) => {
|
||||
@@ -64,7 +64,7 @@ test('oidc initial login', async ({ page }) => {
|
||||
await expect(page).toHaveURL(/\/g\/home/);
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await page.getByText('Settings', { exact: true }).click();
|
||||
await expect(page.getByRole('link', { name: 'Admin Settings' })).not.toBeVisible();
|
||||
await expect(page.getByText('Admin Settings')).not.toBeVisible();
|
||||
});
|
||||
|
||||
test('oidc login with user not in propery group', async ({ page }) => {
|
||||
@@ -171,5 +171,5 @@ test('oidc admin user', async ({ page }) => {
|
||||
await page.getByRole('link', { name: "I'm already set up, just bring me to the homepage" }).click();
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await page.getByText('Settings', { exact: true }).click();
|
||||
await expect(page.getByRole('link', { name: 'Admin Settings' })).toBeVisible();
|
||||
await expect(page.getByText('Admin Settings')).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.40.1",
|
||||
"@types/node": "^20.10.4"
|
||||
"@playwright/test": "^1.55.1",
|
||||
"@types/node": "^22.10.2"
|
||||
},
|
||||
"scripts": {}
|
||||
}
|
||||
|
||||
@@ -2,40 +2,40 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@playwright/test@^1.40.1":
|
||||
version "1.47.2"
|
||||
resolved "https://registry.npmjs.org/@playwright/test/-/test-1.47.2.tgz"
|
||||
integrity sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==
|
||||
"@playwright/test@^1.55.1":
|
||||
version "1.55.1"
|
||||
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.55.1.tgz#80f775d5f948cd3ef550fcc45ef99986d3ffb36c"
|
||||
integrity sha512-IVAh/nOJaw6W9g+RJVlIQJ6gSiER+ae6mKQ5CX1bERzQgbC1VSeBlwdvczT7pxb0GWiyrxH4TGKbMfDb4Sq/ig==
|
||||
dependencies:
|
||||
playwright "1.47.2"
|
||||
playwright "1.55.1"
|
||||
|
||||
"@types/node@^22.13.10":
|
||||
version "22.13.10"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4"
|
||||
integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==
|
||||
"@types/node@^22.10.2":
|
||||
version "22.18.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.18.6.tgz#38172ef0b65e09d1a4fc715eb09a7d5decfdc748"
|
||||
integrity sha512-r8uszLPpeIWbNKtvWRt/DbVi5zbqZyj1PTmhRMqBMvDnaz1QpmSKujUtJLrqGZeoM8v72MfYggDceY4K1itzWQ==
|
||||
dependencies:
|
||||
undici-types "~6.20.0"
|
||||
undici-types "~6.21.0"
|
||||
|
||||
fsevents@2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||
|
||||
playwright-core@1.47.2:
|
||||
version "1.47.2"
|
||||
resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.2.tgz"
|
||||
integrity sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==
|
||||
playwright-core@1.55.1:
|
||||
version "1.55.1"
|
||||
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.55.1.tgz#5d3bb1846bc4289d364ea1a9dcb33f14545802e9"
|
||||
integrity sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==
|
||||
|
||||
playwright@1.47.2:
|
||||
version "1.47.2"
|
||||
resolved "https://registry.npmjs.org/playwright/-/playwright-1.47.2.tgz"
|
||||
integrity sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==
|
||||
playwright@1.55.1:
|
||||
version "1.55.1"
|
||||
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.55.1.tgz#8a9954e9e61ed1ab479212af9be336888f8b3f0e"
|
||||
integrity sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==
|
||||
dependencies:
|
||||
playwright-core "1.47.2"
|
||||
playwright-core "1.55.1"
|
||||
optionalDependencies:
|
||||
fsevents "2.3.2"
|
||||
|
||||
undici-types@~6.20.0:
|
||||
version "6.20.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
|
||||
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
|
||||
undici-types@~6.21.0:
|
||||
version "6.21.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
|
||||
integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
|
||||
|
||||
Reference in New Issue
Block a user