@@ -28,14 +28,17 @@ jobs:
28
28
- 4.2.3
29
29
- 4.1.5
30
30
steps :
31
- - uses : actions/checkout@v2
32
- - uses : actions/setup-node @v2
31
+ - uses : actions/checkout@v3
32
+ - uses : pnpm/action-setup @v2
33
33
with :
34
- node-version : ' 18'
35
- cache : yarn
36
- - run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
37
- - run : yarn install --frozen-lockfile --check-files
38
- - run : yarn build
34
+ version : 8.2.0
35
+ - uses : actions/setup-node@v3
36
+ with :
37
+ node-version : 18
38
+ cache : ' pnpm'
39
+ cache-dependency-path : ' **/pnpm-lock.yaml'
40
+ - run : pnpm install --frozen-lockfile
41
+ - run : pnpm build
39
42
- name : Patch for Old TS
40
43
run : |
41
44
sed -i~ 's/\/\/ @ts-expect-error.*\[LATEST-TS-ONLY\]//' tests/*.tsx
@@ -46,24 +49,13 @@ jobs:
46
49
sed -i~ 's/"zustand": \["\.\/src\/index\.ts"\],/"zustand": [".\/dist\/index.d.ts"],/' tsconfig.json
47
50
sed -i~ 's/"zustand\/\*": \["\.\/src\/\*\.ts"\]/"zustand\/*": [".\/dist\/*.d.ts"]/' tsconfig.json
48
51
sed -i~ 's/"include": .*/"include": ["src\/types.d.ts", "dist\/**\/*", "tests\/**\/*"],/' tsconfig.json
49
- yarn json -I -f package.json -e "this.resolutions={}; this.resolutions['@types/node']='18.13.0';"
50
- yarn add -D @types/[email protected]
52
+ pnpm json -I -f package.json -e "this.resolutions={}; this.resolutions['@types/node']='18.13.0';"
53
+ pnpm add -D @types/[email protected]
51
54
- name : Install old TypeScript
52
- run : yarn add -D typescript@${{ matrix.typescript }}
55
+ run : pnpm add -D typescript@${{ matrix.typescript }}
53
56
- name : Patch testing setup for Old TS
54
57
if : ${{ matrix.typescript == '4.4.4' || matrix.typescript == '4.3.5' || matrix.typescript == '4.2.3' || matrix.typescript == '4.1.5' }}
55
58
run : |
56
- rm node_modules/@vitest/expect/dist/*.d.ts
57
- echo "declare module '@vitest/expect'" >> ./src/types.d.ts
58
- rm node_modules/@vitest/runner/dist/*.d.ts
59
- echo "declare module '@vitest/runner'" >> ./src/types.d.ts
60
- rm node_modules/@vitest/spy/dist/*.d.ts
61
- echo "declare module '@vitest/spy'" >> ./src/types.d.ts
62
- rm node_modules/@vitest/utils/dist/*.d.ts
63
- echo "declare module '@vitest/utils'" >> ./src/types.d.ts
64
- rm node_modules/vite-node/dist/*.d.ts
65
- echo "declare module 'vite-node'" >> ./src/types.d.ts
66
- rm node_modules/vitest/dist/*.d.ts
67
- echo "declare module 'vitest'" >> ./src/types.d.ts
59
+
68
60
- name : Test ${{ matrix.typescript }}
69
- run : yarn tsc --noEmit
61
+ run : pnpm test:types
0 commit comments