wiki-js: 2.5.299 -> 2.5.300
ChangeLog: https://github.com/requarks/wiki/releases/tag/v2.5.300 Apparently they actually fixed their Node 18+ support, so we can drop the patchery 🎉
This commit is contained in:
parent
afde5d87aa
commit
6f0c6c95e9
2 changed files with 2 additions and 56 deletions
|
@ -2,48 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wiki-js";
|
pname = "wiki-js";
|
||||||
version = "2.5.299";
|
version = "2.5.300";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/Requarks/wiki/releases/download/v${version}/${pname}.tar.gz";
|
url = "https://github.com/Requarks/wiki/releases/download/v${version}/${pname}.tar.gz";
|
||||||
sha256 = "sha256-GYe05dbR8RwCzPedeCMUQTWZ51roM/V2jUPPv7o7UEU=";
|
sha256 = "sha256-Cycq2oeB8v02VtE5KPs09+uzZqvGbJRH+J4YPDYo+yY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Implements nodejs 18 support as it's not planned to fix this before
|
|
||||||
# the release of v3[1] which is planned to happen in 2023, but not before
|
|
||||||
# NixOS 23.05. However, in the lifespan of 23.05 v16 will get EOLed, so
|
|
||||||
# we have to hack this on our own.
|
|
||||||
#
|
|
||||||
# The problem we fix here is that `exports."/public/"` in a `package.json`
|
|
||||||
# is prohibited, i.e. you cannot export full directories anymore.
|
|
||||||
#
|
|
||||||
# Unfortunately it's non-trivial to fix this because v10 of `extract-files`
|
|
||||||
# (where the problem is fixed) doesn't work for graphql-tools (which depends
|
|
||||||
# on this). Updating this as well is also quite complex because in later
|
|
||||||
# versions the package was split up into multiple smaller packages and
|
|
||||||
# thus a lot of parts of the code-base would need to be changed accordingly.
|
|
||||||
#
|
|
||||||
# Since this is the only breaking change of nodejs 17/18[2][3], this workaround
|
|
||||||
# will be necessary until we can upgrade to v3.
|
|
||||||
#
|
|
||||||
# [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
|
|
||||||
patches = [ ./drop-node-check.patch ];
|
|
||||||
nativeBuildInputs = [ jq moreutils ];
|
|
||||||
postPatch = ''
|
|
||||||
# Dirty hack to implement nodejs-18 support.
|
|
||||||
<./node_modules/extract-files/package.json jq '
|
|
||||||
# error out loud if the structure has changed and we need to change
|
|
||||||
# this expression
|
|
||||||
if .exports|has("./public/")|not then
|
|
||||||
halt_error(1)
|
|
||||||
else
|
|
||||||
.exports."./public/*" = "./public/*.js" | del(.exports."./public/")
|
|
||||||
end
|
|
||||||
' | sponge ./node_modules/extract-files/package.json
|
|
||||||
'';
|
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
diff --git a/server/index.js b/server/index.js
|
|
||||||
index 7cdb4f80..161ebeb7 100644
|
|
||||||
--- a/server/index.js
|
|
||||||
+++ b/server/index.js
|
|
||||||
@@ -8,14 +8,6 @@ const { nanoid } = require('nanoid')
|
|
||||||
const { DateTime } = require('luxon')
|
|
||||||
const { gte } = require('semver')
|
|
||||||
|
|
||||||
-// ----------------------------------------
|
|
||||||
-// Check Node.js version
|
|
||||||
-// ----------------------------------------
|
|
||||||
-if (gte(process.version, '18.0.0')) {
|
|
||||||
- console.error('You\'re using an unsupported Node.js version. Please read the requirements.')
|
|
||||||
- process.exit(1)
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
// ----------------------------------------
|
|
||||||
// Init WIKI instance
|
|
||||||
// ----------------------------------------
|
|
Loading…
Reference in a new issue