Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

(chore) Update dependencies (#408)

Andrii Romasiun0d3caacf2625
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 8d4e55f88..e3de74518 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
- node-version: [20.3.x]
+ node-version: [20.12.x]
steps:
- name: Checkout Repository
diff --git a/.nvmrc b/.nvmrc
index 695100c78..5802c69cb 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-20.3.0
\ No newline at end of file
+20.12.2
\ No newline at end of file
diff --git a/Dockerfile.fly b/Dockerfile.fly
index 598baef4e..e1c05f476 100644
--- a/Dockerfile.fly
+++ b/Dockerfile.fly
@@ -1,5 +1,5 @@
# base node image
-FROM node:18-bullseye-slim as base
+FROM node:20-bullseye-slim as base
# Install openssl for Prisma
RUN apt-get update && apt-get install -y openssl
diff --git a/app/entry.client.tsx b/app/entry.client.tsx
index 59c355509..cf19f8326 100644
--- a/app/entry.client.tsx
+++ b/app/entry.client.tsx
@@ -6,7 +6,7 @@ import i18next from 'i18next'
import { I18nextProvider, initReactI18next } from 'react-i18next'
import LanguageDetector from 'i18next-browser-languagedetector'
import HTTPBackend from 'i18next-http-backend'
-import { getInitialNamespaces } from 'remix-i18next'
+import { getInitialNamespaces } from 'remix-i18next/client'
import i18n from './i18n'
async function hydrate() {
diff --git a/app/entry.server.tsx b/app/entry.server.tsx
index 8fe92c2b7..ae4ee5234 100644
--- a/app/entry.server.tsx
+++ b/app/entry.server.tsx
@@ -3,10 +3,10 @@ import { PassThrough } from 'node:stream'
import { resolve as feResolve } from 'node:path'
import { createInstance } from 'i18next'
import { I18nextProvider, initReactI18next } from 'react-i18next'
+import { createReadableStreamFromReadable } from '@remix-run/node'
import FSBackend from 'i18next-fs-backend'
-import { Response } from '@remix-run/node'
import { RemixServer } from '@remix-run/react'
-import isbot from 'isbot'
+import { isbot } from 'isbot'
import { renderToPipeableStream } from 'react-dom/server'
import { createSitemapGenerator } from 'remix-sitemap'
@@ -29,6 +29,7 @@ export default async function handleRequest(
remixContext: EntryContext,
) {
if (isSitemapUrl(request)) {
+ // @ts-ignore
const stm = await sitemap(request, remixContext)
return stm
}
@@ -61,9 +62,12 @@ export default async function handleRequest(
{
[callbackName]: () => {
const body = new PassThrough()
+ const stream = createReadableStreamFromReadable(body)
+
responseHeaders.set('Content-Type', 'text/html')
+
resolve(
- new Response(body, {
+ new Response(stream, {
headers: responseHeaders,
status: didError ? 500 : responseStatusCode,
}),
diff --git a/app/i18next.server.ts b/app/i18next.server.ts
index 8b3111f0b..1ea7b6447 100644
--- a/app/i18next.server.ts
+++ b/app/i18next.server.ts
@@ -1,4 +1,4 @@
-import { RemixI18Next } from 'remix-i18next'
+import { RemixI18Next } from 'remix-i18next/server'
import Backend from 'i18next-fs-backend'
import { resolve } from 'node:path'
import { defaultLanguage, whitelist } from 'redux/constants'
diff --git a/app/pages/Dashboard/Dashboard.tsx b/app/pages/Dashboard/Dashboard.tsx
index f468e27b9..ed3041be4 100644
--- a/app/pages/Dashboard/Dashboard.tsx
+++ b/app/pages/Dashboard/Dashboard.tsx
@@ -1,7 +1,7 @@
/* eslint-disable react/forbid-prop-types */
import React, { memo, useState, useEffect, useMemo } from 'react'
import { Link, useNavigate } from '@remix-run/react'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import cx from 'clsx'
import PropTypes from 'prop-types'
import _isEmpty from 'lodash/isEmpty'
diff --git a/app/pages/MainPage/Pricing.tsx b/app/pages/MainPage/Pricing.tsx
index af2fc38d3..1f0f9f9e4 100644
--- a/app/pages/MainPage/Pricing.tsx
+++ b/app/pages/MainPage/Pricing.tsx
@@ -1,7 +1,7 @@
/* eslint-disable no-confusing-arrow */
import React, { memo, useState, useEffect } from 'react'
import { useSelector, useDispatch } from 'react-redux'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import { Link } from '@remix-run/react'
import { CheckIcon } from '@heroicons/react/24/solid'
import dayjs from 'dayjs'
diff --git a/app/pages/MainPage/index.tsx b/app/pages/MainPage/index.tsx
index 81896270f..dbd438577 100644
--- a/app/pages/MainPage/index.tsx
+++ b/app/pages/MainPage/index.tsx
@@ -3,7 +3,7 @@ import React, { memo } from 'react'
import { useTranslation, Trans } from 'react-i18next'
import cx from 'clsx'
import { useSelector } from 'react-redux'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import {
ArrowTopRightOnSquareIcon,
ArrowSmallRightIcon,
diff --git a/app/pages/Performance/index.tsx b/app/pages/Performance/index.tsx
index 8f85564a4..b34870546 100644
--- a/app/pages/Performance/index.tsx
+++ b/app/pages/Performance/index.tsx
@@ -2,7 +2,7 @@ import { Link } from '@remix-run/react'
import React, { memo } from 'react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import { ArrowTopRightOnSquareIcon, ArrowSmallRightIcon, ChevronRightIcon } from '@heroicons/react/24/solid'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
diff --git a/app/pages/Project/View/ViewProject.tsx b/app/pages/Project/View/ViewProject.tsx
index a3457a275..02fdc5c26 100644
--- a/app/pages/Project/View/ViewProject.tsx
+++ b/app/pages/Project/View/ViewProject.tsx
@@ -1,6 +1,6 @@
/* eslint-disable react/forbid-prop-types, react/no-unstable-nested-components, react/display-name */
import React, { useState, useEffect, useMemo, memo, useRef, useCallback } from 'react'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import useSize from 'hooks/useSize'
import { useNavigate, useParams, Link } from '@remix-run/react'
import bb from 'billboard.js'
diff --git a/app/pages/Project/View/components/Sessions.tsx b/app/pages/Project/View/components/Sessions.tsx
index 90a2d1d56..bc3375559 100644
--- a/app/pages/Project/View/components/Sessions.tsx
+++ b/app/pages/Project/View/components/Sessions.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Link } from '@remix-run/react'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import { ChevronRightIcon } from '@heroicons/react/24/outline'
diff --git a/app/pages/UserSettings/UserSettings.tsx b/app/pages/UserSettings/UserSettings.tsx
index eae2ee4a3..87486c3ba 100644
--- a/app/pages/UserSettings/UserSettings.tsx
+++ b/app/pages/UserSettings/UserSettings.tsx
@@ -1,7 +1,7 @@
/* eslint-disable no-param-reassign, react/forbid-prop-types */
import React, { useState, useEffect, memo, useRef, useMemo } from 'react'
import { useNavigate } from '@remix-run/react'
-import { ClientOnly } from 'remix-utils'
+import { ClientOnly } from 'remix-utils/client-only'
import { useTranslation } from 'react-i18next'
import _size from 'lodash/size'
import _isEmpty from 'lodash/isEmpty'
diff --git a/app/redux/constants/timezones.ts b/app/redux/constants/timezones.ts
new file mode 100644
index 000000000..b85d00959
--- /dev/null
+++ b/app/redux/constants/timezones.ts
@@ -0,0 +1,81 @@
+export default {
+ 'Pacific/Midway': 'Midway Island, Samoa',
+ 'Pacific/Honolulu': 'Hawaii',
+ 'America/Juneau': 'Alaska',
+ 'America/Boise': 'Mountain Time',
+ 'America/Dawson': 'Dawson, Yukon',
+ 'America/Chihuahua': 'Chihuahua, La Paz, Mazatlan',
+ 'America/Phoenix': 'Arizona',
+ 'America/Chicago': 'Central Time',
+ 'America/Regina': 'Saskatchewan',
+ 'America/Mexico_City': 'Guadalajara, Mexico City, Monterrey',
+ 'America/Belize': 'Central America',
+ 'America/Detroit': 'Eastern Time',
+ 'America/Bogota': 'Bogota, Lima, Quito',
+ 'America/Caracas': 'Caracas, La Paz',
+ 'America/Santiago': 'Santiago',
+ 'America/St_Johns': 'Newfoundland and Labrador',
+ 'America/Sao_Paulo': 'Brasilia',
+ 'America/Tijuana': 'Tijuana',
+ 'America/Montevideo': 'Montevideo',
+ 'America/Argentina/Buenos_Aires': 'Buenos Aires, Georgetown',
+ 'America/Godthab': 'Greenland',
+ 'America/Los_Angeles': 'Pacific Time',
+ 'Atlantic/Azores': 'Azores',
+ 'Atlantic/Cape_Verde': 'Cape Verde Islands',
+ GMT: 'UTC',
+ 'Europe/London': 'Edinburgh, London',
+ 'Europe/Dublin': 'Dublin',
+ 'Europe/Lisbon': 'Lisbon',
+ 'Africa/Casablanca': 'Casablanca, Monrovia',
+ 'Atlantic/Canary': 'Canary Islands',
+ 'Europe/Belgrade': 'Belgrade, Bratislava, Budapest, Ljubljana, Prague',
+ 'Europe/Sarajevo': 'Sarajevo, Skopje, Warsaw, Zagreb',
+ 'Europe/Brussels': 'Brussels, Copenhagen, Madrid, Paris',
+ 'Europe/Amsterdam': 'Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',
+ 'Africa/Algiers': 'West Central Africa',
+ 'Europe/Bucharest': 'Bucharest',
+ 'Africa/Cairo': 'Cairo',
+ 'Europe/Helsinki': 'Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius',
+ 'Europe/Athens': 'Athens',
+ 'Asia/Jerusalem': 'Jerusalem',
+ 'Africa/Harare': 'Harare, Pretoria',
+ 'Europe/Moscow': 'Istanbul, Minsk, Moscow, St. Petersburg, Volgograd',
+ 'Asia/Kuwait': 'Kuwait, Riyadh',
+ 'Africa/Nairobi': 'Nairobi',
+ 'Asia/Baghdad': 'Baghdad',
+ 'Asia/Tehran': 'Tehran',
+ 'Asia/Dubai': 'Abu Dhabi, Muscat',
+ 'Asia/Baku': 'Baku, Tbilisi, Yerevan',
+ 'Asia/Kabul': 'Kabul',
+ 'Asia/Yekaterinburg': 'Ekaterinburg',
+ 'Asia/Karachi': 'Islamabad, Karachi, Tashkent',
+ 'Asia/Kolkata': 'Chennai, Kolkata, Mumbai, New Delhi',
+ 'Asia/Kathmandu': 'Kathmandu',
+ 'Asia/Dhaka': 'Astana, Dhaka',
+ 'Asia/Colombo': 'Sri Jayawardenepura',
+ 'Asia/Almaty': 'Almaty, Novosibirsk',
+ 'Asia/Rangoon': 'Yangon Rangoon',
+ 'Asia/Bangkok': 'Bangkok, Hanoi, Jakarta',
+ 'Asia/Krasnoyarsk': 'Krasnoyarsk',
+ 'Asia/Shanghai': 'Beijing, Chongqing, Hong Kong SAR, Urumqi',
+ 'Asia/Kuala_Lumpur': 'Kuala Lumpur, Singapore',
+ 'Asia/Taipei': 'Taipei',
+ 'Australia/Perth': 'Perth',
+ 'Asia/Irkutsk': 'Irkutsk, Ulaanbaatar',
+ 'Asia/Seoul': 'Seoul',
+ 'Asia/Tokyo': 'Osaka, Sapporo, Tokyo',
+ 'Asia/Yakutsk': 'Yakutsk',
+ 'Australia/Darwin': 'Darwin',
+ 'Australia/Adelaide': 'Adelaide',
+ 'Australia/Sydney': 'Canberra, Melbourne, Sydney',
+ 'Australia/Brisbane': 'Brisbane',
+ 'Australia/Hobart': 'Hobart',
+ 'Asia/Vladivostok': 'Vladivostok',
+ 'Pacific/Guam': 'Guam, Port Moresby',
+ 'Asia/Magadan': 'Magadan, Solomon Islands, New Caledonia',
+ 'Asia/Kamchatka': 'Kamchatka, Marshall Islands',
+ 'Pacific/Fiji': 'Fiji Islands',
+ 'Pacific/Auckland': 'Auckland, Wellington',
+ 'Pacific/Tongatapu': "Nuku'alofa",
+}
diff --git a/app/root.tsx b/app/root.tsx
index b3542a80d..bd52635d6 100644
--- a/app/root.tsx
+++ b/app/root.tsx
@@ -24,7 +24,7 @@ import BillboardCss from 'billboard.js/dist/billboard.min.css'
import AlertTemplate from 'ui/Alert'
import { trackViews } from 'utils/analytics'
-import { useChangeLanguage } from 'remix-i18next'
+import { useChangeLanguage } from 'remix-i18next/react'
import { useTranslation } from 'react-i18next'
import AppWrapper from 'App'
import { detectLanguage } from 'i18n'
diff --git a/app/ui/TimezonePicker.tsx b/app/ui/TimezonePicker.tsx
index e76a878fd..341222e31 100644
--- a/app/ui/TimezonePicker.tsx
+++ b/app/ui/TimezonePicker.tsx
@@ -1,17 +1,17 @@
import React from 'react'
import spacetime from 'spacetime'
import soft from 'timezone-soft'
-import { allTimezones } from 'react-timezone-select'
import { useTranslation } from 'react-i18next'
import PropTypes from 'prop-types'
import _find from 'lodash/find'
import _reduce from 'lodash/reduce'
import _includes from 'lodash/includes'
+import timezones from 'redux/constants/timezones'
import Select from './Select'
const options = _reduce(
- Object.entries(allTimezones),
+ Object.entries(timezones),
(selectOptions: any[], zone) => {
const now = spacetime.now(zone[0])
const tz = now.timezone()
diff --git a/app/utils/analytics.ts b/app/utils/analytics.ts
index ef5ef00e8..bda392f31 100644
--- a/app/utils/analytics.ts
+++ b/app/utils/analytics.ts
@@ -63,7 +63,6 @@ const checkIgnore = (path: string | undefined | null, ignore: RegExp[]) => {
return false
}
-
const getNewPath = (path: string | undefined | null) => {
if (!path) {
return path
@@ -84,7 +83,6 @@ Swetrix.init(SWETRIX_PID, {
devMode: isDevelopment,
})
-
const trackViews = () => {
if (!isSelfhosted) {
Swetrix.trackViews({
diff --git a/package.json b/package.json
index 1e1ed3ad8..fa7dd9c76 100644
--- a/package.json
+++ b/package.json
@@ -20,60 +20,58 @@
},
"dependencies": {
"@blaumaus/react-alert": "^7.0.5",
- "@headlessui/react": "^1.7.17",
- "@heroicons/react": "^2.0.18",
- "@nivo/core": "^0.83.0",
- "@nivo/sankey": "^0.83.0",
+ "@headlessui/react": "^1.7.19",
+ "@heroicons/react": "^2.1.3",
+ "@nivo/core": "^0.85.1",
+ "@nivo/sankey": "^0.85.1",
"@reduxjs/toolkit": "^1.9.7",
- "@remix-run/node": "^1.19.3",
- "@remix-run/react": "^1.19.3",
- "@remix-run/serve": "^1.19.3",
- "@remix-run/v1-route-convention": "^0.1.2",
+ "@remix-run/node": "^2.8.1",
+ "@remix-run/react": "^2.8.1",
+ "@remix-run/serve": "^2.8.1",
+ "@remix-run/v1-route-convention": "^0.1.4",
"@swetrix/sdk": "^1.1.0",
- "@tailwindcss/forms": "^0.5.6",
- "@testing-library/jest-dom": "^6.1.4",
- "axios": "^1.5.1",
+ "@tailwindcss/forms": "^0.5.7",
+ "@testing-library/jest-dom": "^6.4.2",
+ "axios": "^1.6.8",
"axios-auth-refresh": "^3.3.6",
"babel-jest": "^29.7.0",
- "billboard.js": "^3.10.0",
- "clsx": "^2.0.0",
- "d3": "^7.8.5",
- "dangerously-set-html-content": "^1.0.13",
+ "billboard.js": "^3.11.3",
+ "clsx": "^2.1.0",
+ "d3": "^7.9.0",
+ "dangerously-set-html-content": "^1.1.0",
"dayjs": "^1.11.10",
"debug": "^4.3.4",
"file-saver": "^2.0.5",
"flatpickr": "^4.6.13",
- "i18n-iso-countries": "^7.7.0",
- "i18next": "^23.6.0",
- "i18next-browser-languagedetector": "^7.1.0",
- "i18next-fs-backend": "^2.2.0",
- "i18next-http-backend": "^2.3.0",
- "isbot": "^3.7.0",
+ "i18n-iso-countries": "^7.11.0",
+ "i18next": "^23.11.2",
+ "i18next-browser-languagedetector": "^7.2.1",
+ "i18next-fs-backend": "^2.3.1",
+ "i18next-http-backend": "^2.5.1",
+ "isbot": "^5.1.4",
"jszip": "^3.10.1",
"lodash": "^4.17.21",
- "marked": "^9.1.2",
+ "marked": "^12.0.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-flagkit": "^2.0.4",
"react-flatpickr": "^3.10.13",
"react-hotkeys-hook": "^4.5.0",
- "react-i18next": "^13.3.1",
+ "react-i18next": "^14.1.0",
"react-outside-click-handler": "^1.3.0",
"react-qr-code": "^2.0.12",
- "react-redux": "^8.1.3",
- "react-select": "^5.7.7",
- "react-timezone-select": "^2.1.2",
+ "react-redux": "^9.1.1",
"react-type-animation": "^3.2.0",
- "redux": "^4.2.1",
- "redux-saga": "^1.2.3",
- "remix-i18next": "^5.4.0",
- "remix-sitemap": "^2.2.7",
- "remix-utils": "^6.6.0",
- "spacetime": "^7.4.8",
+ "redux": "^5.0.1",
+ "redux-saga": "^1.3.0",
+ "remix-i18next": "^6.1.0",
+ "remix-sitemap": "^3.2.0",
+ "remix-utils": "^7.6.0",
+ "spacetime": "^7.6.0",
"swetrix": "^3.0.3",
- "timezone-soft": "^1.4.1",
- "ts-jest": "^29.1.1"
+ "timezone-soft": "^1.5.2",
+ "ts-jest": "^29.1.2"
},
"eslintConfig": {
"extends": [
@@ -142,38 +140,38 @@
]
},
"devDependencies": {
- "@remix-run/dev": "^1.19.3",
- "@remix-run/eslint-config": "^1.19.3",
- "@tailwindcss/typography": "^0.5.10",
- "@testing-library/react": "^14.0.0",
- "@types/debug": "^4.1.10",
- "@types/jest": "^29.5.6",
- "@types/lodash": "^4.14.200",
- "@types/node": "^20.8.9",
- "@types/prop-types": "^15.7.9",
- "@types/react": "^18.2.32",
- "@types/react-dom": "^18.2.14",
- "@types/react-flatpickr": "^3.8.10",
- "@types/react-test-renderer": "^18.0.5",
- "@types/redux-mock-store": "^1.0.5",
+ "@remix-run/dev": "^2.8.1",
+ "@remix-run/eslint-config": "^2.8.1",
+ "@tailwindcss/typography": "^0.5.12",
+ "@testing-library/react": "^15.0.2",
+ "@types/debug": "^4.1.12",
+ "@types/jest": "^29.5.12",
+ "@types/lodash": "^4.17.0",
+ "@types/node": "^20.12.7",
+ "@types/prop-types": "^15.7.12",
+ "@types/react": "^18.2.79",
+ "@types/react-dom": "^18.2.25",
+ "@types/react-flatpickr": "^3.8.11",
+ "@types/react-test-renderer": "^18.0.7",
+ "@types/redux-mock-store": "^1.0.6",
"@types/testing-library__jest-dom": "^5.14.9",
- "@typescript-eslint/parser": "^6.9.0",
- "@typescript-eslint/typescript-estree": "^6.9.0",
- "autoprefixer": "^10.4.16",
+ "@typescript-eslint/parser": "^7.7.0",
+ "@typescript-eslint/typescript-estree": "^7.7.0",
+ "autoprefixer": "^10.4.19",
"cross-env": "^7.0.3",
- "eslint": "^8.52.0",
- "eslint-plugin-jsx-a11y": "^6.7.1",
+ "eslint": "^8.57.0",
+ "eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
- "postcss": "^8.4.31",
- "prettier": "^3.1.1",
+ "postcss": "^8.4.38",
+ "prettier": "^3.2.5",
"resize-observer-polyfill": "^1.5.1",
- "tailwindcss": "^3.3.5",
- "typescript": "^5.2.2"
+ "tailwindcss": "^3.4.3",
+ "typescript": "^5.4.5"
},
"engines": {
- "node": ">=16"
+ "node": ">=20"
}
}
diff --git a/remix.config.js b/remix.config.js
index f8b8344e4..9e72c33b6 100644
--- a/remix.config.js
+++ b/remix.config.js
@@ -10,14 +10,6 @@ module.exports = {
tailwind: true,
postcss: true,
serverModuleFormat: 'cjs',
- future: {
- v2_errorBoundary: true,
- v2_meta: true,
- v2_normalizeFormMethod: true,
- v2_dev: true,
- v2_headers: true,
- v2_routeConvention: true,
- },
serverDependenciesToBundle: [
'axios',
'd3',
@@ -30,6 +22,8 @@ module.exports = {
'robust-predicates',
'marked',
'billboard.js',
+ /^remix-utils.*/,
+ /^remix-i18next.*/,
],
serverMinify: process.env.NODE_ENV === 'production',
routes(defineRoutes) {