Skip to content

Commit ba3c0d0

Browse files
authored
Release 12.0.0 (#114)
## What's Changed * feat: add ESLint playwright plugin by @oltionchampari in #106 * update release.yaml for automated release workflow by @datavisyn-bot in #102 * feat: Added useTriggerFrame, useDeepEffect and useDeepMemo to exhaustive deps by @dvmoritzschoefl in #113 * deps: rspack v1.1, TypeScript v5.7, ESLint v8, ... by @puehringer in #112 * feat: rspack in storybook 8 by @puehringer in #108 ## New Contributors * @datavisyn-bot made their first contribution in #102 * @dvmoritzschoefl made their first contribution in #113 **Full Changelog**: v11.2.0...v12.0.0
2 parents 6e8d147 + c070dfe commit ba3c0d0

File tree

15 files changed

+5922
-7759
lines changed

15 files changed

+5922
-7759
lines changed

.yarn/releases/yarn-4.1.0.cjs

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

.yarn/releases/yarn-4.6.0.cjs

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: node-modules
22

3-
yarnPath: .yarn/releases/yarn-4.1.0.cjs
3+
yarnPath: .yarn/releases/yarn-4.6.0.cjs

bin/commands/lint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ module.exports = {
88
type: 'boolean',
99
}),
1010
handler: (args) => {
11-
call('eslint', `${args.cache ? '--cache' : ''} --no-error-on-unmatched-pattern ${(args.strings || []).join(' ')} "src/**/*.ts{,x}" "tests/**/*.ts{,x}" "cypress/**/*.ts{,x}"`);
11+
call('eslint', `${args.cache ? '--cache' : ''} --no-error-on-unmatched-pattern ${(args.strings || []).join(' ')} "src/**/*.ts{,x}" "tests/**/*.ts{,x}" "cypress/**/*.ts{,x}" "playwright/**/*.ts{,x}"`);
1212
},
1313
};

config/eslintrc.template.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
module.exports = ({ tsconfigRootDir, optimizeImports }) => ({
1+
module.exports = ({ tsconfigRootDir, optimizeImports = true }) => ({
22
root: true,
33
extends: [
44
'airbnb',
5-
'airbnb-typescript',
5+
'@kesills/airbnb-typescript',
66
'airbnb/hooks',
77
'eslint:recommended',
88
'plugin:import/recommended',
@@ -17,7 +17,6 @@ module.exports = ({ tsconfigRootDir, optimizeImports }) => ({
1717
browser: true,
1818
es6: true,
1919
jest: true,
20-
'cypress/globals': true,
2120
},
2221
globals: {
2322
Atomics: 'readonly',
@@ -63,14 +62,13 @@ module.exports = ({ tsconfigRootDir, optimizeImports }) => ({
6362
'@typescript-eslint/no-unused-vars': 'warn',
6463
'max-classes-per-file': 'off',
6564
'no-param-reassign': ['warn', { props: true, ignorePropertyModificationsFor: ['state'] }], // Exclude state as required by redux-toolkit: https://redux-toolkit.js.org/usage/immer-reducers#linting-state-mutations
66-
'cypress/unsafe-to-chain-command': 'off',
6765
'import/no-extraneous-dependencies': 'off',
6866
'import/no-webpack-loader-syntax': 'off', // Disable to allow webpack file-loaders syntax
6967
'import/no-unresolved': 'off', // Disable to allow webpack file-loaders syntax
7068
'import/prefer-default-export': 'off',
7169
...(optimizeImports ? {
7270
'import/order': [
73-
1,
71+
'error',
7472
{
7573
groups: [['builtin', 'external'], 'internal', ['sibling', 'parent']],
7674
pathGroups: [
@@ -87,7 +85,7 @@ module.exports = ({ tsconfigRootDir, optimizeImports }) => ({
8785
},
8886
],
8987
'sort-imports': [
90-
1,
88+
'error',
9189
{
9290
ignoreCase: false,
9391
ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
@@ -130,16 +128,18 @@ module.exports = ({ tsconfigRootDir, optimizeImports }) => ({
130128
},
131129
],
132130
'react-compiler/react-compiler': 'warn',
131+
'react-hooks/exhaustive-deps': ['warn', {
132+
additionalHooks: '(useTriggerFrame|useDeepEffect|useDeepMemo|useDeepCallback|useDeepCompareEffect)',
133+
}],
134+
/*
135+
The fork of the eslint-config-airbnb-typescript package has added ESLint Stylistic plugin
136+
to the config. see:https://github.com/Kenneth-Sills/eslint-config-airbnb-typescript/pull/3
137+
Some of the stylistic rules are not compatible with our current prettier config so we disable them.
138+
*/
139+
'@stylistic/indent': 'off',
140+
'@stylistic/comma-dangle': 'off',
133141
},
134142
overrides: [
135-
{
136-
files: ['cypress/**/*'],
137-
extends: ['plugin:cypress/recommended', 'plugin:chai-friendly/recommended'],
138-
rules: {
139-
'cypress/unsafe-to-chain-command': 'warn',
140-
},
141-
plugins: ['cypress', 'chai-friendly'],
142-
},
143143
{
144144
files: ['{src|tests}/**/*.{test|spec}.ts'],
145145
extends: ['plugin:jest/recommended'],

config/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require('fs');
55
const { defineConfig } = require('@rspack/cli');
66
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
77
const dotenv = require('dotenv');
8-
const { DotenvPlugin } = require('rspack-plugin-dotenv');
8+
const DotenvPlugin = require('dotenv-webpack');
99
const dotenvExpand = require('dotenv-expand');
1010
const {
1111
CopyRspackPlugin, DefinePlugin, SwcJsMinimizerRspackPlugin,

config/storybook.main.template.js

Lines changed: 24 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,44 @@
1+
const { resolve } = require('path');
2+
13
/**
2-
* @type {import('@storybook/react-webpack5').StorybookConfig}
4+
* @type {import('storybook-react-rsbuild').StorybookConfig}
35
*/
46
module.exports = {
57
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
8+
core: {
9+
disableTelemetry: true,
10+
},
11+
docs: {
12+
autodocs: true,
13+
},
614
addons: [
715
'@storybook/addon-links',
816
'@storybook/addon-essentials',
917
'@storybook/addon-interactions',
10-
{
11-
name: '@storybook/addon-styling',
12-
options: {
13-
// This is our best guess to replicate the style config we are using in the rspack.config.js
14-
scssBuildRule: {
15-
test: /\.scss$/,
16-
use: [
17-
'style-loader',
18-
{
19-
loader: 'css-loader',
20-
options: { importLoaders: 1 },
21-
},
22-
'resolve-url-loader',
23-
{
24-
loader: 'sass-loader',
25-
options: {
26-
sourceMap: true,
27-
},
28-
},
29-
],
30-
},
31-
},
32-
},
33-
'storybook-addon-swc',
3418
],
3519
framework: {
36-
// TODO: as soon as rspack storybook integration is ready, use that: https://www.rspack.dev/guide/migrate-storybook
37-
name: '@storybook/react-webpack5',
20+
name: 'storybook-react-rsbuild',
3821
options: {
3922
builder: {
40-
useSWC: true,
23+
rsbuildConfigPath: resolve(__dirname, './storybook.rsbuild.config.ts'),
4124
},
4225
},
4326
},
44-
webpackFinal: async (config) => {
27+
rsbuildFinal: async (config) => {
28+
const reactDocgenLoaderRule = config.tools.rspack[1].module.rules[0];
29+
4530
// eslint-disable-next-line no-param-reassign
46-
config.module.rules = config.module.rules.flatMap((rule) => (rule.loader?.includes('swc-loader')
47-
? [
48-
{
49-
...rule,
50-
options: {
51-
...(rule?.options || {}),
52-
jsc: {
53-
...(rule?.options?.jsc || {}),
54-
parser: {
55-
...(rule?.options?.jsc?.parser || {}),
56-
// Sync rules with our rspack config
57-
decorators: true,
58-
},
59-
},
60-
},
61-
},
62-
{
63-
// In addition to the swc-loader rule from storybook, add a rule which allows transforming ts and tsx files (i.e. to transform node_modules/visyn_core)
64-
...rule,
65-
options: {
66-
...(rule?.options || {}),
67-
jsc: {
68-
...(rule?.options?.jsc || {}),
69-
parser: {
70-
...(rule?.options?.jsc?.parser || {}),
71-
// Sync rules with our rspack config
72-
decorators: true,
73-
},
74-
},
75-
},
76-
test: /\.(ts|tsx)$/,
77-
exclude: [],
78-
},
79-
]
80-
: [rule]));
31+
config.tools.rspack[1].module.rules = [
32+
reactDocgenLoaderRule,
33+
{
34+
// Copy the rule (found here: https://github.com/rspack-contrib/storybook-rsbuild/blob/c6b92bd1d40b63cebdf78b8bf75594ec0568b972/packages/framework-react/src/react-docs.ts#L27)
35+
// And modify it to not exclude node_modules
36+
...reactDocgenLoaderRule,
37+
test: /\.(tsx?)$/,
38+
exclude: /(\.(stories|story)\.(js|jsx|ts|tsx))/,
39+
},
40+
];
8141

8242
return config;
8343
},
84-
docs: {
85-
autodocs: true,
86-
},
8744
};

config/storybook.rsbuild.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from '@rsbuild/core';
2+
import { pluginReact } from '@rsbuild/plugin-react';
3+
import { pluginSass } from '@rsbuild/plugin-sass';
4+
5+
// This is the rsbuild configuration used by storybook, it is not the same as the rspack config!
6+
export default defineConfig({
7+
plugins: [pluginReact(), pluginSass()],
8+
});

package.json

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "visyn_scripts",
33
"description": "",
4-
"version": "11.3.0",
4+
"version": "12.0.0",
55
"author": {
66
"name": "datavisyn GmbH",
77
"email": "[email protected]",
@@ -33,76 +33,81 @@
3333
"dist": "npm run lint && npm run test"
3434
},
3535
"dependencies": {
36-
"@rsdoctor/cli": "^0.4.1",
37-
"@rsdoctor/rspack-plugin": "^0.4.1",
38-
"@rspack/cli": "~1.0.2",
39-
"@rspack/core": "~1.0.2",
36+
"@kesills/eslint-config-airbnb-typescript": "^20.0.0",
37+
"@rsbuild/core": "^1.2.0",
38+
"@rsbuild/plugin-react": "^1.1.0",
39+
"@rsbuild/plugin-sass": "^1.2.0",
40+
"@rsdoctor/cli": "^0.4.13",
41+
"@rsdoctor/rspack-plugin": "^0.4.13",
42+
"@rspack/cli": "~1.2.0",
43+
"@rspack/core": "~1.2.0",
4044
"@rspack/plugin-minify": "~0.7.5",
41-
"@rspack/plugin-react-refresh": "~1.0.0",
42-
"@swc/core": "~1.7.23",
43-
"@swc/helpers": "~0.5.13",
44-
"@swc/jest": "~0.2.36",
45+
"@rspack/plugin-react-refresh": "~1.0.1",
46+
"@stylistic/eslint-plugin": "^2.13.0",
47+
"@swc/core": "~1.10.9",
48+
"@swc/helpers": "~0.5.15",
49+
"@swc/jest": "~0.2.37",
4550
"@types/jest": "~27.4.1",
46-
"@types/node": "^20.16.4",
47-
"@typescript-eslint/eslint-plugin": "~7.18.0",
48-
"@typescript-eslint/parser": "~7.18.0",
49-
"dotenv": "^16.4.5",
50-
"dotenv-expand": "^11.0.6",
51-
"eslint": "^8.57.0",
51+
"@types/node": "^20.17.14",
52+
"@typescript-eslint/eslint-plugin": "^8.21.0",
53+
"@typescript-eslint/parser": "~8.21.0",
54+
"dotenv": "^16.4.7",
55+
"dotenv-expand": "^12.0.1",
56+
"dotenv-webpack": "^8.1.0",
57+
"eslint": "^8.57.1",
5258
"eslint-config-airbnb": "^19.0.4",
5359
"eslint-config-airbnb-base": "^15.0.0",
54-
"eslint-config-airbnb-typescript": "^18.0.0",
55-
"eslint-config-prettier": "^9.1.0",
60+
"eslint-config-prettier": "^10.0.1",
5661
"eslint-plugin-chai-friendly": "^1.0.1",
57-
"eslint-plugin-cypress": "^3.5.0",
58-
"eslint-plugin-import": "^2.30.0",
59-
"eslint-plugin-jest": "^27.9.0",
60-
"eslint-plugin-jsx-a11y": "^6.10.0",
61-
"eslint-plugin-prettier": "^5.2.1",
62-
"eslint-plugin-react": "^7.35.2",
63-
"eslint-plugin-react-compiler": "0.0.0-experimental-b8a7b48-20240830",
64-
"eslint-plugin-react-hooks": "^4.6.2",
62+
"eslint-plugin-import": "^2.31.0",
63+
"eslint-plugin-jest": "^28.11.0",
64+
"eslint-plugin-jsx-a11y": "^6.10.2",
65+
"eslint-plugin-playwright": "^2.1.0",
66+
"eslint-plugin-prettier": "^5.2.3",
67+
"eslint-plugin-react": "^7.37.4",
68+
"eslint-plugin-react-compiler": "0.0.0-experimental-decd7b8-20250118",
69+
"eslint-plugin-react-hooks": "^5.1.0",
6570
"eslint-plugin-unused-imports": "^4.1.4",
66-
"eslint-plugin-playwright": "^2.0.1",
6771
"fork-ts-checker-webpack-plugin": "^9.0.2",
68-
"fs-extra": "^11.2.0",
69-
"glob": "^11.0.0",
72+
"fs-extra": "^11.3.0",
73+
"glob": "^11.0.1",
7074
"html-loader": "~5.1.0",
71-
"html-webpack-plugin": "^5.6.0",
75+
"html-webpack-plugin": "^5.6.3",
7276
"identity-obj-proxy": "^3.0.0",
7377
"jest": "^27.5.1",
7478
"jest-raw-loader": "~1.0.1",
75-
"jest-resolve": "^27.4.2",
76-
"postcss": "^8.4.41",
79+
"jest-resolve": "^27.5.1",
80+
"postcss": "^8.5.1",
7781
"postcss-flexbugs-fixes": "^5.0.2",
7882
"postcss-loader": "^8.1.1",
79-
"postcss-normalize": "^10.0.1",
80-
"postcss-preset-env": "^10.0.2",
81-
"prettier": "^3.3.3",
83+
"postcss-normalize": "^13.0.1",
84+
"postcss-preset-env": "^10.1.3",
85+
"prettier": "^3.4.2",
8286
"react-dev-utils": "^12.0.1",
83-
"react-refresh": "^0.14.2",
87+
"react-refresh": "^0.16.0",
8488
"resolve-url-loader": "^5.0.0",
8589
"rimraf": "~6.0.1",
86-
"rspack-plugin-dotenv": "^0.0.3",
87-
"sass-embedded": "~1.78.0",
88-
"sass-loader": "^16.0.1",
90+
"sass-embedded": "~1.83.4",
91+
"sass-loader": "^16.0.4",
8992
"shx": "~0.3.4",
90-
"tailwindcss": "^3.4.10",
93+
"tailwindcss": "^3.4.17",
9194
"ts-node": "^10.9.2",
92-
"tslib": "~2.7.0",
93-
"typescript": "~5.5.4",
95+
"tslib": "~2.8.1",
96+
"typescript": "~5.7.3",
9497
"util": "^0.12.5",
95-
"webpack": "^5.94.0",
98+
"webpack": "^5.97.1",
9699
"yargs": "^17.7.2"
97100
},
98101
"devDependencies": {
99102
"@types/yargs": "^17.0.33",
100103
"http-server": "^14.1.1",
101-
"jest-dev-server": "^6.2.0"
104+
"jest-dev-server": "^6.2.0",
105+
"storybook": "^8.5.0",
106+
"storybook-react-rsbuild": "^0.1.8"
102107
},
103108
"peerDependencies": {
104-
"@types/react": "^18.3.5",
105-
"@types/react-dom": "^18.3.0",
109+
"@types/react": "^18.3.18",
110+
"@types/react-dom": "^18.3.5",
106111
"react": "^18.3.1",
107112
"react-dom": "^18.3.1"
108113
},
@@ -111,5 +116,5 @@
111116
"/node_modules/|/bin/|/tests_fixtures/"
112117
]
113118
},
114-
"packageManager": "yarn@4.1.0"
119+
"packageManager": "yarn@4.6.0"
115120
}

tests_fixtures/standalone_template/.storybook/preview.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import '../workspace.scss';
44
* @type {import('@storybook/react').Parameters}
55
*/
66
export const parameters = {
7-
actions: { argTypesRegex: '^on[A-Z].*' },
87
layout: 'fullscreen',
98
controls: {
109
matchers: {

0 commit comments

Comments
 (0)