Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16,300 changes: 2,836 additions & 13,464 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@
"stylelint": "^16.9.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-prettier": "^5.0.2",
"typescript": "^4.9.4",
"typescript": "^5.9.2",
"vite": "^6.4.1",
"vitest": "^3.0.7"
},
"//": "ensure that typedoc uses latest typescript. It prints a warning, but works",
"overrides": {
"typescript": "^4.9.4",
"typescript": "^5.9.2",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the version of TS used in the main components package. It fixes a compilation error with test-utils, present after upgrading the deps.

"glob": "^10.5.0"
},
"lint-staged": {
Expand All @@ -133,7 +133,7 @@
"stylelint --fix"
],
"package-lock.json": [
"./scripts/prepare-package-lock.js"
"prepare-package-lock"
]
}
}
51 changes: 0 additions & 51 deletions scripts/prepare-package-lock.js

This file was deleted.

12 changes: 6 additions & 6 deletions src/__tests__/__snapshots__/documenter.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ for the user to recover from the error.",
},
{
"inlineType": {
"name": "NonCancelableEventHandler<{}>",
"name": "NonCancelableEventHandler",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is caused by TS version upgrade.

"parameters": [
{
"name": "event",
Expand All @@ -281,7 +281,7 @@ for the user to recover from the error.",
},
"name": "onRecoveryClick",
"optional": true,
"type": "NonCancelableEventHandler<{}>",
"type": "NonCancelableEventHandler",
},
{
"inlineType": {
Expand Down Expand Up @@ -923,7 +923,7 @@ for the user to recover from the error.",
},
{
"inlineType": {
"name": "NonCancelableEventHandler<{}>",
"name": "NonCancelableEventHandler",
"parameters": [
{
"name": "event",
Expand All @@ -935,7 +935,7 @@ for the user to recover from the error.",
},
"name": "onRecoveryClick",
"optional": true,
"type": "NonCancelableEventHandler<{}>",
"type": "NonCancelableEventHandler",
},
{
"inlineType": {
Expand Down Expand Up @@ -1718,7 +1718,7 @@ for the user to recover from the error.",
},
{
"inlineType": {
"name": "NonCancelableEventHandler<{}>",
"name": "NonCancelableEventHandler",
"parameters": [
{
"name": "event",
Expand All @@ -1730,7 +1730,7 @@ for the user to recover from the error.",
},
"name": "onRecoveryClick",
"optional": true,
"type": "NonCancelableEventHandler<{}>",
"type": "NonCancelableEventHandler",
},
{
"inlineType": {
Expand Down
4 changes: 1 addition & 3 deletions src/cartesian-chart/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import { NonCancelableEventHandler } from "../internal/events";
// we pass options directly to the component, instead of grouping them all into a single "options" property.
// We do still organize related options in groups, e.g.: "SeriesOptions", "TooltipOptions".
export interface CartesianChartProps
extends CoreTypes.BaseChartOptions,
CoreTypes.CoreCartesianOptions,
CoreTypes.WithCartesianI18nStrings {
extends CoreTypes.BaseChartOptions, CoreTypes.CoreCartesianOptions, CoreTypes.WithCartesianI18nStrings {
/**
* Inverts X and Y axes. Use it to show horizontal columns (bars).
* This property corresponds to [chart.inverted](https://api.highcharts.com/highcharts/chart.inverted).
Expand Down
2 changes: 2 additions & 0 deletions src/core/__tests__/chart-core-utils.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/* eslint-disable @vitest/no-conditional-expect */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


import highcharts from "highcharts";

import "highcharts/highcharts-more";
Expand Down
3 changes: 2 additions & 1 deletion src/core/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ export interface CoreCartesianOptions {
}

export interface CoreChartProps
extends Pick<
extends
Pick<
BaseChartOptions,
| "highcharts"
| "fallback"
Expand Down
4 changes: 4 additions & 0 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ export function getVisibleLegendItems(options: Highcharts.Options) {
};

options.series?.forEach((series) => {
if (!("type" in series)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Highcharts series option type was extended with UnknownSeriesOptionsType, which does not include the type field.

Ref: highcharts/highcharts-declarations-generator@b381948#diff-027cb4cef6330a88a19cf87488bbabc97c3ebd9a9e5a2be19084339eabc5ff39R305

return;
}

// The pie series is not shown in the legend. Instead, we show pie segments (points).
if (series.type === "pie") {
if (Array.isArray(series.data)) {
Expand Down
2 changes: 2 additions & 0 deletions test/visual/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/* eslint-disable @vitest/no-conditional-expect */

import path from "path";
import { expect, test } from "vitest";

Expand All @@ -21,7 +23,7 @@
if (hasScreenshotArea) {
await page.waitForJsTimers(100);
const pngString = await page.fullPageScreenshot();
expect(pngString).toMatchImageSnapshot();

Check failure on line 26 in test/visual/index.test.ts

View workflow job for this annotation

GitHub Actions / Run Tests

test/visual/index.test.ts > matches snapshot for /#/03-core/solidgauge?screenshotMode=true

Error: Expected image to match or be a close match to snapshot but was 0.001402524544179523% different from snapshot (12 differing pixels). See diff for details: /home/runner/work/chart-components/chart-components/__image_snapshots__/__diff_output__/index-test-ts-matches-snapshot-for-03-core-solidgauge-screenshot-mode-true-1-snap-diff.png ❯ test/visual/index.test.ts:26:25 ❯ test/utils.ts:30:5 ❯ node_modules/@cloudscape-design/browser-test-tools/use-browser.js:36:13

Check failure on line 26 in test/visual/index.test.ts

View workflow job for this annotation

GitHub Actions / Run Tests

test/visual/index.test.ts > matches snapshot for /#/03-core/core-legend-horizontal-alignment?screenshotMode=true

Error: Expected image to match or be a close match to snapshot but was 0.0015247344176540789% different from snapshot (26 differing pixels). See diff for details: /home/runner/work/chart-components/chart-components/__image_snapshots__/__diff_output__/index-test-ts-matches-snapshot-for-03-core-core-legend-horizontal-alignment-screenshot-mode-true-1-snap-diff.png ❯ test/visual/index.test.ts:26:25 ❯ test/utils.ts:30:5 ❯ node_modules/@cloudscape-design/browser-test-tools/use-browser.js:36:13

Check failure on line 26 in test/visual/index.test.ts

View workflow job for this annotation

GitHub Actions / Run Tests

test/visual/index.test.ts > matches snapshot for /#/01-cartesian-chart/axes-and-thresholds?screenshotMode=true

Error: Expected image to match or be a close match to snapshot but was 0.03043896661484936% different from snapshot (1542 differing pixels). See diff for details: /home/runner/work/chart-components/chart-components/__image_snapshots__/__diff_output__/index-test-ts-matches-snapshot-for-01-cartesian-chart-axes-and-thresholds-screenshot-mode-true-1-snap-diff.png ❯ test/visual/index.test.ts:26:25 ❯ test/utils.ts:30:5 ❯ node_modules/@cloudscape-design/browser-test-tools/use-browser.js:36:13
}
})(),
);
2 changes: 1 addition & 1 deletion tsconfig.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"types": ["vite/client"],
"tsBuildInfoFile": "./.cache/e2e-tests.tsbuildinfo"
},
"include": ["types", "test"],
"include": ["types", "test", "vite/client"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes import.meta.glob call in visual tests. W/o these types, the call to .glob fails.

"exclude": []
}
Loading