outline: 0.85.1 -> 0.86.1 (#432857)

This commit is contained in:
Yohann Boniface 2025-08-18 13:59:41 +02:00 committed by GitHub
commit 1ede77b84a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 8 deletions

View File

@ -10,6 +10,7 @@ const path = require('path')
const lockfile = require('./yarnpkg-lockfile.js') const lockfile = require('./yarnpkg-lockfile.js')
const { promisify } = require('util') const { promisify } = require('util')
const url = require('url') const url = require('url')
const { URL } = url;
const { urlToName } = require('./common.js') const { urlToName } = require('./common.js')
const execFile = promisify(child_process.execFile) const execFile = promisify(child_process.execFile)
@ -20,7 +21,7 @@ const exec = async (...args) => {
return res return res
} }
const downloadFileHttps = (fileName, url, expectedHash, hashType = 'sha1') => { const downloadFileHttps = (fileName, url, expectedHash, verbose, hashType = 'sha1') => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const get = (url, redirects = 0) => https.get(url, (res) => { const get = (url, redirects = 0) => https.get(url, (res) => {
if(redirects > 10) { if(redirects > 10) {
@ -28,7 +29,9 @@ const downloadFileHttps = (fileName, url, expectedHash, hashType = 'sha1') => {
return; return;
} }
if(res.statusCode === 301 || res.statusCode === 302) { if(res.statusCode === 301 || res.statusCode === 302) {
return get(res.headers.location, redirects + 1) const location = new URL(res.headers.location, url);
if (verbose) console.log('following redirect to ' + location);
return get(location, redirects + 1);
} }
const file = fs.createWriteStream(fileName) const file = fs.createWriteStream(fileName)
const hash = crypto.createHash(hashType) const hash = crypto.createHash(hashType)
@ -119,9 +122,9 @@ const downloadPkg = (pkg, verbose) => {
} else if (url.startsWith('https://')) { } else if (url.startsWith('https://')) {
if (typeof pkg.integrity === 'string' || pkg.integrity instanceof String) { if (typeof pkg.integrity === 'string' || pkg.integrity instanceof String) {
const [ type, checksum ] = pkg.integrity.split('-') const [ type, checksum ] = pkg.integrity.split('-')
return downloadFileHttps(fileName, url, Buffer.from(checksum, 'base64').toString('hex'), type) return downloadFileHttps(fileName, url, Buffer.from(checksum, 'base64').toString('hex'), verbose, type)
} }
return downloadFileHttps(fileName, url, hash) return downloadFileHttps(fileName, url, hash, verbose)
} else if (url.startsWith('file:')) { } else if (url.startsWith('file:')) {
console.warn(`ignoring unsupported file:path url "${url}"`) console.warn(`ignoring unsupported file:path url "${url}"`)
} else { } else {

View File

@ -14,13 +14,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "outline"; pname = "outline";
version = "0.85.1"; version = "0.86.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "outline"; owner = "outline";
repo = "outline"; repo = "outline";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-lErNsYzxqZYVl1MAQdMk062nBORjQGd3C+UbGbZMzvA="; hash = "sha256-lsiwTpmb9E6C5FuYFfko4PqulDcqWU9sQnzSEJ3Y4NE=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
yarnOfflineCache = fetchYarnDeps { yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock"; yarnLock = "${src}/yarn.lock";
hash = "sha256-/CXIZKI8eeK21PRIVZnRMOkwNNbj0vC0PZuT6rZBwG4="; hash = "sha256-9xJ+N+UaHTlBzXvFPyYgB4jNwdiWCkvCSN22kEGuIxI=";
}; };
configurePhase = '' configurePhase = ''

View File

@ -10234,7 +10234,7 @@ with pkgs;
outline = callPackage ../servers/web-apps/outline ( outline = callPackage ../servers/web-apps/outline (
lib.fix (super: { lib.fix (super: {
yarn = yarn.override { inherit (super) nodejs; }; yarn = yarn.override { inherit (super) nodejs; };
nodejs = nodejs_20; nodejs = nodejs_22;
}) })
); );