netlify-cli: 19.0.2 -> 23.9.2
Upgrades for netlify-cli were broken for a while because postinstall script was changed to not build the packages into dist directory ahead of time, but rather expect the user to do this. Add an workaround to not run postinstall logic entirely. Also disable edge functions in tests using an internal flag, because they try to download Deno, some types definitions, and maybe other stuff at runtime.
This commit is contained in:
@@ -11,16 +11,22 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "netlify-cli";
|
||||
version = "19.0.2";
|
||||
version = "23.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "netlify";
|
||||
repo = "cli";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-+P+hS/g/xRFNvzESZ5LyxyQSSRZ7BzCg9ZX/ndNLeDg=";
|
||||
hash = "sha256-rjxm/TrKsvYCKwoHkZRZXFpFTfLd0s0D/H6p5Bull0E=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-3C+tTqLJCm48pAbQMiIq2SsHmb4bcCaf3IU/cTeR5BA=";
|
||||
# Prevent postinstall script from running before package is built
|
||||
# See https://github.com/netlify/cli/blob/v23.9.2/scripts/postinstall.js#L70
|
||||
postPatch = ''
|
||||
touch .git
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-itzEmCOBXxspGiwxt8t6di7/EuCo2Qkl5JVSkMfUemI=";
|
||||
|
||||
inherit nodejs;
|
||||
|
||||
|
||||
@@ -27,10 +27,15 @@ runCommand "netlify-cli-test"
|
||||
echo '/with-redirect /' >_redirects
|
||||
|
||||
# Start a local server and wait for it to respond
|
||||
netlify dev --offline --port 8888 2>&1 | tee log &
|
||||
# Edge functions require specific version of Deno and internet access for other Netlify stuff
|
||||
netlify dev --offline --internal-disable-edge-functions --port 8888 --debug 2>&1 | tee log &
|
||||
sleep 0.1 || true
|
||||
for (( i=0; i<300; i++ )); do
|
||||
if grep --ignore-case 'Server now ready' <log; then
|
||||
if ! jobs %% > /dev/null; then
|
||||
echo "Server died before starting" >&2
|
||||
exit 1
|
||||
fi
|
||||
if grep --ignore-case 'Local dev server ready' <log; then
|
||||
break
|
||||
else
|
||||
sleep 1
|
||||
|
||||
Reference in New Issue
Block a user