nixpkgs/nixos/modules
Maximilian Bosch 577ffe768c
wiki-js: use nodejs18
Part of #229910.

Unfortunately this is a little hacky because upstream doesn't intend to
support it for 2.5, but only for 3.0 which isn't out yet, however nodejs-16
will get out of maintenance during the support-span of NixOS 23.05[1].

The only breaking change is that `extract-files` uses a deprecated way
of exposing modules, I went through the list of other breaking
changes in v17 and v18[2][3] and couldn't spot any usage of removed
features, also local testing didn't reveal further issues.

Unfortunately fixing that breakage turned out to be non-trivial.
Currently, `extract-files@9.0.0` is used with the problematic portions
in its `package.json`, however it's only a transitive dependency of
`@graphql-tools/url-loader` & `apollo-upload-client`. Unfortunately, the
versions of that in use require v9 and don't work with a newer version of
`extract-files` with the problem fixed[4]. Also, upgrading the
dependencies in question is not a feasible option because `graphql-tools`
was split up into multiple smaller packages in v8 and also some of the
APIs in use in `wiki.js` were dropped there[5], so this would also be
very time-consuming and non-trivial to fix.

Since this was the only issue, I decided to go down the hacky route and
patch the problem in `package.json` of `extract-files` manually during
our `patchPhase`.

[1] https://github.com/requarks/wiki/discussions/6388
[2] https://nodejs.org/en/blog/release/v17.0.0
[3] https://nodejs.org/en/blog/release/v18.0.0
[4] Upon local testing, this broke with the following error:

        Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/extractFiles' is not defined by "exports" in /wiki/node_modules/extract-files/package.json
[5] For instance `SchemaDirectiveVisitor` in
  `server/graph/directives/auth`.
2023-05-14 14:25:33 +02:00
..
config Merge master into staging-next 2023-05-11 00:02:13 +00:00
hardware nixos/hardware/ipu6: Improve the enable description 2023-04-10 18:43:21 +02:00
i18n/input-method treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
installer nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00
misc nixosModules.pkgsReadOnly: init 2023-05-10 15:55:09 +02:00
profiles nixos/installer: update getty help message 2023-04-08 20:18:28 +02:00
programs nixos/sniffnet: init 2023-05-09 15:53:34 -04:00
security Merge pull request #230857 from s1341/bugfix_pam_sssd 2023-05-10 16:56:47 +02:00
services wiki-js: use nodejs18 2023-05-14 14:25:33 +02:00
system Merge pull request #231504 from nikstur/systemd-repart-add-maintainer 2023-05-13 10:51:11 +03:00
tasks nixos/envfs: make mounts non-critical 2023-05-08 11:24:18 +02:00
testing nixos-test-driver: include a timeout for the recv call, do not assume sh == bash 2023-04-26 01:05:53 +02:00
virtualisation Merge pull request #231140 from NixOS/rosetta-nix-build 2023-05-11 14:21:54 -04:00
module-list.nix Merge pull request #228422 from mweinelt/gitea-actions-runner-module 2023-05-12 17:54:16 +02:00
rename.nix Merge pull request #225750 from r-ryantm/auto-update/rtsp-simple-server 2023-04-17 10:28:44 +03:00