shinkansen-pinion 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,28 @@
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-sprockets)\\/',
19
+ '/node_modules\\/(?!shinkansen-cogs)\\/',
20
+ '/node_modules\\/(?!react-component-snapshot)\\/'
21
+ ],
22
+ moduleFileExtensions: ['js', 'jsx', 'mjs'],
23
+ testEnvironment: 'jsdom',
24
+ setupFilesAfterEnv: [
25
+ '<rootDir>/jest.before-each.mjs',
26
+ '<rootDir>/jest.after-each.mjs'
27
+ ]
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-pinion",
3
- "version": "2.0.8",
3
+ "version": "2.1.0",
4
4
  "description": "Shinkansen Pinion",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -70,13 +70,16 @@
70
70
  "@storybook/react": "^8.6.7",
71
71
  "@storybook/react-webpack5": "^8.6.7",
72
72
  "@storybook/theming": "^8.6.7",
73
+ "@testing-library/jest-dom": "^6.6.3",
74
+ "@testing-library/react": "^16.2.0",
73
75
  "@types/babel__register": "^7.17.3",
74
76
  "@types/chai": "^5.2.0",
75
77
  "@types/debug": "^4.1.12",
76
78
  "@types/jest": "^29.5.14",
77
79
  "@types/mocha": "^10.0.10",
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",
@@ -89,6 +92,7 @@
89
92
  "globals": "^16.0.0",
90
93
  "husky": "^9.1.7",
91
94
  "jest": "^29.7.0",
95
+ "jest-environment-jsdom": "^29.7.0",
92
96
  "mini-css-extract-plugin": "^2.9.2",
93
97
  "mocha": "^11.1.0",
94
98
  "perfectionist": "^2.4.0",
@@ -102,17 +106,17 @@
102
106
  "postcss-scss": "^4.0.9",
103
107
  "prettier": "^3.5.3",
104
108
  "prop-types": "^15.8.1",
105
- "react": "18.3.1",
106
- "react-dom": "18.3.1",
109
+ "react": "^19.0.0",
110
+ "react-component-snapshot": "^0.0.1",
111
+ "react-dom": "^19.0.0",
107
112
  "react-router": "^7.3.0",
108
- "react-test-renderer": "18.3.1",
109
113
  "remove-files-webpack-plugin": "^1.5.0",
110
114
  "sass": "^1.86.0",
111
115
  "sass-loader": "^16.0.5",
112
- "shinkansen-cogs": "2.0.10",
116
+ "shinkansen-cogs": "2.1.0",
113
117
  "shinkansen-rails": "1.1.6",
114
118
  "shinkansen-signals": "1.2.6",
115
- "shinkansen-sprockets": "2.0.6",
119
+ "shinkansen-sprockets": "2.1.0",
116
120
  "sinon": "^19.0.2",
117
121
  "storybook": "^8.6.7",
118
122
  "stylelint": "^16.16.0",
@@ -122,10 +126,10 @@
122
126
  "webpack-cli": "^6.0.1"
123
127
  },
124
128
  "peerDependencies": {
125
- "shinkansen-cogs": "2.0.x",
129
+ "shinkansen-cogs": "2.1.x",
126
130
  "shinkansen-rails": "1.1.x",
127
131
  "shinkansen-signals": "1.2.x",
128
- "shinkansen-sprockets": "2.0.x"
132
+ "shinkansen-sprockets": "2.1.x"
129
133
  },
130
134
  "imports": {
131
135
  "#build/paths": "./build/paths.mjs",