Skip to content

Commit

Permalink
add more ci scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcheng committed Dec 3, 2024
1 parent 7aa868b commit df38644
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 96 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- run: yarn
- run: yarn run lint
- run: yarn run test
- run: yarn run build
- run: yarn run test-build-result
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
cache-dependency-path: 'yarn.lock'
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn workspace connect-miniprogram run build
- run: yarn workspace example-mina test-build-result
- run: yarn run lint
- run: yarn run test
- run: yarn run build
- run: yarn run test-build-result
- run: yarn config set npmAuthToken ${{secrets.NPM_TOKEN}}
- run: yarn workspace connect-miniprogram npm publish
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"packages/example-mina"
],
"scripts": {
"lint": "yarn workspace connect-miniprogram lint",
"test": "yarn workspace connect-miniprogram jest",
"build": "yarn workspace connect-miniprogram build",
"dev:taro": "yarn workspace example-taro dev:weapp",
Expand Down
9 changes: 5 additions & 4 deletions packages/connect-miniprogram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"license": "MIT",
"scripts": {
"build": "tsc",
"format": "eslint ./src --ext ts,tsx --fix && prettier ./src --write"
"format": "eslint ./src --ext ts,tsx --fix && prettier ./src --write",
"lint": "eslint ./src --ext ts,tsx && prettier ./src --check"
},
"dependencies": {
"headers-polyfill": "^4.0.3"
Expand All @@ -37,13 +38,13 @@
"@bufbuild/protobuf": "^2.2.0",
"@connectrpc/connect": "~2.0.0",
"@jest/globals": "^29.7.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"eslint": "^8.57.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"jest": "^29.7.0",
"miniprogram-api-typings": "^4.0.2",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"ts-jest": "^29.2.5",
"typescript": "^5.7.2"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/example-taro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"@tarojs/webpack5-runner": "3.6.35",
"@types/react": "^18.3.12",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"babel-preset-taro": "3.6.35",
"eslint": "^8.57.1",
"eslint-config-taro": "3.6.35",
Expand All @@ -72,7 +72,7 @@
"eslint-plugin-react-hooks": "^5.0.0",
"postcss": "^8.4.49",
"react-refresh": "^0.14.2",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"webpack": "5.96.1"
}
}
177 changes: 90 additions & 87 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4279,26 +4279,26 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0"
"@typescript-eslint/eslint-plugin@npm:^8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/eslint-plugin@npm:8.17.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/type-utils": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.17.0"
"@typescript-eslint/type-utils": "npm:8.17.0"
"@typescript-eslint/utils": "npm:8.17.0"
"@typescript-eslint/visitor-keys": "npm:8.17.0"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
"@typescript-eslint/parser": ^7.0.0
eslint: ^8.56.0
"@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/2b37948fa1b0dab77138909dabef242a4d49ab93e4019d4ef930626f0a7d96b03e696cd027fa0087881c20e73be7be77c942606b4a76fa599e6b37f6985304c3
checksum: 10c0/d78778173571a9a1370345bc2aa3e850235a489d16b8a8b5ba3086b988bbef7549bdae38e509d7a679ba3179c688cc5a408376b158be402770836e94ffc9602d
languageName: node
linkType: hard

Expand All @@ -4320,21 +4320,21 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/parser@npm:7.18.0"
"@typescript-eslint/parser@npm:^8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/parser@npm:8.17.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.17.0"
"@typescript-eslint/types": "npm:8.17.0"
"@typescript-eslint/typescript-estree": "npm:8.17.0"
"@typescript-eslint/visitor-keys": "npm:8.17.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^8.56.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/370e73fca4278091bc1b657f85e7d74cd52b24257ea20c927a8e17546107ce04fbf313fec99aed0cc2a145ddbae1d3b12e9cc2c1320117636dc1281bcfd08059
checksum: 10c0/2543deadf01302a92d3b6f58a4c14f98d8936c4d976e7da05e3bb65608f19d8de93b25282e343c304eca3e3f37f2ac23e97fa9c11c6edff36dd2d4f6b601a630
languageName: node
linkType: hard

Expand All @@ -4348,30 +4348,30 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/scope-manager@npm:7.18.0"
"@typescript-eslint/scope-manager@npm:8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/scope-manager@npm:8.17.0"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
checksum: 10c0/038cd58c2271de146b3a594afe2c99290034033326d57ff1f902976022c8b0138ffd3cb893ae439ae41003b5e4bcc00cabf6b244ce40e8668f9412cc96d97b8e
"@typescript-eslint/types": "npm:8.17.0"
"@typescript-eslint/visitor-keys": "npm:8.17.0"
checksum: 10c0/0c08d14240bad4b3f6874f08ba80b29db1a6657437089a6f109db458c544d835bcdc06ba9140bb4f835233ba4326d9a86e6cf6bdb5209960d2f7025aa3191f4f
languageName: node
linkType: hard

"@typescript-eslint/type-utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/type-utils@npm:7.18.0"
"@typescript-eslint/type-utils@npm:8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/type-utils@npm:8.17.0"
dependencies:
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:8.17.0"
"@typescript-eslint/utils": "npm:8.17.0"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
eslint: ^8.56.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/ad92a38007be620f3f7036f10e234abdc2fdc518787b5a7227e55fd12896dacf56e8b34578723fbf9bea8128df2510ba8eb6739439a3879eda9519476d5783fd
checksum: 10c0/6138ec71b5692d4b5e0bf3d7f66a6fa4e91ddea7031907b0ac45a7693df0a2f4cc5bca7218311e0639620d636ceb7efec83a137dfcd5938304d873b774fcc8bd
languageName: node
linkType: hard

Expand All @@ -4382,10 +4382,10 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/types@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/types@npm:7.18.0"
checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054
"@typescript-eslint/types@npm:8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/types@npm:8.17.0"
checksum: 10c0/26b1bf9dfc3ee783c85c6f354b84c28706d5689d777f3ff2de2cb496e45f9d0189c0d561c03ccbc8b24712438be17cf63dd0871ff3ca2083e7f48749770d1893
languageName: node
linkType: hard

Expand All @@ -4408,36 +4408,39 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/typescript-estree@npm:7.18.0"
"@typescript-eslint/typescript-estree@npm:8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/typescript-estree@npm:8.17.0"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/types": "npm:8.17.0"
"@typescript-eslint/visitor-keys": "npm:8.17.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
fast-glob: "npm:^3.3.2"
is-glob: "npm:^4.0.3"
minimatch: "npm:^9.0.4"
semver: "npm:^7.6.0"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81
checksum: 10c0/523013f9b5cf2c58c566868e4c3b0b9ac1b4807223a6d64e2a7c58e01e53b6587ba61f1a8241eade361f3f426d6057657515473176141ef8aebb352bc0d223ce
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/utils@npm:7.18.0"
"@typescript-eslint/utils@npm:8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/utils@npm:8.17.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.17.0"
"@typescript-eslint/types": "npm:8.17.0"
"@typescript-eslint/typescript-estree": "npm:8.17.0"
peerDependencies:
eslint: ^8.56.0
checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/a9785ae5f7e7b51d521dc3f48b15093948e4fcd03352c0b60f39bae366cbc935947d215f91e2ae3182d52fa6affb5ccbb50feff487bd1209011f3e0da02cdf07
languageName: node
linkType: hard

Expand All @@ -4451,13 +4454,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/visitor-keys@npm:7.18.0"
"@typescript-eslint/visitor-keys@npm:8.17.0":
version: 8.17.0
resolution: "@typescript-eslint/visitor-keys@npm:8.17.0"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/538b645f8ff1d9debf264865c69a317074eaff0255e63d7407046176b0f6a6beba34a6c51d511f12444bae12a98c69891eb6f403c9f54c6c2e2849d1c1cb73c0
"@typescript-eslint/types": "npm:8.17.0"
eslint-visitor-keys: "npm:^4.2.0"
checksum: 10c0/9144c4e4a63034fb2031a0ee1fc77e80594f30cab3faafa9a1f7f83782695774dd32fac8986f260698b4e150b4dd52444f2611c07e4c101501f08353eb47c82c
languageName: node
linkType: hard

Expand Down Expand Up @@ -6457,14 +6460,14 @@ __metadata:
"@bufbuild/protobuf": "npm:^2.2.0"
"@connectrpc/connect": "npm:~2.0.0"
"@jest/globals": "npm:^29.7.0"
"@typescript-eslint/eslint-plugin": "npm:^7.18.0"
"@typescript-eslint/parser": "npm:^7.18.0"
"@typescript-eslint/eslint-plugin": "npm:^8.17.0"
"@typescript-eslint/parser": "npm:^8.17.0"
eslint: "npm:^8.57.1"
eslint-plugin-simple-import-sort: "npm:^12.1.1"
headers-polyfill: "npm:^4.0.3"
jest: "npm:^29.7.0"
miniprogram-api-typings: "npm:^4.0.2"
prettier: "npm:^3.3.3"
prettier: "npm:^3.4.1"
ts-jest: "npm:^29.2.5"
typescript: "npm:^5.7.2"
peerDependencies:
Expand Down Expand Up @@ -8514,6 +8517,13 @@ __metadata:
languageName: node
linkType: hard

"eslint-visitor-keys@npm:^4.2.0":
version: 4.2.0
resolution: "eslint-visitor-keys@npm:4.2.0"
checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269
languageName: node
linkType: hard

"eslint@npm:8.41.0":
version: 8.41.0
resolution: "eslint@npm:8.41.0"
Expand Down Expand Up @@ -8787,8 +8797,8 @@ __metadata:
"@tarojs/webpack5-runner": "npm:3.6.35"
"@types/react": "npm:^18.3.12"
"@types/webpack-env": "npm:^1.18.5"
"@typescript-eslint/eslint-plugin": "npm:^7.18.0"
"@typescript-eslint/parser": "npm:^7.18.0"
"@typescript-eslint/eslint-plugin": "npm:^8.17.0"
"@typescript-eslint/parser": "npm:^8.17.0"
babel-preset-taro: "npm:3.6.35"
connect-miniprogram: "workspace:packages/connect-miniprogram"
eslint: "npm:^8.57.1"
Expand All @@ -8800,7 +8810,7 @@ __metadata:
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-refresh: "npm:^0.14.2"
typescript: "npm:^5.6.3"
typescript: "npm:^5.7.2"
webpack: "npm:5.96.1"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8975,6 +8985,19 @@ __metadata:
languageName: node
linkType: hard

"fast-glob@npm:^3.3.2":
version: 3.3.2
resolution: "fast-glob@npm:3.3.2"
dependencies:
"@nodelib/fs.stat": "npm:^2.0.2"
"@nodelib/fs.walk": "npm:^1.2.3"
glob-parent: "npm:^5.1.2"
merge2: "npm:^1.3.0"
micromatch: "npm:^4.0.4"
checksum: 10c0/42baad7b9cd40b63e42039132bde27ca2cb3a4950d0a0f9abe4639ea1aa9d3e3b40f98b1fe31cbc0cc17b664c9ea7447d911a152fa34ec5b72977b125a6fc845
languageName: node
linkType: hard

"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0":
version: 2.1.0
resolution: "fast-json-stable-stringify@npm:2.1.0"
Expand Down Expand Up @@ -14493,12 +14516,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^3.3.3":
version: 3.3.3
resolution: "prettier@npm:3.3.3"
"prettier@npm:^3.4.1":
version: 3.4.1
resolution: "prettier@npm:3.4.1"
bin:
prettier: bin/prettier.cjs
checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26
checksum: 10c0/2d6cc3101ad9de72b49c59339480b0983e6ff6742143da0c43f476bf3b5ef88ede42ebd9956d7a0a8fa59f7a5990e8ef03c9ad4c37f7e4c9e5db43ee0853156c
languageName: node
linkType: hard

Expand Down Expand Up @@ -17139,16 +17162,6 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:^5.6.3":
version: 5.6.3
resolution: "typescript@npm:5.6.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799
languageName: node
linkType: hard

"typescript@npm:^5.7.2":
version: 5.7.2
resolution: "typescript@npm:5.7.2"
Expand All @@ -17159,16 +17172,6 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A^5.6.3#optional!builtin<compat/typescript>":
version: 5.6.3
resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin<compat/typescript>::version=5.6.3&hash=5adc0c"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/ac8307bb06bbfd08ae7137da740769b7d8c3ee5943188743bb622c621f8ad61d244767480f90fbd840277fbf152d8932aa20c33f867dea1bb5e79b187ca1a92f
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A^5.7.2#optional!builtin<compat/typescript>":
version: 5.7.2
resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin<compat/typescript>::version=5.7.2&hash=5adc0c"
Expand Down

0 comments on commit df38644

Please sign in to comment.