Skip to content

Commit

Permalink
Avoid use of require() in default-config.tsx (jaegertracing#1225)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Split from jaegertracing#1212

## Short description of the changes
This needs to be an import for an eventual build system switch, since
Vite uses ES modules. It also helps make things more consistent.

The UI package version in the About Jaeger dropdown still shows up.

---------

Signed-off-by: Máté Szabó <mszabo@fandom.com>
  • Loading branch information
mszabo-wikia authored Mar 1, 2023
1 parent 24591c2 commit f5d276d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/constants/default-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import deepFreeze from 'deep-freeze';
import { FALLBACK_DAG_MAX_NUM_SERVICES } from './index';
import getVersion from '../utils/version/get-version';

const { version } = require('../../package.json');
import { version } from '../../package.json';

export default deepFreeze(
Object.defineProperty(
Expand Down
3 changes: 2 additions & 1 deletion packages/jaeger-ui/tsconfig.lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"src/selectors/trace.js",
"src/utils/configure-store.js",
"src/utils/sort.js",
"src/utils/TreeNode.js"
"src/utils/TreeNode.js",
"package.json"
]
}

0 comments on commit f5d276d

Please sign in to comment.