Skip to content

Commit 308d769

Browse files
chore: Upgrade dependencies
Regenerate package-lock file to receive latest updates. This is done here to make it easier to separate the upgrade to Node16 from the fixing of dependencies caused by regenerating the lock file. - Regenerate package-lock - Fix eslint and stylelint issue
1 parent e52b6f6 commit 308d769

File tree

11 files changed

+3079
-3783
lines changed

11 files changed

+3079
-3783
lines changed

build-tools/stylelint/__tests__/no-motion-outside-of-mixin.test.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -64,29 +64,29 @@ describe('No motion outside of mixin', () => {
6464
}
6565
`);
6666
expect(result.errored).toBe(true);
67+
expect(result.results[0].warnings.length).toBe(1);
6768
expect(result.results[0].warnings).toEqual([
68-
{
69-
column: 15,
70-
line: 5,
69+
expect.objectContaining({
7170
rule: '@cloudscape-design/no-motion-outside-of-mixin',
7271
severity: 'error',
7372
text: `Property "${property}" should be directly under 'with-motion' helper (@cloudscape-design/no-motion-outside-of-mixin)`,
74-
},
73+
}),
7574
]);
75+
expect(result.errored).toBe(true);
7676
});
7777

7878
test('should not allow motion outside of the mixin', async () => {
7979
const result = await runPlugin(`.block { ${property}: my-animation; }`);
8080
expect(result.errored).toBe(true);
81+
expect(result.results[0].warnings.length).toBe(1);
8182
expect(result.results[0].warnings).toEqual([
82-
{
83-
column: 10,
84-
line: 1,
83+
expect.objectContaining({
8584
rule: '@cloudscape-design/no-motion-outside-of-mixin',
8685
severity: 'error',
8786
text: `Property "${property}" should be directly under 'with-motion' helper (@cloudscape-design/no-motion-outside-of-mixin)`,
88-
},
87+
}),
8988
]);
89+
expect(result.errored).toBe(true);
9090
});
9191

9292
test('should not allow motion if mixin in the scope but not a parent', async () => {
@@ -97,14 +97,13 @@ describe('No motion outside of mixin', () => {
9797
${property}: my-animation;
9898
}
9999
`);
100+
expect(result.results[0].warnings.length).toBe(1);
100101
expect(result.results[0].warnings).toEqual([
101-
{
102-
column: 11,
103-
line: 5,
102+
expect.objectContaining({
104103
rule: '@cloudscape-design/no-motion-outside-of-mixin',
105104
severity: 'error',
106105
text: `Property "${property}" should be directly under 'with-motion' helper (@cloudscape-design/no-motion-outside-of-mixin)`,
107-
},
106+
}),
108107
]);
109108
expect(result.errored).toBe(true);
110109
});

package-lock.json

+3,027-3,737
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
"@types/react-router-dom": "^5.3.2",
7575
"@types/react-transition-group": "^4.4.4",
7676
"@types/webpack-env": "^1.16.3",
77-
"@typescript-eslint/eslint-plugin": "^4.33.0",
78-
"@typescript-eslint/parser": "^4.33.0",
77+
"@typescript-eslint/eslint-plugin": "^5.45.0",
78+
"@typescript-eslint/parser": "^5.45.0",
7979
"axe-core": "^4.4.1",
8080
"babel-jest": "^28.1.0",
8181
"change-case": "^4.1.2",
@@ -86,14 +86,14 @@
8686
"css-minimizer-webpack-plugin": "^3.1.1",
8787
"d3-scale": "^4.0.2",
8888
"del": "^5.1.0",
89-
"eslint": "^7.32.0",
90-
"eslint-config-prettier": "^8.3.0",
91-
"eslint-plugin-header": "3.1.0",
92-
"eslint-plugin-no-unsanitized": "^4.0.0",
93-
"eslint-plugin-prettier": "^3.4.1",
94-
"eslint-plugin-react": "^7.26.1",
95-
"eslint-plugin-react-hooks": "^4.2.0",
96-
"eslint-plugin-unicorn": "^28.0.2",
89+
"eslint": "^8.28.0",
90+
"eslint-config-prettier": "^8.5.0",
91+
"eslint-plugin-header": "^3.1.1",
92+
"eslint-plugin-no-unsanitized": "^4.0.2",
93+
"eslint-plugin-prettier": "^4.2.1",
94+
"eslint-plugin-react": "^7.31.11",
95+
"eslint-plugin-react-hooks": "^4.6.0",
96+
"eslint-plugin-unicorn": "^45.0.1",
9797
"execa": "^4.1.0",
9898
"glob": "^7.2.0",
9999
"gulp": "^4.0.2",
@@ -120,13 +120,13 @@
120120
"rollup-plugin-license": "^2.8.2",
121121
"sass": "^1.43.4",
122122
"sass-loader": "^12.3.0",
123-
"stylelint": "^14.3.0",
124-
"stylelint-config-prettier": "^8.0.1",
125-
"stylelint-config-recommended-scss": "^5.0.2",
126-
"stylelint-no-unsupported-browser-features": "^5.0.3",
123+
"stylelint": "^14.15.0",
124+
"stylelint-config-prettier": "^9.0.4",
125+
"stylelint-config-recommended-scss": "^8.0.0",
126+
"stylelint-no-unsupported-browser-features": "^6.0.1",
127127
"stylelint-order": "^5.0.0",
128-
"stylelint-prettier": "^1.2.0",
129-
"stylelint-scss": "^3.21.0",
128+
"stylelint-prettier": "^2.0.0",
129+
"stylelint-scss": "^4.3.0",
130130
"svgo": "^2.8.0",
131131
"ts-jest": "^28.0.2",
132132
"ts-loader": "^9.2.6",

src/app-layout/visual-refresh/main.scss

+13-5
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,25 @@
5757
desktop viewports if there are no Breadcrumbs or Header. Use additional
5858
to padding on the Main.
5959
*/
60-
&.content-type-default.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height),
61-
&.content-type-form.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height) {
60+
&.content-type-default.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(
61+
.has-dynamic-overlap-height
62+
),
63+
&.content-type-form.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(
64+
.has-dynamic-overlap-height
65+
) {
6266
padding-top: awsui.$space-scaled-m;
6367
}
6468

6569
/*
6670
Main is the only rendered center content if there are no Notifications,
6771
Breadcrumbs, or Header. Use minimal top padding.
6872
*/
69-
&.content-type-default:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height),
70-
&.content-type-form:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height) {
73+
&.content-type-default:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(
74+
.has-dynamic-overlap-height
75+
),
76+
&.content-type-form:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(
77+
.has-dynamic-overlap-height
78+
) {
7179
padding-top: awsui.$space-scaled-xs;
7280
}
7381

@@ -121,7 +129,7 @@
121129
}
122130

123131
// Prevent content that is visually hidden behind drawers and content area in mobile view from receiving focus
124-
/* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
132+
/* stylelint-disable-next-line selector-max-universal, selector-combinator-disallowed-list */
125133
.unfocusable * {
126134
visibility: hidden !important;
127135
}

src/internal/components/cartesian-chart/bottom-labels.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ function BottomLabels({
8282
<g
8383
transform={`translate(0,${height})`}
8484
className={styles['labels-bottom']}
85-
focusable={false}
8685
aria-label={title}
8786
role="list"
8887
aria-roledescription={ariaRoleDescription}

src/internal/components/chart-plot/__tests__/chart-plot.test.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ describe('initial state', () => {
3232

3333
expect(plot.getAttribute('focusable')).toBe('true');
3434
expect(plot.tabIndex).toBe(0);
35-
expect(application.getAttribute('focusable')).toBe('false');
3635
expect(application.tabIndex).toBe(-1);
3736
});
3837

@@ -151,7 +150,6 @@ describe('focused plot', () => {
151150

152151
expect(plot.getAttribute('focusable')).toBe('true');
153152
expect(plot.tabIndex).toBe(0);
154-
expect(application.getAttribute('focusable')).toBe('false');
155153
expect(application.tabIndex).toBe(-1);
156154
});
157155

src/internal/components/chart-plot/application-controller.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ function ApplicationController(
8383
return (
8484
<g ref={containerRef}>
8585
<g
86-
focusable={false}
8786
tabIndex={-1}
8887
ref={applicationRef}
8988
onFocus={onApplicationFocus}

src/internal/utils/locale/__tests__/utils/intl-polyfill.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
// We use resolvedOptions to detect browser locale. This method allows us to override the value for testing.
55
export default function setResolvedOptions(newValue: { locale: string }): void {
6+
const dateTimeFormat = new Intl.DateTimeFormat(newValue.locale);
7+
const resolvedOptions = dateTimeFormat.resolvedOptions();
8+
69
// eslint-disable-next-line no-undef
7-
window.Intl.DateTimeFormat.prototype.resolvedOptions = () => newValue;
10+
window.Intl.DateTimeFormat.prototype.resolvedOptions = () => ({ ...resolvedOptions, ...newValue });
811
}

src/internal/vendor/__tests__/__snapshots__/d3-scale-third-party-licences.test.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`d3-scale-third-party-licenses.txt content stays unchanged without any d3-scale version changes 1`] = `
44
"Name: d3-array
5-
Version: 3.2.0
5+
Version: 3.2.1
66
License: ISC
77
Private: false
88
Description: Array manipulation, ordering, searching, summarizing, etc.
@@ -170,7 +170,7 @@ THIS SOFTWARE.
170170
---
171171
172172
Name: d3-time
173-
Version: 3.0.0
173+
Version: 3.1.0
174174
License: ISC
175175
Private: false
176176
Description: A calculator for humanity’s peculiar conventions of time.
@@ -180,7 +180,7 @@ Author: Mike Bostock (http://bost.ocks.org/mike)
180180
License Copyright:
181181
===
182182
183-
Copyright 2010-2021 Mike Bostock
183+
Copyright 2010-2022 Mike Bostock
184184
185185
Permission to use, copy, modify, and/or distribute this software for any purpose
186186
with or without fee is hereby granted, provided that the above copyright notice

src/mixed-line-bar-chart/domain.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ export function computeDomainX<T>(series: readonly InternalChartSeries<T>[], xSc
3232
// Compare x-threshold X with current min, max.
3333
if (isXThreshold(curr.series)) {
3434
const [min, max] = acc;
35-
const newMin = min === undefined || curr.series.x < min ? curr.series.x : min;
36-
const newMax = max === undefined || max < curr.series.x ? curr.series.x : max;
35+
const newMin = min === undefined || min === null || curr.series.x < min ? curr.series.x : min;
36+
const newMax = max === undefined || max === null || max < curr.series.x ? curr.series.x : max;
3737
return [newMin, newMax] as T[];
3838
}
3939

4040
// Compare all series X values with current min, max.
4141
if (isDataSeries(curr.series)) {
4242
return curr.series.data.reduce(([min, max], { x }) => {
43-
const newMin = min === undefined || x < min ? x : min;
44-
const newMax = max === undefined || max < x ? x : max;
43+
const newMin = min === undefined || min === null || x < min ? x : min;
44+
const newMax = max === undefined || max === null || max < x ? x : max;
4545
return [newMin, newMax] as T[];
4646
}, acc);
4747
}

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": ["es5", "es2015.collection", "dom"],
3+
"lib": ["es5", "es2015.collection", "es2015.Iterable", "dom"],
44
"types": [],
55
"module": "esnext",
66
"moduleResolution": "node",

0 commit comments

Comments
 (0)