Skip to content

Commit a5a9885

Browse files
yardenshohamwxiaoguangsilverwind
authored
Bump htmx to 2.0.0 (#31413)
Tested Subscribe, Follow, Star, Watch, and System Status. --------- Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent c60ef94 commit a5a9885

File tree

9 files changed

+13
-14
lines changed

9 files changed

+13
-14
lines changed

.eslintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ overrides:
3333
- files: ["web_src/**/*"]
3434
globals:
3535
__webpack_public_path__: true
36+
htmx: true
3637
process: false # https://github.com/webpack/webpack/issues/15833
3738
- files: ["web_src/**/*", "docs/**/*"]
3839
env:

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"esbuild-loader": "4.2.0",
2929
"escape-goat": "4.0.0",
3030
"fast-glob": "3.3.2",
31-
"htmx.org": "1.9.12",
31+
"htmx.org": "2.0.0",
3232
"idiomorph": "0.3.0",
3333
"jquery": "3.7.1",
3434
"katex": "0.16.10",

web_src/js/features/common-global.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {showTemporaryTooltip} from '../modules/tippy.js';
1111
import {confirmModal} from './comp/ConfirmModal.js';
1212
import {showErrorToast} from '../modules/toast.js';
1313
import {request, POST, GET} from '../modules/fetch.js';
14-
import '../htmx.js';
1514

1615
const {appUrl, appSubUrl, csrfToken, i18n} = window.config;
1716

web_src/js/globals.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import jquery from 'jquery';
2+
import htmx from 'htmx.org/dist/htmx.esm.js';
3+
4+
window.$ = window.jQuery = jquery;
5+
window.htmx = htmx;

web_src/js/htmx.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as htmx from 'htmx.org';
21
import {showErrorToast} from './modules/toast.js';
32

43
// https://github.com/bigskysoftware/idiomorph#htmx

web_src/js/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors
22
import './bootstrap.js';
3+
import './htmx.js';
34

45
import {initRepoActivityTopAuthorsChart} from './components/RepoActivityTopAuthors.vue';
56
import {initScopedAccessTokenCategories} from './components/ScopedAccessTokenSelector.vue';

web_src/js/jquery.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

webpack.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
mode: isProduction ? 'production' : 'development',
7777
entry: {
7878
index: [
79-
fileURLToPath(new URL('web_src/js/jquery.js', import.meta.url)),
79+
fileURLToPath(new URL('web_src/js/globals.js', import.meta.url)),
8080
fileURLToPath(new URL('web_src/fomantic/build/semantic.js', import.meta.url)),
8181
fileURLToPath(new URL('web_src/js/index.js', import.meta.url)),
8282
fileURLToPath(new URL('node_modules/easymde/dist/easymde.min.css', import.meta.url)),
@@ -195,9 +195,6 @@ export default {
195195
],
196196
},
197197
plugins: [
198-
new webpack.ProvidePlugin({ // for htmx extensions
199-
htmx: 'htmx.org',
200-
}),
201198
new DefinePlugin({
202199
__VUE_OPTIONS_API__: true, // at the moment, many Vue components still use the Vue Options API
203200
__VUE_PROD_DEVTOOLS__: false, // do not enable devtools support in production

0 commit comments

Comments
 (0)