From 3bf8047695950d91b0af9f2df65a5a22228440f9 Mon Sep 17 00:00:00 2001 From: ehmicky Date: Sun, 29 Oct 2023 21:51:41 +0000 Subject: [PATCH] Upgrade `mimic-function` --- CHANGELOG.md | 6 ++++++ README.md | 4 ++-- package-lock.json | 14 +++++++++++++- package.json | 2 +- src/main.js | 4 ++-- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcfae08..9882ae0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 7.1.0 + +## Dependencies + +- Upgrade `mimic-function` + # 7.0.0 ## Breaking changes diff --git a/README.md b/README.md index dede20c..9ea9786 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ A function `wrapper` is passed as argument. A copy of it is returned. # See also -- [`mimic-fn`](https://github.com/sindresorhus/mimic-fn): same but for functions - that do not wrap other functions. +- [`mimic-function`](https://github.com/sindresorhus/mimic-function): same but + for functions that do not wrap other functions. # Support diff --git a/package-lock.json b/package-lock.json index 2dddd11..63e5db5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "7.0.0", "license": "MIT", "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-function": "^5.0.0" }, "devDependencies": { "@ehmicky/dev-tasks": "^2.0.103", @@ -13041,6 +13041,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, "engines": { "node": ">=12" }, @@ -13048,6 +13049,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mimic-function": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.0.tgz", + "integrity": "sha512-RBfQ+9X9DpXdEoK7Bu+KeEU6vFhumEIiXKWECPzRBmDserEq4uR2b/VCm0LwpMSosoq2k+Zuxj/GzOr0Fn6h/g==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mimic-response": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", diff --git a/package.json b/package.json index e5d0ea8..b209a9c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lib": "src" }, "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-function": "^5.0.0" }, "devDependencies": { "@ehmicky/dev-tasks": "^2.0.103", diff --git a/src/main.js b/src/main.js index 6214f85..0270a13 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,4 @@ -import mimicFn from 'mimic-fn' +import mimicFunction from 'mimic-function' // Wraps a functor so it does not modify a function `name`, etc. const keepFuncProps = (functor) => { @@ -11,7 +11,7 @@ const keepFuncProps = (functor) => { const newFunc = functor.call(this, func, ...args) if (typeof func === 'function' && typeof newFunc === 'function') { - mimicFn(newFunc, func, { ignoreNonConfigurable: true }) + mimicFunction(newFunc, func, { ignoreNonConfigurable: true }) } return newFunc