Skip to content

Commit

Permalink
Replace memoizee with nano-memoize
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis committed Apr 19, 2024
1 parent 6f33953 commit 53ad01e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 111 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-humans-repair.md
@@ -0,0 +1,5 @@
---
'sku': patch
---

Replace `memoizee` dependency with `nano-memoize`
@@ -1,5 +1,5 @@
const { HtmlRenderPlugin } = require('html-render-webpack-plugin');
const memoize = require('memoizee/weak');
const { default: memoize } = require('nano-memoize');
const debug = require('debug');

const {
Expand Down
3 changes: 2 additions & 1 deletion packages/sku/config/webpack/utils/resolvePackage.js
@@ -1,5 +1,5 @@
const path = require('node:path');
const memoize = require('memoizee');
const { default: memoize } = require('nano-memoize');
const debug = require('debug')('sku:resolvePackage');
const { cwd } = require('../../../lib/cwd');

Expand Down Expand Up @@ -37,6 +37,7 @@ const createPackageResolver = (fs, resolve) => {
*
* Throws if a package is listed in the project's dependencies and cannot be resolved.
*/
/** @param {string} packageName */
function resolvePackage(packageName) {
try {
// First, try to use require.resolve to find the package.
Expand Down
2 changes: 1 addition & 1 deletion packages/sku/package.json
Expand Up @@ -98,9 +98,9 @@
"less": "^4.1.0",
"less-loader": "^12.0.0",
"lint-staged": "^11.1.1",
"memoizee": "^0.4.15",
"mini-css-extract-plugin": "^2.6.1",
"minimist": "^1.2.8",
"nano-memoize": "^3.0.16",
"node-html-parser": "^6.1.1",
"open": "^7.3.1",
"path-to-regexp": "^6.2.0",
Expand Down
115 changes: 7 additions & 108 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 53ad01e

Please sign in to comment.