logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 67621430aed6f3b637faad6d72db6b5c23056e1e
parent 7e4e8dbabd44ae33f295b84aeab089ce9a862581
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  7 Oct 2023 01:05:11 +0200

dev-nodejs/balanced-match: Fix lack of "exports" entry

Diffstat:

Adev-nodejs/balanced-match/balanced-match-3.0.0-r1.ebuild29+++++++++++++++++++++++++++++
Ddev-nodejs/balanced-match/balanced-match-3.0.0.ebuild26--------------------------
2 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/dev-nodejs/balanced-match/balanced-match-3.0.0-r1.ebuild b/dev-nodejs/balanced-match/balanced-match-3.0.0-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit nodejs + +DESCRIPTION="Match balanced character pairs, like { and }" +HOMEPAGE="https://github.com/juliangruber/balanced-match" +SRC_URI="https://github.com/juliangruber/balanced-match/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +RESTRICT="!test? ( test )" + +src_prepare() { + default + + # standard: linter; no need in a distro package + sed -i 's;"test": "standard --fix && node--test;"test": "node --test;' package.json || die + + # 'test' is just a port of 'node:test' from NodeJS 18+ + sed -i "s;import test from 'test';import test from 'node:test';" test/test.js || die + + # https://github.com/juliangruber/balanced-match/pull/50 + sed -i 's!"main": "index.js"!"exports": "./index.js"!' package.json || die +} diff --git a/dev-nodejs/balanced-match/balanced-match-3.0.0.ebuild b/dev-nodejs/balanced-match/balanced-match-3.0.0.ebuild @@ -1,26 +0,0 @@ -# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit nodejs - -DESCRIPTION="Match balanced character pairs, like { and }" -HOMEPAGE="https://github.com/juliangruber/balanced-match" -SRC_URI="https://github.com/juliangruber/balanced-match/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="test" - -RESTRICT="!test? ( test )" - -src_prepare() { - default - - # standard: linter; no need in a distro package - sed -i 's;"test": "standard --fix && node--test;"test": "node --test;' package.json || die - - # 'test' is just a port of 'node:test' from NodeJS 18+ - sed -i "s;import test from 'test';import test from 'node:test';" test/test.js || die -}