Align the js-ts-mode entry with the javascript-mode entries in the
default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is
not associated with .js files.
* lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp.
Fixes: 2023-01-20 6b2f85caa6ca "Make tree-sitter based modes optional"
(cherry picked from commit
6299eb0fe54c87bcbb0f6ab4de3e4f9e250d4586)
(treesit-major-mode-setup)
(add-to-list 'auto-mode-alist
- '("\\(\\.js[mx]\\|\\.har\\)\\'" . js-ts-mode))))
+ '("\\(\\.js[mx]?\\|\\.har\\)\\'" . js-ts-mode))))
(derived-mode-add-parents 'js-ts-mode '(js-mode))