Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d5a2945
Add Vite configuration files
dauglyon Jan 16, 2026
40d2379
Move index.html from public/ to project root
dauglyon Jan 16, 2026
7244b59
Remove CRA react-app-env.d.ts
dauglyon Jan 16, 2026
b3a112a
Update tsconfig.json for Vite and TypeScript 5
dauglyon Jan 16, 2026
d3b3e94
Update .nvmrc to Node 22 and add Vite ignores to .gitignore
dauglyon Jan 16, 2026
222540a
Rename environment variables REACT_APP_* to VITE_*
dauglyon Jan 16, 2026
35ce731
Replace process.env.REACT_APP_* with import.meta.env.VITE_*
dauglyon Jan 16, 2026
52526b4
Update package.json for Vite migration
dauglyon Jan 16, 2026
93d6ddf
Rewrite setupTests.ts for Vitest
dauglyon Jan 16, 2026
80a2031
Replace Jest APIs with Vitest equivalents in test files
dauglyon Jan 16, 2026
2ec950e
Update test utilities for Vitest
dauglyon Jan 16, 2026
1a1ad60
Migrate Storybook configuration to TypeScript and Vite
dauglyon Jan 16, 2026
bd14b80
Update story files for Storybook 8
dauglyon Jan 16, 2026
470d982
Fix Sass deprecation warnings
dauglyon Jan 16, 2026
44dec9a
Remove unused web-vitals CRA boilerplate
dauglyon Jan 16, 2026
4a607e0
Fix circular dependency in route constants
dauglyon Jan 16, 2026
6b6f639
Additional environment variable updates for Vite
dauglyon Jan 16, 2026
b21c3ed
Fix TypeScript typeof syntax for TS5 compatibility
dauglyon Jan 16, 2026
21f84cb
Fix remaining TypeScript typeof syntax across components
dauglyon Jan 16, 2026
2a7f398
Update redirectValidation to use Vite env vars
dauglyon Jan 16, 2026
df305bd
Update README for Vite migration
dauglyon Jan 16, 2026
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
19 changes: 8 additions & 11 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
# These values are overwritten by config.json when deployed.

# Base URL path for the enviroment
PUBLIC_URL = '/dev/'
VITE_BASE_URL = '/dev/'

# Name of enviroment for build
REACT_APP_KBASE_ENV=ci-europa
VITE_KBASE_ENV=ci-europa
# Domain of enviroment for build
REACT_APP_KBASE_DOMAIN=ci-europa.kbase.us
# The following must be a subdomain of REACT_APP_KBASE_DOMAIN
REACT_APP_KBASE_LEGACY_DOMAIN=legacy.ci-europa.kbase.us
VITE_KBASE_DOMAIN=ci-europa.kbase.us
# The following must be a subdomain of VITE_KBASE_DOMAIN
VITE_KBASE_LEGACY_DOMAIN=legacy.ci-europa.kbase.us

# Backup cookie name and domain, empty if unused by enviroment
REACT_APP_KBASE_BACKUP_COOKIE_NAME = 'test_kbase_backup_session'
REACT_APP_KBASE_BACKUP_COOKIE_DOMAIN = 'localhost'
VITE_KBASE_BACKUP_COOKIE_NAME = 'test_kbase_backup_session'
VITE_KBASE_BACKUP_COOKIE_DOMAIN = 'localhost'

# Comma-separated list of allowed external redirect domains (supports wildcards like *.berdl.kbase.us)
REACT_APP_REDIRECT_WHITELIST = '*.kbase.us'

EXTEND_ESLINT=true
SKIP_PREFLIGHT_CHECK=true
VITE_REDIRECT_WHITELIST = '*.kbase.us'
16 changes: 15 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"react-app",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": ["package-lock.json", "!.stylelintrc.json", "*.mdx"],
"ignorePatterns": [
"package-lock.json",
"!.stylelintrc.json",
"*.mdx",
"node_modules",
"build",
"storybook-static"
],
"overrides": [
{
"files": ["package.json"],
Expand All @@ -16,6 +23,13 @@
{
"files": ["*.json"],
"rules": { "no-unused-expressions": ["off"] }
},
{
"files": ["**/*.stories.tsx", "**/setupTests.ts"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"no-console": "off"
}
}
],
"parser": "@typescript-eslint/parser",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable_build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
password: '${{ secrets.GHCR_TOKEN }}'

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install app
run: npm ci
Expand All @@ -45,7 +45,7 @@ jobs:
run: npm run lint:strict

- name: Run tests
run: npm test . -- --coverage --verbose
run: npm test -- --run --coverage

- name: Run multi-enviroment build
run: ./scripts/build_deploy.sh
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# production
/build
/deploy
/storybook-static
debug-storybook.log

# misc
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.11.1
v22.22.0
16 changes: 0 additions & 16 deletions .storybook/main.js

This file was deleted.

16 changes: 16 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
};

export default config;
11 changes: 2 additions & 9 deletions .storybook/manager.js → .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import { addons } from '@storybook/addons';
import { addons } from '@storybook/manager-api';

addons.setConfig({
isFullscreen: false,
showNav: true,
showPanel: true,
panelPosition: 'bottom',
enableShortcuts: true,
isToolshown: true,
showToolbar: true,
theme: undefined,
selectedPanel: undefined,
initialActive: 'sidebar',
sidebar: {
showRoots: false,
collapsedRoots: ['other'],
},
toolbar: {
title: { hidden: false, },
zoom: { hidden: false, },
eject: { hidden: false, },
copy: { hidden: false, },
fullscreen: { hidden: false, },
},
});
33 changes: 0 additions & 33 deletions .storybook/preview.js

This file was deleted.

36 changes: 36 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import '../src/index.scss';
import { Provider } from 'react-redux';
import { BrowserRouter as Router } from 'react-router-dom';
import { createTestStore } from '../src/app/store';
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
options: {
storySort: (a, b) => {
const keyA = a.title;
const keyB = b.title;
return keyA === keyB
? 0
: keyA.localeCompare(keyB, undefined, { numeric: true });
},
},
},
decorators: [
(Story) => (
<Provider store={createTestStore()}>
<Router>
<Story />
</Router>
</Provider>
),
],
};

export default preview;
Loading