Skip to content

Commit f566633

Browse files
committed
chore: fixed import-svg script to work for node 24
1 parent e846f88 commit f566633

File tree

7 files changed

+41
-17
lines changed

7 files changed

+41
-17
lines changed

packages/ebayui-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"build:storybook": "storybook build -o ./_site",
3030
"coverage": "vitest run --browser.headless --coverage",
3131
"deploy": "storybook build -o ./_site",
32-
"importSVG": "node --experimental-json-modules --experimental-import-meta-resolve scripts/import-svg && prettier \"{./src/components/ebay-{icon,flag,star-rating,image-placeholder}/**/*,**/*.{js,ts,json,MD}}\" --write --log-level=warn",
32+
"importSVG": "node scripts/import-svg && prettier \"{./src/components/ebay-{icon,flag,star-rating,image-placeholder}/**/*,**/*.{js,ts,json,MD}}\" --write --log-level=warn",
3333
"lint": "npm run lint:less && npm run lint:js && npm run lint:whitespace",
3434
"lint:js": "eslint",
3535
"lint:less": "stylelint \"src/**/*.{css,less}\" --config .stylelintrc",

packages/ebayui-core/scripts/import-svg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
getCountryCallingCode,
1616
} from "libphonenumber-js/max";
1717
import examples from "libphonenumber-js/mobile/examples";
18-
import markoTagJson from "../src/components/ebay-icon/marko-tag.json" assert { type: "json" };
18+
import markoTagJson from "../src/components/ebay-icon/marko-tag.json" with { type: "json" };
1919
// const tempIgnore = ["RS", "PE", "SV", "BO", "DO", "EA"];
2020
const tempIgnore = [];
2121

packages/ebayui-core/src/common/charts/shared.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ export const chartFontFamily = '"Market Sans", Arial, sans-serif',
8181
(series[i] as Highcharts.SeriesBarOptions).borderColor = color;
8282
(series[i] as Highcharts.SeriesBarOptions).color = color;
8383
} else {
84-
(series[i] as Highcharts.SeriesAreasplineOptions).lineColor = color;
85-
(series[i] as Highcharts.SeriesAreasplineOptions).fillOpacity = 1;
84+
(series[i] as Highcharts.SeriesAreasplineOptions).lineColor =
85+
color;
86+
(series[i] as Highcharts.SeriesAreasplineOptions).fillOpacity =
87+
1;
8688
}
8789
}
8890
},
@@ -116,7 +118,9 @@ export const chartFontFamily = '"Market Sans", Arial, sans-serif',
116118

117119
return colors.map((color: any) => color.lineColor);
118120
},
119-
setSeriesMarkerStyles = function (series: Highcharts.SeriesAreasplineOptions[]) {
121+
setSeriesMarkerStyles = function (
122+
series: Highcharts.SeriesAreasplineOptions[],
123+
) {
120124
series.forEach((s, i) => {
121125
s.zIndex = series.length - i;
122126
s.marker = {

packages/ebayui-core/src/common/countries/countries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default {
6363
EC: { countryCode: "EC", callingCode: "593", mask: "000 000 0000" },
6464
EE: { countryCode: "EE", callingCode: "372", mask: "0000 0000" },
6565
EG: { countryCode: "EG", callingCode: "20", mask: "000 00000000" },
66-
EH: { countryCode: "EH", callingCode: "212", mask: "0000-000000" },
66+
EH: { countryCode: "EH", callingCode: "212", mask: "00 00 00 00 00" },
6767
ER: { countryCode: "ER", callingCode: "291", mask: "00 000 000" },
6868
ES: { countryCode: "ES", callingCode: "34", mask: "000 00 00 00" },
6969
ET: { countryCode: "ET", callingCode: "251", mask: "000 000 0000" },
@@ -132,7 +132,7 @@ export default {
132132
LU: { countryCode: "LU", callingCode: "352", mask: "000 000 000" },
133133
LV: { countryCode: "LV", callingCode: "371", mask: "00 000 000" },
134134
LY: { countryCode: "LY", callingCode: "218", mask: "000-0000000" },
135-
MA: { countryCode: "MA", callingCode: "212", mask: "0000-000000" },
135+
MA: { countryCode: "MA", callingCode: "212", mask: "00 00 00 00 00" },
136136
MC: { countryCode: "MC", callingCode: "377", mask: "00 00 00 00 00" },
137137
MD: { countryCode: "MD", callingCode: "373", mask: "0000 00 000" },
138138
ME: { countryCode: "ME", callingCode: "382", mask: "000 000 000" },

packages/ebayui-core/src/components/ebay-accordion/component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ class Accordion extends Marko.Component<Input, State> {
2323
onCreate() {
2424
this.state = {
2525
index: -1,
26-
interacted: false
27-
}
26+
interacted: false,
27+
};
2828
}
2929

3030
onInput(input: Input) {
3131
this.state = {
3232
index: -1,
33-
interacted: this.state.interacted
33+
interacted: this.state.interacted,
3434
};
3535
}
3636

packages/ebayui-core/src/components/ebay-area-chart/area-chart.stories.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ export const Standard = Template.bind({});
8282
Standard.args = {
8383
title: "Single series sample area chart",
8484
description: "this chart displays 30 days of sample values",
85-
series: sampleSeriesData.slice(0, 1) as Highcharts.SeriesAreasplineOptions[],
85+
series: sampleSeriesData.slice(
86+
0,
87+
1,
88+
) as Highcharts.SeriesAreasplineOptions[],
8689
};
8790
Standard.parameters = {
8891
docs: {
@@ -97,7 +100,10 @@ TwoSeries.args = {
97100
title: "Two series sample area chart",
98101
description:
99102
"this chart displays 30 days of values for sample1 and sample2",
100-
series: sampleSeriesData.slice(0, 2) as Highcharts.SeriesAreasplineOptions[],
103+
series: sampleSeriesData.slice(
104+
0,
105+
2,
106+
) as Highcharts.SeriesAreasplineOptions[],
101107
};
102108
TwoSeries.parameters = {
103109
docs: {
@@ -112,7 +118,10 @@ ThreeSeries.args = {
112118
title: "Three series sample area chart",
113119
description:
114120
"this chart displays 30 days of values for sample1, sample2 and sample3",
115-
series: sampleSeriesData.slice(0, 3) as Highcharts.SeriesAreasplineOptions[],
121+
series: sampleSeriesData.slice(
122+
0,
123+
3,
124+
) as Highcharts.SeriesAreasplineOptions[],
116125
};
117126
ThreeSeries.parameters = {
118127
docs: {
@@ -127,7 +136,10 @@ FourSeries.args = {
127136
title: "Four series sample area chart",
128137
description:
129138
"this chart displays 30 days of values for sample1, sample2, sample3, and sample4",
130-
series: sampleSeriesData.slice(0, 4) as Highcharts.SeriesAreasplineOptions[],
139+
series: sampleSeriesData.slice(
140+
0,
141+
4,
142+
) as Highcharts.SeriesAreasplineOptions[],
131143
};
132144
FourSeries.parameters = {
133145
docs: {
@@ -202,7 +214,10 @@ NonSpline.args = {
202214
title: "Area chart with non-spline type",
203215
description:
204216
"this chart displays 30 days of values for sample1, sample2, sample3, sample4, and sample5",
205-
series: sampleSeriesData.slice(0, 1) as Highcharts.SeriesAreasplineOptions[],
217+
series: sampleSeriesData.slice(
218+
0,
219+
1,
220+
) as Highcharts.SeriesAreasplineOptions[],
206221
areaType: "area",
207222
};
208223

@@ -219,7 +234,10 @@ CustomHighchartOptions.args = {
219234
title: "Custom highchart options",
220235
description:
221236
"this chart displays 30 days of values for sample1, sample2, sample3, sample4, and sample5",
222-
series: sampleSeriesData.slice(0, 1) as Highcharts.SeriesAreasplineOptions[],
237+
series: sampleSeriesData.slice(
238+
0,
239+
1,
240+
) as Highcharts.SeriesAreasplineOptions[],
223241
highchartOptions: {
224242
yAxis: {
225243
ceiling: 45000,

packages/ebayui-core/src/components/ebay-area-chart/component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ declare const Highcharts: typeof HighchartsTypes;
2323
interface AreaChartInput extends Omit<Marko.HTML.Div, `on${string}`> {
2424
title?: Highcharts.TitleOptions["text"];
2525
description?: Highcharts.SeriesAccessibilityOptionsObject["description"];
26-
series: Highcharts.SeriesAreasplineOptions | Highcharts.SeriesAreasplineOptions[];
26+
series:
27+
| Highcharts.SeriesAreasplineOptions
28+
| Highcharts.SeriesAreasplineOptions[];
2729
tooltipValueFormatter?: (value: string | number) => string;
2830
tooltipTitleFormatter?: (
2931
value: string | number,

0 commit comments

Comments
 (0)