Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
687f764f
Commit
687f764f
authored
Nov 12, 2024
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update nextjs version
parent
73ce4f50
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
778 additions
and
355 deletions
+778
-355
instrumentation.node.ts
instrumentation.node.ts
+4
-4
instrumentation.ts
instrumentation.ts
+1
-1
isMetaKey.tsx
lib/isMetaKey.tsx
+1
-1
next.config.js
next.config.js
+4
-10
package.json
package.json
+12
-7
dev.sh
tools/scripts/dev.sh
+1
-1
SearchBarSuggest.tsx
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggest.tsx
+3
-1
yarn.lock
yarn.lock
+752
-330
No files found.
instrumentation.node.ts
View file @
687f764f
...
...
@@ -10,7 +10,7 @@ import {
}
from
'
@opentelemetry/sdk-metrics
'
;
import
{
NodeSDK
}
from
'
@opentelemetry/sdk-node
'
;
import
{
SimpleSpanProcessor
}
from
'
@opentelemetry/sdk-trace-node
'
;
import
{
S
emanticResourceAttributes
}
from
'
@opentelemetry/semantic-conventions
'
;
import
{
S
EMRESATTRS_SERVICE_NAME
,
SEMRESATTRS_SERVICE_VERSION
,
SEMRESATTRS_SERVICE_INSTANCE_ID
}
from
'
@opentelemetry/semantic-conventions
'
;
diag
.
setLogger
(
new
DiagConsoleLogger
(),
DiagLogLevel
.
INFO
);
...
...
@@ -18,9 +18,9 @@ const traceExporter = new OTLPTraceExporter();
const
sdk
=
new
NodeSDK
({
resource
:
new
Resource
({
[
S
emanticResourceAttributes
.
SERVICE_NAME
]:
'
blockscout_frontend
'
,
[
S
emanticResourceAttributes
.
SERVICE_VERSION
]:
process
.
env
.
NEXT_PUBLIC_GIT_TAG
||
process
.
env
.
NEXT_PUBLIC_GIT_COMMIT_SHA
||
'
unknown_version
'
,
[
S
emanticResourceAttributes
.
SERVICE_INSTANCE_ID
]:
[
S
EMRESATTRS_
SERVICE_NAME
]:
'
blockscout_frontend
'
,
[
S
EMRESATTRS_
SERVICE_VERSION
]:
process
.
env
.
NEXT_PUBLIC_GIT_TAG
||
process
.
env
.
NEXT_PUBLIC_GIT_COMMIT_SHA
||
'
unknown_version
'
,
[
S
EMRESATTRS_
SERVICE_INSTANCE_ID
]:
process
.
env
.
NEXT_PUBLIC_APP_INSTANCE
||
process
.
env
.
NEXT_PUBLIC_APP_HOST
?.
replace
(
'
.blockscout.com
'
,
''
).
replaceAll
(
'
-
'
,
'
_
'
)
||
'
unknown_app
'
,
...
...
instrumentation.ts
View file @
687f764f
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
'
);
}
}
lib/isMetaKey.tsx
View file @
687f764f
export
default
function
isMetaKey
(
event
:
React
.
KeyboardEvent
)
{
return
event
.
metaKey
||
event
.
getModifierState
(
'
Meta
'
)
||
event
.
getModifierState
(
'
OS
'
)
;
return
event
.
metaKey
||
event
.
getModifierState
(
'
Meta
'
);
}
next.config.js
View file @
687f764f
...
...
@@ -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
,
},
},
};
...
...
package.json
View file @
687f764f
...
...
@@ -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
"
:
"
1
4.2
.3
"
,
"
@next/bundle-analyzer
"
:
"
1
5.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
"
,
...
...
@@ -88,7 +89,7 @@
"
magic-bytes.js
"
:
"
1.8.0
"
,
"
mixpanel-browser
"
:
"
^2.47.0
"
,
"
monaco-editor
"
:
"
^0.34.1
"
,
"
next
"
:
"
1
4.2.1
3
"
,
"
next
"
:
"
1
5.0.
3
"
,
"
nextjs-routes
"
:
"
^1.0.8
"
,
"
node-fetch
"
:
"
^3.2.9
"
,
"
papaparse
"
:
"
^5.3.2
"
,
...
...
@@ -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
"
,
...
...
@@ -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
"
,
...
...
@@ -142,7 +143,7 @@
"
css-loader
"
:
"
^6.7.3
"
,
"
dotenv-cli
"
:
"
^6.0.0
"
,
"
eslint
"
:
"
^8.32.0
"
,
"
eslint-config-next
"
:
"
1
3.3.0
"
,
"
eslint-config-next
"
:
"
1
5.0.3
"
,
"
eslint-plugin-es5
"
:
"
^1.5.0
"
,
"
eslint-plugin-import-helpers
"
:
"
^1.2.1
"
,
"
eslint-plugin-jest
"
:
"
^27.1.6
"
,
...
...
@@ -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
"
}
}
tools/scripts/dev.sh
View file @
687f764f
...
...
@@ -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
\ No newline at end of file
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggest.tsx
View file @
687f764f
...
...
@@ -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
>
...
...
yarn.lock
View file @
687f764f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment