From 56606ee26d1c4b29902524c238cef67ea1d95eeb Mon Sep 17 00:00:00 2001 From: TechQuery Date: Tue, 30 Jan 2024 07:02:23 +0800 Subject: [PATCH] [optimize] upgrade MobX i18n & Husky --- .husky/pre-commit | 4 -- .husky/pre-push | 4 -- ReadMe.md | 8 +++ package.json | 16 +++--- pnpm-lock.yaml | 133 +++++++++++++++++++++------------------------- 5 files changed, 76 insertions(+), 89 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 06c2b40..72c4429 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1 @@ -#!/bin/sh - -. "$(dirname "$0")/_/husky.sh" - npm test diff --git a/.husky/pre-push b/.husky/pre-push index 952f7e3..d6cb288 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,5 +1 @@ -#!/bin/sh - -. "$(dirname "$0")/_/husky.sh" - npm run build diff --git a/ReadMe.md b/ReadMe.md index 52ddcc6..6674ae5 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -7,6 +7,13 @@ [![NPM](https://nodei.co/npm/next-ssr-middleware.png?downloads=true&downloadRank=true&stars=true)][5] +## Versions + +| SemVer | status | MobX | [MobX i18n][6] | +| :-----: | :----------: | :---------: | :------------: | +| `>=0.7` | ✅developing | `>=6.11` | `>=0.5` | +| `<0.7` | ❌deprecated | `>=4 <6.11` | `<0.5` | + ## Usage ### `pages/user/[id].tsx` @@ -66,3 +73,4 @@ export default function UserDetailPage({ [3]: https://libraries.io/npm/next-ssr-middleware [4]: https://github.com/idea2app/Next-SSR-middleware/actions/workflows/main.yml [5]: https://nodei.co/npm/next-ssr-middleware/ +[6]: https://github.com/idea2app/MobX-i18n diff --git a/package.json b/package.json index 9f4e99b..a5d855c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "next-ssr-middleware", - "version": "0.6.2", + "version": "0.7.0", "license": "LGPL-3.0-or-later", "author": "shiy2008@gmail.com", "description": "Koa-like middlewares for Next.js Server Side Rendering", @@ -23,7 +23,7 @@ "main": "dist/index.js", "dependencies": { "jsonwebtoken": "^9.0.2", - "mobx-i18n": "^0.4.2", + "mobx-i18n": "^0.5.0", "tslib": "^2.6.2", "web-utility": "^4.1.3" }, @@ -32,14 +32,14 @@ }, "devDependencies": { "@types/jsonwebtoken": "^9.0.5", - "@types/node": "^18.19.3", - "husky": "^8.0.3", + "@types/node": "^18.19.10", + "husky": "^9.0.7", "koajax": "^0.9.6", "lint-staged": "^15.2.0", - "next": "^14.0.4", + "next": "^14.1.0", "open-cli": "^8.0.0", - "prettier": "^3.1.1", - "typedoc": "^0.25.4", + "prettier": "^3.2.4", + "typedoc": "^0.25.7", "typescript": "~5.3.3" }, "prettier": { @@ -52,7 +52,7 @@ "*.{md,json,yml,ts}": "prettier --write" }, "scripts": { - "prepare": "husky install", + "prepare": "husky", "test": "lint-staged", "build": "rm -rf dist/ docs/ && typedoc source/ && tsc", "start": "typedoc && open-cli docs/index.html", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a81b06..1034b27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^9.0.2 version: 9.0.2 mobx-i18n: - specifier: ^0.4.2 - version: 0.4.2 + specifier: ^0.5.0 + version: 0.5.0 tslib: specifier: ^2.6.2 version: 2.6.2 @@ -23,11 +23,11 @@ devDependencies: specifier: ^9.0.5 version: 9.0.5 '@types/node': - specifier: ^18.19.3 - version: 18.19.3 + specifier: ^18.19.10 + version: 18.19.10 husky: - specifier: ^8.0.3 - version: 8.0.3 + specifier: ^9.0.7 + version: 9.0.7 koajax: specifier: ^0.9.6 version: 0.9.6(typescript@5.3.3) @@ -35,29 +35,29 @@ devDependencies: specifier: ^15.2.0 version: 15.2.0 next: - specifier: ^14.0.4 - version: 14.0.4 + specifier: ^14.1.0 + version: 14.1.0 open-cli: specifier: ^8.0.0 version: 8.0.0 prettier: - specifier: ^3.1.1 - version: 3.1.1 + specifier: ^3.2.4 + version: 3.2.4 typedoc: - specifier: ^0.25.4 - version: 0.25.4(typescript@5.3.3) + specifier: ^0.25.7 + version: 0.25.7(typescript@5.3.3) typescript: specifier: ~5.3.3 version: 5.3.3 packages: - /@next/env@14.0.4: - resolution: {integrity: sha512-irQnbMLbUNQpP1wcE5NstJtbuA/69kRfzBrpAD7Gsn8zm/CY6YQYc3HQBz8QPxwISG26tIm5afvvVbu508oBeQ==} + /@next/env@14.1.0: + resolution: {integrity: sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw==} dev: true - /@next/swc-darwin-arm64@14.0.4: - resolution: {integrity: sha512-mF05E/5uPthWzyYDyptcwHptucf/jj09i2SXBPwNzbgBNc+XnwzrL0U6BmPjQeOL+FiB+iG1gwBeq7mlDjSRPg==} + /@next/swc-darwin-arm64@14.1.0: + resolution: {integrity: sha512-nUDn7TOGcIeyQni6lZHfzNoo9S0euXnu0jhsbMOmMJUBfgsnESdjN97kM7cBqQxZa8L/bM9om/S5/1dzCrW6wQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -65,8 +65,8 @@ packages: dev: true optional: true - /@next/swc-darwin-x64@14.0.4: - resolution: {integrity: sha512-IZQ3C7Bx0k2rYtrZZxKKiusMTM9WWcK5ajyhOZkYYTCc8xytmwSzR1skU7qLgVT/EY9xtXDG0WhY6fyujnI3rw==} + /@next/swc-darwin-x64@14.1.0: + resolution: {integrity: sha512-1jgudN5haWxiAl3O1ljUS2GfupPmcftu2RYJqZiMJmmbBT5M1XDffjUtRUzP4W3cBHsrvkfOFdQ71hAreNQP6g==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -74,8 +74,8 @@ packages: dev: true optional: true - /@next/swc-linux-arm64-gnu@14.0.4: - resolution: {integrity: sha512-VwwZKrBQo/MGb1VOrxJ6LrKvbpo7UbROuyMRvQKTFKhNaXjUmKTu7wxVkIuCARAfiI8JpaWAnKR+D6tzpCcM4w==} + /@next/swc-linux-arm64-gnu@14.1.0: + resolution: {integrity: sha512-RHo7Tcj+jllXUbK7xk2NyIDod3YcCPDZxj1WLIYxd709BQ7WuRYl3OWUNG+WUfqeQBds6kvZYlc42NJJTNi4tQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -83,8 +83,8 @@ packages: dev: true optional: true - /@next/swc-linux-arm64-musl@14.0.4: - resolution: {integrity: sha512-8QftwPEW37XxXoAwsn+nXlodKWHfpMaSvt81W43Wh8dv0gkheD+30ezWMcFGHLI71KiWmHK5PSQbTQGUiidvLQ==} + /@next/swc-linux-arm64-musl@14.1.0: + resolution: {integrity: sha512-v6kP8sHYxjO8RwHmWMJSq7VZP2nYCkRVQ0qolh2l6xroe9QjbgV8siTbduED4u0hlk0+tjS6/Tuy4n5XCp+l6g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -92,8 +92,8 @@ packages: dev: true optional: true - /@next/swc-linux-x64-gnu@14.0.4: - resolution: {integrity: sha512-/s/Pme3VKfZAfISlYVq2hzFS8AcAIOTnoKupc/j4WlvF6GQ0VouS2Q2KEgPuO1eMBwakWPB1aYFIA4VNVh667A==} + /@next/swc-linux-x64-gnu@14.1.0: + resolution: {integrity: sha512-zJ2pnoFYB1F4vmEVlb/eSe+VH679zT1VdXlZKX+pE66grOgjmKJHKacf82g/sWE4MQ4Rk2FMBCRnX+l6/TVYzQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -101,8 +101,8 @@ packages: dev: true optional: true - /@next/swc-linux-x64-musl@14.0.4: - resolution: {integrity: sha512-m8z/6Fyal4L9Bnlxde5g2Mfa1Z7dasMQyhEhskDATpqr+Y0mjOBZcXQ7G5U+vgL22cI4T7MfvgtrM2jdopqWaw==} + /@next/swc-linux-x64-musl@14.1.0: + resolution: {integrity: sha512-rbaIYFt2X9YZBSbH/CwGAjbBG2/MrACCVu2X0+kSykHzHnYH5FjHxwXLkcoJ10cX0aWCEynpu+rP76x0914atg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -110,8 +110,8 @@ packages: dev: true optional: true - /@next/swc-win32-arm64-msvc@14.0.4: - resolution: {integrity: sha512-7Wv4PRiWIAWbm5XrGz3D8HUkCVDMMz9igffZG4NB1p4u1KoItwx9qjATHz88kwCEal/HXmbShucaslXCQXUM5w==} + /@next/swc-win32-arm64-msvc@14.1.0: + resolution: {integrity: sha512-o1N5TsYc8f/HpGt39OUQpQ9AKIGApd3QLueu7hXk//2xq5Z9OxmV6sQfNp8C7qYmiOlHYODOGqNNa0e9jvchGQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -119,8 +119,8 @@ packages: dev: true optional: true - /@next/swc-win32-ia32-msvc@14.0.4: - resolution: {integrity: sha512-zLeNEAPULsl0phfGb4kdzF/cAVIfaC7hY+kt0/d+y9mzcZHsMS3hAS829WbJ31DkSlVKQeHEjZHIdhN+Pg7Gyg==} + /@next/swc-win32-ia32-msvc@14.1.0: + resolution: {integrity: sha512-XXIuB1DBRCFwNO6EEzCTMHT5pauwaSj4SWs7CYnME57eaReAKBXCnkUE80p/pAZcewm7hs+vGvNqDPacEXHVkw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -128,8 +128,8 @@ packages: dev: true optional: true - /@next/swc-win32-x64-msvc@14.0.4: - resolution: {integrity: sha512-yEh2+R8qDlDCjxVpzOTEpBLQTEFAcP2A8fUFLaWNap9GitYKkKv1//y2S6XY6zsR4rCOPRpU7plYDR+az2n30A==} + /@next/swc-win32-x64-msvc@14.1.0: + resolution: {integrity: sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -155,11 +155,11 @@ packages: /@types/jsonwebtoken@9.0.5: resolution: {integrity: sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==} dependencies: - '@types/node': 18.19.3 + '@types/node': 18.19.10 dev: true - /@types/node@18.19.3: - resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} + /@types/node@18.19.10: + resolution: {integrity: sha512-IZD8kAM02AW1HRDTPOlz3npFava678pr8Ie9Vp8uRhBROXAv8MXT2pCnGZZAKYdromsNQLHQcfWQ6EOatVLtqA==} dependencies: undici-types: 5.26.5 dev: true @@ -220,8 +220,8 @@ packages: streamsearch: 1.1.0 dev: true - /caniuse-lite@1.0.30001571: - resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} + /caniuse-lite@1.0.30001581: + resolution: {integrity: sha512-whlTkwhqV2tUmP3oYhtNfaWGYHDdS3JYFQBKXxcUR9qqPWsRhFHhoISO2Xnl/g0xyKzht9mI1LZpiNWfMzHixQ==} dev: true /chalk@5.3.0: @@ -366,10 +366,6 @@ packages: engines: {node: '>=16'} dev: true - /glob-to-regexp@0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - dev: true - /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true @@ -379,9 +375,9 @@ packages: engines: {node: '>=16.17.0'} dev: true - /husky@8.0.3: - resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} - engines: {node: '>=14'} + /husky@9.0.7: + resolution: {integrity: sha512-vWdusw+y12DUEeoZqW1kplOFqk3tedGV8qlga8/SF6a3lOiWLqGZZQvfWvY0fQYdfiRi/u1DFNpudTSV9l1aCg==} + engines: {node: '>=18'} hasBin: true dev: true @@ -620,10 +616,10 @@ packages: brace-expansion: 2.0.1 dev: true - /mobx-i18n@0.4.2: - resolution: {integrity: sha512-YENAuWPFFVl5ly257lg6Si7Z4aj3H7Hgh7DagcIOo/vvdiFbU1jRAYb4IUdrfVSRiEtKs+u0hW54v2pnNz6Nbg==} + /mobx-i18n@0.5.0: + resolution: {integrity: sha512-ZflCX7iqosU/ZhfGV3uaQGcptK1w1pHBEn4PWc1b+IZtLOcc4agaLQNj5OIIbTQNLNNxNdA5k1+Ze9aqStsHzA==} peerDependencies: - mobx: '>=4' + mobx: '>=6.11' dependencies: '@swc/helpers': 0.5.3 regenerator-runtime: 0.14.1 @@ -643,8 +639,8 @@ packages: hasBin: true dev: true - /next@14.0.4: - resolution: {integrity: sha512-qbwypnM7327SadwFtxXnQdGiKpkuhaRLE2uq62/nRul9cj9KhQ5LhHmlziTNqUidZotw/Q1I9OjirBROdUJNgA==} + /next@14.1.0: + resolution: {integrity: sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: @@ -658,24 +654,23 @@ packages: sass: optional: true dependencies: - '@next/env': 14.0.4 + '@next/env': 14.1.0 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001571 + caniuse-lite: 1.0.30001581 graceful-fs: 4.2.11 postcss: 8.4.31 styled-jsx: 5.1.1 - watchpack: 2.4.0 optionalDependencies: - '@next/swc-darwin-arm64': 14.0.4 - '@next/swc-darwin-x64': 14.0.4 - '@next/swc-linux-arm64-gnu': 14.0.4 - '@next/swc-linux-arm64-musl': 14.0.4 - '@next/swc-linux-x64-gnu': 14.0.4 - '@next/swc-linux-x64-musl': 14.0.4 - '@next/swc-win32-arm64-msvc': 14.0.4 - '@next/swc-win32-ia32-msvc': 14.0.4 - '@next/swc-win32-x64-msvc': 14.0.4 + '@next/swc-darwin-arm64': 14.1.0 + '@next/swc-darwin-x64': 14.1.0 + '@next/swc-linux-arm64-gnu': 14.1.0 + '@next/swc-linux-arm64-musl': 14.1.0 + '@next/swc-linux-x64-gnu': 14.1.0 + '@next/swc-linux-x64-musl': 14.1.0 + '@next/swc-win32-arm64-msvc': 14.1.0 + '@next/swc-win32-ia32-msvc': 14.1.0 + '@next/swc-win32-x64-msvc': 14.1.0 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -763,8 +758,8 @@ packages: source-map-js: 1.0.2 dev: true - /prettier@3.1.1: - resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + /prettier@3.2.4: + resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} engines: {node: '>=14'} hasBin: true dev: true @@ -976,8 +971,8 @@ packages: engines: {node: '>=14.16'} dev: true - /typedoc@0.25.4(typescript@5.3.3): - resolution: {integrity: sha512-Du9ImmpBCw54bX275yJrxPVnjdIyJO/84co0/L9mwe0R3G4FSR6rQ09AlXVRvZEGMUg09+z/usc8mgygQ1aidA==} + /typedoc@0.25.7(typescript@5.3.3): + resolution: {integrity: sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==} engines: {node: '>= 16'} hasBin: true peerDependencies: @@ -1018,14 +1013,6 @@ packages: resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: true - /watchpack@2.4.0: - resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} - engines: {node: '>=10.13.0'} - dependencies: - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - dev: true - /web-utility@4.1.3(typescript@5.3.3): resolution: {integrity: sha512-NLk7jXW/3WKMXxr/THwRilzjjsGmK78nSZJShzcDSwmAmyzKLkG28kxSVX8hw9Eynp+dOKAjeK/CB/kLZec6rQ==} peerDependencies: