-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add exports for node * apply type module * fix integration tests * support commonjs * fixes typo * add integration tests for node module and commonjs * add chartjs-plugin-annotation.js creation * remove build of plugin.js * change chart.js peerDependencies * add doc referring to chart.js version 4 as required * changes minimum chartjs version
- Loading branch information
1 parent
84545be
commit c0bfea9
Showing
21 changed files
with
189 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 3.x Migration Guide | ||
|
||
**`chartjs-plugin-annotation`** plugin version 3 becomes an [ESM-only package](https://nodejs.org/api/esm.html). | ||
The [UMD bundle](integration.md#script-tag) is still available. | ||
|
||
## Chart.js version | ||
|
||
The annotation plugin requires at least version 4.0.0 to work because of Chart.js becomes an ESM-only package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,40 +5,46 @@ | |
"version": "2.2.1", | ||
"author": "Evert Timberg <[email protected]>", | ||
"license": "MIT", | ||
"main": "dist/chartjs-plugin-annotation.js", | ||
"type": "module", | ||
"main": "dist/chartjs-plugin-annotation.cjs", | ||
"module": "dist/chartjs-plugin-annotation.esm.js", | ||
"types": "types/index.d.ts", | ||
"jsdelivr": "dist/chartjs-plugin-annotation.min.js", | ||
"unpkg": "dist/chartjs-plugin-annotation.min.js", | ||
"exports": { | ||
"types": "./types/index.d.ts", | ||
"import": "./dist/chartjs-plugin-annotation.esm.js", | ||
"require": "./dist/chartjs-plugin-annotation.min.js", | ||
"require": "./dist/chartjs-plugin-annotation.cjs", | ||
"script": "./dist/chartjs-plugin-annotation.min.js" | ||
}, | ||
"sideEffects": [ | ||
"dist/chartjs-plugin-annotation.cjs", | ||
"dist/chartjs-plugin-annotation.min.js" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/chartjs/chartjs-plugin-annotation.git" | ||
}, | ||
"files": [ | ||
"dist/*.js", | ||
"dist/*", | ||
"!dist/docs/**", | ||
"types/*.d.ts" | ||
], | ||
"scripts": { | ||
"build": "rollup -c", | ||
"dev": "karma start --auto-watch --no-single-run --browsers chrome", | ||
"dev:ff": "karma start --auto-watch --no-single-run --browsers firefox", | ||
"dev": "karma start ./karma.conf.cjs --auto-watch --no-single-run --browsers chrome", | ||
"dev:ff": "karma start ./karma.conf.cjs --auto-watch --no-single-run --browsers firefox", | ||
"docs": "npm run build && vuepress build docs --no-cache", | ||
"docs:dev": "npm run build && vuepress dev docs --no-cache", | ||
"lint": "concurrently --group \"npm:lint-*\"", | ||
"lint-js": "eslint \"test/**/*.js\" \"src/**/*.js\"", | ||
"lint-md": "eslint \"**/*.md\"", | ||
"lint-types": "eslint \"types/**/*.ts\" && tsc -p types/tests/", | ||
"test": "cross-env NODE_ENV=test concurrently --group \"npm:test-*\"", | ||
"test-karma": "karma start --auto-watch --single-run", | ||
"test-karma": "karma start ./karma.conf.cjs --auto-watch --single-run", | ||
"test-lint": "npm run lint", | ||
"test-types": "tsc -p types/tests/", | ||
"test-types-integration": "mocha --full-trace test/integration/*-test.js" | ||
"test-integration": "mocha --full-trace test/integration/*-test.js" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-json": "^6.0.0", | ||
|
@@ -79,6 +85,6 @@ | |
"vuepress-theme-chartjs": "^0.2.0" | ||
}, | ||
"peerDependencies": { | ||
"chart.js": ">=3.7.0" | ||
"chart.js": ">=4.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.