diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index aae7a741a..000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,48 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "es2021": true - }, - extends: [ - 'semistandard' - ], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "ignorePatterns" : ["modules/base/zstd.mjs", "modules/three.mjs", "modules/three_addons.mjs", "modules/d3.mjs", "modules/gui/lil-gui.mjs"], - "rules": { - "quotes": ["warn", "single"], - "indent": "off", - "camelcase": "off", - "space-before-function-paren": ["warn", "never"], - "comma-spacing": "warn", - "keyword-spacing": "warn", - "prefer-const": "warn", - "eqeqeq": "warn", - "spaced-comment": "warn", - "array-bracket-spacing": "warn", - "key-spacing": "warn", - "space-in-parens": "warn", - "computed-property-spacing": "warn", - "object-curly-spacing": "warn", - "semi-spacing": "warn", - "no-floating-decimal": "warn", - "semi": "warn", - "object-curly-newline": ["warn", { - "ObjectExpression": { "consistent": true }, - "ObjectPattern": { "consistent": true }, - "ImportDeclaration": "never", - "ExportDeclaration": "never" - }], - "curly": ["warn", "multi-or-nest"], - "one-var": ["warn", "consecutive"], - "space-infix-ops": "off", - "no-multi-spaces": ["warn", { ignoreEOLComments: true }], - "no-multiple-empty-lines": "off", - "object-property-newline": "off", - "promise/param-names": ["warn", { resolvePattern: "^resolve*", rejectPattern: "^reject*" } ], - "no-new-func": "off", - "padded-blocks": ["warn", { "blocks": "never", "classes": "always", "switches": "never" }] - } -}; diff --git a/.github/workflows/jsroot-ci.yml b/.github/workflows/jsroot-ci.yml index 6472d2f9a..ca4e8dcaa 100644 --- a/.github/workflows/jsroot-ci.yml +++ b/.github/workflows/jsroot-ci.yml @@ -2,9 +2,12 @@ name: JSROOT CI on: push: - branches: [ "master" ] + branches: + - "master" pull_request: - branches: [ "master" ] + branches: + - "master" + - "dev" jobs: build-ubuntu: @@ -12,11 +15,12 @@ jobs: strategy: fail-fast: false matrix: - node-version: [18.x, 20.x] - cxx: [g++-11, g++-12, g++-13] + node-version: [20.x, 22.x, 24.x] + cxx: [g++-13, g++-14] steps: - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -30,6 +34,7 @@ jobs: sudo apt-get install -y xutils-dev libxi-dev libxxf86vm-dev x11proto-xf86vidmode-dev mesa-utils xvfb libgl1-mesa-dri libglapi-mesa libosmesa6 musl-dev libgl1-mesa-dev sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev pkg-config echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV + echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV - name: Install dependencies run: | @@ -50,32 +55,68 @@ jobs: node demo/node/tree_dump.js node demo/node/tree_draw.js xvfb-run -s "-ac -screen 0 1280x1024x24" node demo/node/geomsvg.js - node demo/node/selector.js - cd demo/node; xvfb-run -s "-ac -screen 0 1280x1024x24" node make_image.js + node demo/node/tree_selector.js + node demo/node/tree_staged.js + xvfb-run -s "-ac -screen 0 1280x1024x24" node demo/node/make_image.js demo/node/ + wget https://root.cern/js/files/hsimple.root + node demo/node/file_proxy.js sync ./hsimple.root + node demo/node/file_proxy.js promise ./hsimple.root + node demo/node/file_proxy.js multi ./hsimple.root + node demo/node/file_proxy.js buffer ./hsimple.root + node demo/node/buffer_test.js + node demo/node/rntuple_test.js demo/node/rntuple_test.root + node demo/node/build3d.js + tests_ubuntu: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x, 24.x] + cxx: [g++-13, g++-14] + steps: + - name: Checkout jsroot + uses: actions/checkout@v4 + with: + path: 'jsroot' + - name: Checkout jsroot-test repo uses: actions/checkout@v4 with: repository: 'linev/jsroot-test' path: 'jsroot-test' - - name: Clone JSROOT Repository - run: git clone https://github.com/root-project/jsroot.git + - name: Show jsroot status + run: | + cd jsroot + git status + + - name: Show jsroot-test status + run: | + cd jsroot-test + git status + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + cache-dependency-path: jsroot/package-lock.json + node-version: ${{ matrix.node-version }} + cache: 'npm' - - name: Install System Dependencies for headless-gl + - name: Set up C++ compiler (Ubuntu) run: | sudo apt-get update - sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev xvfb + sudo apt-get install -y ${{ matrix.cxx }} + sudo apt-get install -y xutils-dev libxi-dev libxxf86vm-dev x11proto-xf86vidmode-dev mesa-utils xvfb libgl1-mesa-dri libglapi-mesa libosmesa6 musl-dev libgl1-mesa-dev + sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev pkg-config + echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV + echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV - name: Dependencies jsroot run: | cd jsroot - npm install + npm ci - name: Dependencies jsroot-test run: | @@ -87,24 +128,12 @@ jobs: cd jsroot-test xvfb-run -s "-ac -screen 0 1280x1024x24" node test.js -c -m -p - #Special Cases: Tests,which are not running properly on ubuntu - #TH1/optdate.svg - #TH1/optdate2.svg - #TH1/optdate3.svg - #TH2/image.png - #Candle/plot.svg - #Candle/stack.svg - #TCanvas/time.svg - #TGeo/image.png - #Misc/taxis.svg - #RCanvas/raxis.svg - build-macos: runs-on: macos-latest strategy: fail-fast: false matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x, 24.x] steps: - uses: actions/checkout@v4 @@ -142,15 +171,24 @@ jobs: node demo/node/makesvg.js node demo/node/tree_dump.js node demo/node/tree_draw.js - node demo/node/selector.js - cd demo/node; node make_image.js + node demo/node/tree_selector.js + node demo/node/tree_staged.js + node demo/node/make_image.js demo/node/ + wget https://root.cern/js/files/hsimple.root + node demo/node/file_proxy.js sync ./hsimple.root + node demo/node/file_proxy.js promise ./hsimple.root + node demo/node/file_proxy.js multi ./hsimple.root + node demo/node/file_proxy.js buffer ./hsimple.root + node demo/node/buffer_test.js + node demo/node/rntuple_test.js demo/node/rntuple_test.root + node demo/node/build3d.js build-windows: runs-on: windows-latest strategy: fail-fast: false matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x, 24.x] steps: - uses: actions/checkout@v4 @@ -166,7 +204,7 @@ jobs: - name: Install dependencies run: | - npm ci + npm install - name: Run eslint run: | @@ -180,8 +218,19 @@ jobs: run: | cd demo/node; npm install; cd ../.. node demo/node/makesvg.js + node demo/node/geomsvg.js node demo/node/tree_dump.js node demo/node/tree_draw.js - node demo/node/geomsvg.js - node demo/node/selector.js - cd demo/node; node make_image.js + node demo/node/tree_selector.js + node demo/node/tree_staged.js + node demo/node/make_image.js demo/node/ + curl https://root.cern/js/files/hsimple.root --output hsimple.root + node demo/node/file_proxy.js sync ./hsimple.root + node demo/node/file_proxy.js promise ./hsimple.root + node demo/node/file_proxy.js multi ./hsimple.root + node demo/node/file_proxy.js buffer ./hsimple.root + node demo/node/buffer_test.js + node demo/node/rntuple_test.js demo/node/rntuple_test.root + node demo/node/build3d.js + + diff --git a/.gitignore b/.gitignore index d17715f2a..94b775154 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ docs/jsdocfull/ *.root *.json *.html +*.svg +*.png demo/node/node_modules demo/node/*.svg demo/node/*.png diff --git a/LICENSE b/LICENSE index 1f796956b..a6d9f2471 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright � 2013-2024 JavaScript ROOT authors +Copyright � 2013-2026 JavaScript ROOT authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/api.htm b/api.htm index 701c58183..26c3c1589 100644 --- a/api.htm +++ b/api.htm @@ -355,9 +355,11 @@