From 2ec65034da7c75840caac2b51b45d074961ac2b4 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 20:23:47 +0000 Subject: [PATCH] Update from copier (2026-03-30T20:23:47) Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- .copier-answers.yaml | 2 +- .gitattributes | 1 - .github/workflows/build.yaml | 4 +-- .gitignore | 28 ++++------------ js/build.mjs | 41 +++++++++++------------ js/package.json | 9 +++-- js/src/{less/index.less => css/index.css} | 0 pyproject.toml | 5 +-- 8 files changed, 36 insertions(+), 54 deletions(-) rename js/src/{less/index.less => css/index.css} (100%) diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 2088c4e..37d0063 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: 08a244d +_commit: '1246721' _src_path: https://github.com/python-project-templates/base.git add_docs: true add_extension: cppjswasm diff --git a/.gitattributes b/.gitattributes index df3e022..971a600 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,7 +9,6 @@ Makefile linguist-documentation *.html text=auto eol=lf *.js text=auto eol=lf *.json text=auto eol=lf -*.less text=auto eol=lf *.md text=auto eol=lf *.py text=auto eol=lf *.toml text=auto eol=lf diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index df60a60..7bb8c9e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -86,12 +86,12 @@ jobs: if: matrix.os == 'ubuntu-latest' - name: Upload coverage - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 with: platforms: all if: runner.os == 'Linux' && runner.arch == 'X64' diff --git a/.gitignore b/.gitignore index 3bee772..d108797 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ __pycache__/ *.exp *.lib +# Rust +target + # Distribution / packaging .Python build/ @@ -55,26 +58,12 @@ junit.xml .hypothesis/ .pytest_cache/ -# Translations -*.mo -*.pot - -# Django stuff: +# Django *.log local_settings.py db.sqlite3 db.sqlite3-journal -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# PyBuilder -target/ - # IPython profile_default/ ipython_config.py @@ -85,15 +74,12 @@ ipython_config.py # pipenv Pipfile.lock -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff +# Celery celerybeat-schedule celerybeat.pid -# SageMath parsed files -*.sage.py +# Airspeed Velocity +.asv # Environments .env diff --git a/js/build.mjs b/js/build.mjs index efd2ef6..4877fa3 100644 --- a/js/build.mjs +++ b/js/build.mjs @@ -1,10 +1,9 @@ import { NodeModulesExternal } from "@finos/perspective-esbuild-plugin/external.js"; import { build } from "@finos/perspective-esbuild-plugin/build.js"; -import { BuildCss } from "@prospective.co/procss/target/cjs/procss.js"; +import { transform } from "lightningcss"; import { getarg } from "./tools/getarg.mjs"; import fs from "fs"; import cpy from "cpy"; -import path_mod from "path"; const DEBUG = getarg("--debug"); @@ -40,31 +39,29 @@ const BUILD = [ async function compile_css() { const process_path = (path) => { - const outpath = path.replace("src/less", "dist/css"); + const outpath = path.replace("src/css", "dist/css"); fs.mkdirSync(outpath, { recursive: true }); - fs.readdirSync(path).forEach((file_or_folder) => { - if (file_or_folder.endsWith(".less")) { - const outfile = file_or_folder.replace(".less", ".css"); - const builder = new BuildCss(""); - builder.add( - `${path}/${file_or_folder}`, - fs - .readFileSync(path_mod.join(`${path}/${file_or_folder}`)) - .toString(), - ); - fs.writeFileSync( - `${path.replace("src/less", "dist/css")}/${outfile}`, - builder.compile().get(outfile), - ); - } else { - process_path(`${path}/${file_or_folder}`); + fs.readdirSync(path, { withFileTypes: true }).forEach((entry) => { + const input = `${path}/${entry.name}`; + const output = `${outpath}/${entry.name}`; + + if (entry.isDirectory()) { + process_path(input); + } else if (entry.isFile() && entry.name.endsWith(".css")) { + const source = fs.readFileSync(input); + const { code } = transform({ + filename: entry.name, + code: source, + minify: !DEBUG, + sourceMap: false, + }); + fs.writeFileSync(output, code); } }); }; - // recursively process all less files in src/less - process_path("src/less"); - cpy("src/css/*", "dist/css/"); + + process_path("src/css"); } async function copy_html() { diff --git a/js/package.json b/js/package.json index 84f8eba..aa29a97 100644 --- a/js/package.json +++ b/js/package.json @@ -32,10 +32,10 @@ "build": "npm-run-all build:cpp build:prod", "clean": "rm -rf dist lib playwright-report ../python_template_cppjswasm/extension", "dev": "npm-run-all -p start watch", - "lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"", + "lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"", "lint:cpp": "clang-format --dry-run -Werror -style=file:../.clang-format src/cpp/*.cpp", "lint": "npm-run-all lint:*", - "fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"", + "fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"", "fix:cpp": "clang-format -i -style=file:../.clang-format src/cpp/*.cpp", "fix": "npm-run-all fix:*", "preinstall": "npx only-allow pnpm", @@ -44,16 +44,15 @@ "start:tests": "http-server -p 3000 ", "test:js": "playwright test", "test": "npm-run-all test:*", - "watch": "nodemon --watch src -e ts,less,html,cpp,hpp --exec \"pnpm build:debug\"" + "watch": "nodemon --watch src -e ts,css,html,cpp,hpp --exec \"pnpm build:debug\"" }, "dependencies": {}, "devDependencies": { "@finos/perspective-esbuild-plugin": "^3.2.1", "@playwright/test": "^1.56.1", - "@prospective.co/procss": "^0.1.17", "cpy": "^12.1.0", "esbuild": "^0.27.2", - "esbuild-plugin-less": "^1.3.35", + "lightningcss": "^1.29.3", "http-server": "^14.1.1", "nodemon": "^3.1.10", "npm-run-all": "^4.1.5", diff --git a/js/src/less/index.less b/js/src/css/index.css similarity index 100% rename from js/src/less/index.less rename to js/src/css/index.css diff --git a/pyproject.toml b/pyproject.toml index 68a72f5..54c102e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "hatchling", - "hatch-cpp<0.3", + "hatch-cpp", "hatch-js", "pybind11", ] @@ -42,7 +42,7 @@ develop = [ "check-dist", "cibuildwheel", "codespell", - "hatch-cpp<0.3", + "hatch-cpp", "hatch-js", "hatchling", "pybind11", @@ -106,6 +106,7 @@ branch = true omit = [ "python_template_cppjswasm/tests/integration/", ] + [tool.coverage.report] exclude_also = [ "raise NotImplementedError",