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

bump find-cache-dir to v4 #995

Merged
merged 3 commits into from
Jul 6, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: latest
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Lint
Expand All @@ -40,6 +41,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Install webpack ${{ matrix.webpack-version }}
Expand Down
3 changes: 2 additions & 1 deletion babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
},
"presets": [
["@babel/preset-env", {
"loose": true
"loose": true,
"modules": false
}]
],
"env": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"node": ">= 14.15.0"
},
"dependencies": {
"find-cache-dir": "^3.3.2",
"find-cache-dir": "^4.0.0",
"schema-utils": "^4.0.0"
},
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const os = require("os");
const path = require("path");
const zlib = require("zlib");
const crypto = require("crypto");
const findCacheDir = require("find-cache-dir");
const { promisify } = require("util");
const { readFile, writeFile, mkdir } = require("fs/promises");
const findCacheDirP = import("find-cache-dir");

const transform = require("./transform");
// Lazily instantiated when needed
Expand Down Expand Up @@ -169,6 +169,7 @@ module.exports = async function (params) {
directory = params.cacheDirectory;
} else {
if (defaultCacheDirectory === null) {
const { default: findCacheDir } = await findCacheDirP;
defaultCacheDirectory =
findCacheDir({ name: "babel-loader" }) || os.tmpdir();
}
Expand Down
74 changes: 72 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,7 @@ __metadata:
eslint-config-prettier: ^6.3.0
eslint-plugin-flowtype: ^5.2.0
eslint-plugin-prettier: ^3.0.0
find-cache-dir: ^3.3.2
find-cache-dir: ^4.0.0
husky: ^4.3.0
lint-staged: ^10.5.1
nyc: ^15.1.0
Expand Down Expand Up @@ -3725,7 +3725,7 @@ __metadata:
languageName: node
linkType: hard

"find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.2":
"find-cache-dir@npm:^3.2.0":
version: 3.3.2
resolution: "find-cache-dir@npm:3.3.2"
dependencies:
Expand All @@ -3736,6 +3736,16 @@ __metadata:
languageName: node
linkType: hard

"find-cache-dir@npm:^4.0.0":
version: 4.0.0
resolution: "find-cache-dir@npm:4.0.0"
dependencies:
common-path-prefix: ^3.0.0
pkg-dir: ^7.0.0
checksum: 52a456a80deeb27daa3af6e06059b63bdb9cc4af4d845fc6d6229887e505ba913cd56000349caa60bc3aa59dacdb5b4c37903d4ba34c75102d83cab330b70d2f
languageName: node
linkType: hard

"find-up@npm:^3.0.0":
version: 3.0.0
resolution: "find-up@npm:3.0.0"
Expand All @@ -3755,6 +3765,16 @@ __metadata:
languageName: node
linkType: hard

"find-up@npm:^6.3.0":
version: 6.3.0
resolution: "find-up@npm:6.3.0"
dependencies:
locate-path: ^7.1.0
path-exists: ^5.0.0
checksum: 9a21b7f9244a420e54c6df95b4f6fc3941efd3c3e5476f8274eb452f6a85706e7a6a90de71353ee4f091fcb4593271a6f92810a324ec542650398f928783c280
languageName: node
linkType: hard

"find-versions@npm:^3.2.0":
version: 3.2.0
resolution: "find-versions@npm:3.2.0"
Expand Down Expand Up @@ -4952,6 +4972,15 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"locate-path@npm:^7.1.0":
version: 7.2.0
resolution: "locate-path@npm:7.2.0"
dependencies:
p-locate: ^6.0.0
checksum: c1b653bdf29beaecb3d307dfb7c44d98a2a98a02ebe353c9ad055d1ac45d6ed4e1142563d222df9b9efebc2bcb7d4c792b507fad9e7150a04c29530b7db570f8
languageName: node
linkType: hard

"lodash.clonedeep@npm:^4.5.0":
version: 4.5.0
resolution: "lodash.clonedeep@npm:4.5.0"
Expand Down Expand Up @@ -5549,6 +5578,15 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"p-limit@npm:^4.0.0":
version: 4.0.0
resolution: "p-limit@npm:4.0.0"
dependencies:
yocto-queue: ^1.0.0
checksum: 01d9d70695187788f984226e16c903475ec6a947ee7b21948d6f597bed788e3112cc7ec2e171c1d37125057a5f45f3da21d8653e04a3a793589e12e9e80e756b
languageName: node
linkType: hard

"p-locate@npm:^3.0.0":
version: 3.0.0
resolution: "p-locate@npm:3.0.0"
Expand All @@ -5567,6 +5605,15 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"p-locate@npm:^6.0.0":
version: 6.0.0
resolution: "p-locate@npm:6.0.0"
dependencies:
p-limit: ^4.0.0
checksum: 2bfe5234efa5e7a4e74b30a5479a193fdd9236f8f6b4d2f3f69e3d286d9a7d7ab0c118a2a50142efcf4e41625def635bd9332d6cbf9cc65d85eb0718c579ab38
languageName: node
linkType: hard

"p-map@npm:^3.0.0":
version: 3.0.0
resolution: "p-map@npm:3.0.0"
Expand Down Expand Up @@ -5677,6 +5724,13 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"path-exists@npm:^5.0.0":
version: 5.0.0
resolution: "path-exists@npm:5.0.0"
checksum: 8ca842868cab09423994596eb2c5ec2a971c17d1a3cb36dbf060592c730c725cd524b9067d7d2a1e031fef9ba7bd2ac6dc5ec9fb92aa693265f7be3987045254
languageName: node
linkType: hard

"path-is-absolute@npm:^1.0.0":
version: 1.0.1
resolution: "path-is-absolute@npm:1.0.1"
Expand Down Expand Up @@ -5752,6 +5806,15 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"pkg-dir@npm:^7.0.0":
version: 7.0.0
resolution: "pkg-dir@npm:7.0.0"
dependencies:
find-up: ^6.3.0
checksum: 94298b20a446bfbbd66604474de8a0cdd3b8d251225170970f15d9646f633e056c80520dd5b4c1d1050c9fed8f6a9e5054b141c93806439452efe72e57562c03
languageName: node
linkType: hard

"please-upgrade-node@npm:^3.2.0":
version: 3.2.0
resolution: "please-upgrade-node@npm:3.2.0"
Expand Down Expand Up @@ -7451,3 +7514,10 @@ typescript@^4.0:
checksum: 65843536f948b75045465c47c58c601c8bc1f7e86ae786a32dcf416ac499558749d85a45078921fcb90e31d8f27abcaabf7b0fd57d6fd5298fcc340d2115cda0
languageName: node
linkType: hard

"yocto-queue@npm:^1.0.0":
version: 1.0.0
resolution: "yocto-queue@npm:1.0.0"
checksum: 2cac84540f65c64ccc1683c267edce396b26b1e931aa429660aefac8fbe0188167b7aee815a3c22fa59a28a58d898d1a2b1825048f834d8d629f4c2a5d443801
languageName: node
linkType: hard