Skip to content

Commit 7de9819

Browse files
MichaelWest22michaelwest-dv
authored andcommitted
Update Node Versions and types to fix latest tsc upgrade issues (#3455)
* Update Node Versions and types to fix latest tsc upgrade issues * fix playwright only test filtering that has broken from playwright browser updates --------- Co-authored-by: MichaelWest22 <michael.west@docuvera.com> (cherry picked from commit 5629997)
1 parent 0da136f commit 7de9819

File tree

4 files changed

+35
-24
lines changed

4 files changed

+35
-24
lines changed

package-lock.json

Lines changed: 27 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"dist": "./scripts/dist.sh && npm run types-generate && npm run web-types-generate",
3030
"lint": "eslint src/htmx.js test/attributes/ test/core/ test/util/ scripts/*.mjs",
3131
"format": "eslint --fix src/htmx.js test/attributes/ test/core/ test/util/ scripts/*.mjs",
32-
"types-check": "tsc src/htmx.js --noEmit --checkJs --target es6 --lib dom,dom.iterable",
32+
"types-check": "tsc src/htmx.js --noEmit --checkJs --target es6 --lib dom,dom.iterable --moduleResolution node",
3333
"types-generate": "tsc dist/htmx.esm.js --declaration --emitDeclarationOnly --allowJs --outDir dist",
3434
"test": "npm run lint && npm run types-check && npm run test:chrome",
3535
"test:debug": "web-test-runner --manual --open",
@@ -70,8 +70,8 @@
7070
"no-useless-escape": 0,
7171
"no-unused-expressions": 0,
7272
"no-restricted-properties": ["error", {
73-
"property": "substr",
74-
"message": "Use .slice or .substring instead of .substr"
73+
"property": "substr",
74+
"message": "Use .slice or .substring instead of .substr"
7575
}],
7676
"space-before-function-paren": [
7777
"error",
@@ -80,7 +80,7 @@
8080
}
8181
},
8282
"devDependencies": {
83-
"@types/node": "20.0.0",
83+
"@types/node": "^22.18.8",
8484
"@types/parse5": "^7.0.0",
8585
"@web/test-runner": "^0.20.2",
8686
"@web/test-runner-playwright": "^0.11.0",
@@ -91,10 +91,10 @@
9191
"eslint-plugin-import": "^2.29.1",
9292
"eslint-plugin-mocha": "^10.5.0",
9393
"fs-extra": "^9.1.0",
94-
"mocha": "^11.1.0",
94+
"mocha": "^11.7.4",
9595
"mock-socket": "^9.3.1",
9696
"sinon": "^10.0.1",
97-
"typescript": "^5.5.4",
97+
"typescript": "^5.9.3",
9898
"uglify-js": "^3.19.3",
9999
"ws": "^8.18.1"
100100
}

test/attributes/hx-boost.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe('hx-boost attribute', function() {
206206
div.innerHTML.should.equal('Boosted!')
207207
})
208208

209-
if (window.__playwright__binding__ && /chrome/i.test(navigator.userAgent)) {
209+
if (/headlesschrome/i.test(navigator.userAgent)) {
210210
it('ctrlKey mouse click does not boost', function() {
211211
// Test only works well in playwright with chome for code coverage as otherwise it opens a new tab breaking things
212212
this.server.respondWith('GET', '/test', 'Boosted')

test/attributes/hx-trigger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ describe('hx-trigger attribute', function() {
10381038
}, 250)
10391039
})
10401040

1041-
if (window.__playwright__binding__) {
1041+
if (/headlesschrome/i.test(navigator.userAgent)) {
10421042
it('scrolling triggers intersect event', function(done) {
10431043
// test only works reliably with playwright
10441044
this.server.respondWith('GET', '/test', 'test')

0 commit comments

Comments
 (0)