Skip to content

Commit 3048c1f

Browse files
committed
feat: upgrade to rc.2
1 parent e045e12 commit 3048c1f

21 files changed

+96
-135
lines changed

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"src/**/*.tsx"
5151
],
5252
"peerDependencies": {
53-
"chart.js": "^3.0.0-rc"
53+
"chart.js": "^3.0.0-rc.2"
5454
},
5555
"browserslist": [
5656
"Firefox ESR",
@@ -73,7 +73,7 @@
7373
"@yarnpkg/pnpify": "^2.4.0",
7474
"canvas": "^2.7.0",
7575
"canvas-5-polyfill": "^0.1.5",
76-
"chart.js": "^3.0.0-rc",
76+
"chart.js": "^3.0.0-rc.2",
7777
"eslint": "^7.22.0",
7878
"eslint-config-airbnb-typescript": "^12.3.1",
7979
"eslint-config-prettier": "^8.1.0",
@@ -87,7 +87,7 @@
8787
"jest": "^26.6.3",
8888
"jest-image-snapshot": "^4.4.0",
8989
"prettier": "^2.2.1",
90-
"release-it": "^14.4.1",
90+
"release-it": "^14.5.0",
9191
"rimraf": "^3.0.2",
9292
"rollup": "^2.42.1",
9393
"rollup-plugin-cleanup": "^3.2.1",
@@ -101,10 +101,9 @@
101101
"scripts": {
102102
"clean": "rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\"",
103103
"compile": "tsc -b tsconfig.c.json",
104-
"compile:types": "tsc -p tsconfig.c.json --emitDeclarationOnly",
105104
"start": "yarn run watch",
106105
"watch": "rollup -c -w",
107-
"build": "rollup -c && yarn run compile:types",
106+
"build": "rollup -c",
108107
"test": "jest --passWithNoTests",
109108
"test:watch": "jest --passWithNoTests --watch",
110109
"test:coverage": "jest --passWithNoTests --coverage",

rollup.config.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import commonjs from '@rollup/plugin-commonjs';
22
import resolve from '@rollup/plugin-node-resolve';
33
import cleanup from 'rollup-plugin-cleanup';
4-
// import dts from 'rollup-plugin-dts';
4+
import dts from 'rollup-plugin-dts';
55
import typescript from '@rollup/plugin-typescript';
66
import { terser } from 'rollup-plugin-terser';
77
import replace from '@rollup/plugin-replace';
@@ -23,10 +23,10 @@ const banner = `/**
2323
*/
2424
const watchOnly = ['umd'];
2525

26-
const isDependency = (v) => Object.keys(pkg.dependencies || {}).some((e) => e === v || v.startsWith(e + '/'));
27-
const isPeerDependency = (v) => Object.keys(pkg.peerDependencies || {}).some((e) => e === v || v.startsWith(e + '/'));
26+
const isDependency = (v) => Object.keys(pkg.dependencies || {}).some((e) => e === v || v.startsWith(`${e}/`));
27+
const isPeerDependency = (v) => Object.keys(pkg.peerDependencies || {}).some((e) => e === v || v.startsWith(`${e}/`));
2828

29-
export default (options) => {
29+
export default function Config(options) {
3030
const buildFormat = (format) => {
3131
return !options.watch || watchOnly.includes(format);
3232
};
@@ -102,22 +102,22 @@ export default (options) => {
102102
].filter(Boolean),
103103
external: (v) => isPeerDependency(v),
104104
},
105-
// buildFormat('types') && {
106-
// ...base,
107-
// output: {
108-
// ...commonOutput,
109-
// file: pkg.types,
110-
// format: 'es',
111-
// },
112-
// plugins: [
113-
// dts({
114-
// respectExternal: true,
115-
// compilerOptions: {
116-
// skipLibCheck: true,
117-
// skipDefaultLibCheck: true,
118-
// },
119-
// }),
120-
// ],
121-
// },
105+
buildFormat('types') && {
106+
...base,
107+
output: {
108+
...commonOutput,
109+
file: pkg.types,
110+
format: 'es',
111+
},
112+
plugins: [
113+
dts({
114+
respectExternal: true,
115+
compilerOptions: {
116+
skipLibCheck: true,
117+
skipDefaultLibCheck: true,
118+
},
119+
}),
120+
],
121+
},
122122
].filter(Boolean);
123-
};
123+
}

samples/animation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Box Plot Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
</head>
88

samples/datalimits.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Box Plot Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/d3-random@latest/dist/d3-random.min.js"></script>
88
<script src="./utils.js"></script>

samples/datastructures.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Box Plot Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/d3-random@latest/dist/d3-random.min.js"></script>
88
<script src="./utils.js"></script>

samples/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Box Plot Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/d3-random@latest/dist/d3-random.min.js"></script>
88
<script src="./utils.js"></script>

samples/default_esm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<script type="importmap-shim">
1212
{
1313
"imports": {
14-
"chart.js": "https://unpkg.com/chart.js@3.0.0-rc?module",
15-
"chart.js/helpers": "https://unpkg.com/chart.js@3.0.0-rc/helpers/helpers.esm.js?module",
14+
"chart.js": "https://unpkg.com/chart.js@3.0.0-rc.2?module",
15+
"chart.js/helpers": "https://unpkg.com/chart.js@3.0.0-rc.2/helpers/helpers.esm.js?module",
1616
"@sgratzl/boxplots": "https://unpkg.com/@sgratzl/boxplots?module",
1717
"@sgratzl/chartjs-chart-boxplot": "../build/index.js"
1818
}

samples/empty.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Box Plot Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
</head>
88

samples/fivenum.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Box Plot Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
</head>
88

samples/horizontalBoxplot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Horizontal Bar Chart</title>
5-
<script src="https://unpkg.com/chart.js@3.0.0-rc/dist/chart.js"></script>
5+
<script src="https://unpkg.com/chart.js@3.0.0-rc.2/dist/chart.js"></script>
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/d3-random@latest/dist/d3-random.min.js"></script>
88
<script src="./utils.js"></script>

0 commit comments

Comments
 (0)