htmx.org 2.0.4 → 2.0.6

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
@@ -5,7 +5,7 @@
5
5
  "AJAX",
6
6
  "HTML"
7
7
  ],
8
- "version": "2.0.4",
8
+ "version": "2.0.6",
9
9
  "homepage": "https://htmx.org/",
10
10
  "bugs": {
11
11
  "url": "https://github.com/bigskysoftware/htmx/issues"
@@ -22,16 +22,24 @@
22
22
  ],
23
23
  "main": "dist/htmx.esm.js",
24
24
  "types": "dist/htmx.esm.d.ts",
25
+ "jsdelivr": "dist/htmx.min.js",
25
26
  "unpkg": "dist/htmx.min.js",
26
27
  "web-types": "editors/jetbrains/htmx.web-types.json",
27
28
  "scripts": {
28
- "dist": "./scripts/dist.sh && npm run types-generate",
29
- "lint": "eslint src/htmx.js test/attributes/ test/core/ test/util/",
30
- "format": "eslint --fix src/htmx.js test/attributes/ test/core/ test/util/",
29
+ "dist": "./scripts/dist.sh && npm run types-generate && npm run web-types-generate",
30
+ "lint": "eslint src/htmx.js test/attributes/ test/core/ test/util/ scripts/*.mjs",
31
+ "format": "eslint --fix src/htmx.js test/attributes/ test/core/ test/util/ scripts/*.mjs",
31
32
  "types-check": "tsc src/htmx.js --noEmit --checkJs --target es6 --lib dom,dom.iterable",
32
33
  "types-generate": "tsc dist/htmx.esm.js --declaration --emitDeclarationOnly --allowJs --outDir dist",
33
- "test": "npm run lint && npm run types-check && mocha-chrome test/index.html",
34
+ "test": "npm run lint && npm run types-check && npm run test:chrome",
35
+ "test:debug": "web-test-runner --manual --open",
36
+ "test:chrome": "playwright install chromium && web-test-runner --browsers chromium --playwright",
37
+ "test:firefox": "playwright install firefox && web-test-runner --concurrency 1 --browsers firefox --playwright",
38
+ "test:webkit": "playwright install webkit && web-test-runner --browsers webkit --playwright",
39
+ "test:all": "playwright install chromium firefox webkit && web-test-runner --concurrency 1 --browsers chromium firefox webkit --playwright",
40
+ "test:ci": "npm run lint && npm run types-check && npm run test:all",
34
41
  "ws-tests": "cd ./test/ws-sse && node ./server.js",
42
+ "web-types-generate": "node ./scripts/generate-web-types.mjs",
35
43
  "www": "bash ./scripts/www.sh",
36
44
  "sha": "bash ./scripts/sha.sh"
37
45
  },
@@ -40,8 +48,11 @@
40
48
  "url": "git+https://github.com/bigskysoftware/htmx.git"
41
49
  },
42
50
  "eslintConfig": {
43
- "extends": "standard",
51
+ "extends": ["standard", "plugin:mocha/recommended"],
44
52
  "rules": {
53
+ "mocha/consistent-spacing-between-blocks": 0,
54
+ "mocha/no-setup-in-describe": 0,
55
+ "mocha/no-skipped-tests": 0,
45
56
  "camelcase": 0,
46
57
  "no-var": 0,
47
58
  "no-undef": 0,
@@ -58,6 +69,10 @@
58
69
  "no-useless-call": 0,
59
70
  "no-useless-escape": 0,
60
71
  "no-unused-expressions": 0,
72
+ "no-restricted-properties": ["error", {
73
+ "property": "substr",
74
+ "message": "Use .slice or .substring instead of .substr"
75
+ }],
61
76
  "space-before-function-paren": [
62
77
  "error",
63
78
  "never"
@@ -66,19 +81,21 @@
66
81
  },
67
82
  "devDependencies": {
68
83
  "@types/node": "20.0.0",
69
- "chai": "^4.3.10",
70
- "chai-dom": "^1.12.0",
71
- "eslint": "^8.56.0",
84
+ "@types/parse5": "^7.0.0",
85
+ "@web/test-runner": "^0.20.2",
86
+ "@web/test-runner-playwright": "^0.11.0",
87
+ "chai": "^4.5.0",
88
+ "chai-dom": "^1.12.1",
89
+ "eslint": "^8.57.1",
72
90
  "eslint-config-standard": "^17.1.0",
73
91
  "eslint-plugin-import": "^2.29.1",
92
+ "eslint-plugin-mocha": "^10.5.0",
74
93
  "fs-extra": "^9.1.0",
75
- "mocha": "10.1.0",
76
- "mocha-chrome": "https://github.com/Telroshan/mocha-chrome",
77
- "mocha-webdriver": "^0.3.2",
94
+ "mocha": "^11.1.0",
78
95
  "mock-socket": "^9.3.1",
79
- "sinon": "^9.2.4",
96
+ "sinon": "^10.0.1",
80
97
  "typescript": "^5.5.4",
81
- "uglify-js": "^3.17.4",
82
- "ws": "^8.14.2"
98
+ "uglify-js": "^3.19.3",
99
+ "ws": "^8.18.1"
83
100
  }
84
101
  }