shinkansen-engine 2.0.8 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/babel.config.cjs CHANGED
@@ -52,7 +52,7 @@ module.exports = (api) => {
52
52
  presets,
53
53
  plugins,
54
54
  ignore: [
55
- /node_modules\/(?!shinkansen|@modernpoacher)/
55
+ /node_modules\/(?!shinkansen|@modernpoacher|react-component-snapshot)/
56
56
  ]
57
57
  }
58
58
  }
package/eslint.config.mjs CHANGED
@@ -80,7 +80,8 @@ export default [
80
80
  ignores: [
81
81
  'src',
82
82
  'stories',
83
- 'test'
83
+ 'test',
84
+ 'jest.*.mjs'
84
85
  ],
85
86
  languageOptions: {
86
87
  globals: {
@@ -145,7 +146,8 @@ export default [
145
146
  standard({
146
147
  files: [
147
148
  'src/**/__tests__/**/*.jsx',
148
- 'stories/**/__tests__/**/*.jsx'
149
+ 'stories/**/__tests__/**/*.jsx',
150
+ 'jest.*.mjs'
149
151
  ],
150
152
  languageOptions: {
151
153
  parser: babelParser,
@@ -0,0 +1,10 @@
1
+ afterEach(() => {
2
+ const {
3
+ body
4
+ } = document
5
+
6
+ Array.from(body.children)
7
+ .forEach((child) => {
8
+ body.removeChild(child)
9
+ })
10
+ })
@@ -0,0 +1 @@
1
+ beforeEach(() => {})
@@ -0,0 +1,34 @@
1
+ export default {
2
+ bail: true,
3
+ verbose: true,
4
+ rootDir: '.',
5
+ roots: [
6
+ './src'
7
+ ],
8
+ clearMocks: true,
9
+ collectCoverage: true,
10
+ coverageDirectory: './coverage',
11
+ coverageProvider: 'v8',
12
+ testRegex: '(/__tests__/.*|(\\.|/))(test|spec)\\.(mjs?|jsx?)$',
13
+ transform: {
14
+ '^.+\\.jsx$': 'babel-jest',
15
+ '^.+\\.mjs$': 'babel-jest'
16
+ },
17
+ transformIgnorePatterns: [
18
+ '/node_modules\\/(?!shinkansen-cogs)\\/',
19
+ '/node_modules\\/(?!shinkansen-sprockets)\\/',
20
+ '/node_modules\\/(?!shinkansen-gears)\\/',
21
+ '/node_modules\\/(?!shinkansen-pinion)\\/',
22
+ '/node_modules\\/(?!shinkansen-rails)\\/',
23
+ '/node_modules\\/(?!shinkansen-signals)\\/',
24
+ '/node_modules\\/(?!shinkansen-pantograph)\\/',
25
+ '/node_modules\\/(?!shinkansen-transmission)\\/',
26
+ '/node_modules\\/(?!react-component-snapshot)\\/'
27
+ ],
28
+ moduleFileExtensions: ['js', 'jsx', 'mjs'],
29
+ testEnvironment: 'jsdom',
30
+ setupFilesAfterEnv: [
31
+ '<rootDir>/jest.before-each.mjs',
32
+ '<rootDir>/jest.after-each.mjs'
33
+ ]
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-engine",
3
- "version": "2.0.8",
3
+ "version": "2.1.0",
4
4
  "description": "Shinkansen Engine",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -63,20 +63,23 @@
63
63
  "@modernpoacher/design-system": "2.0.2",
64
64
  "@sequencemedia/eslint-config-standard": "^0.2.43",
65
65
  "@sequencemedia/eslint-config-typescript": "^0.1.62",
66
- "@storybook/addon-actions": "^8.6.6",
67
- "@storybook/addon-essentials": "^8.6.6",
68
- "@storybook/addon-links": "^8.6.6",
66
+ "@storybook/addon-actions": "^8.6.7",
67
+ "@storybook/addon-essentials": "^8.6.7",
68
+ "@storybook/addon-links": "^8.6.7",
69
69
  "@storybook/addon-webpack5-compiler-babel": "^3.0.5",
70
- "@storybook/manager-api": "^8.6.6",
71
- "@storybook/react": "^8.6.6",
72
- "@storybook/react-webpack5": "^8.6.6",
73
- "@storybook/theming": "^8.6.6",
70
+ "@storybook/manager-api": "^8.6.7",
71
+ "@storybook/react": "^8.6.7",
72
+ "@storybook/react-webpack5": "^8.6.7",
73
+ "@storybook/theming": "^8.6.7",
74
+ "@testing-library/jest-dom": "^6.6.3",
75
+ "@testing-library/react": "^16.2.0",
74
76
  "@types/babel__register": "^7.17.3",
75
77
  "@types/chai": "^5.2.0",
76
78
  "@types/debug": "^4.1.12",
77
79
  "@types/jest": "^29.5.14",
78
- "@types/react": "18.3.13",
79
- "@types/react-test-renderer": "^19.0.0",
80
+ "@types/prop-types": "^15.7.14",
81
+ "@types/react": "^19.0.11",
82
+ "@types/react-dom": "^19.0.4",
80
83
  "@typescript-eslint/eslint-plugin": "^8.26.1",
81
84
  "@typescript-eslint/parser": "^8.26.1",
82
85
  "autoprefixer": "^10.4.21",
@@ -86,10 +89,11 @@
86
89
  "cross-env": "^7.0.3",
87
90
  "eslint": "^9.22.0",
88
91
  "eslint-plugin-react": "^7.37.4",
89
- "eslint-plugin-storybook": "^0.11.4",
92
+ "eslint-plugin-storybook": "^0.11.6",
90
93
  "globals": "^16.0.0",
91
94
  "husky": "^9.1.7",
92
95
  "jest": "^29.7.0",
96
+ "jest-environment-jsdom": "^29.7.0",
93
97
  "mini-css-extract-plugin": "^2.9.2",
94
98
  "mocha": "^11.1.0",
95
99
  "perfectionist": "^2.4.0",
@@ -101,23 +105,23 @@
101
105
  "postcss-map": "^0.11.0",
102
106
  "prettier": "^3.5.3",
103
107
  "prop-types": "^15.8.1",
104
- "react": "18.3.1",
105
- "react-dom": "18.3.1",
108
+ "react": "^19.0.0",
109
+ "react-component-snapshot": "^0.0.1",
110
+ "react-dom": "^19.0.0",
106
111
  "react-router": "^7.3.0",
107
- "react-test-renderer": "18.3.1",
108
112
  "remove-files-webpack-plugin": "^1.5.0",
109
- "sass": "^1.85.1",
113
+ "sass": "^1.86.0",
110
114
  "sass-loader": "^16.0.5",
111
- "shinkansen-cogs": "2.0.9",
112
- "shinkansen-gears": "2.0.5",
115
+ "shinkansen-cogs": "2.1.0",
116
+ "shinkansen-gears": "2.1.0",
113
117
  "shinkansen-pantograph": "1.5.8",
114
- "shinkansen-pinion": "2.0.6",
118
+ "shinkansen-pinion": "2.1.0",
115
119
  "shinkansen-rails": "1.1.6",
116
120
  "shinkansen-signals": "1.2.6",
117
- "shinkansen-sprockets": "2.0.6",
121
+ "shinkansen-sprockets": "2.1.0",
118
122
  "shinkansen-transmission": "2.5.6",
119
123
  "sinon": "^19.0.2",
120
- "storybook": "^8.6.6",
124
+ "storybook": "^8.6.7",
121
125
  "stylelint": "^16.16.0",
122
126
  "stylelint-config-recommended-scss": "^14.1.0",
123
127
  "stylelint-scss": "^6.11.1",
@@ -125,13 +129,13 @@
125
129
  "webpack-cli": "^6.0.1"
126
130
  },
127
131
  "peerDependencies": {
128
- "shinkansen-cogs": "2.0.x",
129
- "shinkansen-gears": "2.0.x",
132
+ "shinkansen-cogs": "2.1.x",
133
+ "shinkansen-gears": "2.1.x",
130
134
  "shinkansen-pantograph": "1.5.x",
131
- "shinkansen-pinion": "2.0.x",
135
+ "shinkansen-pinion": "2.1.x",
132
136
  "shinkansen-rails": "1.1.x",
133
137
  "shinkansen-signals": "1.2.x",
134
- "shinkansen-sprockets": "2.0.x",
138
+ "shinkansen-sprockets": "2.1.x",
135
139
  "shinkansen-transmission": "2.5.x"
136
140
  },
137
141
  "imports": {