From aa2f05c1eec9e1216bc3ea0a0d07f947521e8816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Gran=C3=A1t?= Date: Thu, 4 Apr 2024 18:17:57 +0200 Subject: [PATCH] chore: fix next.js import and upgrade eslint, prettier --- packages/web/package.json | 13 ++-- packages/web/tools/package.json | 3 +- packages/web/vite.config.ts | 1 + pnpm-lock.yaml | 96 +++++++++++++++-------------- testapps/next-app/package.json | 5 +- testapps/next-internal/package.json | 2 +- testapps/next/package.json | 2 +- testapps/react/package.json | 3 +- 8 files changed, 65 insertions(+), 60 deletions(-) diff --git a/packages/web/package.json b/packages/web/package.json index 940cefed2c..252fda7c7a 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -9,26 +9,23 @@ "exports": { ".": { "production": { - "require": "./dist/tolgee-web.production.umd.cjs", - "module": "./dist/tolgee-web.production.umd.cjs", - "import": "./dist/tolgee-web.production.esm.js" + "import": "./dist/tolgee-web.production.esm.js", + "require": "./dist/tolgee-web.production.umd.cjs" }, - "require": "./index.cjs", - "module": "./dist/tolgee-web.development.umd.cjs", "import": "./dist/tolgee-web.development.esm.js", + "require": "./index.cjs", "types": "./types/index.d.ts" }, "./tools": { - "require": "./dist/tolgee-in-context-tools.umd.cjs", - "module": "./dist/tolgee-in-context-tools.umd.cjs", "import": "./dist/tolgee-in-context-tools.esm.js", + "require": "./dist/tolgee-in-context-tools.umd.cjs", "types": "./types/tools.d.ts" }, "./package.json": "./package.json" }, "scripts": { "dev": "vite", - "develop": "concurrently \"tsc --project tsconfig.prod.json --watch\" \"vite build --watch\"", + "develop": "concurrently --raw \"tsc --watch --preserveWatchOutput --project tsconfig.prod.json\" \"vite build --watch\"", "build": "tsc --project tsconfig.prod.json && vite build && vite build --config vite.config.production.ts && vite build --config vite.config.tools.ts", "test": "jest --collect-coverage", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", diff --git a/packages/web/tools/package.json b/packages/web/tools/package.json index 79ab052353..c6106f92db 100644 --- a/packages/web/tools/package.json +++ b/packages/web/tools/package.json @@ -5,9 +5,8 @@ "types": "../types/tools.d.ts", "exports": { ".": { - "require": "./../dist/tolgee-in-context-tools.umd.cjs", - "module": "./../dist/tolgee-in-context-tools.umd.cjs", "import": "./../dist/tolgee-in-context-tools.esm.js", + "require": "./../dist/tolgee-in-context-tools.umd.cjs", "types": "./../types/tools.d.ts" }, "./package.json": "./package.json" diff --git a/packages/web/vite.config.ts b/packages/web/vite.config.ts index 435657fde4..e00500d143 100644 --- a/packages/web/vite.config.ts +++ b/packages/web/vite.config.ts @@ -13,6 +13,7 @@ type Props = { // reused for vite.config.tools & vite.config.production export const createConfig = ({ entry, rollupOptions }: Props) => defineConfig({ + clearScreen: false, build: { emptyOutDir: false, minify: false, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ce8a1f935..f2260123fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -768,8 +768,8 @@ importers: specifier: 5.22.0 version: link:../../packages/react next: - specifier: 14.0.3 - version: 14.0.3(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) + specifier: 14.1.4 + version: 14.1.4(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -802,11 +802,11 @@ importers: specifier: 5.22.0 version: link:../../packages/web next: - specifier: 14.0.3 - version: 14.0.3(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) + specifier: 14.1.4 + version: 14.1.4(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) next-intl: specifier: ^3.2.3 - version: 3.2.3(next@14.0.3)(react@18.2.0) + version: 3.2.3(next@14.1.4)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -836,8 +836,8 @@ importers: specifier: 5.22.0 version: link:../../packages/web next: - specifier: 14.0.3 - version: 14.0.3(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) + specifier: 14.1.4 + version: 14.1.4(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -8107,8 +8107,8 @@ packages: resolution: {integrity: sha512-SmksyaJAdSlMa9cTidVSIqYo1qti+WTsviNDwgjNVm+KQ3DRP2Df9umDIzC4vCcpEYY+chQe0i2IKnLw03AT8Q==} dev: true - /@next/env@14.0.3: - resolution: {integrity: sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA==} + /@next/env@14.1.4: + resolution: {integrity: sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ==} dev: false /@next/eslint-plugin-next@13.2.3: @@ -8117,8 +8117,8 @@ packages: glob: 7.1.7 dev: true - /@next/swc-darwin-arm64@14.0.3: - resolution: {integrity: sha512-64JbSvi3nbbcEtyitNn2LEDS/hcleAFpHdykpcnrstITFlzFgB/bW0ER5/SJJwUPj+ZPY+z3e+1jAfcczRLVGw==} + /@next/swc-darwin-arm64@14.1.4: + resolution: {integrity: sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -8126,8 +8126,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@14.0.3: - resolution: {integrity: sha512-RkTf+KbAD0SgYdVn1XzqE/+sIxYGB7NLMZRn9I4Z24afrhUpVJx6L8hsRnIwxz3ERE2NFURNliPjJ2QNfnWicQ==} + /@next/swc-darwin-x64@14.1.4: + resolution: {integrity: sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -8135,8 +8135,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@14.0.3: - resolution: {integrity: sha512-3tBWGgz7M9RKLO6sPWC6c4pAw4geujSwQ7q7Si4d6bo0l6cLs4tmO+lnSwFp1Tm3lxwfMk0SgkJT7EdwYSJvcg==} + /@next/swc-linux-arm64-gnu@14.1.4: + resolution: {integrity: sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -8144,8 +8144,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@14.0.3: - resolution: {integrity: sha512-v0v8Kb8j8T23jvVUWZeA2D8+izWspeyeDGNaT2/mTHWp7+37fiNfL8bmBWiOmeumXkacM/AB0XOUQvEbncSnHA==} + /@next/swc-linux-arm64-musl@14.1.4: + resolution: {integrity: sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -8153,8 +8153,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@14.0.3: - resolution: {integrity: sha512-VM1aE1tJKLBwMGtyBR21yy+STfl0MapMQnNrXkxeyLs0GFv/kZqXS5Jw/TQ3TSUnbv0QPDf/X8sDXuMtSgG6eg==} + /@next/swc-linux-x64-gnu@14.1.4: + resolution: {integrity: sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -8162,8 +8162,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@14.0.3: - resolution: {integrity: sha512-64EnmKy18MYFL5CzLaSuUn561hbO1Gk16jM/KHznYP3iCIfF9e3yULtHaMy0D8zbHfxset9LTOv6cuYKJgcOxg==} + /@next/swc-linux-x64-musl@14.1.4: + resolution: {integrity: sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -8171,8 +8171,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@14.0.3: - resolution: {integrity: sha512-WRDp8QrmsL1bbGtsh5GqQ/KWulmrnMBgbnb+59qNTW1kVi1nG/2ndZLkcbs2GX7NpFLlToLRMWSQXmPzQm4tog==} + /@next/swc-win32-arm64-msvc@14.1.4: + resolution: {integrity: sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -8180,8 +8180,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@14.0.3: - resolution: {integrity: sha512-EKffQeqCrj+t6qFFhIFTRoqb2QwX1mU7iTOvMyLbYw3QtqTw9sMwjykyiMlZlrfm2a4fA84+/aeW+PMg1MjuTg==} + /@next/swc-win32-ia32-msvc@14.1.4: + resolution: {integrity: sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -8189,8 +8189,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@14.0.3: - resolution: {integrity: sha512-ERhKPSJ1vQrPiwrs15Pjz/rvDHZmkmvbf/BjPN/UCOI++ODftT0GtasDPi0j+y6PPJi5HsXw+dpRaXUaw4vjuQ==} + /@next/swc-win32-x64-msvc@14.1.4: + resolution: {integrity: sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -13630,10 +13630,15 @@ packages: /caniuse-lite@1.0.30001566: resolution: {integrity: sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==} + dev: true /caniuse-lite@1.0.30001588: resolution: {integrity: sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==} + /caniuse-lite@1.0.30001605: + resolution: {integrity: sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==} + dev: false + /canonical-path@1.0.0: resolution: {integrity: sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==} dev: true @@ -18416,6 +18421,7 @@ packages: /glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + dev: true /glob@7.1.4: resolution: {integrity: sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==} @@ -23678,7 +23684,7 @@ packages: resolution: {integrity: sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g==} dev: true - /next-intl@3.2.3(next@14.0.3)(react@18.2.0): + /next-intl@3.2.3(next@14.1.4)(react@18.2.0): resolution: {integrity: sha512-uJM00R1qn5doC5PcYk22klm7kA7vRxg9dlWOVTSdusftjEIc/KeRQu+tl2JtyIKSWYPeVGItLyUasJu08BCljQ==} peerDependencies: next: ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 @@ -23686,13 +23692,13 @@ packages: dependencies: '@formatjs/intl-localematcher': 0.2.32 negotiator: 0.6.3 - next: 14.0.3(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) + next: 14.1.4(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 use-intl: 3.2.3(react@18.2.0) dev: false - /next@14.0.3(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-AbYdRNfImBr3XGtvnwOxq8ekVCwbFTv/UJoLwmaX89nk9i051AEY4/HAWzU0YpaTDw8IofUpmuIlvzWF13jxIw==} + /next@14.1.4(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: @@ -23706,25 +23712,25 @@ packages: sass: optional: true dependencies: - '@next/env': 14.0.3 + '@next/env': 14.1.4 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001566 + caniuse-lite: 1.0.30001605 + graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(@babel/core@7.24.4)(react@18.2.0) - watchpack: 2.4.0 optionalDependencies: - '@next/swc-darwin-arm64': 14.0.3 - '@next/swc-darwin-x64': 14.0.3 - '@next/swc-linux-arm64-gnu': 14.0.3 - '@next/swc-linux-arm64-musl': 14.0.3 - '@next/swc-linux-x64-gnu': 14.0.3 - '@next/swc-linux-x64-musl': 14.0.3 - '@next/swc-win32-arm64-msvc': 14.0.3 - '@next/swc-win32-ia32-msvc': 14.0.3 - '@next/swc-win32-x64-msvc': 14.0.3 + '@next/swc-darwin-arm64': 14.1.4 + '@next/swc-darwin-x64': 14.1.4 + '@next/swc-linux-arm64-gnu': 14.1.4 + '@next/swc-linux-arm64-musl': 14.1.4 + '@next/swc-linux-x64-gnu': 14.1.4 + '@next/swc-linux-x64-musl': 14.1.4 + '@next/swc-win32-arm64-msvc': 14.1.4 + '@next/swc-win32-ia32-msvc': 14.1.4 + '@next/swc-win32-x64-msvc': 14.1.4 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -26480,7 +26486,7 @@ packages: dependencies: nanoid: 3.3.7 picocolors: 1.0.0 - source-map-js: 1.0.2 + source-map-js: 1.2.0 dev: false /postcss@8.4.32: @@ -28545,7 +28551,6 @@ packages: /source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} - dev: true /source-map-loader@3.0.1(webpack@5.70.0): resolution: {integrity: sha512-Vp1UsfyPvgujKQzi4pyDiTOnE3E4H+yHvkVRN3c/9PJmQS4CQJExvcDvaX/D+RV+xQben9HJ56jMJS3CgUeWyA==} @@ -31142,6 +31147,7 @@ packages: dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 + dev: true /wbuf@1.7.3: resolution: {integrity: sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==} diff --git a/testapps/next-app/package.json b/testapps/next-app/package.json index d87067a3c3..c3f4987e2a 100644 --- a/testapps/next-app/package.json +++ b/testapps/next-app/package.json @@ -7,13 +7,14 @@ "develop": "next dev", "build": "next build", "build:e2e": "NEXT_BUILD_DIR=dist-e2e next build", - "start": "next start" + "start": "next start", + "clean": "rm -rf .next dist-e2e" }, "dependencies": { "@tolgee/format-icu": "5.22.0", "@tolgee/react": "5.22.0", "@tolgee/web": "5.22.0", - "next": "14.0.3", + "next": "14.1.4", "next-intl": "^3.2.3", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/testapps/next-internal/package.json b/testapps/next-internal/package.json index 02b96b2f44..46e1fb0afc 100644 --- a/testapps/next-internal/package.json +++ b/testapps/next-internal/package.json @@ -13,7 +13,7 @@ "dependencies": { "@tolgee/react": "5.22.0", "@tolgee/web": "5.22.0", - "next": "14.0.3", + "next": "14.1.4", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/testapps/next/package.json b/testapps/next/package.json index c2b3985f85..d0116081a1 100644 --- a/testapps/next/package.json +++ b/testapps/next/package.json @@ -14,7 +14,7 @@ "dependencies": { "@tolgee/format-icu": "5.22.0", "@tolgee/react": "5.22.0", - "next": "14.0.3", + "next": "14.1.4", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/testapps/react/package.json b/testapps/react/package.json index 40b97cf568..59c6c944d5 100644 --- a/testapps/react/package.json +++ b/testapps/react/package.json @@ -7,7 +7,8 @@ "develop": "vite", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "clean": "rm -rf dist " }, "dependencies": { "@tolgee/format-icu": "5.22.0",