Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace memoizee with nano-memoize #953

Merged
merged 3 commits into from May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.