Skip to content
Draft
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
9 changes: 9 additions & 0 deletions .github/workflows/biome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ jobs:
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm install

# HACK: Sometimes this error happens:
# ```
# Error: Cannot find module '@biomejs/cli-linux-x64/biome'
# ```
Comment on lines +48 to +50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - maybe this bug? npm/cli#4828. Fixed, but not backported, in npm 11. (npm/cli#8184)

Another workaround would be to add this and other packages to our package.json optionalDependencies so they don't get removed again (like this commit odoo/o-spreadsheet@9042443)

(found via https://www.npmjs.com/package/napi-postinstall)

# This package is only being installed with `npm install` if you're on Linux host. It's not installable on other
# OSs.
- name: Install missing Linux biome dependency
run: npm install @biomejs/cli-linux-x64

# Check for Biome formatting errors
- name: Check Biome formatting, import order and linter
run: npm run lint:biome
16 changes: 2 additions & 14 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ module.exports = {
addons: [
'@storybook/addon-links',
'@storybook/addon-a11y',
// NB:
// 'storybook-addon-swc' may improve build speed in the future.
// - At time of writing, the build performance gains are negated because it
// switches to a slower refresh plugin and also causes other compatibility
// issues in Storybook 6.
// - Testing with React 16.14.0 and Storybook 7 (beta) seemed to perform
// well.
'storybook-dark-mode',
'@storybook-community/storybook-dark-mode',
'@storybook/addon-webpack5-compiler-swc',
'storybook-addon-remix-react-router',
'@storybook/addon-docs',
Expand Down Expand Up @@ -100,11 +93,6 @@ function applySpeedTweaks(config) {
// Use swc to make the Terser step faster
if (config.mode === 'production') {
const TerserPlugin = require('terser-webpack-plugin')
config.optimization.minimizer = [
new TerserPlugin({
minify: TerserPlugin.swcMinify,
terserOptions: {},
}),
]
config.optimization.minimizer = [new TerserPlugin({ parallel: 1 })]
}
}
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import '../jsapp/scss/main.scss'
import '#/bemComponents'
import '@mantine/core/styles.css'
import { MantineProvider, useMantineColorScheme } from '@mantine/core'
import { DARK_MODE_EVENT_NAME } from '@storybook-community/storybook-dark-mode'
import type { Preview } from '@storybook/react'
import * as mswAddon from 'msw-storybook-addon'
import { useEffect } from 'react'
import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode'
import { addons } from 'storybook/preview-api'
import environmentMock from '#/endpoints/environment.mocks'
import meMock from '#/endpoints/me.mocks'
Expand Down
3 changes: 2 additions & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"kobo/apps/openrosa/apps/logger/fixtures/*",
"kpi/static/js/swagger/swagger-ui-bundle.js",
"kpi/static/js/swagger/swagger-ui-standalone-preset.js",
"msw-mocks/*"
"msw-mocks/*",
"package.json"
]
},
"vcs": {
Expand Down
Loading