Commit Graph
5 Commits
Author SHA1 Message Date
Maxim Cournoyer 728408c2b0 build/node: Clean-up deprecation.
(guix build json-utils): should not be deprecating things that are to be
deprecated in (guix build node-build-system).  For things now defined in (guix
build json-utils), opt to re-export rather than define a deprecation, as this
would otherwise cause warnings that cannot be resolved (due to the conflicting
definitions).

* guix/build/json-utils.scm: Export with-atomic-json-file-replacement*. Do not
define/export delete-fields, replace-fields and add-fields.  Avoid double
definition of with-atomic-json-file-replacement and modify-json.
* guix/build/node-build-system.scm: Streamline imports/re-exports.  Do not
deprecate things that were newly added to (guix build json-utils).
* tests/node.scm: Add (guix build json-utils) import.
2026-08-27 10:59:22 +09:00
Maxim Cournoyer b8c45293f7 tests: Fix `delete-dependencies' & cie.
* guix/build/node-build-system.scm (delete-dependencies): Properly pass
the #:dependency-keys keyword.  Avoid printing deletion message when no
deletion occurs.
* tests/node.scm ("delete-dependencies", "delete-dependencies/except")
("delete-dev-dependencies/except"): Control other dependency sections.

Fixes: #10332
2026-08-27 10:59:22 +09:00
Maxim Cournoyer 7bcfbab25b tests: Move modify-json ordering test to tests/json-utils.scm.
* tests/node.scm ("modify-json, ordering"): Move to...
* tests/json-utils.scm ("modify-json, ordering"): ... here.
2026-08-27 10:59:22 +09:00
Maxim Cournoyer ef58e493c3 build/node: Preserve field order of modified JSON files.
* guix/build/node-build-system.scm (with-atomic-json-file-replacement): Call
json->scm with #:ordered #t.
* tests/node.scm ("modify-json, ordering"): New test.
("delete-dev-dependencies/except"): Adjust expected output accordingly.

Change-Id: I9cf0475a7bac0cad8f5fd3d479c50eb35eac3f32
2026-07-08 18:33:27 +02:00
Maxim Cournoyer 230a8b05a8 build/node: Add `delete-dependencies/except' procedure.
This adds a more convenient means to filter out most, but not all, development
dependencies.

* guix/build/node-build-system.scm (%dependency-keys)
(%dev-dependency-keys): New variables.
(delete-dependencies) [#:negate?, #:dependency-keys]: New arguments.  Log
removed dependencies.
(delete-dependencies/except, delete-dev-dependencies/except): New procedures.
* tests/node.scm: New test.
* Makefile.am (SCM_TESTS): Register it.
2026-07-08 18:33:27 +02:00