Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bumpd frontend dependencies #84

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
bump packages
  • Loading branch information
peterholmberg committed Aug 19, 2024
commit 81d12b7b019637b854cc60326e0c35543e777f55
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.8.7",
"@grafana/e2e": "9.5.3",
"@grafana/e2e-selectors": "9.5.3",
"@grafana/eslint-config": "^6.0.0",
"@grafana/tsconfig": "^1.2.0-rc1",
"@grafana/eslint-config": "^7.0.0",
"@grafana/tsconfig": "^1.3.0-rc1",
"@swc/core": "^1.3.62",
"@swc/helpers": "^0.5.0",
"@swc/jest": "^0.2.26",
Expand All @@ -41,7 +39,7 @@
"@types/jquery": "^3.3.29",
"@types/lodash": "^4.14.194",
"@types/node": "^18.15.11",
"@types/react": "^16.8.21",
"@types/react": "^18.3.3",
"copy-webpack-plugin": "^11.0.0",
"cspell": "6.13.3",
"css-loader": "^6.7.3",
Expand Down Expand Up @@ -70,11 +68,11 @@
"dependencies": {
"@emotion/css": "^11.1.3",
"@emotion/react": "11.1.5",
"@grafana/data": "10.0.2",
"@grafana/runtime": "10.0.2",
"@grafana/ui": "10.0.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"@grafana/data": "11.1.4",
"@grafana/runtime": "11.1.4",
"@grafana/ui": "11.1.4",
"react": "18.3.1",
"react-dom": "18.3.1",
"tslib": "2.5.3"
},
"resolutions": {
Expand Down
19 changes: 9 additions & 10 deletions src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
TIME_SERIES_TIME_FIELD_NAME,
FieldType,
MutableField,
ArrayVector,
MutableDataFrame,
TIME_SERIES_VALUE_FIELD_NAME,
MetricFindValue,
Expand Down Expand Up @@ -196,7 +195,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
config: {
custom: {},
},
values: new ArrayVector(),
values: [],
};

const valueFiled: MutableField<number | null> = {
Expand All @@ -205,7 +204,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
config: {
custom: {},
},
values: new ArrayVector(),
values: [],
};

const frame = new MutableDataFrame({
Expand Down Expand Up @@ -262,7 +261,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
streamValues = smoothVelocityData(streamValues);
}

valueFiled.values = new ArrayVector(streamValues);
valueFiled.values = streamValues;
frame.addField(timeFiled);
frame.addField(valueFiled);

Expand Down Expand Up @@ -306,7 +305,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
config: {
custom: {},
},
values: new ArrayVector(),
values: [],
};

const valueFiled: MutableField<number | null> = {
Expand All @@ -315,7 +314,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
config: {
custom: {},
},
values: new ArrayVector(),
values: [],
};

const frame = new MutableDataFrame({
Expand Down Expand Up @@ -373,7 +372,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
streamValues = smoothVelocityData(streamValues);
}

valueFiled.values = new ArrayVector(streamValues);
valueFiled.values = streamValues;
frame.addField(timeFiled);
frame.addField(valueFiled);

Expand All @@ -387,7 +386,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
config: {
custom: {},
},
values: new ArrayVector(),
values: [],
};

const splitStat = target.splitStat || '';
Expand All @@ -396,7 +395,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
name: splitStat || TIME_SERIES_VALUE_FIELD_NAME,
type: FieldType.number,
config: {},
values: new ArrayVector(),
values: [],
};

const frame = new MutableDataFrame({
Expand Down Expand Up @@ -443,7 +442,7 @@ export default class StravaDatasource extends DataSourceApi<StravaQuery, StravaJ
name: stats,
type: FieldType.other,
config: {},
values: new ArrayVector(),
values: [],
};
let activityStats = (activity as any)[stats];
if (stats.startsWith('gear_')) {
Expand Down
47 changes: 23 additions & 24 deletions src/responseHandler.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
import {
TimeRange,
DataFrame,
dateTime,
MutableField,
TIME_SERIES_TIME_FIELD_NAME,
FieldType,
ArrayVector,
TIME_SERIES_VALUE_FIELD_NAME,
MutableDataFrame,
TimeSeriesPoints,
TimeSeriesValue,
value TimeRange,
value DataFrame,
value dateTime,
value MutableField,
value TIME_SERIES_TIME_FIELD_NAME,
value FieldType,
value TIME_SERIES_VALUE_FIELD_NAME,
value MutableDataFrame,
value TimeSeriesPoints,
value TimeSeriesValue,
} from '@grafana/data';
import polyline from 'polyline';
import {
StravaActivity,
StravaQuery,
StravaQueryInterval,
StravaMeasurementPreference,
StravaActivityStat,
value StravaActivity,
value StravaQuery,
value StravaQueryInterval,
value StravaMeasurementPreference,
value StravaActivityStat,
} from 'types';
import {
INTERVAL_1w,
INTERVAL_4w,
getAggregationInterval,
getAggregationIntervalFromTarget,
getPreferredDistance,
getPreferredLength,
value INTERVAL_1w,
value INTERVAL_4w,
value getAggregationInterval,
value getAggregationIntervalFromTarget,
value getPreferredDistance,
value getPreferredLength,
} from 'utils';

interface TransformOptions {
Expand Down Expand Up @@ -64,7 +63,7 @@ export function transformActivitiesToTimeseries(
name: TIME_SERIES_TIME_FIELD_NAME,
type: FieldType.time,
config: {},
values: new ArrayVector(),
values: [],
};

const valueFiled: MutableField<number> = {
Expand All @@ -73,7 +72,7 @@ export function transformActivitiesToTimeseries(
config: {
unit: getStatUnit(target.activityStat, measurementPreference),
},
values: new ArrayVector(),
values: [],
};

for (let i = 0; i < datapoints.length; i++) {
Expand Down
Loading