From 1286f03fe73dee9a447b13b662f0c5622ab6ec9e Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 25 Aug 2022 13:59:23 -0700 Subject: [PATCH] deps: unique-filename@2.0.1 --- node_modules/unique-filename/package.json | 4 +-- node_modules/unique-slug/{ => lib}/index.js | 4 +-- node_modules/unique-slug/package.json | 35 ++++++++++++++++----- node_modules/unique-slug/test/index.js | 13 -------- package-lock.json | 17 +++++----- 5 files changed, 42 insertions(+), 31 deletions(-) rename node_modules/unique-slug/{ => lib}/index.js (55%) delete mode 100644 node_modules/unique-slug/test/index.js diff --git a/node_modules/unique-filename/package.json b/node_modules/unique-filename/package.json index 0d4ddb45ef11d..bfdec2c3722a0 100644 --- a/node_modules/unique-filename/package.json +++ b/node_modules/unique-filename/package.json @@ -1,6 +1,6 @@ { "name": "unique-filename", - "version": "2.0.0", + "version": "2.0.1", "description": "Generate a unique filename for use in temporary directories or caches.", "main": "lib/index.js", "scripts": { @@ -32,7 +32,7 @@ "tap": "^16.3.0" }, "dependencies": { - "unique-slug": "^2.0.2" + "unique-slug": "^3.0.0" }, "files": [ "bin/", diff --git a/node_modules/unique-slug/index.js b/node_modules/unique-slug/lib/index.js similarity index 55% rename from node_modules/unique-slug/index.js rename to node_modules/unique-slug/lib/index.js index fa4761ad2e258..1bac84d95d730 100644 --- a/node_modules/unique-slug/index.js +++ b/node_modules/unique-slug/lib/index.js @@ -4,8 +4,8 @@ var MurmurHash3 = require('imurmurhash') module.exports = function (uniq) { if (uniq) { var hash = new MurmurHash3(uniq) - return ('00000000' + hash.result().toString(16)).substr(-8) + return ('00000000' + hash.result().toString(16)).slice(-8) } else { - return (Math.random().toString(16) + '0000000').substr(2, 8) + return (Math.random().toString(16) + '0000000').slice(2, 10) } } diff --git a/node_modules/unique-slug/package.json b/node_modules/unique-slug/package.json index 2142e68561f5d..3194408f27fda 100644 --- a/node_modules/unique-slug/package.json +++ b/node_modules/unique-slug/package.json @@ -1,23 +1,44 @@ { "name": "unique-slug", - "version": "2.0.2", + "version": "3.0.0", "description": "Generate a unique character string suitible for use in files and URLs.", - "main": "index.js", + "main": "lib/index.js", "scripts": { - "test": "standard && tap --coverage test" + "test": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", + "posttest": "npm run lint" }, "keywords": [], - "author": "Rebecca Turner (http://re-becca.org)", + "author": "GitHub Inc.", "license": "ISC", "devDependencies": { - "standard": "^12.0.1", - "tap": "^12.7.0" + "@npmcli/eslint-config": "^3.1.0", + "@npmcli/template-oss": "3.5.0", + "tap": "^16.3.0" }, "repository": { "type": "git", - "url": "git://github.com/iarna/unique-slug.git" + "url": "https://github.com/npm/unique-slug.git" }, "dependencies": { "imurmurhash": "^0.1.4" + }, + "files": [ + "bin/", + "lib/" + ], + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.5.0" } } diff --git a/node_modules/unique-slug/test/index.js b/node_modules/unique-slug/test/index.js deleted file mode 100644 index 0f4ccad04af6f..0000000000000 --- a/node_modules/unique-slug/test/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' -var t = require('tap') -var uniqueSlug = require('../index.js') - -t.plan(5) -var slugA = uniqueSlug() -t.is(slugA.length, 8, 'random slugs are 8 chars') -t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same") -var base = '/path/to/thingy' -var slugB = uniqueSlug(base) -t.is(slugB.length, 8, 'string based slugs are 8 chars') -t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same') -t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different') diff --git a/package-lock.json b/package-lock.json index 326eb73194f4b..33939ece8b8e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9916,24 +9916,27 @@ } }, "node_modules/unique-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.0.tgz", - "integrity": "sha512-tpzoz2RpZ//6Zt4GPpOFTyrnfZuSvjIfe8lvx6Thp4yTQwJtAFwPlssEBE62VhGA2We5/COyNpcIu+OABu3/Yg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", "inBundle": true, "dependencies": { - "unique-slug": "^2.0.2" + "unique-slug": "^3.0.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", "inBundle": true, "dependencies": { "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/unist-builder": {