Skip to content

Commit da515ba

Browse files
committed
Upgrade dependencies
1 parent 61b6c16 commit da515ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3926
-3351
lines changed

client/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
},
3434
"dependencies": {
3535
"facilmap-types": "workspace:^",
36-
"serialize-error": "^11.0.3",
37-
"socket.io-client": "^4.7.5"
36+
"serialize-error": "^12.0.0",
37+
"socket.io-client": "^4.8.1"
3838
},
3939
"devDependencies": {
40-
"@types/geojson": "^7946.0.14",
41-
"rimraf": "^5.0.5",
42-
"typescript": "^5.4.4",
43-
"vite": "^5.2.8",
44-
"vite-plugin-dts": "^3.8.2"
40+
"@types/geojson": "^7946.0.16",
41+
"rimraf": "^6.0.1",
42+
"typescript": "^5.7.3",
43+
"vite": "^6.2.0",
44+
"vite-plugin-dts": "^4.5.0"
4545
}
4646
}

client/src/client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { io, type ManagerOptions, type Socket as SocketIO, type SocketOptions } from "socket.io-client";
22
import { type Bbox, type BboxWithZoom, type CRU, type EventHandler, type EventName, type FindOnMapQuery, type FindMapsQuery, type FindMapsResult, type FindQuery, type GetMapQuery, type HistoryEntry, type ID, type Line, type LineExportRequest, type LineTemplateRequest, type LineToRouteCreate, type SocketEvents, type Marker, type MultipleEvents, type ObjectWithId, type MapData, type MapId, type PagedResults, type SocketRequest, type SocketRequestName, type SocketResponse, type Route, type RouteClear, type RouteCreate, type RouteExportRequest, type RouteInfo, type RouteRequest, type SearchResult, type SocketVersion, type TrackPoint, type Type, type View, type Writable, type SocketClientToServerEvents, type SocketServerToClientEvents, type LineTemplate, type LinePointsEvent, MapNotFoundError, type SetLanguageRequest } from "facilmap-types";
3-
import { deserializeError, errorConstructors, serializeError } from "serialize-error";
3+
import { addKnownErrorConstructor, deserializeError, serializeError } from "serialize-error";
44

55
export interface ClientEventsInterface extends SocketEvents<SocketVersion.V3> {
66
connect: [];
@@ -68,7 +68,9 @@ interface ClientData {
6868
routes: Record<string, RouteWithTrackPoints>;
6969
}
7070

71-
errorConstructors.set("MapNotFoundError", MapNotFoundError as any);
71+
// Workaround for https://github.com/sindresorhus/serialize-error/issues/106
72+
Object.defineProperty(MapNotFoundError, "name", { value: "MapNotFoundError" });
73+
addKnownErrorConstructor(MapNotFoundError);
7274

7375
class Client {
7476
private socket: SocketIO<SocketServerToClientEvents<SocketVersion.V3>, SocketClientToServerEvents<SocketVersion.V3>>;

.eslintrc.cjs renamed to eslint.config.mjs

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,45 @@
1-
/** @type {import('eslint').Linter.Config} */
2-
module.exports = {
3-
root: true,
4-
ignorePatterns: ["**/dist/*", "**/out/*", "**/out.*/*", "**/vite.config.ts.timestamp-*.mjs"],
5-
parserOptions: {
6-
parser: "@typescript-eslint/parser",
7-
project: ["*/tsconfig.json", "*/tsconfig.node.json"],
8-
extraFileExtensions: [".vue"]
9-
},
10-
plugins: ["@typescript-eslint", "import"],
1+
import tseslint from "typescript-eslint";
2+
import importPlugin from "eslint-plugin-import";
3+
import vuePlugin from "eslint-plugin-vue";
4+
import globals from "globals";
5+
6+
export default tseslint.config({
7+
ignores: ["**/dist/*", "**/out/*", "**/out.*/*", "**/vite.config.ts.timestamp-*.mjs", "docs/**/*"],
8+
}, {
119
extends: [
12-
"plugin:import/typescript",
13-
"plugin:vue/vue3-essential"
10+
tseslint.configs.base,
11+
{ ...importPlugin.flatConfigs.recommended, rules: {} },
12+
importPlugin.flatConfigs.typescript,
13+
...vuePlugin.configs['flat/essential']
1414
],
15-
overrides: [
16-
{
17-
extends: ["plugin:@typescript-eslint/disable-type-checked"],
18-
files: ["**/*.js", "**/*.cjs"]
15+
16+
files: ['**/*.{js,mjs,cjs,ts,mts,cts,vue}'],
17+
18+
languageOptions: {
19+
globals: globals.browser, // ...globals.node,
20+
parserOptions: {
21+
parser: tseslint.parser,
22+
tsconfigRootDir: import.meta.dirname,
23+
project: ["*/tsconfig.json", "*/tsconfig.node.json"],
24+
extraFileExtensions: [".vue"]
1925
}
20-
],
21-
env: {
22-
node: true
2326
},
27+
28+
settings: {
29+
"import/resolver": {
30+
"typescript": {
31+
"project": ["tsconfig.json", "*/tsconfig.json"],
32+
}
33+
},
34+
},
35+
2436
rules: {
2537
"@typescript-eslint/explicit-module-boundary-types": ["warn", { "allowArgumentsExplicitlyTypedAsAny": true }],
2638
"import/no-unresolved": ["error", { "ignore": [ "geojson", "virtual:icons" ], "caseSensitive": true }],
2739
"import/no-extraneous-dependencies": ["error"],
2840
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }],
2941
"import/no-named-as-default": ["warn"],
3042
"import/no-duplicates": ["warn"],
31-
"import/namespace": ["error"],
3243
"import/default": ["error"],
3344
"@typescript-eslint/no-extra-non-null-assertion": ["error"],
3445
"@typescript-eslint/no-non-null-asserted-optional-chain": ["error"],
@@ -94,11 +105,9 @@ module.exports = {
94105
"use-isnan": ["error"],
95106
"valid-typeof": ["error"]
96107
},
97-
"settings": {
98-
"import/resolver": {
99-
"typescript": {
100-
"project": ["tsconfig.json", "*/tsconfig.json"],
101-
}
102-
},
103-
}
104-
};
108+
}, {
109+
files: ["**/*.{js,cjs,mjs}"],
110+
extends: [
111+
tseslint.configs.disableTypeChecked
112+
]
113+
});

frontend/build.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { InlineConfig, ViteDevServer } from "vite";
22

33
export const paths: {
4-
root: string;
5-
dist: string;
6-
base: string;
7-
mapEntry: string;
8-
mapEjs: string;
9-
tableEntry: string;
10-
tableEjs: string;
11-
viteManifest: string;
12-
pwaManifest: string;
13-
opensearchXmlEjs: string;
4+
root: string;
5+
dist: string;
6+
base: string;
7+
mapEntry: string;
8+
mapEjs: string;
9+
tableEntry: string;
10+
tableEjs: string;
11+
viteManifest: string;
12+
pwaManifest: string;
13+
opensearchXmlEjs: string;
1414
};
1515

1616
export function serve(inlineConfig?: InlineConfig): Promise<ViteDevServer>;

frontend/build.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ const root = dirname(fileURLToPath(import.meta.url));
66
const dist = `${root}/dist/app`;
77

88
export const paths = {
9-
root,
10-
dist,
11-
base: '/_app/',
12-
mapEntry: "src/map/map.ts",
13-
mapEjs: `${root}/src/map/map.ejs`,
14-
tableEntry: "src/table/table.ts",
15-
tableEjs: `${root}/src/table/table.ejs`,
16-
viteManifest: `${dist}/.vite/manifest.json`,
17-
pwaManifest: `${root}/src/manifest.json`,
18-
opensearchXmlEjs: `${root}/src/opensearch.xml.ejs`,
9+
root,
10+
dist,
11+
base: '/_app/',
12+
mapEntry: "src/map/map.ts",
13+
mapEjs: `${root}/src/map/map.ejs`,
14+
tableEntry: "src/table/table.ts",
15+
tableEjs: `${root}/src/table/table.ejs`,
16+
viteManifest: `${dist}/.vite/manifest.json`,
17+
pwaManifest: `${root}/src/manifest.json`,
18+
opensearchXmlEjs: `${root}/src/opensearch.xml.ejs`,
1919
};
2020

2121
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
2222
export async function serve(inlineConfig = {}) {
23-
return await createServer({
24-
root,
25-
...inlineConfig
26-
});
23+
return await createServer({
24+
root,
25+
...inlineConfig
26+
});
2727
}

frontend/package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
"check-types": "vue-tsc -b --emitDeclarationOnly"
4040
},
4141
"dependencies": {
42-
"@ckpack/vue-color": "^1.5.0",
43-
"@tmcw/togeojson": "^5.8.1",
44-
"@vitejs/plugin-vue": "^5.0.4",
45-
"@zip.js/zip.js": "^2.7.47",
42+
"@ckpack/vue-color": "^1.6.0",
43+
"@tmcw/togeojson": "^6.0.1",
44+
"@vitejs/plugin-vue": "^5.2.1",
45+
"@zip.js/zip.js": "^2.7.57",
4646
"blob": "^0.1.0",
4747
"bootstrap": "^5.3.3",
4848
"copy-to-clipboard": "^3.3.3",
@@ -52,51 +52,51 @@
5252
"facilmap-types": "workspace:^",
5353
"facilmap-utils": "workspace:^",
5454
"file-saver": "^2.0.5",
55-
"i18next": "^23.11.1",
55+
"i18next": "^24.2.2",
5656
"jquery": "^3.7.1",
5757
"js-cookie": "^3.0.5",
5858
"leaflet": "^1.9.4",
59-
"leaflet-draggable-lines": "^3.0.0",
59+
"leaflet-draggable-lines": "^3.2.1",
6060
"leaflet-graphicscale": "^0.0.4",
6161
"leaflet-mouse-position": "^1.2.0",
6262
"leaflet.heightgraph": "^1.4.0",
63-
"leaflet.locatecontrol": "^0.79.0",
63+
"leaflet.locatecontrol": "^0.83.1",
6464
"lodash-es": "^4.17.21",
6565
"markdown": "^0.5.0",
6666
"mitt": "^3.0.1",
6767
"osmtogeojson": "^3.0.0-beta.5",
6868
"p-debounce": "^4.0.0",
69-
"p-throttle": "^6.1.0",
69+
"p-throttle": "^7.0.0",
7070
"pluralize": "^8.0.0",
7171
"popper-max-size-modifier": "^0.2.0",
72-
"qrcode.vue": "^3.4.1",
73-
"tablesorter": "^2.31.3",
74-
"vite": "^5.2.8",
75-
"vite-plugin-css-injected-by-js": "^3.5.0",
76-
"vite-plugin-dts": "^3.8.2",
77-
"vue": "^3.4.21",
72+
"qrcode.vue": "^3.6.0",
73+
"tablesorter": "^2.32.0",
74+
"vite": "^6.2.0",
75+
"vite-plugin-css-injected-by-js": "^3.5.2",
76+
"vite-plugin-dts": "^4.5.0",
77+
"vue": "^3.5.13",
7878
"vuedraggable": "^4.1.0",
79-
"zod": "^3.22.4"
79+
"zod": "^3.24.2"
8080
},
8181
"devDependencies": {
8282
"@types/bootstrap": "^5.2.10",
8383
"@types/decode-uri-component": "^0.2.2",
8484
"@types/file-saver": "^2.0.7",
85-
"@types/jquery": "^3.5.29",
85+
"@types/jquery": "^3.5.32",
8686
"@types/js-cookie": "^3.0.6",
87-
"@types/leaflet": "^1.9.9",
87+
"@types/leaflet": "^1.9.16",
8888
"@types/leaflet-mouse-position": "^1.2.4",
89-
"@types/leaflet.locatecontrol": "^0.74.4",
89+
"@types/leaflet.locatecontrol": "^0.82.0",
9090
"@types/lodash-es": "^4.17.12",
9191
"@types/pluralize": "^0.0.33",
92-
"happy-dom": "^14.7.1",
93-
"rimraf": "^5.0.5",
94-
"sass": "^1.74.1",
95-
"svgo": "^3.2.0",
96-
"tsx": "^4.7.2",
97-
"typescript": "^5.4.4",
98-
"vite-tsconfig-paths": "^4.3.2",
99-
"vitest": "^1.4.0",
100-
"vue-tsc": "^2.0.11"
92+
"happy-dom": "^17.1.8",
93+
"rimraf": "^6.0.1",
94+
"sass": "^1.85.1",
95+
"svgo": "^3.3.2",
96+
"tsx": "^4.19.3",
97+
"typescript": "^5.7.3",
98+
"vite-tsconfig-paths": "^5.1.4",
99+
"vitest": "^3.0.7",
100+
"vue-tsc": "^2.2.4"
101101
}
102102
}

frontend/src/lib/components/leaflet-map/leaflet-map-components.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type Ref, ref, watch, markRaw, reactive, watchEffect, shallowRef, shall
22
import { Control, latLng, latLngBounds, type Map, map as leafletMap, DomUtil, control } from "leaflet";
33
import "leaflet/dist/leaflet.css";
44
import { BboxHandler, getIconHtml, getVisibleLayers, HashHandler, LinesLayer, MarkersLayer, SearchResultsLayer, OverpassLayer, OverpassLoadStatus, displayView, getInitialView, coreIconList, defaultVisibleLayers } from "facilmap-leaflet";
5-
import "leaflet.locatecontrol";
5+
import { LocateControl, type LocateOptions } from "leaflet.locatecontrol";
66
import "leaflet.locatecontrol/dist/L.Control.Locate.css";
77
import "leaflet-graphicscale";
88
import "leaflet-graphicscale/dist/Leaflet.GraphicScale.min.css";
@@ -195,7 +195,7 @@ function useLinesLayer(map: Ref<Map>, client: Ref<ClientContext>): Ref<Raw<Lines
195195
);
196196
}
197197

198-
function useLocateControl(map: Ref<Map>, context: FacilMapContext): Ref<Raw<Control.Locate> | undefined> {
198+
function useLocateControl(map: Ref<Map>, context: FacilMapContext): Ref<Raw<LocateControl> | undefined> {
199199
return useMapComponent(
200200
map,
201201
() => {
@@ -206,7 +206,7 @@ function useLocateControl(map: Ref<Map>, context: FacilMapContext): Ref<Raw<Cont
206206

207207
let screenshotIconHtmlP = getIconHtml("currentColor", "1.5em", "screenshot");
208208

209-
const locateControl = control.locate({
209+
const locateControl = new LocateControl({
210210
flyTo: true,
211211
markerStyle: { pane: "fm-raised-marker", zIndexOffset: 10000 },
212212
locateOptions: {
@@ -215,7 +215,7 @@ function useLocateControl(map: Ref<Map>, context: FacilMapContext): Ref<Raw<Cont
215215
clickBehavior: {
216216
inView: "stop",
217217
outOfView: "setView",
218-
inViewNotFollowing: "outOfView"
218+
inViewNotFollowing: "setView"
219219
},
220220
setView: "untilPan",
221221
keepCurrentZoomLevel: false,
@@ -224,7 +224,7 @@ function useLocateControl(map: Ref<Map>, context: FacilMapContext): Ref<Raw<Cont
224224
icon: "fm-locate-control-icon",
225225
iconLoading: "fm-locate-control-icon-loading",
226226
createButtonCallback: (container, options) => {
227-
const { link, icon } = (Control.Locate.prototype.options as Control.LocateOptions).createButtonCallback!(container, options) as any as { link: HTMLElement; icon: HTMLElement };
227+
const { link, icon } = (LocateControl.prototype.options as LocateOptions).createButtonCallback!(container, options) as any as { link: HTMLAnchorElement; icon: HTMLElement };
228228
screenshotIconHtmlP.then((iconHtml) => {
229229
icon.innerHTML = iconHtml;
230230
}).catch(console.error);

frontend/src/lib/components/ui/attribute-preserving-element.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
}
6868
});
6969
70-
const attrs = useAttrs();
70+
const attrs: Record<string, unknown> = useAttrs();
7171
7272
const attributes = computed(() => Object.fromEntries([
7373
...Object.entries(manualAttributes.value).filter(([k, v]) => !ownAttributeNames.has(k)),
@@ -77,7 +77,7 @@
7777
const className = computed(() => [
7878
...manualClassNames.value.filter((c) => !ownClassNames.has(c)),
7979
props.class ?? ''
80-
].join(' '));
80+
]);
8181
8282
defineExpose({
8383
elementRef

frontend/src/lib/components/ui/modal-dialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
tag="div"
8787
class="modal fade fm-modal"
8888
:class="[
89-
props.size !== 'default' ? `modal-${props.size}` : undefined,
90-
props.class
89+
props.size !== 'default' ? `modal-${props.size}` : '',
90+
props.class ?? ''
9191
]"
9292
tabindex="-1"
9393
aria-hidden="true"

frontend/src/lib/utils/box-selection.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ export default class BoxSelection extends Map.BoxZoom {
4141

4242
}
4343

44-
// eslint-disable-next-line no-redeclare
4544
export default interface BoxSelection extends Evented {}
4645
Object.assign(BoxSelection.prototype, Evented.prototype);

0 commit comments

Comments
 (0)