Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Chart.js 3.0 support #754

Merged
merged 11 commits into from Feb 21, 2022
31 changes: 31 additions & 0 deletions .github/workflows/checks.yml
@@ -0,0 +1,31 @@
name: Checks
on:
pull_request:
branches:
- main
jobs:
size:
runs-on: ubuntu-latest
name: Checking size
if: "!contains(github.event.head_commit.message, '[ci skip]')"
env:
CI_JOB_NUMBER: 1
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Check size
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_step: install
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Install dependencies
run: pnpm install
- name: Check size
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_step: install
- name: Check size
uses: andresz1/size-limit-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

code from master has pnpm support

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thabarbados look at the suggestion carefully

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dangreen sorry, fixed

24 changes: 24 additions & 0 deletions .size-limit
@@ -0,0 +1,24 @@
[
dangreen marked this conversation as resolved.
Show resolved Hide resolved
{
"path": "dist/index.cjs",
"limit": "2.2 KB",
"webpack": false,
"running": false
},
{
"path": "dist/index.cjs",
"limit": "700 B",
"import": "{ Chart }"
},
{
"path": "dist/index.js",
"limit": "2 KB",
"webpack": false,
"running": false
},
{
"path": "dist/index.js",
"limit": "300 B",
"import": "{ Chart }"
}
]
12 changes: 7 additions & 5 deletions package.json
Expand Up @@ -36,6 +36,7 @@
"Wrapper",
"Charts"
],
"sideEffects": false,
"main": "./src/index.js",
"typings": "./dist/index.d.ts",
"publishConfig": {
Expand All @@ -46,10 +47,10 @@
"scripts": {
"prepublishOnly": "pnpm test && pnpm build && del ./package && clean-publish",
"postpublish": "del ./package",
"emitDeclarations": "tsc --skipLibCheck --emitDeclarationOnly",
"build": "rollup -c & pnpm emitDeclarations",
"build": "rollup -c",
"unit": "jest -c jest.config.json",
"test": "pnpm lint && pnpm unit",
"test:size": "size-limit",
"lint": "eslint --ext .js,.vue src test",
"format": "prettier --write src test",
"release": "standard-version",
Expand All @@ -59,7 +60,7 @@
"start:storybook": "start-storybook -p 6006"
},
"peerDependencies": {
"chart.js": ">= 2.5"
"chart.js": "^3.7.0"
},
"dependencies": {
"@types/chart.js": "^2.7.55"
Expand All @@ -70,19 +71,19 @@
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@size-limit/preset-big-lib": "^7.0.8",
"@storybook/addon-actions": "^6.4.12",
"@storybook/addon-essentials": "^6.4.13",
"@storybook/vue": "^6.4.12",
"@swc/core": "^1.2.120",
"@swc/helpers": "^0.3.2",
"@swc/jest": "^0.2.15",
"@types/chart.js": "^2.7.55",
"@vue/test-utils": "^1.3.0",
"@vue/vue2-jest": "^27.0.0-alpha.4",
"babel-jest": "^27.4.5",
"babel-loader": "8.2.3",
"browserslist": "^4.19.1",
"chart.js": "^2.8.0",
"chart.js": "^3.7.0",
"clean-publish": "^4.0.0",
"commitizen": "^4.2.4",
"cross-env": "^5.1.1",
Expand All @@ -108,6 +109,7 @@
"rollup-plugin-swc": "^0.2.0",
"rollup-plugin-vue": "^6.0.0",
"simple-git-hooks": "^2.7.0",
"size-limit": "^7.0.8",
"standard-version": "^9.3.2",
"vue": "2.6.14",
"vue-hot-reload-api": "2.3.1",
Expand Down