Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Dec 1, 2022
1 parent 2d6f832 commit 9908ed4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/babel-helper-compilation-targets/package.json
Expand Up @@ -25,7 +25,7 @@
"@babel/compat-data": "workspace:^",
"@babel/helper-validator-option": "workspace:^",
"browserslist": "^4.21.3",
"lru-cache": "^5.1.1",
"lru-cache": "condition:BABEL_8_BREAKING ? ^7.14.1 : ^5.1.1",
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-helper-compilation-targets/src/index.ts
Expand Up @@ -170,7 +170,7 @@ function resolveTargets(queries: Browsers, env?: string): Targets {
return getLowestVersions(resolved);
}

const targetsCache = new LruCache(64);
const targetsCache = new LruCache({ max: 64 });

function resolveTargetsCached(queries: Browsers, env?: string): Targets {
const cacheKey = typeof queries === "string" ? queries : queries.join() + env;
Expand Down
37 changes: 27 additions & 10 deletions yarn.lock
Expand Up @@ -555,7 +555,7 @@ __metadata:
"@types/lru-cache": ^5.1.1
"@types/semver": ^5.5.0
browserslist: ^4.21.3
lru-cache: ^5.1.1
lru-cache: "condition:BABEL_8_BREAKING ? ^7.14.1 : ^5.1.1"
semver: "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0"
peerDependencies:
"@babel/core": ^7.0.0
Expand Down Expand Up @@ -11168,6 +11168,32 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"lru-cache-BABEL_8_BREAKING-false@npm:lru-cache@^5.1.1, lru-cache@npm:^5.1.1":
version: 5.1.1
resolution: "lru-cache@npm:5.1.1"
dependencies:
yallist: ^3.0.2
checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb
languageName: node
linkType: hard

"lru-cache-BABEL_8_BREAKING-true@npm:lru-cache@^7.14.1":
version: 7.14.1
resolution: "lru-cache@npm:7.14.1"
checksum: d72c6713c6a6d86836a7a6523b3f1ac6764768cca47ec99341c3e76db06aacd4764620e5e2cda719a36848785a52a70e531822dc2b33fb071fa709683746c104
languageName: node
linkType: hard

"lru-cache@condition:BABEL_8_BREAKING ? ^7.14.1 : ^5.1.1":
version: 0.0.0-condition-86c673
resolution: "lru-cache@condition:BABEL_8_BREAKING?^7.14.1:^5.1.1#86c673"
dependencies:
lru-cache-BABEL_8_BREAKING-false: "npm:lru-cache@^5.1.1"
lru-cache-BABEL_8_BREAKING-true: "npm:lru-cache@^7.14.1"
checksum: 9a90e9b7fff14a71bd363ac5e40cea193f2da3380ca92d012589d3da49cc6af9c9a8399fc59b57b206e62753347ff4d77769a1e3bc0dd5550f3a8225a1a78a9a
languageName: node
linkType: hard

"lru-cache@npm:^4.0.1":
version: 4.1.5
resolution: "lru-cache@npm:4.1.5"
Expand All @@ -11178,15 +11204,6 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"lru-cache@npm:^5.1.1":
version: 5.1.1
resolution: "lru-cache@npm:5.1.1"
dependencies:
yallist: ^3.0.2
checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb
languageName: node
linkType: hard

"lru-cache@npm:^6.0.0":
version: 6.0.0
resolution: "lru-cache@npm:6.0.0"
Expand Down

0 comments on commit 9908ed4

Please sign in to comment.