Skip to content

Commit

Permalink
Merge pull request #2354 from umami-software/dev
Browse files Browse the repository at this point in the history
v2.8.0
  • Loading branch information
mikecao authored Oct 19, 2023
2 parents fd5d5c6 + 214fade commit b54164a
Show file tree
Hide file tree
Showing 397 changed files with 4,375 additions and 5,059 deletions.
1 change: 1 addition & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
35 changes: 27 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const pkg = require('./package.json');
const contentSecurityPolicy = `
default-src 'self';
img-src *;
script-src 'self' 'unsafe-eval';
script-src 'self' 'unsafe-eval' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
connect-src 'self' api.umami.is;
frame-ancestors 'self' ${process.env.ALLOWED_FRAME_URLS};
Expand Down Expand Up @@ -74,16 +74,23 @@ if (process.env.CLOUD_MODE && process.env.CLOUD_URL && process.env.DISABLE_LOGIN
});
}

const basePath = process.env.BASE_PATH;

/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: false,
env: {
cloudMode: process.env.CLOUD_MODE,
basePath: basePath || '',
cloudMode: !!process.env.CLOUD_MODE,
cloudUrl: process.env.CLOUD_URL,
configUrl: '/config',
currentVersion: pkg.version,
defaultLocale: process.env.DEFAULT_LOCALE,
disableLogin: process.env.DISABLE_LOGIN,
disableUI: process.env.DISABLE_UI,
isProduction: process.env.NODE_ENV === 'production',
},
basePath: process.env.BASE_PATH,
basePath,
output: 'standalone',
eslint: {
ignoreDuringBuilds: true,
Expand All @@ -92,11 +99,23 @@ const config = {
ignoreBuildErrors: true,
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
issuer: /\.{js|jsx|ts|tsx}$/,
use: ['@svgr/webpack'],
});
const fileLoaderRule = config.module.rules.find(rule => rule.test?.test?.('.svg'));

config.module.rules.push(
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/,
},
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] },
use: ['@svgr/webpack'],
},
);

fileLoaderRule.exclude = /\.svg$/i;

config.resolve.alias['public'] = path.resolve('./public');

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "umami",
"version": "2.7.0",
"version": "2.8.0",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",
Expand Down Expand Up @@ -61,16 +61,17 @@
".next/cache"
],
"dependencies": {
"@clickhouse/client": "^0.2.2",
"@fontsource/inter": "^4.5.15",
"@prisma/client": "5.3.1",
"@react-spring/web": "^9.7.3",
"@tanstack/react-query": "^4.33.0",
"@umami/prisma-client": "^0.2.0",
"@umami/prisma-client": "^0.3.0",
"@umami/redis-client": "^0.15.0",
"chalk": "^4.1.1",
"chart.js": "^4.2.1",
"chartjs-adapter-date-fns": "^3.0.0",
"classnames": "^2.3.1",
"clickhouse": "^2.5.0",
"colord": "^2.9.2",
"cors": "^2.8.5",
"cross-spawn": "^7.0.3",
Expand All @@ -91,18 +92,17 @@
"kafkajs": "^2.1.0",
"maxmind": "^4.3.6",
"moment-timezone": "^0.5.35",
"next": "13.5.2",
"next": "13.5.3",
"next-basics": "^0.36.0",
"node-fetch": "^3.2.8",
"npm-run-all": "^4.1.5",
"react": "^18.2.0",
"react-basics": "^0.100.0",
"react-basics": "^0.105.0",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.4",
"react-intl": "^5.24.7",
"react-intl": "^6.4.7",
"react-simple-maps": "^2.3.0",
"react-spring": "^9.4.4",
"react-use-measure": "^2.0.4",
"react-window": "^1.8.6",
"request-ip": "^3.3.0",
Expand All @@ -123,12 +123,12 @@
"@rollup/plugin-node-resolve": "^15.2.0",
"@rollup/plugin-replace": "^5.0.2",
"@svgr/rollup": "^8.1.0",
"@svgr/webpack": "^6.2.1",
"@svgr/webpack": "^8.1.0",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"cross-env": "^7.0.3",
"esbuild": "^0.17.17",
"eslint": "^8.33.0",
Expand All @@ -138,9 +138,9 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"extract-react-intl-messages": "^4.1.1",
"husky": "^7.0.0",
"lint-staged": "^11.0.0",
"postcss": "^8.4.21",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"postcss": "^8.4.31",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^15.1.0",
"postcss-preset-env": "7.8.3",
Expand Down
Binary file added public/images/os/windows-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b54164a

Please sign in to comment.