commit: bad2b95b0ae2fe73e340d0e4937e10f9372d8251
parent c105939c422ebc7fcb87e5299675dc9226c08cb1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 11 Apr 2025 06:37:06 +0200
dev-nodejs/abbrev: add 3.0.1, drop 2.0.0-r1
Diffstat:
5 files changed, 117 insertions(+), 111 deletions(-)
diff --git a/dev-nodejs/abbrev/Manifest b/dev-nodejs/abbrev/Manifest
@@ -1 +1 @@
-DIST abbrev-2.0.0.tar.gz 10285 BLAKE2B 5d7df658d5783aee6a652db95f90911010f5c835723897888dc949a3e3d3775e254dd5aba8c17ee52567e645477310a178780f8b0512e5366a79af01df488d98 SHA512 da689f14980dc1b60743f8702c850b687634a1ffeab44257683f3a51fbe0c36b1bf17ef5dbfc0632346a4e72051287f0a70524d2dcde106ca7f5d1723a14e415
+DIST abbrev-3.0.1.tar.gz 14392 BLAKE2B c9c5ada2e9aba6a1c7275ffdcd0edc6de711bd45305e9d069224411eea848055ed0b1d8cfa2bdb6fdced0c21b45d466cac6835b8f62c09796a868d243b540d23 SHA512 c1e15f95f65a2fff3b2c07422c260af89d59242e7733f5d04f05571915a61693dd557e22223ea150e1d1f10b55e8098ab481299bc89f1e4b48a61a7643512428
diff --git a/dev-nodejs/abbrev/abbrev-2.0.0-r1.ebuild b/dev-nodejs/abbrev/abbrev-2.0.0-r1.ebuild
@@ -1,18 +0,0 @@
-# Copyright 2022-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit nodejs
-
-DESCRIPTION="Get unique abbreviations for a set of strings"
-HOMEPAGE="https://github.com/npm/abbrev-js"
-SRC_URI="https://github.com/npm/abbrev-js/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/abbrev-js-${PV}"
-LICENSE="|| ( ISC MIT )"
-SLOT="0"
-KEYWORDS="~amd64"
-
-PATCHES=(
- "${FILESDIR}/abbrev-2.0.0-node_test.patch"
-)
diff --git a/dev-nodejs/abbrev/abbrev-3.0.1.ebuild b/dev-nodejs/abbrev/abbrev-3.0.1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 2022-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit nodejs
+
+DESCRIPTION="Get unique abbreviations for a set of strings"
+HOMEPAGE="https://github.com/npm/abbrev-js"
+SRC_URI="https://github.com/npm/abbrev-js/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/abbrev-js-${PV}"
+LICENSE="|| ( ISC MIT )"
+SLOT="0"
+KEYWORDS="~amd64"
+
+PATCHES=(
+ "${FILESDIR}/abbrev-3.0.1-node_test.patch"
+)
diff --git a/dev-nodejs/abbrev/files/abbrev-2.0.0-node_test.patch b/dev-nodejs/abbrev/files/abbrev-2.0.0-node_test.patch
@@ -1,92 +0,0 @@
-From 08f0f108ece47624da15a77a6f1aeb3016946201 Mon Sep 17 00:00:00 2001
-From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
-Date: Fri, 8 Sep 2023 10:11:49 +0200
-Subject: [PATCH] Depend on node:test instead of npm:tap
-
----
- package.json | 15 ++++-----------
- test/test.js | 23 +++++++++++------------
- 2 files changed, 15 insertions(+), 23 deletions(-)
-
-diff --git a/package.json b/package.json
-index e264004..4123322 100644
---- a/package.json
-+++ b/package.json
-@@ -3,9 +3,9 @@
- "version": "2.0.0",
- "description": "Like ruby's abbrev module, but in js",
- "author": "GitHub Inc.",
-- "main": "lib/index.js",
-+ "exports": "./lib/index.js",
- "scripts": {
-- "test": "tap",
-+ "test": "node test/test.js",
- "lint": "eslint \"**/*.js\"",
- "postlint": "template-oss-check",
- "template-oss-apply": "template-oss-apply --force",
-@@ -20,21 +20,14 @@
- "license": "ISC",
- "devDependencies": {
- "@npmcli/eslint-config": "^4.0.0",
-- "@npmcli/template-oss": "4.8.0",
-- "tap": "^16.3.0"
-- },
-- "tap": {
-- "nyc-arg": [
-- "--exclude",
-- "tap-snapshots/**"
-- ]
-+ "@npmcli/template-oss": "4.8.0"
- },
- "files": [
- "bin/",
- "lib/"
- ],
- "engines": {
-- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-+ "node": ">=18.0.0"
- },
- "templateOSS": {
- "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-diff --git a/test/test.js b/test/test.js
-index 6192f3d..a4db824 100644
---- a/test/test.js
-+++ b/test/test.js
-@@ -1,17 +1,16 @@
--const abbrev = require('../')
--const t = require('tap')
-+const abbrev = require('abbrev')
-+const t = require('node:test')
-+const assert = require('assert');
- const util = require('util')
-
- function test (list, expect) {
-- let actual = abbrev(list)
-- t.same(actual, expect,
-- 'abbrev(' + util.inspect(list) + ') === ' + util.inspect(expect) + '\n' +
-- 'actual: ' + util.inspect(actual))
-+ t.test(() => {
-+ let actual = abbrev(list);
-+ assert.deepStrictEqual(actual, expect);
-
-- actual = abbrev(...list)
-- t.same(abbrev(...list), expect,
-- 'abbrev(' + list.map(JSON.stringify).join(',') + ') === ' + util.inspect(expect) + '\n' +
-- 'actual: ' + util.inspect(actual))
-+ actual = abbrev(...list);
-+ assert.deepStrictEqual(actual, expect);
-+ });
- }
-
- test(['ruby', 'ruby', 'rules', 'rules', 'rules'],
-@@ -50,5 +49,5 @@ test(['a', 'ab', 'abc', 'abcd', 'abcde', 'acde'].reverse(),
- acde: 'acde',
- })
-
--t.notOk([].abbrev)
--t.notOk({}.abbrev)
-+t.test(() => assert(![].abbrev))
-+t.test(() => assert(!{}.abbrev))
---
-2.41.0
-
diff --git a/dev-nodejs/abbrev/files/abbrev-3.0.1-node_test.patch b/dev-nodejs/abbrev/files/abbrev-3.0.1-node_test.patch
@@ -0,0 +1,98 @@
+From 8f8b90eb0c9cda32c77fa2114e63c6b64c5a22e0 Mon Sep 17 00:00:00 2001
+From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
+Date: Fri, 8 Sep 2023 10:11:49 +0200
+Subject: [PATCH] Use builtin node:test instead of npm:tap dependency
+
+---
+ package.json | 13 +++----------
+ test/test.js | 29 ++++++++++++++---------------
+ 2 files changed, 17 insertions(+), 25 deletions(-)
+
+diff --git a/package.json b/package.json
+index 077d4bc..622ee50 100644
+--- a/package.json
++++ b/package.json
+@@ -3,9 +3,9 @@
+ "version": "3.0.1",
+ "description": "Like ruby's abbrev module, but in js",
+ "author": "GitHub Inc.",
+- "main": "lib/index.js",
++ "exports": "./lib/index.js",
+ "scripts": {
+- "test": "tap",
++ "test": "node test/test.js",
+ "lint": "npm run eslint",
+ "postlint": "template-oss-check",
+ "template-oss-apply": "template-oss-apply --force",
+@@ -21,14 +21,7 @@
+ "license": "ISC",
+ "devDependencies": {
+ "@npmcli/eslint-config": "^5.0.0",
+- "@npmcli/template-oss": "4.24.3",
+- "tap": "^16.3.0"
+- },
+- "tap": {
+- "nyc-arg": [
+- "--exclude",
+- "tap-snapshots/**"
+- ]
++ "@npmcli/template-oss": "4.24.3"
+ },
+ "files": [
+ "bin/",
+diff --git a/test/test.js b/test/test.js
+index b82a839..ea2a289 100644
+--- a/test/test.js
++++ b/test/test.js
+@@ -1,28 +1,27 @@
+-const abbrev = require('../')
+-const t = require('tap')
++const abbrev = require('abbrev')
++const t = require('node:test')
++const assert = require('assert');
+ const util = require('util')
+
+ function test (list, expect) {
+- let actual = abbrev(list)
+- t.same(actual, expect,
+- 'abbrev(' + util.inspect(list) + ') === ' + util.inspect(expect) + '\n' +
+- 'actual: ' + util.inspect(actual))
++ t.test(() => {
++ let actual = abbrev(list)
++ assert.deepStrictEqual(actual, expect)
+
+- actual = abbrev(...list)
+- t.same(abbrev(...list), expect,
+- 'abbrev(' + list.map(JSON.stringify).join(',') + ') === ' + util.inspect(expect) + '\n' +
+- 'actual: ' + util.inspect(actual))
++ actual = abbrev(...list)
++ assert.deepStrictEqual(actual, expect)
++ })
+ }
+
+ t.test('single string input', t => {
+ const result = abbrev('asdf')
+- t.same(result, {
++ let expect = {
+ a: 'asdf',
+ as: 'asdf',
+ asd: 'asdf',
+ asdf: 'asdf',
+- }, 'correctly abbreviates a single string')
+- t.end()
++ }
++ assert.deepStrictEqual(result, expect)
+ })
+
+ test(['ruby', 'ruby', 'rules', 'rules', 'rules'],
+@@ -61,5 +60,5 @@ test(['a', 'ab', 'abc', 'abcd', 'abcde', 'acde'].reverse(),
+ acde: 'acde',
+ })
+
+-t.notOk([].abbrev)
+-t.notOk({}.abbrev)
++t.test(() => assert(![].abbrev))
++t.test(() => assert(!{}.abbrev))
+--
+2.49.0
+