Skip to content

Commit

Permalink
chore: update packages and test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed Jun 1, 2023
1 parent a9c41ab commit 1836b17
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 509 deletions.
66 changes: 44 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,24 @@ jobs:
node-version: 16
cache: 'pnpm'

- name: Cache
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache node_modules
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Cache packages
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
Expand All @@ -48,12 +60,10 @@ jobs:
run: |
pnpm --filter @zarm-design/* run build
test-cli:
name: Test @zarm-design/cli on Node.js
lint:
needs: [setup]
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 16, 14, 12, 10]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -69,16 +79,31 @@ jobs:
node-version: 16
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
- name: Restore node_modules Cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Test
run: pnpm --filter @zarm-design/cli run test
- name: Restore packages Cache
uses: actions/cache@v3
with:
path: |
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
key: setup-${{ github.sha }}

lint:
- name: Lint
run: pnpm run lint

test-cli:
needs: [setup]
name: Lint
name: Test @zarm-design/cli on Node.js
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 16, 14, 12, 10]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -99,16 +124,13 @@ jobs:
with:
path: |
node_modules
*/*/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
packages/**/node_modules
key: setup-${{ github.sha }}

- name: Lint
run: pnpm run lint
- name: Test
run: pnpm --filter @zarm-design/cli run test

Test:
test:
needs: [setup]
name: Test zarm
runs-on: ubuntu-latest
Expand Down Expand Up @@ -138,7 +160,7 @@ jobs:
with:
path: |
node_modules
*/*/node_modules
packages/**/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "4.1.2",
"husky": "^8.0.2",
"jest": "^26.5.3",
"lerna": "^4.0.0",
"lint-staged": "^13.1.0",
"only-allow": "^1.1.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/zarm-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"build": "pnpm clean && tsc --build --force",
"clean": "rimraf dist",
"dev": "tsc -w",
"prepare": "pnpm build",
"test": "jest"
},
"dependencies": {
Expand Down Expand Up @@ -70,7 +69,6 @@
"signale": "^1.4.0",
"terser-webpack-plugin": "^5.1.2",
"through2": "^3.0.1",
"ts-jest": "^26.5.0",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",
Expand All @@ -81,6 +79,7 @@
"devDependencies": {
"@types/node": "^15.3.0",
"@types/webpack": "^5.28.0",
"ts-jest": "^26.5.6",
"ts-node": "^10.9.1"
},
"tags": [
Expand Down
1 change: 1 addition & 0 deletions packages/zarm-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"devDependencies": {
"@babel/cli": "^7.13.16",
"@svgr/cli": "^5.5.0",
"@testing-library/react": "^12.0.0",
"@types/react": "^18.0.26",
"@zarm-design/cli": "workspace:*",
"react": "^17.0.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/zarm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,18 @@
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^14.4.3",
"@types/lodash": "^4.14.182",
"@types/node": "^15.3.0",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/react-transition-group": "^4.4.5",
"@types/testing-library__jest-dom": "^5.14.6",
"@zarm-design/cli": "workspace:*",
"chalk": "^4.1.1",
"dekko": "^0.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"resolve-url-loader": "^5.0.0"
"resolve-url-loader": "^5.0.0",
"ts-jest": "^26.5.0"
},
"peerDependencies": {
"react": ">=16.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ exports[`Button icon 1`] = `
alt=""
src="https://zarm.design/images/logo.ce68565d.svg"
/>
<span>
<span
class="za-button__text"
>
foo
</span>
</div>
Expand Down Expand Up @@ -118,7 +120,9 @@ exports[`Button loading 1`] = `
/>
</svg>
</div>
<span>
<span
class="za-button__text"
>
foo
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ exports[`DatePickerView meridiem hour snapshot 1`] = `
style="transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-property: transform; transition-duration: 800ms; transform: translateX(0px) translateY(NaNpx);"
>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
上午
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
下午
Expand All @@ -49,7 +49,7 @@ exports[`DatePickerView meridiem hour snapshot 1`] = `
1时
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
2时
Expand Down Expand Up @@ -97,7 +97,7 @@ exports[`DatePickerView meridiem hour snapshot 1`] = `
9时
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
10时
Expand All @@ -118,7 +118,7 @@ exports[`DatePickerView meridiem hour snapshot 1`] = `
style="transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-property: transform; transition-duration: 800ms; transform: translateX(0px) translateY(NaNpx);"
>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
0分
Expand Down Expand Up @@ -274,7 +274,7 @@ exports[`DatePickerView meridiem hour snapshot 1`] = `
25分
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
26分
Expand Down Expand Up @@ -530,7 +530,7 @@ exports[`DatePickerView snapshot 1`] = `
2016年
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
2017年
Expand Down Expand Up @@ -566,7 +566,7 @@ exports[`DatePickerView snapshot 1`] = `
2022年
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
2023年
Expand Down Expand Up @@ -665,7 +665,7 @@ exports[`DatePickerView snapshot 1`] = `
4月
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
5月
Expand Down Expand Up @@ -707,7 +707,7 @@ exports[`DatePickerView snapshot 1`] = `
11月
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
12月
Expand All @@ -734,7 +734,7 @@ exports[`DatePickerView snapshot 1`] = `
2日
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
3日
Expand Down Expand Up @@ -902,7 +902,7 @@ exports[`DatePickerView snapshot 1`] = `
30日
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
31日
Expand Down Expand Up @@ -960,7 +960,7 @@ exports[`DatePickerView week snapshot 1`] = `
2016年
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
2017年
Expand Down Expand Up @@ -996,7 +996,7 @@ exports[`DatePickerView week snapshot 1`] = `
2022年
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
2023年
Expand Down Expand Up @@ -1197,7 +1197,7 @@ exports[`DatePickerView week snapshot 1`] = `
21周
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
22周
Expand Down Expand Up @@ -1353,7 +1353,7 @@ exports[`DatePickerView week snapshot 1`] = `
47周
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
48周
Expand Down Expand Up @@ -1404,7 +1404,7 @@ exports[`DatePickerView week snapshot 1`] = `
周二
</div>
<div
class="za-wheel__item"
class="za-wheel__item za-wheel__item--selected"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
周三
Expand All @@ -1428,7 +1428,7 @@ exports[`DatePickerView week snapshot 1`] = `
周六
</div>
<div
class="za-wheel__item za-wheel__item--selected"
class="za-wheel__item"
style="transform: rotateX(NaNdeg); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); transition-duration: 800ms; pointer-events: none;"
>
周日
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ exports[`DateSelect DateSelect time 1`] = `
exports[`DateSelect DateSelect trigger visible 1`] = `
<DocumentFragment>
<div
class="za-date-select"
class="za-date-select za-date-select--placeholder"
>
<div
class="za-date-select__input"
>
<div
class="za-date-select__value"
>
2019年4月23日
请选择
</div>
</div>
<div
Expand Down

0 comments on commit 1836b17

Please sign in to comment.