Skip to content

Commit

Permalink
chore: Upgrade dependencies
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michaeldowseza committed Dec 6, 2022
1 parent e52b6f6 commit 308d769
Show file tree
Hide file tree
Showing 11 changed files with 3,079 additions and 3,783 deletions.
23 changes: 11 additions & 12 deletions build-tools/stylelint/__tests__/no-motion-outside-of-mixin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,29 @@ describe('No motion outside of mixin', () => {
}
`);
expect(result.errored).toBe(true);
expect(result.results[0].warnings.length).toBe(1);
expect(result.results[0].warnings).toEqual([
{
column: 15,
line: 5,
expect.objectContaining({
rule: '@cloudscape-design/no-motion-outside-of-mixin',
severity: 'error',
text: `Property "${property}" should be directly under 'with-motion' helper (@cloudscape-design/no-motion-outside-of-mixin)`,
},
}),
]);
expect(result.errored).toBe(true);
});

test('should not allow motion outside of the mixin', async () => {
const result = await runPlugin(`.block { ${property}: my-animation; }`);
expect(result.errored).toBe(true);
expect(result.results[0].warnings.length).toBe(1);
expect(result.results[0].warnings).toEqual([
{
column: 10,
line: 1,
expect.objectContaining({
rule: '@cloudscape-design/no-motion-outside-of-mixin',
severity: 'error',
text: `Property "${property}" should be directly under 'with-motion' helper (@cloudscape-design/no-motion-outside-of-mixin)`,
},
}),
]);
expect(result.errored).toBe(true);
});

test('should not allow motion if mixin in the scope but not a parent', async () => {
Expand All @@ -97,14 +97,13 @@ describe('No motion outside of mixin', () => {
${property}: my-animation;
}
`);
expect(result.results[0].warnings.length).toBe(1);
expect(result.results[0].warnings).toEqual([
{
column: 11,
line: 5,
expect.objectContaining({
rule: '@cloudscape-design/no-motion-outside-of-mixin',
severity: 'error',
text: `Property "${property}" should be directly under 'with-motion' helper (@cloudscape-design/no-motion-outside-of-mixin)`,
},
}),
]);
expect(result.errored).toBe(true);
});
Expand Down
6,764 changes: 3,027 additions & 3,737 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"@types/react-router-dom": "^5.3.2",
"@types/react-transition-group": "^4.4.4",
"@types/webpack-env": "^1.16.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"axe-core": "^4.4.1",
"babel-jest": "^28.1.0",
"change-case": "^4.1.2",
Expand All @@ -86,14 +86,14 @@
"css-minimizer-webpack-plugin": "^3.1.1",
"d3-scale": "^4.0.2",
"del": "^5.1.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-header": "3.1.0",
"eslint-plugin-no-unsanitized": "^4.0.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unicorn": "^28.0.2",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unicorn": "^45.0.1",
"execa": "^4.1.0",
"glob": "^7.2.0",
"gulp": "^4.0.2",
Expand All @@ -120,13 +120,13 @@
"rollup-plugin-license": "^2.8.2",
"sass": "^1.43.4",
"sass-loader": "^12.3.0",
"stylelint": "^14.3.0",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-recommended-scss": "^5.0.2",
"stylelint-no-unsupported-browser-features": "^5.0.3",
"stylelint": "^14.15.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-recommended-scss": "^8.0.0",
"stylelint-no-unsupported-browser-features": "^6.0.1",
"stylelint-order": "^5.0.0",
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.21.0",
"stylelint-prettier": "^2.0.0",
"stylelint-scss": "^4.3.0",
"svgo": "^2.8.0",
"ts-jest": "^28.0.2",
"ts-loader": "^9.2.6",
Expand Down
18 changes: 13 additions & 5 deletions src/app-layout/visual-refresh/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,25 @@
desktop viewports if there are no Breadcrumbs or Header. Use additional
to padding on the Main.
*/
&.content-type-default.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height),
&.content-type-form.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height) {
&.content-type-default.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(
.has-dynamic-overlap-height
),
&.content-type-form.has-notifications-content:not(.has-breadcrumbs):not(.has-header):not(
.has-dynamic-overlap-height
) {
padding-top: awsui.$space-scaled-m;
}

/*
Main is the only rendered center content if there are no Notifications,
Breadcrumbs, or Header. Use minimal top padding.
*/
&.content-type-default:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height),
&.content-type-form:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(.has-dynamic-overlap-height) {
&.content-type-default:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(
.has-dynamic-overlap-height
),
&.content-type-form:not(.has-notifications-content):not(.has-breadcrumbs):not(.has-header):not(
.has-dynamic-overlap-height
) {
padding-top: awsui.$space-scaled-xs;
}

Expand Down Expand Up @@ -121,7 +129,7 @@
}

// Prevent content that is visually hidden behind drawers and content area in mobile view from receiving focus
/* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
/* stylelint-disable-next-line selector-max-universal, selector-combinator-disallowed-list */
.unfocusable * {
visibility: hidden !important;
}
1 change: 0 additions & 1 deletion src/internal/components/cartesian-chart/bottom-labels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ function BottomLabels({
<g
transform={`translate(0,${height})`}
className={styles['labels-bottom']}
focusable={false}
aria-label={title}
role="list"
aria-roledescription={ariaRoleDescription}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ describe('initial state', () => {

expect(plot.getAttribute('focusable')).toBe('true');
expect(plot.tabIndex).toBe(0);
expect(application.getAttribute('focusable')).toBe('false');
expect(application.tabIndex).toBe(-1);
});

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

expect(plot.getAttribute('focusable')).toBe('true');
expect(plot.tabIndex).toBe(0);
expect(application.getAttribute('focusable')).toBe('false');
expect(application.tabIndex).toBe(-1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function ApplicationController(
return (
<g ref={containerRef}>
<g
focusable={false}
tabIndex={-1}
ref={applicationRef}
onFocus={onApplicationFocus}
Expand Down
5 changes: 4 additions & 1 deletion src/internal/utils/locale/__tests__/utils/intl-polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

// We use resolvedOptions to detect browser locale. This method allows us to override the value for testing.
export default function setResolvedOptions(newValue: { locale: string }): void {
const dateTimeFormat = new Intl.DateTimeFormat(newValue.locale);
const resolvedOptions = dateTimeFormat.resolvedOptions();

// eslint-disable-next-line no-undef
window.Intl.DateTimeFormat.prototype.resolvedOptions = () => newValue;
window.Intl.DateTimeFormat.prototype.resolvedOptions = () => ({ ...resolvedOptions, ...newValue });
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`d3-scale-third-party-licenses.txt content stays unchanged without any d3-scale version changes 1`] = `
"Name: d3-array
Version: 3.2.0
Version: 3.2.1
License: ISC
Private: false
Description: Array manipulation, ordering, searching, summarizing, etc.
Expand Down Expand Up @@ -170,7 +170,7 @@ THIS SOFTWARE.
---
Name: d3-time
Version: 3.0.0
Version: 3.1.0
License: ISC
Private: false
Description: A calculator for humanity’s peculiar conventions of time.
Expand All @@ -180,7 +180,7 @@ Author: Mike Bostock (http://bost.ocks.org/mike)
License Copyright:
===
Copyright 2010-2021 Mike Bostock
Copyright 2010-2022 Mike Bostock
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
Expand Down
8 changes: 4 additions & 4 deletions src/mixed-line-bar-chart/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ export function computeDomainX<T>(series: readonly InternalChartSeries<T>[], xSc
// Compare x-threshold X with current min, max.
if (isXThreshold(curr.series)) {
const [min, max] = acc;
const newMin = min === undefined || curr.series.x < min ? curr.series.x : min;
const newMax = max === undefined || max < curr.series.x ? curr.series.x : max;
const newMin = min === undefined || min === null || curr.series.x < min ? curr.series.x : min;
const newMax = max === undefined || max === null || max < curr.series.x ? curr.series.x : max;
return [newMin, newMax] as T[];
}

// Compare all series X values with current min, max.
if (isDataSeries(curr.series)) {
return curr.series.data.reduce(([min, max], { x }) => {
const newMin = min === undefined || x < min ? x : min;
const newMax = max === undefined || max < x ? x : max;
const newMin = min === undefined || min === null || x < min ? x : min;
const newMax = max === undefined || max === null || max < x ? x : max;
return [newMin, newMax] as T[];
}, acc);
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"lib": ["es5", "es2015.collection", "dom"],
"lib": ["es5", "es2015.collection", "es2015.Iterable", "dom"],
"types": [],
"module": "esnext",
"moduleResolution": "node",
Expand Down

0 comments on commit 308d769

Please sign in to comment.