Merge branch 'vite-5.4' into 'main'

Upgrade Vite to v5.4

See merge request soapbox-pub/soapbox!3121
This commit is contained in:
Alex Gleason 2024-09-26 01:15:18 +00:00
commit 80160207d8
4 changed files with 909 additions and 887 deletions

View File

@ -91,7 +91,7 @@
"@types/redux-mock-store": "^1.0.6", "@types/redux-mock-store": "^1.0.6",
"@types/semver": "^7.3.9", "@types/semver": "^7.3.9",
"@types/uuid": "^9.0.0", "@types/uuid": "^9.0.0",
"@vitejs/plugin-react": "^4.0.4", "@vitejs/plugin-react": "^4.3.1",
"@webbtc/webln-types": "^3.0.0", "@webbtc/webln-types": "^3.0.0",
"autoprefixer": "^10.4.15", "autoprefixer": "^10.4.15",
"axios": "^1.2.2", "axios": "^1.2.2",
@ -172,11 +172,11 @@
"typescript": "^5.6.2", "typescript": "^5.6.2",
"util": "^0.12.4", "util": "^0.12.4",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"vite": "^5.0.10", "vite": "^5.4.8",
"vite-plugin-compile-time": "^0.2.1", "vite-plugin-compile-time": "^0.2.1",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.2",
"vite-plugin-require": "^1.1.10", "vite-plugin-require": "^1.2.14",
"vite-plugin-static-copy": "^1.0.0", "vite-plugin-static-copy": "^1.0.6",
"wicg-inert": "^3.1.1", "wicg-inert": "^3.1.1",
"zod": "^3.23.5" "zod": "^3.23.5"
}, },
@ -210,9 +210,9 @@
"stylelint": "^16.0.2", "stylelint": "^16.0.2",
"stylelint-config-standard-scss": "^12.0.0", "stylelint-config-standard-scss": "^12.0.0",
"tailwindcss": "^3.4.0", "tailwindcss": "^3.4.0",
"vite-plugin-checker": "^0.6.2", "vite-plugin-checker": "^0.8.0",
"vite-plugin-pwa": "^0.17.0", "vite-plugin-pwa": "^0.20.5",
"vitest": "^1.0.0" "vitest": "^2.1.1"
}, },
"resolutions": { "resolutions": {
"@types/react": "^18.0.26", "@types/react": "^18.0.26",

View File

@ -7,18 +7,18 @@ import LandingPageModal from './landing-page-modal';
describe('<LandingPageModal />', () => { describe('<LandingPageModal />', () => {
it('successfully renders', () => { it('successfully renders', () => {
render(<LandingPageModal onClose={vi.fn} />); render(<LandingPageModal onClose={() => {}} />);
expect(screen.getByTestId('modal')).toBeInTheDocument(); expect(screen.getByTestId('modal')).toBeInTheDocument();
}); });
it('doesn\'t display the signup button by default', () => { it('doesn\'t display the signup button by default', () => {
render(<LandingPageModal onClose={vi.fn} />); render(<LandingPageModal onClose={() => {}} />);
expect(screen.queryByText('Register')).not.toBeInTheDocument(); expect(screen.queryByText('Register')).not.toBeInTheDocument();
}); });
describe('with registrations enabled', () => { describe('with registrations enabled', () => {
it('displays the signup button', () => { it('displays the signup button', () => {
render(<LandingPageModal onClose={vi.fn} />, undefined, storeOpen); render(<LandingPageModal onClose={() => {}} />, undefined, storeOpen);
expect(screen.getByText('Register')).toBeInTheDocument(); expect(screen.getByText('Register')).toBeInTheDocument();
}); });
}); });

View File

@ -7,18 +7,18 @@ import UnauthorizedModal from './unauthorized-modal';
describe('<UnauthorizedModal />', () => { describe('<UnauthorizedModal />', () => {
it('successfully renders', () => { it('successfully renders', () => {
render(<UnauthorizedModal onClose={vi.fn} action='FOLLOW' />); render(<UnauthorizedModal onClose={() => {}} action='FOLLOW' />);
expect(screen.getByTestId('modal')).toBeInTheDocument(); expect(screen.getByTestId('modal')).toBeInTheDocument();
}); });
it('doesn\'t display the signup button by default', () => { it('doesn\'t display the signup button by default', () => {
render(<UnauthorizedModal onClose={vi.fn} action='FOLLOW' />); render(<UnauthorizedModal onClose={() => {}} action='FOLLOW' />);
expect(screen.queryByText('Sign up')).not.toBeInTheDocument(); expect(screen.queryByText('Sign up')).not.toBeInTheDocument();
}); });
describe('with registrations enabled', () => { describe('with registrations enabled', () => {
it('displays the signup button', () => { it('displays the signup button', () => {
render(<UnauthorizedModal onClose={vi.fn} action='FOLLOW' />, undefined, storeOpen); render(<UnauthorizedModal onClose={() => {}} action='FOLLOW' />, undefined, storeOpen);
expect(screen.getByText('Sign up')).toBeInTheDocument(); expect(screen.getByText('Sign up')).toBeInTheDocument();
}); });
}); });

1768
yarn.lock

File diff suppressed because it is too large Load Diff