diff --git a/.changeset/beige-gorillas-cross.md b/.changeset/beige-gorillas-cross.md new file mode 100644 index 0000000..ff2aaec --- /dev/null +++ b/.changeset/beige-gorillas-cross.md @@ -0,0 +1,5 @@ +--- +"@arethetypeswrong/core": patch +--- + +Changed version of lru-cache dependency to ^10.4.3 in order to fix compatibility with Node.js 18. diff --git a/package.json b/package.json index a391b39..8de1183 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ }, "pnpm": { "patchedDependencies": { - "cjs-module-lexer@1.4.0": "patches/cjs-module-lexer@1.4.0.patch" + "cjs-module-lexer@1.4.0": "patches/cjs-module-lexer@1.4.0.patch", + "lru-cache@10.4.3": "patches/lru-cache@10.4.3.patch" } } } diff --git a/packages/core/package.json b/packages/core/package.json index 13bc56c..5d9acbf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -53,7 +53,7 @@ "@andrewbranch/untar.js": "^1.0.3", "cjs-module-lexer": "^1.2.3", "fflate": "^0.8.2", - "lru-cache": "^11.0.1", + "lru-cache": "^10.4.3", "semver": "^7.5.4", "typescript": "5.6.1-rc", "validate-npm-package-name": "^5.0.0" diff --git a/patches/lru-cache@10.4.3.patch b/patches/lru-cache@10.4.3.patch new file mode 100644 index 0000000..640e759 --- /dev/null +++ b/patches/lru-cache@10.4.3.patch @@ -0,0 +1,26 @@ +diff --git a/dist/commonjs/index.d.ts b/dist/commonjs/index.d.ts +index f59de7602a528afde714e56dcf8c25ee496e39fb..0692e188a017d277fe843efb420b1f2c3cd28157 100644 +--- a/dist/commonjs/index.d.ts ++++ b/dist/commonjs/index.d.ts +@@ -837,7 +837,7 @@ export declare namespace LRUCache { + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +-export declare class LRUCache implements Map { ++export declare class LRUCache { + #private; + /** + * {@link LRUCache.OptionsBase.ttl} +diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts +index f59de7602a528afde714e56dcf8c25ee496e39fb..0692e188a017d277fe843efb420b1f2c3cd28157 100644 +--- a/dist/esm/index.d.ts ++++ b/dist/esm/index.d.ts +@@ -837,7 +837,7 @@ export declare namespace LRUCache { + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +-export declare class LRUCache implements Map { ++export declare class LRUCache { + #private; + /** + * {@link LRUCache.OptionsBase.ttl} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d2c653c..3a30830 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ patchedDependencies: cjs-module-lexer@1.4.0: hash: gwwdgkalbuq7pt3qbrdws6vbs4 path: patches/cjs-module-lexer@1.4.0.patch + lru-cache@10.4.3: + hash: pmipjznrdotd3z6bhpktlo2giu + path: patches/lru-cache@10.4.3.patch importers: @@ -75,8 +78,8 @@ importers: specifier: ^0.8.2 version: 0.8.2 lru-cache: - specifier: ^11.0.1 - version: 11.0.1 + specifier: ^10.4.3 + version: 10.4.3(patch_hash=pmipjznrdotd3z6bhpktlo2giu) semver: specifier: ^7.5.4 version: 7.5.4 @@ -1175,13 +1178,8 @@ packages: lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - lru-cache@10.0.1: - resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} - engines: {node: 14 || >=16.14} - - lru-cache@11.0.1: - resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} - engines: {node: 20 || >=22} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -2902,9 +2900,7 @@ snapshots: lodash.startcase@4.4.0: {} - lru-cache@10.0.1: {} - - lru-cache@11.0.1: {} + lru-cache@10.4.3(patch_hash=pmipjznrdotd3z6bhpktlo2giu): {} lru-cache@4.1.5: dependencies: @@ -3197,7 +3193,7 @@ snapshots: path-scurry@1.10.1: dependencies: - lru-cache: 10.0.1 + lru-cache: 10.4.3(patch_hash=pmipjznrdotd3z6bhpktlo2giu) minipass: 7.0.4 path-type@4.0.0: {}