Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
});

if (env === 'production') {
config.output.path = path.resolve(__dirname, 'build/');

Check warning on line 38 in config-overrides.js

View workflow job for this annotation

GitHub Actions / Verify Files

Assignment to property of function parameter 'config'
}
config.plugins.push(
new MonacoWebpackPlugin({
Expand All @@ -48,10 +48,10 @@
}),
);

// Add DefinePlugin to expose just the version
// Add DefinePlugin to expose just the version as a global variable
config.plugins.push(
new webpack.DefinePlugin({
'process.env.UI_VERSION': JSON.stringify(packageJson.version),
__UI_VERSION__: JSON.stringify(packageJson.version),
}),
);

Expand All @@ -68,13 +68,13 @@
// By default jest does not transform anything in node_modules
// So this override excludes node_modules except @gravity-ui
// see https://github.com/timarney/react-app-rewired/issues/241
config.transformIgnorePatterns = ['node_modules/(?!(@gravity-ui|@mjackson)/)'];

Check warning on line 71 in config-overrides.js

View workflow job for this annotation

GitHub Actions / Verify Files

Assignment to property of function parameter 'config'

// Add .github directory to roots
config.roots = ['<rootDir>/src', '<rootDir>/.github'];

Check warning on line 74 in config-overrides.js

View workflow job for this annotation

GitHub Actions / Verify Files

Assignment to property of function parameter 'config'

// Update testMatch to include .github directory
config.testMatch = [

Check warning on line 77 in config-overrides.js

View workflow job for this annotation

GitHub Actions / Verify Files

Assignment to property of function parameter 'config'
'<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}',
'<rootDir>/.github/**/*.{spec,test}.{js,jsx,ts,tsx}',
Expand Down
2 changes: 1 addition & 1 deletion src/containers/UserSettings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const autocompleteOnEnterSetting: SettingProps = {
export const interfaceVersionInfoField: SettingsInfoFieldProps = {
title: i18n('settings.about.interfaceVersionInfoField.title'),
type: 'info',
content: process.env.UI_VERSION,
content: __UI_VERSION__,
};

export const appearanceSection: SettingsSection = {
Expand Down
2 changes: 2 additions & 0 deletions src/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
declare type AnyRecord = Record<string | number | symbol, unknown>;

declare const __UI_VERSION__: string;
Loading