@rtorcato/js-tooling 2.6.0 → 2.7.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rtorcato/js-tooling",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "JavaScript and TypeScript tooling for Node.js, React, Next.js, and Vitest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
"tooling/vitest/vitest.config.react.d.mts",
|
|
62
62
|
"tooling/vitest/vitest.setup.mjs",
|
|
63
63
|
"tooling/vitest/vitest.setup.d.mts",
|
|
64
|
+
"tooling/vitest/jsdom-shims.mjs",
|
|
65
|
+
"tooling/vitest/jsdom-shims.d.mts",
|
|
64
66
|
"tooling/tsup/index.ts",
|
|
65
67
|
"tooling/biome/biome.json",
|
|
66
68
|
"tooling/semantic-release/*.mjs",
|
|
@@ -123,6 +125,10 @@
|
|
|
123
125
|
"types": "./tooling/vitest/vitest.setup.d.mts",
|
|
124
126
|
"import": "./tooling/vitest/vitest.setup.mjs"
|
|
125
127
|
},
|
|
128
|
+
"./vitest/jsdom-shims": {
|
|
129
|
+
"types": "./tooling/vitest/jsdom-shims.d.mts",
|
|
130
|
+
"import": "./tooling/vitest/jsdom-shims.mjs"
|
|
131
|
+
},
|
|
126
132
|
"./tsup": "./tooling/tsup/index.ts",
|
|
127
133
|
"./biome": "./tooling/biome/biome.json",
|
|
128
134
|
"./semantic-release": {
|
|
@@ -146,20 +152,20 @@
|
|
|
146
152
|
},
|
|
147
153
|
"devDependencies": {
|
|
148
154
|
"@biomejs/biome": "^2.3.0",
|
|
155
|
+
"@commitlint/cli": "^20.1.0",
|
|
156
|
+
"@commitlint/config-conventional": "^21.0.1",
|
|
149
157
|
"@commitlint/types": "^20.0.0",
|
|
150
158
|
"@eslint/js": "^9.38.0",
|
|
151
159
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.2",
|
|
152
|
-
"@commitlint/cli": "^20.1.0",
|
|
153
|
-
"@commitlint/config-conventional": "^21.0.1",
|
|
154
160
|
"@next/eslint-plugin-next": "^16.0.0",
|
|
155
161
|
"@playwright/test": "^1.56.1",
|
|
156
162
|
"@semantic-release/changelog": "^6.0.3",
|
|
157
163
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
158
164
|
"@semantic-release/exec": "^7.1.0",
|
|
159
165
|
"@semantic-release/git": "^10.0.1",
|
|
160
|
-
"@semantic-release/github": "^12.0.
|
|
161
|
-
"@semantic-release/npm": "^13.1.
|
|
162
|
-
"@semantic-release/release-notes-generator": "^14.1.
|
|
166
|
+
"@semantic-release/github": "^12.0.8",
|
|
167
|
+
"@semantic-release/npm": "^13.1.5",
|
|
168
|
+
"@semantic-release/release-notes-generator": "^14.1.1",
|
|
163
169
|
"@total-typescript/ts-reset": "0.6.1",
|
|
164
170
|
"@types/fs-extra": "^11.0.4",
|
|
165
171
|
"@types/node": "^25.9.1",
|
|
@@ -175,19 +181,20 @@
|
|
|
175
181
|
"eslint": "9.38.0",
|
|
176
182
|
"eslint-plugin-import": "^2.32.0",
|
|
177
183
|
"eslint-plugin-jest": "29.0.1",
|
|
178
|
-
"jest": "^29.7.0",
|
|
179
184
|
"husky": "^9.1.7",
|
|
180
185
|
"is-ci": "^4.1.0",
|
|
186
|
+
"jest": "^29.7.0",
|
|
187
|
+
"jsdom": "^26.1.0",
|
|
188
|
+
"knip": "^5.61.3",
|
|
181
189
|
"lint-staged": "^16.2.6",
|
|
182
190
|
"prettier": "^3.6.2",
|
|
183
191
|
"rimraf": "6.0.1",
|
|
184
|
-
"semantic-release": "^25.0.
|
|
192
|
+
"semantic-release": "^25.0.3",
|
|
185
193
|
"ts-jest": "^29.4.5",
|
|
186
194
|
"tsup": "8.5.1",
|
|
187
195
|
"typescript": "^5.9.3",
|
|
188
196
|
"typescript-eslint": "^8.60.0",
|
|
189
|
-
"vitest": "4.0.3"
|
|
190
|
-
"knip": "^5.61.3"
|
|
197
|
+
"vitest": "4.0.3"
|
|
191
198
|
},
|
|
192
199
|
"peerDependencies": {
|
|
193
200
|
"@biomejs/biome": "^2.0.0",
|
|
@@ -201,7 +208,7 @@
|
|
|
201
208
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
202
209
|
"@semantic-release/exec": "^7.0.0",
|
|
203
210
|
"@semantic-release/git": "^10.0.0",
|
|
204
|
-
"@semantic-release/github": "^12.0.
|
|
211
|
+
"@semantic-release/github": "^12.0.8",
|
|
205
212
|
"@semantic-release/npm": "^13.0.0",
|
|
206
213
|
"@semantic-release/release-notes-generator": "^14.0.0",
|
|
207
214
|
"@total-typescript/ts-reset": "^0.6.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// jsdom doesn't ship the browser APIs that Radix UI, cmdk, embla-carousel,
|
|
2
|
+
// react-day-picker and friends call at mount time. Import this file from your
|
|
3
|
+
// vitest setupFiles to install no-op polyfills for all of them:
|
|
4
|
+
//
|
|
5
|
+
// // vitest.config.ts -> test.setupFiles
|
|
6
|
+
// import '@rtorcato/js-tooling/vitest/jsdom-shims'
|
|
7
|
+
//
|
|
8
|
+
// Side-effect only; nothing is exported.
|
|
9
|
+
|
|
10
|
+
if (typeof Element !== 'undefined') {
|
|
11
|
+
if (!Element.prototype.hasPointerCapture) {
|
|
12
|
+
Element.prototype.hasPointerCapture = () => false
|
|
13
|
+
}
|
|
14
|
+
if (!Element.prototype.setPointerCapture) {
|
|
15
|
+
Element.prototype.setPointerCapture = () => {}
|
|
16
|
+
}
|
|
17
|
+
if (!Element.prototype.releasePointerCapture) {
|
|
18
|
+
Element.prototype.releasePointerCapture = () => {}
|
|
19
|
+
}
|
|
20
|
+
if (!Element.prototype.scrollIntoView) {
|
|
21
|
+
Element.prototype.scrollIntoView = () => {}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (typeof globalThis.ResizeObserver === 'undefined') {
|
|
26
|
+
globalThis.ResizeObserver = class ResizeObserver {
|
|
27
|
+
observe() {}
|
|
28
|
+
unobserve() {}
|
|
29
|
+
disconnect() {}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (typeof globalThis.IntersectionObserver === 'undefined') {
|
|
34
|
+
globalThis.IntersectionObserver = class IntersectionObserver {
|
|
35
|
+
observe() {}
|
|
36
|
+
unobserve() {}
|
|
37
|
+
disconnect() {}
|
|
38
|
+
takeRecords() {
|
|
39
|
+
return []
|
|
40
|
+
}
|
|
41
|
+
root = null
|
|
42
|
+
rootMargin = ''
|
|
43
|
+
thresholds = []
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (typeof window !== 'undefined' && typeof window.matchMedia === 'undefined') {
|
|
48
|
+
window.matchMedia = (query) => ({
|
|
49
|
+
matches: false,
|
|
50
|
+
media: query,
|
|
51
|
+
onchange: null,
|
|
52
|
+
addListener: () => {},
|
|
53
|
+
removeListener: () => {},
|
|
54
|
+
addEventListener: () => {},
|
|
55
|
+
removeEventListener: () => {},
|
|
56
|
+
dispatchEvent: () => false,
|
|
57
|
+
})
|
|
58
|
+
}
|