Skip to content

Commit

Permalink
chore: updates dependencies (#235)
Browse files Browse the repository at this point in the history
* chore: update combobox-nav package

* chore: updates all dependencies
  • Loading branch information
mikaelbr authored Feb 23, 2024
1 parent 6f89a59 commit f9f1971
Show file tree
Hide file tree
Showing 7 changed files with 1,066 additions and 2,022 deletions.
75 changes: 38 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,76 +23,77 @@
"postinstall": "patch-package"
},
"dependencies": {
"@apollo/client": "^3.8.8",
"@atb-as/config-specs": "^3.13.1",
"@apollo/client": "^3.9.5",
"@atb-as/config-specs": "^3.15.0",
"@atb-as/theme": "^8.0.0",
"@github/combobox-nav": "^2.3.0",
"@github/combobox-nav": "^2.3.1",
"@isaacs/ttlcache": "^1.4.1",
"@leile/lobo-t": "^1.0.5",
"@mapbox/polyline": "^1.2.1",
"@react-aria/focus": "^3.15.0",
"@react-aria/focus": "^3.16.2",
"@react-hook/resize-observer": "^1.2.6",
"@turf/turf": "5.1.6",
"@turf/centroid": "^7.0.0-alpha.113",
"bunyan": "^1.8.15",
"compare-versions": "^6.1.0",
"cookies-next": "^4.1.0",
"cookies-next": "^4.1.1",
"cors": "^2.8.5",
"date-fns": "^2.30.0",
"date-fns": "^3.3.1",
"detect-nearest-browser-locale": "^19.0.0",
"detect-nearest-locale": "^1.0.1",
"downshift": "^8.2.3",
"firebase": "^10.7.1",
"framer-motion": "^10.16.16",
"downshift": "^8.3.2",
"firebase": "^10.8.0",
"framer-motion": "^11.0.6",
"graphql": "^16.8.1",
"haversine-distance": "^1.2.1",
"humanize-duration": "^3.31.0",
"lodash": "^4.17.21",
"lz-string": "^1.5.0",
"mapbox-gl": "^3.0.1",
"next": "14.0.4",
"mapbox-gl": "^3.1.2",
"next": "14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-syntax-highlighter": "^15.5.0",
"swr": "^2.2.2",
"swr": "^2.2.5",
"uuid": "^9.0.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@atb-as/generate-assets": "^9.9.0",
"@graphql-codegen/cli": "^5.0.0",
"@atb-as/generate-assets": "^10.0.0",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-generic-sdk": "^4.0.0",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@playwright/test": "^1.41.1",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@graphql-codegen/typescript": "^4.0.6",
"@graphql-codegen/typescript-generic-sdk": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.2.0",
"@playwright/test": "^1.41.2",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/bunyan": "^1.8.11",
"@types/cors": "^2.8.17",
"@types/humanize-duration": "^3.27.3",
"@types/humanize-duration": "^3.27.4",
"@types/lodash": "^4.14.202",
"@types/mapbox-gl": "^2.7.19",
"@types/mapbox-gl": "^3.1.0",
"@types/mapbox__polyline": "^1.0.5",
"@types/node": "20.10.4",
"@types/react": "18.2.43",
"@types/react-dom": "18.2.17",
"@types/node": "20.11.20",
"@types/react": "18.2.58",
"@types/react-dom": "18.2.19",
"@types/react-syntax-highlighter": "^15.5.11",
"@types/uuid": "^9.0.7",
"@types/uuid": "^9.0.8",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "8.55.0",
"eslint-config-next": "14.0.4",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "8.56.0",
"eslint-config-next": "14.1.0",
"graphql-tag": "^2.12.6",
"happy-dom": "^12.10.3",
"next-router-mock": "^0.9.10",
"happy-dom": "^13.4.1",
"next-router-mock": "^0.9.12",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"rimraf": "^5.0.1",
"typescript": "5.3.3",
"vite": "^5.0.7",
"vite-plugin-dts": "^3.6.4",
"vitest": "^1.0.4"
"vite": "^5.1.4",
"vite-plugin-dts": "^3.7.3",
"vitest": "^1.3.1"
}
}
31 changes: 31 additions & 0 deletions patches/@github+combobox-nav+2.3.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/node_modules/@github/combobox-nav/dist/index.js b/node_modules/@github/combobox-nav/dist/index.js
index 977da72..8bc4667 100644
--- a/node_modules/@github/combobox-nav/dist/index.js
+++ b/node_modules/@github/combobox-nav/dist/index.js
@@ -34,7 +34,7 @@ export default class Combobox {
this.input.addEventListener('compositionend', this.compositionEventHandler);
this.input.addEventListener('input', this.inputHandler);
this.input.addEventListener('keydown', this.keyboardEventHandler);
- this.list.addEventListener('click', commitWithElement);
+ this.list.addEventListener('mousedown', commitWithElement);
this.indicateDefaultOption();
}
stop() {
@@ -44,7 +44,7 @@ export default class Combobox {
this.input.removeEventListener('compositionend', this.compositionEventHandler);
this.input.removeEventListener('input', this.inputHandler);
this.input.removeEventListener('keydown', this.keyboardEventHandler);
- this.list.removeEventListener('click', commitWithElement);
+ this.list.removeEventListener('mousedown', commitWithElement);
}
indicateDefaultOption() {
var _a;
@@ -155,7 +155,7 @@ function commit(input, list) {
return false;
if (target.getAttribute('aria-disabled') === 'true')
return true;
- target.click();
+ fireCommitEvent(target)
return true;
}
function fireCommitEvent(target, detail) {
2 changes: 1 addition & 1 deletion src/components/map/use-map-tariff-zones.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from 'react';
import { Language, useTranslation } from '@atb/translations';
import mapboxgl, { AnyLayer } from 'mapbox-gl';
import { getReferenceDataName } from '@atb/utils/reference-data';
import { centroid } from '@turf/turf';
import { centroid } from '@turf/centroid';
import { type TariffZone, getTariffZones } from '@atb/modules/firebase';
import useSWR from 'swr';
import { addLayerIfNotExists, addSourceIfNotExists } from '.';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/firebase/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { z } from 'zod';
export const tariffZoneSchema = z.object({
geometry: z.object({
coordinates: z.array(z.array(z.array(z.number()))),
type: z.string(),
type: z.literal('Polygon'),
}),
id: z.string(),
name: languageAndTextSchema,
Expand Down
6 changes: 2 additions & 4 deletions src/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
differenceInSeconds,
differenceInCalendarDays,
} from 'date-fns';
import en from 'date-fns/locale/en-GB';
import nb from 'date-fns/locale/nb';
import nn from 'date-fns/locale/nn';
import { enGB, nb, nn } from 'date-fns/locale';
import humanizeDuration from 'humanize-duration';
import { DEFAULT_LANGUAGE, Language } from '../translations';
import dictionary from '@atb/translations/dictionary';
Expand Down Expand Up @@ -161,7 +159,7 @@ const languageToLocale = (language: Language): Locale => {
case Language.Norwegian:
return nb;
case Language.English:
return en;
return enGB;
case Language.Nynorsk:
return nn;
}
Expand Down
8 changes: 5 additions & 3 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import path from 'path';

export default defineConfig({
plugins: [react()],
// @TODO There is an issue with typing in this version, so we need to cast it to any
plugins: [react() as any],

test: {
globalSetup: './src/tests/global-setup.ts',
setupFiles: './src/tests/setup.ts',
environment: 'happy-dom',
exclude: ['e2e-tests/**', '**/node_modules/**'],
},

resolve: {
alias: {
'@atb': path.resolve(__dirname, './src'),
Expand Down
Loading

0 comments on commit f9f1971

Please sign in to comment.