Skip to content

Commit 50ecc6f

Browse files
bocharsky-bwweaverryan
authored andcommitted
Fix TypeScript warnings
Also minor CI improvements
1 parent 122e228 commit 50ecc6f

File tree

9 files changed

+471
-436
lines changed

9 files changed

+471
-436
lines changed

.github/workflows/test.yaml

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
1616

1717
coding-style-js:
18+
name: JavaScript Coding Style
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@master
@@ -33,6 +34,7 @@ jobs:
3334
- run: yarn check-format
3435

3536
js-dist-current:
37+
name: Check for UnBuilt JS Dist Files
3638
runs-on: ubuntu-latest
3739
steps:
3840
- uses: actions/checkout@master
@@ -49,12 +51,18 @@ jobs:
4951
- run: yarn && yarn build
5052
- name: Check if js dist files are current
5153
id: changes
52-
uses: UnicornGlobal/[email protected]
54+
run: |
55+
echo "STATUS=$(git status --porcelain)" >> $GITHUB_OUTPUT
5356
54-
- name: Ensure no changes
55-
if: steps.changes.outputs.changed == 1
57+
- name: No changes found
58+
if: steps.changes.outputs.STATUS == ''
59+
run: |
60+
echo "git status is clean"
61+
- name: Changes were found
62+
if: steps.changes.outputs.STATUS != ''
5663
run: |
5764
echo "JS dist files need to be rebuilt"
65+
echo "${{ steps.changes.outputs.STATUS }}"
5866
exit 1
5967
6068
tests-php-low-deps:

src/Autocomplete/assets/dist/controller.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import { Controller } from '@hotwired/stimulus';
22
import TomSelect from 'tom-select';
33

4-
/******************************************************************************
5-
Copyright (c) Microsoft Corporation.
6-
7-
Permission to use, copy, modify, and/or distribute this software for any
8-
purpose with or without fee is hereby granted.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16-
PERFORMANCE OF THIS SOFTWARE.
17-
***************************************************************************** */
18-
19-
function __classPrivateFieldGet(receiver, state, kind, f) {
20-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
21-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
22-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
4+
/******************************************************************************
5+
Copyright (c) Microsoft Corporation.
6+
7+
Permission to use, copy, modify, and/or distribute this software for any
8+
purpose with or without fee is hereby granted.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16+
PERFORMANCE OF THIS SOFTWARE.
17+
***************************************************************************** */
18+
19+
function __classPrivateFieldGet(receiver, state, kind, f) {
20+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
21+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
22+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2323
}
2424

2525
var _default_1_instances, _default_1_getCommonConfig, _default_1_createAutocomplete, _default_1_createAutocompleteWithHtmlContents, _default_1_createAutocompleteWithRemoteData, _default_1_stripTags, _default_1_mergeObjects, _default_1_createTomSelect;
@@ -193,7 +193,7 @@ class default_1 extends Controller {
193193
this.resetTomSelect();
194194
}
195195
if (changeDisabledState) {
196-
this.changeTomSelectDisabledState((this.formElement.disabled));
196+
this.changeTomSelectDisabledState(this.formElement.disabled);
197197
}
198198
if (changePlaceholder) {
199199
this.updateTomSelectPlaceholder();

src/Chartjs/assets/dist/controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class default_1 extends Controller {
3030
const parentElement = this.element.parentElement;
3131
if (parentElement && this.chart.options.responsive) {
3232
const originalWidth = parentElement.style.width;
33-
parentElement.style.width = (parentElement.offsetWidth + 1) + 'px';
33+
parentElement.style.width = parentElement.offsetWidth + 1 + 'px';
3434
setTimeout(() => {
3535
parentElement.style.width = originalWidth;
3636
}, 0);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Component from './Component';
2+
declare class ComponentRegistry {
3+
private components;
4+
registerComponent(element: HTMLElement, definition: Component): void;
5+
unregisterComponent(element: HTMLElement): void;
6+
getComponent(element: HTMLElement): Promise<Component>;
7+
}
8+
declare const _default: ComponentRegistry;
9+
export default _default;

0 commit comments

Comments
 (0)