Commit 687f764f authored by tom's avatar tom

update nextjs version

parent 73ce4f50
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
} from '@opentelemetry/sdk-metrics'; } from '@opentelemetry/sdk-metrics';
import { NodeSDK } from '@opentelemetry/sdk-node'; import { NodeSDK } from '@opentelemetry/sdk-node';
import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node'; import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_SERVICE_VERSION, SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO); diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO);
...@@ -18,9 +18,9 @@ const traceExporter = new OTLPTraceExporter(); ...@@ -18,9 +18,9 @@ const traceExporter = new OTLPTraceExporter();
const sdk = new NodeSDK({ const sdk = new NodeSDK({
resource: new Resource({ resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'blockscout_frontend', [SEMRESATTRS_SERVICE_NAME]: 'blockscout_frontend',
[SemanticResourceAttributes.SERVICE_VERSION]: process.env.NEXT_PUBLIC_GIT_TAG || process.env.NEXT_PUBLIC_GIT_COMMIT_SHA || 'unknown_version', [SEMRESATTRS_SERVICE_VERSION]: process.env.NEXT_PUBLIC_GIT_TAG || process.env.NEXT_PUBLIC_GIT_COMMIT_SHA || 'unknown_version',
[SemanticResourceAttributes.SERVICE_INSTANCE_ID]: [SEMRESATTRS_SERVICE_INSTANCE_ID]:
process.env.NEXT_PUBLIC_APP_INSTANCE || process.env.NEXT_PUBLIC_APP_INSTANCE ||
process.env.NEXT_PUBLIC_APP_HOST?.replace('.blockscout.com', '').replaceAll('-', '_') || process.env.NEXT_PUBLIC_APP_HOST?.replace('.blockscout.com', '').replaceAll('-', '_') ||
'unknown_app', 'unknown_app',
......
export async function register() { export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') { if (process.env.NEXT_RUNTIME === 'nodejs' && process.env.NEXT_OPEN_TELEMETRY_ENABLED === 'true') {
await import('./instrumentation.node'); await import('./instrumentation.node');
} }
} }
export default function isMetaKey(event: React.KeyboardEvent) { export default function isMetaKey(event: React.KeyboardEvent) {
return event.metaKey || event.getModifierState('Meta') || event.getModifierState('OS'); return event.metaKey || event.getModifierState('Meta');
} }
...@@ -46,16 +46,10 @@ const moduleExports = { ...@@ -46,16 +46,10 @@ const moduleExports = {
output: 'standalone', output: 'standalone',
productionBrowserSourceMaps: true, productionBrowserSourceMaps: true,
experimental: { experimental: {
instrumentationHook: process.env.NEXT_OPEN_TELEMETRY_ENABLED === 'true', staleTimes: {
// disabled as it is not stable yet dynamic: 30,
// turbo: { 'static': 180,
// rules: { },
// '*.svg': {
// loaders: [ '@svgr/webpack' ],
// as: '*.js',
// },
// },
// },
}, },
}; };
......
...@@ -49,8 +49,9 @@ ...@@ -49,8 +49,9 @@
"@metamask/post-message-stream": "^7.0.0", "@metamask/post-message-stream": "^7.0.0",
"@metamask/providers": "^10.2.1", "@metamask/providers": "^10.2.1",
"@monaco-editor/react": "^4.4.6", "@monaco-editor/react": "^4.4.6",
"@next/bundle-analyzer": "14.2.3", "@next/bundle-analyzer": "15.0.3",
"@opentelemetry/auto-instrumentations-node": "0.43.0", "@opentelemetry/auto-instrumentations-node": "0.43.0",
"@opentelemetry/exporter-jaeger": "1.27.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.49.1", "@opentelemetry/exporter-metrics-otlp-proto": "0.49.1",
"@opentelemetry/exporter-trace-otlp-http": "0.49.1", "@opentelemetry/exporter-trace-otlp-http": "0.49.1",
"@opentelemetry/resources": "1.22.0", "@opentelemetry/resources": "1.22.0",
...@@ -88,7 +89,7 @@ ...@@ -88,7 +89,7 @@
"magic-bytes.js": "1.8.0", "magic-bytes.js": "1.8.0",
"mixpanel-browser": "^2.47.0", "mixpanel-browser": "^2.47.0",
"monaco-editor": "^0.34.1", "monaco-editor": "^0.34.1",
"next": "14.2.13", "next": "15.0.3",
"nextjs-routes": "^1.0.8", "nextjs-routes": "^1.0.8",
"node-fetch": "^3.2.9", "node-fetch": "^3.2.9",
"papaparse": "^5.3.2", "papaparse": "^5.3.2",
...@@ -98,9 +99,9 @@ ...@@ -98,9 +99,9 @@
"pino-pretty": "^9.1.1", "pino-pretty": "^9.1.1",
"prom-client": "15.1.1", "prom-client": "15.1.1",
"qrcode": "^1.5.1", "qrcode": "^1.5.1",
"react": "18.2.0", "react": "18.3.1",
"react-device-detect": "^2.2.3", "react-device-detect": "^2.2.3",
"react-dom": "18.2.0", "react-dom": "18.3.1",
"react-google-recaptcha-v3": "1.10.1", "react-google-recaptcha-v3": "1.10.1",
"react-hook-form": "7.52.1", "react-hook-form": "7.52.1",
"react-identicons": "^1.2.5", "react-identicons": "^1.2.5",
...@@ -132,8 +133,8 @@ ...@@ -132,8 +133,8 @@
"@types/node": "20.16.7", "@types/node": "20.16.7",
"@types/phoenix": "^1.5.4", "@types/phoenix": "^1.5.4",
"@types/qrcode": "^1.5.0", "@types/qrcode": "^1.5.0",
"@types/react": "18.0.9", "@types/react": "18.3.12",
"@types/react-dom": "18.0.5", "@types/react-dom": "18.3.1",
"@types/react-google-recaptcha": "^2.1.5", "@types/react-google-recaptcha": "^2.1.5",
"@types/swagger-ui-react": "^4.11.0", "@types/swagger-ui-react": "^4.11.0",
"@types/ws": "^8.5.3", "@types/ws": "^8.5.3",
...@@ -142,7 +143,7 @@ ...@@ -142,7 +143,7 @@
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"dotenv-cli": "^6.0.0", "dotenv-cli": "^6.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"eslint-config-next": "13.3.0", "eslint-config-next": "15.0.3",
"eslint-plugin-es5": "^1.5.0", "eslint-plugin-es5": "^1.5.0",
"eslint-plugin-import-helpers": "^1.2.1", "eslint-plugin-import-helpers": "^1.2.1",
"eslint-plugin-jest": "^27.1.6", "eslint-plugin-jest": "^27.1.6",
...@@ -167,5 +168,9 @@ ...@@ -167,5 +168,9 @@
}, },
"lint-staged": { "lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --cache --fix" "*.{js,jsx,ts,tsx}": "eslint --cache --fix"
},
"resolutions": {
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1"
} }
} }
...@@ -20,5 +20,5 @@ dotenv \ ...@@ -20,5 +20,5 @@ dotenv \
-e .env.local \ -e .env.local \
-e .env.development \ -e .env.development \
-e .env \ -e .env \
-- bash -c './deploy/scripts/make_envs_script.sh && next dev -p $NEXT_PUBLIC_APP_PORT' | -- bash -c './deploy/scripts/make_envs_script.sh && next dev --turbopack -p $NEXT_PUBLIC_APP_PORT' |
pino-pretty pino-pretty
\ No newline at end of file
...@@ -163,7 +163,9 @@ const SearchBarSuggest = ({ query, searchTerm, onItemClick, containerId }: Props ...@@ -163,7 +163,9 @@ const SearchBarSuggest = ({ query, searchTerm, onItemClick, containerId }: Props
variant="secondary" variant="secondary"
mt={ 6 } mt={ 6 }
mb={ 3 } mb={ 3 }
ref={ (el: HTMLParagraphElement) => categoriesRefs.current[indx] = el } ref={ (el: HTMLParagraphElement) => {
categoriesRefs.current[indx] = el;
} }
> >
{ cat.title } { cat.title }
</Text> </Text>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment