Skip to content

Commit

Permalink
Run yarn upgrade
Browse files Browse the repository at this point in the history
Update to the latest packages
so the output of 'yarn audit'
becomes useful.

There is some kind of incompatibility
with @types/react version 18, so restrict
the packages to the latest version 17
for now.

Mobx 6.13 makes tsc error out with:

Error: node_modules/mobx/dist/types/observableset.d.ts(45,31): error TS2552: Cannot find name 'ReadonlySetLike'. Did you mean 'ReadonlySet'?

which is issue 3903. Restrict mobx to <6.13
for now to avoid the issue.

This also discovered something with
the types of lodash-es, so add a type
signature and a default value to
avoid a TS2322 error.

Before:

140 vulnerabilities found - Packages audited: 1918
Severity: 7 Low | 47 Moderate | 70 High | 16 Critical

After:

35 vulnerabilities found - Packages audited: 1976
Severity: 2 Low | 13 Moderate | 16 High | 4 Critical
  • Loading branch information
pjonsson committed Sep 19, 2024
1 parent 88619a8 commit 39ae0c2
Show file tree
Hide file tree
Showing 4 changed files with 3,046 additions and 2,780 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ gulp.task("lint", function (done) {
"--ignore-pattern",
"lib/ThirdParty",
"--max-warnings",
"238" // TODO: Bring this back to 0
"204" // TODO: Bring this back to 0
]);

done();
Expand Down
4 changes: 2 additions & 2 deletions lib/Models/Catalog/Gtfs/prettyPrintGtfsEntityField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export default function prettyPrintGtfsEntityField(
// TODO: Get sone of this data (eg. route short name) from static GTFS csv files instead
// This probably only works for NSW
case "route_short_name": {
const route: string = _get(entity, "vehicle.trip.route_id");
const route: string = _get(entity, "vehicle.trip.route_id", "");
if (route !== undefined && route.indexOf("_") + 1 > 0) {
return route.substr(route.indexOf("_") + 1);
} else {
return "";
}
}
case "occupancy_status#str": {
const occupancy: OccupancyStatus = _get(
const occupancy: OccupancyStatus | undefined = _get(
entity,
"vehicle.occupancy_status"
);
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"colors": "1.4.0",
"@types/node": "^18.15.11",
"@types/css-font-loading-module": "^0.0.9",
"@types/react": "^17.0.25",
"@types/react-dom": "^17.0.25",
"terser-webpack-plugin": "^4.2.3",
"underscore": "^1.12.1"
},
Expand Down Expand Up @@ -136,7 +138,7 @@
"math-expression-evaluator": "^1.3.7",
"mini-css-extract-plugin": "^0.5.0",
"minisearch": "^3.0.2",
"mobx": "^6.7.0",
"mobx": "<6.13.0",
"mobx-react": "7.6.0",
"mobx-utils": "^6.0.5",
"moment": "^2.30.1",
Expand Down
Loading

0 comments on commit 39ae0c2

Please sign in to comment.