On Sun, Nov 13, 2022 at 05:46:08AM -0800, Per Bothner wrote: > > > On 11/13/22 01:22, Hilmar Preuße wrote: > > hopefully this is not a FAQ, but I found nothing in the archive. > > > > What is the status of the code sitting in subdir "js"? To me this code > > looks quite unmaintained. > > It is definitely maintained. It hasn't seen much development recently > (it works pretty well), though I have some things I'd like to change if/when > I get time. > > However, the directory seems to have some old crud and could probably be > cleaned up. > Specifically, I don't think yarn.lock is needed or used at this point.
I'm trying to check this directory. npm is still needed to install tools under the js/ directory: modernizr, eslint, tsc, uglifyjs. I have fixed the makefile rules to access these tools by their absolute file names. "make modernizr" and "make minify" appear to work without any problems. "make lint" issues an error: /home/g/src/texinfo/GIT/js/node_modules/.bin/eslint -c build-aux/eslint.json info.js -f unix /home/g/src/texinfo/GIT/js/info.js:123:57: Parsing error: Unexpected token = [Error] (paths will differ on other systems). The code was introduced with commit 938b9500d1: Author: Per Bothner <p...@bothner.com> Date: Wed Apr 28 20:57:17 2021 -0700 js/info.js: Change auto-hide of sidebar in narrow windows. Now clicking in sidebar in narror window doesn't hide sidebar, but click in main page does - however, navigation is supressed. Also changed the show/hide-sidebar logic to work using the store/action/dispatch framework. The error is to do with the use of default function arguments: https://groups.google.com/g/eslint/c/UAsX_sjlbLY. Either the lint settings or the code itslef would need to be changed. "make check-types" gives a lot of errors, starting: info.js:305:47 - error TS2339: Property 'nextElementSibling' does not exist on type 'Node'. 305 ? item_current.nextElementSibling ~~~~~~~~~~~~~~~~~~ info.js:307:47 - error TS2339: Property 'previousElementSibling' does not exist on type 'Node'. 307 ? item_current.previousElementSibling ~~~~~~~~~~~~~~~~~~~~~~ This particular code was introduced in commit 5231b32a82a, in 2021 (the code was originally developed in 2017, and it's likely that "make check-types" did work at that point). Per, would you be able to take a look at this?