From b89f7f57b7daf1820be52117f4cdfeb54361e10f Mon Sep 17 00:00:00 2001 From: ntnyq Date: Wed, 18 Sep 2024 02:15:08 +0800 Subject: [PATCH] chore: update --- .github/workflows/ci.yml | 3 ++- .github/workflows/release.yml | 1 - .husky/pre-commit | 2 +- config/index.ts | 12 +++++++----- package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 375e41f..74bfc03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: + node-version: lts/* cache: pnpm - run: pnpm install --frozen-lockfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a49cbfc..30c3017 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v4 with: node-version: lts/* diff --git a/.husky/pre-commit b/.husky/pre-commit index 87119bc..ac3d43c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -npx nano-staged +nano-staged diff --git a/config/index.ts b/config/index.ts index 8131575..2df85b0 100644 --- a/config/index.ts +++ b/config/index.ts @@ -6,6 +6,12 @@ import path from 'node:path' import { defineConfig } from 'taro-define-config' import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' +declare module 'taro-define-config' { + interface CustomPluginOptionsMap { + 'taro-plugin-pinia': {} + } +} + /** * resolve path * @param args @@ -25,11 +31,7 @@ export default defineConfig({ }, sourceRoot: 'src', outputRoot: 'dist', - plugins: [ - '@tarojs/plugin-html', - // @ts-expect-error not supported by defineConfig - 'taro-plugin-pinia', - ], + plugins: ['@tarojs/plugin-html', 'taro-plugin-pinia'], compiler: { type: 'webpack5', prebundle: { diff --git a/package.json b/package.json index 98b0e29..1bc39c8 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@babel/core": "^7.25.2", "@babel/plugin-proposal-class-properties": "^7.18.6", "@ntnyq/eslint-config": "^3.0.0-beta.12", - "@ntnyq/prettier-config": "^1.21.2", + "@ntnyq/prettier-config": "^1.21.3", "@tarojs/cli": "^4.0.5", "@tarojs/helper": "^4.0.5", "@tarojs/plugin-platform-weapp": "^4.0.5", @@ -70,7 +70,7 @@ }, "prettier": "@ntnyq/prettier-config", "nano-staged": { - "*.{js,ts,mjs,vue,yml,yaml,md,json}": "eslint --fix" + "*.{js,ts,cjs,mjs,vue,yml,yaml,md,json}": "eslint --fix" }, "browserslist": [ "last 3 versions", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73d9a1d..a5340ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,8 +55,8 @@ importers: specifier: ^3.0.0-beta.12 version: 3.0.0-beta.12(@types/eslint@9.6.0)(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(@typescript-eslint/utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) '@ntnyq/prettier-config': - specifier: ^1.21.2 - version: 1.21.2 + specifier: ^1.21.3 + version: 1.21.3 '@tarojs/cli': specifier: ^4.0.5 version: 4.0.5 @@ -1081,8 +1081,8 @@ packages: peerDependencies: eslint: ^9.0.0 - '@ntnyq/prettier-config@1.21.2': - resolution: {integrity: sha512-XbSrutNQzfLXq7yqhcI/9w6AoQpGJulE2Nhj52GXL6XkmHENA7WG3ZzTPjfPEGHpC4GGwtEWCXk3qDSqsB7auQ==} + '@ntnyq/prettier-config@1.21.3': + resolution: {integrity: sha512-gqnraIdHvjZnyd2JqBPiys+XNoHV4J/L9mzOLrVEyyxPCOBP8NSc9lNbqo2gvf7sDgVtffR+eLYov/c321W9cw==} '@nutui/icons-vue-taro@0.0.9': resolution: {integrity: sha512-10VYAtFC+o1X0anGs+y2PgF1NWMeLFz2JVMRw4BWLg6wbtVbYy9wukLxyGhZC6Yf6t39DcwaGVda8paV7K6/Ew==} @@ -7281,7 +7281,7 @@ snapshots: - typescript - vitest - '@ntnyq/prettier-config@1.21.2': {} + '@ntnyq/prettier-config@1.21.3': {} '@nutui/icons-vue-taro@0.0.9': {}