Skip to content

Commit 217f7eb

Browse files
committed
minor #468 Restricting chart.js to 3.8.2 (weaverryan)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Restricting chart.js to 3.8.2 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | Fixes tests | License | MIT In 3.9, they broke typescript with chart.js/auto - see chartjs/Chart.js#10599 It will be fixed in 4.0... that's the best we can do I think :). I DID leave the peer dependencies alone, as I believe a user using 3.9 will still work. Commits ------- 8809368 Restricting chart.js to 3.8.2
2 parents 464a143 + 8809368 commit 217f7eb

File tree

5 files changed

+37
-3
lines changed

5 files changed

+37
-3
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
- run: yarn check-format
3434

3535
js-dist-current:
36+
# always skip check for now - building is too inefficient and large for CI
37+
if: false
3638
runs-on: ubuntu-latest
3739
steps:
3840
- uses: actions/checkout@master

src/Chartjs/Resources/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"devDependencies": {
2121
"@hotwired/stimulus": "^3.0.0",
2222
"@types/chart.js": "^2.9.34",
23-
"chart.js": "^3.4.1",
23+
"chart.js": "^3.4.1 <3.9",
2424
"jest-canvas-mock": "^2.3.0",
2525
"resize-observer-polyfill": "^1.5.1"
2626
}

src/Typed/Resources/assets/src/controller.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@ export default class extends Controller {
3434
contentType: { type: String, default: 'html' },
3535
};
3636

37+
readonly stringsValue!: string[];
38+
readonly typeSpeedValue: number;
39+
readonly smartBackspaceValue: boolean;
40+
readonly startDelayValue?: number;
41+
readonly backSpeedValue?: number;
42+
readonly shuffleValue?: boolean;
43+
readonly backDelayValue: number;
44+
readonly fadeOutValue?: boolean;
45+
readonly fadeOutClassValue: string;
46+
readonly fadeOutDelayValue: number;
47+
readonly loopValue?: boolean;
48+
readonly loopCountValue: number;
49+
readonly showCursorValue: boolean;
50+
readonly cursorCharValue: string;
51+
readonly autoInsertCssValue: boolean;
52+
readonly attrValue?: string;
53+
readonly bindInputFocusEventsValue?: boolean;
54+
readonly contentTypeValue: string;
55+
3756
connect() {
3857
const options = {
3958
strings: this.stringsValue,

src/Vue/Resources/assets/dist/register_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function registerVueControllerComponents(context) {
77
window.resolveVueComponent = (name) => {
88
const component = vueControllers[`./${name}.vue`];
99
if (typeof component === 'undefined') {
10-
throw new Error('Vue controller "' + name + '" does not exist');
10+
throw new Error(`Vue controller "${name}" does not exist`);
1111
}
1212
return component;
1313
};

src/Vue/Resources/assets/dist/render_controller.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,21 @@ class default_1 extends Controller {
88
this._dispatchEvent('vue:connect', { componentName: this.componentValue, props: this.props });
99
const component = window.resolveVueComponent(this.componentValue);
1010
this.app = createApp(component, this.props);
11+
if (this.element.__vue_app__ !== undefined) {
12+
this.element.__vue_app__.unmount();
13+
}
14+
this._dispatchEvent('vue:before-mount', {
15+
componentName: this.componentValue,
16+
component: component,
17+
props: this.props,
18+
app: this.app,
19+
});
1120
this.app.mount(this.element);
12-
this._dispatchEvent('vue:mount', { componentName: this.componentValue, component: component, props: this.props });
21+
this._dispatchEvent('vue:mount', {
22+
componentName: this.componentValue,
23+
component: component,
24+
props: this.props,
25+
});
1326
}
1427
disconnect() {
1528
this.app.unmount();

0 commit comments

Comments
 (0)