diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4bff7b70..e4e1a340 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,12 +10,11 @@ jobs: fail-fast: false matrix: python: - - "3.7" - - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" + - "3.13" steps: - uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index 64536afc..11882162 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.egg-info *.pyc -build /.coverage /.mxmake/ /.project @@ -8,20 +7,22 @@ build /.pydevproject.bak /.settings/ /.vscode/ +/build/ /constraints-mxdev.txt /coverage/ /dist/ -/docs/Makefile /docs/cone.app.zip /docs/doctrees/ /docs/html/ /docs/latex/ /docs/make.bat +/docs/Makefile /htmlcov/ /js/karma/ /node_modules/ /package-lock.json /pip-selfcheck.json +/pnpm-lock.yaml /pyvenv.cfg /requirements-mxdev.txt /sources/ diff --git a/Makefile b/Makefile index a044c172..d1b8331d 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ #: docs.sphinx #: i18n.gettext #: i18n.lingua -#: js.npm +#: js.nodejs #: js.rollup #: js.scss #: js.wtr @@ -46,32 +46,37 @@ INCLUDE_MAKEFILE?=include.mk # No default value. EXTRA_PATH?= -## js.npm +## js.nodejs -# Value for `--prefix` option. +# The package manager to use. Defaults to `npm`. Possible values +# are `npm` and `pnpm` +# Default: npm +NODEJS_PACKAGE_MANAGER?=pnpm + +# Value for `--prefix` option when installing packages. # Default: . -NPM_PREFIX?=. +NODEJS_PREFIX?=. -# Packages which get installed with `--no-save` option. +# Packages to install with `--no-save` option. # No default value. -NPM_PACKAGES?= +NODEJS_PACKAGES?= -# Packages which get installed with `--save-dev` option. +# Packages to install with `--save-dev` option. # No default value. -NPM_DEV_PACKAGES?= +NODEJS_DEV_PACKAGES?= -# Packages which get installed with `--save-prod` option. +# Packages to install with `--save-prod` option. # No default value. -NPM_PROD_PACKAGES?= +NODEJS_PROD_PACKAGES?= -# Packages which get installed with `--save-optional` option. +# Packages to install with `--save-optional` option. # No default value. -NPM_OPT_PACKAGES?= +NODEJS_OPT_PACKAGES?= # Additional install options. Possible values are `--save-exact` # and `--save-bundle`. # No default value. -NPM_INSTALL_OPTS?= +NODEJS_INSTALL_OPTS?= ## js.wtr @@ -115,8 +120,8 @@ ROLLUP_CONFIG?=js/rollup.conf.js PRIMARY_PYTHON?=python3 # Minimum required Python version. -# Default: 3.7 -PYTHON_MIN_VERSION?=3.7 +# Default: 3.9 +PYTHON_MIN_VERSION?=3.9 # Install packages using the given package installer method. # Supported are `pip` and `uv`. If uv is used, its global availability is @@ -278,79 +283,75 @@ $(SENTINEL): $(firstword $(MAKEFILE_LIST)) @echo "Sentinels for the Makefile process." > $(SENTINEL) ############################################################################## -# npm +# nodejs ############################################################################## -export PATH:=$(shell pwd)/$(NPM_PREFIX)/node_modules/.bin:$(PATH) +export PATH:=$(shell pwd)/$(NODEJS_PREFIX)/node_modules/.bin:$(PATH) -# case `system.dependencies` domain is included -SYSTEM_DEPENDENCIES+=npm -NPM_TARGET:=$(SENTINEL_FOLDER)/npm.sentinel -$(NPM_TARGET): $(SENTINEL) - @echo "Install npm packages" - @test -z "$(NPM_DEV_PACKAGES)" \ +NODEJS_TARGET:=$(SENTINEL_FOLDER)/nodejs.sentinel +$(NODEJS_TARGET): $(SENTINEL) + @echo "Install nodejs packages" + @test -z "$(NODEJS_DEV_PACKAGES)" \ && echo "No dev packages to be installed" \ - || npm --prefix $(NPM_PREFIX) install \ + || $(NODEJS_PACKAGE_MANAGER) --prefix $(NODEJS_PREFIX) install \ --save-dev \ - $(NPM_INSTALL_OPTS) \ - $(NPM_DEV_PACKAGES) - @test -z "$(NPM_PROD_PACKAGES)" \ + $(NODEJS_INSTALL_OPTS) \ + $(NODEJS_DEV_PACKAGES) + @test -z "$(NODEJS_PROD_PACKAGES)" \ && echo "No prod packages to be installed" \ - || npm --prefix $(NPM_PREFIX) install \ + || $(NODEJS_PACKAGE_MANAGER) --prefix $(NODEJS_PREFIX) install \ --save-prod \ - $(NPM_INSTALL_OPTS) \ - $(NPM_PROD_PACKAGES) - @test -z "$(NPM_OPT_PACKAGES)" \ + $(NODEJS_INSTALL_OPTS) \ + $(NODEJS_PROD_PACKAGES) + @test -z "$(NODEJS_OPT_PACKAGES)" \ && echo "No opt packages to be installed" \ - || npm --prefix $(NPM_PREFIX) install \ + || $(NODEJS_PACKAGE_MANAGER) --prefix $(NODEJS_PREFIX) install \ --save-optional \ - $(NPM_INSTALL_OPTS) \ - $(NPM_OPT_PACKAGES) - @test -z "$(NPM_PACKAGES)" \ + $(NODEJS_INSTALL_OPTS) \ + $(NODEJS_OPT_PACKAGES) + @test -z "$(NODEJS_PACKAGES)" \ && echo "No packages to be installed" \ - || npm --prefix $(NPM_PREFIX) install \ + || $(NODEJS_PACKAGE_MANAGER) --prefix $(NODEJS_PREFIX) install \ --no-save \ - $(NPM_PACKAGES) - @touch $(NPM_TARGET) + $(NODEJS_PACKAGES) + @touch $(NODEJS_TARGET) -.PHONY: npm -npm: $(NPM_TARGET) +.PHONY: nodejs +nodejs: $(NODEJS_TARGET) -.PHONY: npm-dirty -npm-dirty: - @rm -f $(NPM_TARGET) +.PHONY: nodejs-dirty +nodejs-dirty: + @rm -f $(NODEJS_TARGET) -.PHONY: npm-clean -npm-clean: npm-dirty - @rm -rf $(NPM_PREFIX)/node_modules +.PHONY: nodejs-clean +nodejs-clean: nodejs-dirty + @rm -rf $(NODEJS_PREFIX)/node_modules -INSTALL_TARGETS+=npm -DIRTY_TARGETS+=npm-dirty -CLEAN_TARGETS+=npm-clean +INSTALL_TARGETS+=nodejs +DIRTY_TARGETS+=nodejs-dirty +CLEAN_TARGETS+=nodejs-clean ############################################################################## # web test runner ############################################################################## -# extend npm dev packages -NPM_DEV_PACKAGES+=\ +NODEJS_DEV_PACKAGES+=\ @web/test-runner \ @web/dev-server-import-maps .PHONY: wtr -wtr: $(NPM_TARGET) +wtr: $(NODEJS_TARGET) @web-test-runner $(WTR_OPTIONS) --config $(WTR_CONFIG) ############################################################################## # scss ############################################################################## -# extend npm dev packages -NPM_DEV_PACKAGES+=sass +NODEJS_DEV_PACKAGES+=sass .PHONY: scss -scss: $(NPM_TARGET) +scss: $(NODEJS_TARGET) @sass $(SCSS_OPTIONS) $(SCSS_SOURCE) $(SCSS_TARGET) @sass $(SCSS_OPTIONS) --style compressed $(SCSS_SOURCE) $(SCSS_MIN_TARGET) @@ -358,14 +359,13 @@ scss: $(NPM_TARGET) # rollup ############################################################################## -# extend npm dev packages -NPM_DEV_PACKAGES+=\ +NODEJS_DEV_PACKAGES+=\ rollup \ rollup-plugin-cleanup \ @rollup/plugin-terser .PHONY: rollup -rollup: $(NPM_TARGET) +rollup: $(NODEJS_TARGET) @rollup --config $(ROLLUP_CONFIG) ############################################################################## @@ -782,6 +782,10 @@ INSTALL_TARGETS+=$(LINGUA_TARGET) DIRTY_TARGETS+=lingua-dirty CLEAN_TARGETS+=lingua-clean +############################################################################## +# Custom includes +############################################################################## + -include $(INCLUDE_MAKEFILE) ############################################################################## diff --git a/package.json b/package.json index 7a1b59b1..4975f7c3 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "qunit": "^2.20.1", "rollup": "^2.79.2", "rollup-plugin-cleanup": "^3.2.1", - "sass": "^1.80.6", + "sass": "^1.81.0", "web-test-runner-qunit": "^2.0.0" - } + }, + "packageManager": "pnpm@9.3.0+sha512.ee7b93e0c2bd11409c6424f92b866f31d3ea1bef5fbe47d3c7500cdc3c9668833d2e55681ad66df5b640c61fa9dc25d546efa54d76d7f8bf54b13614ac293631" }