Procházet zdrojové kódy

Merge branch 'dev/7.5.x' into support/migrate-to-y-websocket

Yuki Takei před 2 týdny
rodič
revize
9e9fd0b421

+ 4 - 4
.github/mergify.yml

@@ -11,12 +11,12 @@ queue_rules:
       - check-success ~= ci-app-lint
       - check-success ~= ci-app-lint
       - check-success ~= ci-app-test
       - check-success ~= ci-app-test
       - check-success ~= ci-app-launch-dev
       - check-success ~= ci-app-launch-dev
-      - check-success = test-prod-node20 / build-prod
-      - check-success ~= test-prod-node20 / launch-prod
-      - check-success ~= test-prod-node20 / run-playwright
+      - check-success = test-prod-node24 / build-prod
+      - check-success ~= test-prod-node24 / launch-prod
+      - check-success ~= test-prod-node24 / run-playwright
       - -check-failure ~= ci-app-
       - -check-failure ~= ci-app-
       - -check-failure ~= ci-slackbot-
       - -check-failure ~= ci-slackbot-
-      - -check-failure ~= test-prod-node20 /
+      - -check-failure ~= test-prod-node24 /
 
 
 pull_request_rules:
 pull_request_rules:
   - name: Automatic queue to merge
   - name: Automatic queue to merge

+ 2 - 1
.github/workflows/reusable-app-prod.yml

@@ -77,6 +77,7 @@ jobs:
           apps/app/tmp \
           apps/app/tmp \
           apps/app/.env.production* \
           apps/app/.env.production* \
           apps/app/node_modules \
           apps/app/node_modules \
+          apps/app/next.config.js \
           apps/app/package.json
           apps/app/package.json
         echo "file=production.tar.gz" >> $GITHUB_OUTPUT
         echo "file=production.tar.gz" >> $GITHUB_OUTPUT
 
 
@@ -172,7 +173,7 @@ jobs:
     container:
     container:
       # Match the Playwright version
       # Match the Playwright version
       # https://github.com/microsoft/playwright/issues/20010
       # https://github.com/microsoft/playwright/issues/20010
-      image: mcr.microsoft.com/playwright:v1.49.1-jammy
+      image: mcr.microsoft.com/playwright:v1.58.2-jammy
 
 
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false

+ 1 - 0
apps/app/docker/Dockerfile

@@ -100,6 +100,7 @@ RUN mkdir -p /tmp/release/apps/app && \
   cp -a apps/app/.next apps/app/config apps/app/dist apps/app/public \
   cp -a apps/app/.next apps/app/config apps/app/dist apps/app/public \
        apps/app/resource apps/app/tmp \
        apps/app/resource apps/app/tmp \
        apps/app/package.json apps/app/node_modules \
        apps/app/package.json apps/app/node_modules \
+       apps/app/next.config.js \
        /tmp/release/apps/app/ && \
        /tmp/release/apps/app/ && \
   (cp apps/app/.env.production* /tmp/release/apps/app/ 2>/dev/null || true)
   (cp apps/app/.env.production* /tmp/release/apps/app/ 2>/dev/null || true)
 
 

+ 26 - 0
apps/app/next.config.prod.cjs

@@ -0,0 +1,26 @@
+/**
+ * Minimal Next.js config for production runtime.
+ *
+ * next.config.ts is the authoritative config used at build time (Turbopack rules,
+ * transpilePackages, sassOptions, etc.).  However, Next.js 16 tries to transpile
+ * .ts configs at server startup, which fails in production where TypeScript is not
+ * installed.  assemble-prod.sh therefore deletes next.config.ts and renames this
+ * file to next.config.js so the production server can load the runtime-critical
+ * settings (i18n routing, pageExtensions, …) without a TypeScript toolchain.
+ *
+ * Keep the runtime-relevant values in sync with next.config.ts.
+ */
+
+const nextI18nConfig = require('./config/next-i18next.config');
+
+const { i18n } = nextI18nConfig;
+
+/** @type {import('next').NextConfig} */
+module.exports = {
+  reactStrictMode: true,
+  poweredByHeader: false,
+  pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
+  i18n,
+
+  serverExternalPackages: ['handsontable'],
+};