Skip to content

Commit

Permalink
update nextjs version
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Nov 12, 2024
1 parent 73ce4f5 commit 687f764
Show file tree
Hide file tree
Showing 8 changed files with 778 additions and 355 deletions.
8 changes: 4 additions & 4 deletions instrumentation.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import {
} from '@opentelemetry/sdk-metrics';
import { NodeSDK } from '@opentelemetry/sdk-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);

const traceExporter = new OTLPTraceExporter();

const sdk = new NodeSDK({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'blockscout_frontend',
[SemanticResourceAttributes.SERVICE_VERSION]: process.env.NEXT_PUBLIC_GIT_TAG || process.env.NEXT_PUBLIC_GIT_COMMIT_SHA || 'unknown_version',
[SemanticResourceAttributes.SERVICE_INSTANCE_ID]:
[SEMRESATTRS_SERVICE_NAME]: 'blockscout_frontend',
[SEMRESATTRS_SERVICE_VERSION]: process.env.NEXT_PUBLIC_GIT_TAG || process.env.NEXT_PUBLIC_GIT_COMMIT_SHA || 'unknown_version',
[SEMRESATTRS_SERVICE_INSTANCE_ID]:
process.env.NEXT_PUBLIC_APP_INSTANCE ||
process.env.NEXT_PUBLIC_APP_HOST?.replace('.blockscout.com', '').replaceAll('-', '_') ||
'unknown_app',
Expand Down
2 changes: 1 addition & 1 deletion instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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');
}
}
2 changes: 1 addition & 1 deletion lib/isMetaKey.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function isMetaKey(event: React.KeyboardEvent) {
return event.metaKey || event.getModifierState('Meta') || event.getModifierState('OS');
return event.metaKey || event.getModifierState('Meta');
}
14 changes: 4 additions & 10 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,10 @@ const moduleExports = {
output: 'standalone',
productionBrowserSourceMaps: true,
experimental: {
instrumentationHook: process.env.NEXT_OPEN_TELEMETRY_ENABLED === 'true',
// disabled as it is not stable yet
// turbo: {
// rules: {
// '*.svg': {
// loaders: [ '@svgr/webpack' ],
// as: '*.js',
// },
// },
// },
staleTimes: {
dynamic: 30,
'static': 180,
},
},
};

Expand Down
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
"@metamask/post-message-stream": "^7.0.0",
"@metamask/providers": "^10.2.1",
"@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/exporter-jaeger": "1.27.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.49.1",
"@opentelemetry/exporter-trace-otlp-http": "0.49.1",
"@opentelemetry/resources": "1.22.0",
Expand Down Expand Up @@ -88,7 +89,7 @@
"magic-bytes.js": "1.8.0",
"mixpanel-browser": "^2.47.0",
"monaco-editor": "^0.34.1",
"next": "14.2.13",
"next": "15.0.3",
"nextjs-routes": "^1.0.8",
"node-fetch": "^3.2.9",
"papaparse": "^5.3.2",
Expand All @@ -98,9 +99,9 @@
"pino-pretty": "^9.1.1",
"prom-client": "15.1.1",
"qrcode": "^1.5.1",
"react": "18.2.0",
"react": "18.3.1",
"react-device-detect": "^2.2.3",
"react-dom": "18.2.0",
"react-dom": "18.3.1",
"react-google-recaptcha-v3": "1.10.1",
"react-hook-form": "7.52.1",
"react-identicons": "^1.2.5",
Expand Down Expand Up @@ -132,8 +133,8 @@
"@types/node": "20.16.7",
"@types/phoenix": "^1.5.4",
"@types/qrcode": "^1.5.0",
"@types/react": "18.0.9",
"@types/react-dom": "18.0.5",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@types/react-google-recaptcha": "^2.1.5",
"@types/swagger-ui-react": "^4.11.0",
"@types/ws": "^8.5.3",
Expand All @@ -142,7 +143,7 @@
"css-loader": "^6.7.3",
"dotenv-cli": "^6.0.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-import-helpers": "^1.2.1",
"eslint-plugin-jest": "^27.1.6",
Expand All @@ -167,5 +168,9 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
},
"resolutions": {
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1"
}
}
2 changes: 1 addition & 1 deletion tools/scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ dotenv \
-e .env.local \
-e .env.development \
-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
4 changes: 3 additions & 1 deletion ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ const SearchBarSuggest = ({ query, searchTerm, onItemClick, containerId }: Props
variant="secondary"
mt={ 6 }
mb={ 3 }
ref={ (el: HTMLParagraphElement) => categoriesRefs.current[indx] = el }
ref={ (el: HTMLParagraphElement) => {
categoriesRefs.current[indx] = el;
} }
>
{ cat.title }
</Text>
Expand Down
Loading

0 comments on commit 687f764

Please sign in to comment.