From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kM93BaaJwmWrdAAA62LTzQ:P1 (envelope-from ) for ; Tue, 06 Feb 2024 20:33:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kM93BaaJwmWrdAAA62LTzQ (envelope-from ) for ; Tue, 06 Feb 2024 20:33:58 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=C6XjhA2x; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707248038; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LyGTLqdOVEyl32Ob2OgSaR1UvbKxQVJlYQ76eiKj6Jg=; b=G2aRVHzsTZXBrvbbAOEwHgUijo29CdTYbQP5mzuFhbemifO2zDFql/t92F5HwnGNJ/KKXS +6YqwlFpQqT2UPCN6PL17xdu/1BowB+bO1XTocg/juGoTFrZrZBBO5+pyG7NNwpdMhCK1D Jw7vP4OsClZ0zWRntucI5PWtg1O86lwOUlmkkoTm01IAXKyPGd8upNu84DPUgXFUL72iwr 8JdwknQISYEljC8KVtGOYTvtya7Eq4R23dRydKeSG2DsjPHfsTMZ3NL0D0Vtph6BbiKA/+ 55KBjk+CxBglii4o38Gto76aJJ/UWL4EI0XB9EeePN0F7/6JM5igNLGQRfK+AQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=C6XjhA2x; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707248038; a=rsa-sha256; cv=none; b=HjGgzWaDlQhTZX6t8np75GS7D9laXCrHfBfpu7gWC+bJwWSBk0TywX5eqbuKzon6VpfMyM 8d03I2PFIhi+nXCfpJlUKO7x+rmv5KzSPEIDWEBL6MTA9kOq6Nra9xl4Brz2Q5Y4RgViNJ pJuHT4ihw8KJ239++51NE+yAPMHWgkKypO55BuvvXcFSFmPeJNa63x59L+pAaJfAdLzgxL gS7ZsZXzTSZSJWUKf3TcCJQFYRfk+lh01VpQ3Ifeyp7Xlwix2imcWP+o74/ENzt2I+QONq pLudr7BtGoZ2HBURH1DDwff+1YTeJYYEhCXkEeAITF9eSHui2hp4Yj/mItAfgg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 032033B865 for ; Tue, 6 Feb 2024 20:33:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXRCa-0002qx-42; Tue, 06 Feb 2024 14:33:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXRCX-0002oD-IN for guix-patches@gnu.org; Tue, 06 Feb 2024 14:33:49 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXRCX-0005OC-AB for guix-patches@gnu.org; Tue, 06 Feb 2024 14:33:49 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXRCk-0001R7-AF for guix-patches@gnu.org; Tue, 06 Feb 2024 14:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68941] [PATCH 02/44] guix: build-system: node: Add node-is-type-object helper. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Feb 2024 19:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68941 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves , 68941@debbugs.gnu.org Received: via spool by 68941-submit@debbugs.gnu.org id=B68941.17072480185490 (code B ref 68941); Tue, 06 Feb 2024 19:34:02 +0000 Received: (at 68941) by debbugs.gnu.org; 6 Feb 2024 19:33:38 +0000 Received: from localhost ([127.0.0.1]:55144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRCM-0001QU-5s for submit@debbugs.gnu.org; Tue, 06 Feb 2024 14:33:38 -0500 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:46336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRCJ-0001QB-PY for 68941@debbugs.gnu.org; Tue, 06 Feb 2024 14:33:36 -0500 Received: by mail-ej1-x642.google.com with SMTP id a640c23a62f3a-a370e63835cso552203566b.1 for <68941@debbugs.gnu.org>; Tue, 06 Feb 2024 11:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707247996; x=1707852796; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=LyGTLqdOVEyl32Ob2OgSaR1UvbKxQVJlYQ76eiKj6Jg=; b=C6XjhA2xAthyk3TvN9ypfKDF6C/CcTiQH8wSmyVlPExL94lttuNnFCARPFU70q4xaZ ExklEjJSB7gPQTbaNLWZjboodV75r+Dg0rBnsuNPL4SgPuxrOAfC2r/pBF2JHYrh7pta UQJIYpjCviiU0Ckio3NIQmzsyzAtPRiExVVSJkp8vMDeCWVyJVZbYNyI23ZpyE15ZbRs oCTwuFsT7NxGCFzdxRABlABVsCGcKkU/qVWalg+LhGe84YDHYSRMlpzhxqNvmzpPyI9b pu/nnI/ILPDtVyrtO3+NGyVMY2d/bNjyFdyHjOpUh+aUh5Q8RxX+RKVyYvwscR/guwDx 4o7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707247996; x=1707852796; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LyGTLqdOVEyl32Ob2OgSaR1UvbKxQVJlYQ76eiKj6Jg=; b=oVVgYxgR/McVVYLFBmSZSlzb0prywgcZt1TI3nquvSGLNzBv8Jk1rRcgrDdsk9Hn71 YUMPmdVP4Y3w80VJyQqzmHdVwvs8a1sWeWBWSW224UaRjPpZvVLe+nYSndtOCGmeO+Gz in7c+BeHrHgIbUkSTdba6cAhHYoOmUbFmTbDeG3CwnarE+RRmG6V4psXinhoELuyv8ng JkJ2C1mM5TY85VsDU9CquV8JiuyFjQZQ100BMqbw6suFf4BqvamIcB+MSjGw1Ngg5N/f Cg+c0XC3/QqndvXdk+yehNgzai+ynL5ylFTX7IkEIitGBA6UQf0e/xcya2L4ygZrRktl a59Q== X-Gm-Message-State: AOJu0YyTWV1upqH5Kj1mHH5YMRAVRwqQC69v/jnsk1uwlLnlK80Awkqo JMmoz6RrbLkCKGwcQO13+OSnQgKIMn3lbYHX2GsMB6Aoo8tCG18f7Hveu0EMXrE= X-Google-Smtp-Source: AGHT+IEdGI4g0DLBAsUyO7FI7m67ipIU6vJkpeVWgwMA6nndySRUPyJRenbeq0bHbYa8u/RLFPl45Q== X-Received: by 2002:a17:906:71a:b0:a37:4836:be30 with SMTP id y26-20020a170906071a00b00a374836be30mr2473644ejb.73.1707247996345; Tue, 06 Feb 2024 11:33:16 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXDD7jroM0HtfUC3uKJ9BeX8+EEZQOukCMF8nqQphCp7PpmgYzJL7m29Ql85tf+dUbLPzm+gf7cmNHrfixOQ4QtDQnj3fQ= Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id lx2-20020a170906af0200b00a370158ff2asm1472157ejb.69.2024.02.06.11.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 11:33:16 -0800 (PST) Message-ID: <705eb2aeae1c89d93a3db2470dcaf0d731a7f85a.camel@gmail.com> From: Liliana Marie Prikler Date: Tue, 06 Feb 2024 20:33:15 +0100 In-Reply-To: <20240205231952.26410-2-ngraves@ngraves.fr> References: <20240205231952.26410-1-ngraves@ngraves.fr> <20240205231952.26410-2-ngraves@ngraves.fr> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.33 X-Migadu-Queue-Id: 032033B865 X-Spam-Score: 2.33 X-Migadu-Scanner: mx11.migadu.com X-TUID: R9kjoHuytAMn Am Dienstag, dem 06.02.2024 um 00:18 +0100 schrieb Nicolas Graves: > * guix/build-system/node.scm (node-is-type-object): Add function. >=20 > Change-Id: I7027aff3b314cd999798afd8c11dc90ef7c6e43c > --- > =C2=A0guix/build-system/node.scm | 14 ++++++++++++++ > =C2=A01 file changed, 14 insertions(+) >=20 > diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm > index 8a903b4fe5..b52b8f4f3e 100644 > --- a/guix/build-system/node.scm > +++ b/guix/build-system/node.scm > @@ -35,8 +35,22 @@ (define-module (guix build-system node) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = node-build > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = node-build-system > =C2=A0 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 node-= is-type-object > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = node-trivial-package)) > =C2=A0 > +(define* (node-is-type-object type #:optional (type-exists? #t)) > +=C2=A0 "Helper for node packages replacement.=C2=A0 This is actual code > factorized from > +the packages it replaces, use with caution.=C2=A0 It doesn't apply to al= l > +javascript types." Which types are excluded? > +=C2=A0 (string-append > +=C2=A0=C2=A0 "function(value) {" > +=C2=A0=C2=A0 (if type-exists? > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-append > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "if (typeof value =3D=3D=3D '= " (string-downcase type) "') {return > true;} ") > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "") > +=C2=A0=C2=A0 "if (value =3D=3D=3D null || typeof value !=3D=3D 'object')= {return false;} > +=C2=A0 return Object.prototype.toString.call(value) =3D=3D=3D '[object "= type > "]';}")) > + I'd call this js-type-object? or perhaps make-js-type-predicate. Cheers