Skip to content

Commit

Permalink
fix: 更新依赖;使用 yarn 作为包管理工具
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 6, 2021
1 parent fd4e2af commit f8748e7
Show file tree
Hide file tree
Showing 10 changed files with 9,900 additions and 9,981 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
id: cache
with:
path: node_modules
key: ${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ hashFiles('yarn.lock') }}
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: npx pnpm -v && npx pnpm install --frozen-lockfile
run: yarn --frozen-lockfile
- run: |
rm -rf node_modules/.cache
npm run build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
id: cache
with:
path: node_modules
key: ${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ hashFiles('yarn.lock') }}
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: npx pnpm -v && npx pnpm install --frozen-lockfile
run: yarn --frozen-lockfile
- run: |
rm -rf node_modules/.cache
npm run build
Expand Down
14 changes: 4 additions & 10 deletions haoma-compile.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,10 @@ export default [
target: file => (/src\/(dev|x)\//.test(file) ? 'node' : 'browser'),
outDir: 'lib/_cjs',
emitDts: false,
renameImport: [
{
original: /yup\/es(.*)$/,
replacement: 'yup/lib$1',
},
{
original: /date-fns\/esm(.*)$/,
replacement: 'date-fns$1',
},
],
alias: {
'yup/es': 'yup/lib',
'date-fns/esm': 'date-fns',
},
plugins: [removeIsTypePlugin],
}),
]
9 changes: 2 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/** @type import('haoma').JestConfig */
module.exports = require('haoma').getJestConfig({
transformPackages: [
'lodash-es',
'date-fns',
'yup',
'@babel/runtime',
'@tarojs/runtime',
],
testEnvironment: 'jsdom',
transformPackages: ['lodash-es', 'date-fns', 'yup', '@tarojs/runtime'],
transformer: 'babel',
})
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@
"test-types": "tsc --noEmit",
"test-update-snapshot": "jest --updateSnapshot",
"test-with-coverage": "jest --coverage",
"test-with-coverage-open": "jest --coverage && open-cli ./coverage/lcov-report/index.html"
"test-with-coverage-open": "jest --coverage && open-cli ./coverage/lcov-report/index.html",
"postinstall": "patch-package"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"post-merge": "pnpm install"
"post-merge": "yarn"
}
},
"lint-staged": {
Expand All @@ -97,6 +98,9 @@
"prettier --write"
]
},
"resolutions": {
"typescript": "^4.3.5"
},
"dependencies": {
"@babel/runtime": "^7.12.18",
"@types/benchmark": "^2.1.0",
Expand Down Expand Up @@ -128,6 +132,7 @@
"@testing-library/react": "11.2.7",
"@testing-library/react-hooks": "7.0.0",
"@types/fs-extra": "9.0.11",
"@types/node": "16.0.0",
"@types/prompts": "2.0.12",
"@types/react": "17.0.8",
"@types/react-dom": "17.0.5",
Expand All @@ -139,12 +144,13 @@
"execa": "5.0.0",
"fs-extra": "10.0.0",
"globby": "11.0.3",
"haoma": "2.31.0",
"husky": "6.0.0",
"haoma": "^3.3.3",
"husky": "4.3.8",
"ioredis-mock": "5.5.7",
"jest": "27.0.1",
"jest": "27.0.6",
"lint-staged": "11.0.0",
"open-cli": "6.0.1",
"patch-package": "6.4.7",
"prettier": "2.3.0",
"prompts": "2.4.1",
"react": "17.0.2",
Expand All @@ -156,18 +162,13 @@
"tree-tool": "1.1.8",
"ts-essentials": "7.0.1",
"type-fest": "1.1.3",
"typescript": "4.3.2",
"typescript": "4.3.5",
"typescript-snapshots-plugin": "1.7.0",
"vscode-generate-index-standalone": "1.4.0",
"yargs": "17.0.1"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"pnpm": {
"overrides": {
"typescript": "^4.1.2"
}
}
}
90 changes: 90 additions & 0 deletions patches/@tarojs+taro+3.2.10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
diff --git a/node_modules/@tarojs/taro/types/api/cloud/index.d.ts b/node_modules/@tarojs/taro/types/api/cloud/index.d.ts
index f30ea1c..231dd3e 100644
--- a/node_modules/@tarojs/taro/types/api/cloud/index.d.ts
+++ b/node_modules/@tarojs/taro/types/api/cloud/index.d.ts
@@ -1877,62 +1877,62 @@ declare namespace Taro {
/** 逻辑命令字面量 */
interface LOGIC_COMMANDS_LITERAL {
/** 与 */
- and
+ and: any
/** 或 */
- or
+ or: any
/** 非 */
- not
+ not: any
/** 都不 */
- nor
+ nor: any
}

/** 查询命令字面量 */
interface QUERY_COMMANDS_LITERAL {
// normal
/** 等于 */
- eq
+ eq: any
/** 不等于 */
- neq
+ neq: any
/** 大于 */
- gt
+ gt: any
/** 大于等于 */
- gte
+ gte: any
/** 小于 */
- lt
+ lt: any
/** 小于等于 */
- lte
+ lte: any
/** 范围内 */
- in
+ in: any
/** 范围外 */
- nin
+ nin: any

// geo
/** 附近排序 */
- geoNear
+ geoNear: any
/** 指定区域内 */
- geoWithin
+ geoWithin: any
/** 相交区域 */
- geoIntersects
+ geoIntersects: any
}

/** 更新命令字面量 */
interface UPDATE_COMMANDS_LITERAL {
/** 等于 */
- set
+ set: any
/** 删除 */
- remove
+ remove: any
/** 自增 */
- inc
+ inc: any
/** 自乘 */
- mul
+ mul: any
/** 尾部添加 */
- push
+ push: any
/** 尾部删除 */
- pop
+ pop: any
/** 头部删除 */
- shift
+ shift: any
/** 头部添加 */
- unshift
+ unshift: any
}

/** 按从近到远的顺序,找出字段值在给定点的附近的记录参数 */
Loading

0 comments on commit f8748e7

Please sign in to comment.