Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
083fddf
Bump qs from 6.14.1 to 6.14.2 (#229)
dependabot[bot] Feb 17, 2026
489bef8
Bump svgo from 3.3.2 to 3.3.3 (#233)
dependabot[bot] Mar 5, 2026
e21f50e
Bump shell-quote from 1.8.1 to 1.8.4 (#245)
dependabot[bot] Jul 16, 2026
86e724e
Bump axios from 1.12.0 to 1.16.0 (#244)
dependabot[bot] Jul 16, 2026
d2bb52d
Bump qs from 6.14.2 to 6.15.2 (#243)
dependabot[bot] Jul 16, 2026
7dc9166
Bump postcss from 8.4.45 to 8.5.10 (#239)
dependabot[bot] Jul 16, 2026
b5f112e
Bump @babel/plugin-transform-modules-systemjs from 7.25.0 to 7.29.4 (…
dependabot[bot] Jul 16, 2026
d25bfb0
Translated using Weblate (Portuguese (Brazil))
Mar 11, 2026
63708ae
Added translation using Weblate (Kabyle)
Mar 11, 2026
30cf994
Added translation using Weblate (Serbian)
Mar 12, 2026
cc876d8
Translated using Weblate (Kabyle)
Mar 19, 2026
3706352
Translated using Weblate (Chinese (Simplified Han script))
Mar 24, 2026
5653810
Added translation using Weblate (Japanese)
Apr 3, 2026
47c5699
Translated using Weblate (Japanese)
Apr 3, 2026
ca0fc84
Translated using Weblate (Russian)
Apr 8, 2026
f0dd074
Translated using Weblate (Kabyle)
Apr 9, 2026
6748a6a
Translated using Weblate (German)
Apr 12, 2026
1142ac0
Translated using Weblate (Japanese)
Apr 12, 2026
421c573
Translated using Weblate (Japanese)
Apr 12, 2026
c12bd7e
Translated using Weblate (Turkish)
Apr 18, 2026
23d1e0c
Translated using Weblate (Turkish)
Apr 21, 2026
cb493ba
Translated using Weblate (Kabyle)
Apr 22, 2026
aa93613
Translated using Weblate (Portuguese (Brazil))
Mar 11, 2026
6f6866f
Translated using Weblate (Chinese (Simplified Han script))
Jun 12, 2026
436ea2c
Merge pull request #235 from ooni/weblate
majakomel Jul 16, 2026
7c1792b
Bump js-yaml from 4.1.1 to 4.3.0 (#249)
dependabot[bot] Jul 16, 2026
f596e39
Bump form-data from 4.0.5 to 4.0.6 (#248)
dependabot[bot] Jul 16, 2026
e963f37
Bump ws from 7.5.10 to 7.5.12 (#247)
dependabot[bot] Jul 16, 2026
85b7dcb
Bump @babel/core from 7.25.2 to 7.29.6 (#246)
dependabot[bot] Jul 16, 2026
eb3873e
Upgrade few packages
majakomel Jul 16, 2026
7550d64
Update Next.js version, refactor language support (#250)
majakomel Jul 16, 2026
f589dab
Bump axios from 1.16.0 to 1.18.0 (#252)
dependabot[bot] Jul 21, 2026
5ad0bc6
Bump yaml from 1.10.2 to 1.10.3 (#251)
dependabot[bot] Jul 21, 2026
243b499
Set up redirects for old link path
majakomel Jul 21, 2026
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
10 changes: 9 additions & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ExplorerLogo from 'ooni-components/svgs/logos/OONI-HorizontalMonochromeInverted.svg'
import { useIntl } from 'react-intl'
import Image from 'next/image'

const FooterHead = ({ ...props }) => (
<div className="font-semibold mb-2.5" {...props} />
Expand Down Expand Up @@ -31,7 +32,14 @@ const Footer = () => {
<div className="py-6 w-full md:w-2/5">
<div className="flex flex-wrap items-center">
<div className="p-1 md:mb-4 md:p-0 w-1/2 md:w-full">
<ExplorerLogo height="32px" />
<Image
src={ExplorerLogo}
alt="OONI Explorer"
height={32}
width={114}
style={{ height: '32px', width: 'auto' }}
unoptimized
/>
</div>
<div className="w-1/2 md:w-2/3">
{' '}
Expand Down
3 changes: 2 additions & 1 deletion components/LocaleSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const getLocalisedLanguageName = (
}
}

const languages = process.env.LOCALES
import { SUPPORTED_LANGUAGES as languages } from 'lib/i18n'

type LanguageSelectProps = {
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void
value: string
Expand Down
2 changes: 0 additions & 2 deletions components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ const NavItem = ({ label, href, ...props }: NavItemProps) => {
)
}

const languages = process.env.LOCALES

export const NavBar = () => {
const router = useRouter()
const { pathname } = router
Expand Down
19 changes: 19 additions & 0 deletions lib/i18n.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const DEFAULT_LOCALE = 'en'

const SUPPORTED_LANGUAGES = [
'ar',
'de',
'en',
'es',
'id',
// 'ja',
// 'kab',
'km',
'pt-br',
'ru',
'sr',
'tr',
'zh-cn',
]

module.exports = { DEFAULT_LOCALE, SUPPORTED_LANGUAGES }
203 changes: 76 additions & 127 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,134 +1,83 @@
/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs')

const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})

const webpack = require('webpack')
const glob = require('glob')
const { basename } = require('node:path')

const LANG_DIR = './public/static/lang/'
const DEFAULT_LOCALE = 'en'

function getSupportedLanguages() {
const supportedLanguages = new Set()
supportedLanguages.add(DEFAULT_LOCALE) // at least 1 supported language
// biome-ignore lint/complexity/noForEach: <explanation>
glob
.sync(`${LANG_DIR}/**/*.json`)
.forEach((f) => supportedLanguages.add(basename(f, '.json')))
return [...supportedLanguages]
}

module.exports = withBundleAnalyzer(
withSentryConfig(
{
output: 'standalone',
reactStrictMode: true,
swcMinify: true,
i18n: {
locales: getSupportedLanguages(),
defaultLocale: DEFAULT_LOCALE,
},
async headers() {
const headers = []
if (process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {
headers.push({
headers: [
{
key: 'X-Robots-Tag',
value: 'noindex',
},
],
source: '/:path*',
})
}
return headers
},
async rewrites() {
return [
{
source: '/apple-app-site-association',
destination: '/api/apple-app-site-association',
},
{
source: '/.well-known/assetlinks.json',
destination: '/api/assetlinks',
},
{
source: '/api/v2/:path*',
destination: `${process.env.NEXT_PUBLIC_OONI_API}/api/v2/:path*`,
},
]
},
webpack: (config, options) => {
config.plugins.push(
new options.webpack.DefinePlugin({
'process.env.DEFAULT_LOCALE': DEFAULT_LOCALE,
'process.env.LOCALES': JSON.stringify(getSupportedLanguages()),
}),
)

config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /\.\/lib\/update/,
}),
)

// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.('.svg'),
)

config.module.rules.push(
// Convert all *.svg imports to React components
{
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
},
)

// Modify the file loader rule to ignore *.svg, since we have it handled
fileLoaderRule.exclude = /\.svg$/i

return config
const { DEFAULT_LOCALE, SUPPORTED_LANGUAGES } = require('./lib/i18n')

module.exports = withSentryConfig(
{
output: 'standalone',
reactStrictMode: true,
turbopack: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js',
},
},
},
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
org: 'ooni',
project: 'run',
sentryUrl: 'https://sentry.io/',

// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
i18n: {
locales: SUPPORTED_LANGUAGES,
defaultLocale: DEFAULT_LOCALE,
},
async headers() {
const headers = []
if (process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {
headers.push({
headers: [
{
key: 'X-Robots-Tag',
value: 'noindex',
},
],
source: '/:path*',
})
}
return headers
},
async rewrites() {
return [
{
source: '/apple-app-site-association',
destination: '/api/apple-app-site-association',
},
{
source: '/.well-known/assetlinks.json',
destination: '/api/assetlinks',
},
{
source: '/api/v2/:path*',
destination: `${process.env.NEXT_PUBLIC_OONI_API}/api/v2/:path*`,
},
]
},
async redirects() {
return [
{
source: '/nettest', // v1 links
destination:
'https://ooni.org/support/ooni-run/#updating-old-ooni-run-links',
permanent: true,
},
]
},
),
},
{
org: 'ooni',
project: 'run',
sentryUrl: 'https://sentry.io/',

// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
widenClientFileUpload: true,

// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// tunnelRoute: "/monitoring",

hideSourceMaps: true,
disableLogger: true,
automaticVercelMonitors: true,
},
)
24 changes: 10 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,30 @@
"license": "BSD-3-Clause",
"dependencies": {
"@hookform/resolvers": "^3.6.0",
"@next/bundle-analyzer": "^14.2.5",
"@sentry/nextjs": "^8",
"@sentry/nextjs": "^10.66.0",
"@tailwindcss/postcss": "^4.3.3",
"@uiw/react-color-compact": "^2.3.0",
"axios": "^1.12.0",
"axios": "^1.18.0",
"cookie": "^0.7.0",
"date-fns": "^3.6.0",
"markdown-to-jsx": "^7.4.7",
"next": "^14.2.35",
"next": "^16.2.10",
"nprogress": "^0.2.0",
"ooni-components": "0.7.0-alpha.12",
"ooni-components": "0.8.0-alpha.3",
"react": "^18.3.1",
"react-content-loader": "^7.0.2",
"react-day-picker": "^9.0.8",
"react-dom": "^18.3.1",
"react-hook-form": "^7.52.2",
"react-icons": "^5.3.0",
"react-hook-form": "^7.81.0",
"react-icons": "^5.7.0",
"react-intl": "^6.8.2",
"react-outside-click-handler": "^1.3.0",
"swr": "^2.2.5",
"tailwind-merge": "^2.5.2",
"useragent": "^2.3.0",
"yup": "^1.4.0"
"yup": "^1.7.1"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@biomejs/biome": "^1.6.4",
"@formatjs/cli": "^6.2.7",
"@playwright/test": "^1.42.1",
Expand All @@ -40,12 +39,10 @@
"@types/react-dom": "^18.2.21",
"@types/react-outside-click-handler": "^1.3.3",
"autoprefixer": "^10.4.20",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"json2csv": "^6.0.0-alpha.2",
"msw": "^2.2.13",
"postcss": "^8.4.41",
"tailwindcss": "^3.4.10",
"postcss": "^8.5.10",
"tailwindcss": "^4.3.3",
"typescript": "^5.4.3",
"uglify-js": "^3.17.4"
},
Expand All @@ -57,7 +54,6 @@
"start": "next start -p 3100",
"build": "next build",
"test": "playwright test",
"build:analyze": "ANALYZE=true next build",
"extract": "node ./scripts/extract '{pages,components,utils}/*.{js,ts,tsx}'",
"script:build-translations": "node ./scripts/build-translations.js"
},
Expand Down
2 changes: 1 addition & 1 deletion pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import { FormattedMessage, useIntl } from 'react-intl'

import OONIRunHero from 'components/OONIRunHero'
import OONI404 from 'public/static/images/OONI_404.svg'
import OONI404 from '@/public/static/images/OONI_404.svg'

const Custom404 = () => {
const router = useRouter()
Expand Down
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Fira_Sans } from 'next/font/google'
import { useRouter } from 'next/router'
import NProgress from 'nprogress'
import 'ooni-components/dist/tailwind.css'
import { useEffect, useMemo } from 'react'
import 'styles/globals.css'
import '../public/static/nprogress.css'

import type { AppProps } from 'next/app'
Expand Down
2 changes: 1 addition & 1 deletion pages/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { GetServerSideProps } from 'next'
import dynamic from 'next/dynamic'
import NLink from 'next/link'
import { useIntl } from 'react-intl'
import OONI404 from '/public/static/images/OONI_404.svg'
import OONI404 from '@/public/static/images/OONI_404.svg'

const RunLinkList = dynamic(() => import('components/List'))
const OONIRunHero = dynamic(() => import('components/OONIRunHero'))
Expand Down
2 changes: 1 addition & 1 deletion pages/v2/[linkId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { GetServerSideProps } from 'next'
import type { ParsedUrlQuery } from 'node:querystring'
import { useIntl } from 'react-intl'
import { getIntentURIv2 } from 'utils/links'
import OONI404 from '/public/static/images/OONI_404.svg'
import OONI404 from '@/public/static/images/OONI_404.svg'

const useragent = require('useragent/index.js')

Expand Down
6 changes: 0 additions & 6 deletions postcss.config.js

This file was deleted.

8 changes: 8 additions & 0 deletions postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
'@tailwindcss/postcss': {},
},
}

export default config
Loading
Loading