Skip to content

Commit 7a32197

Browse files
authored
chore: use vite + vitest (#248)
1 parent 48bb66f commit 7a32197

File tree

61 files changed

+7928
-13617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+7928
-13617
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ on:
55
branches: [main, next]
66
pull_request:
77

8+
concurrency:
9+
group: ci-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
verify_files:
1014
name: Verify Files
1115
runs-on: ubuntu-latest
1216
steps:
1317
- name: Checkout
1418
uses: actions/checkout@v6
15-
with:
16-
fetch-depth: 0
1719
- name: Setup Node
1820
uses: actions/setup-node@v6
1921
with:
@@ -34,14 +36,13 @@ jobs:
3436
steps:
3537
- name: Checkout
3638
uses: actions/checkout@v6
37-
with:
38-
fetch-depth: 0
3939
- name: Setup Node
4040
uses: actions/setup-node@v6
4141
with:
4242
node-version-file: .nvmrc
4343
cache: 'npm'
4444
- name: Install Packages
4545
run: npm ci
46-
- name: Unit Tests
46+
- uses: ./.github/actions/setup-playwright
47+
- name: Tests
4748
run: npm run test

.github/workflows/main-preview.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v6
14-
with:
15-
fetch-depth: 0
1614
- name: Setup Node
1715
uses: actions/setup-node@v6
1816
with:

.github/workflows/pr-preview-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: PR Preview Build
33
on:
44
pull_request:
55

6+
concurrency:
7+
group: preview-${{ github.event.pull_request.number }}
8+
cancel-in-progress: true
9+
610
jobs:
711
build:
812
name: Build

.github/workflows/pr-title.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ on:
55
types:
66
- opened
77
- synchronize
8-
- reopened
98
- edited
109

1110
concurrency:
12-
group: ${{github.workflow}}-${{github.ref}}
11+
group: title-${{ github.event.pull_request.number }}
1312
cancel-in-progress: true
1413

1514
jobs:

.github/workflows/pr-visual-tests-report.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/pr-visual-tests.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/release-beta.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ jobs:
3030
registry-url: 'https://registry.npmjs.org'
3131
- name: Install Packages
3232
run: npm ci
33-
- name: Lint Files
34-
run: npm run lint
35-
- name: Typecheck
36-
run: npm run typecheck
37-
- name: Test
38-
run: npm test
3933
- name: Bump version
4034
run: |
4135
echo ${{ github.event.inputs.version }}

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ dist
1010
storybook-static
1111
.cache
1212

13-
# Playwright
14-
playwright-report
15-
playwright-report-docker
16-
playwright/.cache-docker
17-
playwright/.cache/
18-
test-results
13+
# Tests
14+
reports
1915

2016
# System files
2117
.DS_Store
18+
19+
.vitest-*

.storybook/main.ts

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,18 @@
1-
import {defineMain} from '@storybook/react-webpack5/node';
2-
import * as sass from 'sass';
1+
import {defineMain} from '@storybook/react-vite/node';
32

43
export default defineMain({
54
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
65
addons: [
76
'@storybook/addon-docs',
87
'@storybook/addon-a11y',
98
import.meta.resolve('./theme-addon/theme-preset.ts'),
10-
'@storybook/addon-webpack5-compiler-babel',
11-
{
12-
name: '@storybook/addon-styling-webpack',
13-
options: {
14-
rules: [
15-
{
16-
test: /\.css$/,
17-
sideEffects: true,
18-
use: ['style-loader', 'css-loader'],
19-
},
20-
{
21-
test: /\.scss$/,
22-
sideEffects: true,
23-
use: [
24-
'style-loader',
25-
{
26-
loader: 'css-loader',
27-
options: {importLoaders: 1},
28-
},
29-
{
30-
loader: 'sass-loader',
31-
options: {implementation: sass},
32-
},
33-
],
34-
},
35-
],
36-
},
37-
},
9+
'@storybook/addon-vitest',
3810
],
39-
framework: '@storybook/react-webpack5',
11+
framework: {name: '@storybook/react-vite', options: {strictMode: true}},
4012
typescript: {
41-
check: false,
42-
checkOptions: {},
4313
reactDocgen: 'react-docgen-typescript',
4414
},
4515
core: {
4616
disableTelemetry: true,
4717
},
48-
babel: {
49-
presets: [
50-
[
51-
'@babel/preset-env',
52-
{
53-
targets: {
54-
chrome: 100,
55-
},
56-
},
57-
],
58-
'@babel/preset-typescript',
59-
['@babel/preset-react', {runtime: 'automatic'}],
60-
],
61-
},
6218
});

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {addons} from 'storybook/manager-api';
22

3-
import {themes} from './theme';
3+
import {themes} from './theme.js';
44

55
addons.setConfig({
66
theme: themes.light,

0 commit comments

Comments
 (0)