Skip to content

Commit

Permalink
Merge pull request #46 from Zegnat/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies to get rid of deprecation warnings
  • Loading branch information
zachleat authored Oct 21, 2024
2 parents d7f8755 + 7db51a7 commit 058bbff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,24 @@
},
"homepage": "https://github.com/11ty/eleventy-fetch#readme",
"devDependencies": {
"ava": "^5.2.0",
"prettier": "^3.2.5"
"ava": "^6.1.3",
"prettier": "^3.3.3"
},
"dependencies": {
"debug": "^4.3.4",
"flat-cache": "^3.0.4",
"p-queue": "^6.6.2"
"debug": "^4.3.5",
"flat-cache": "^5.0.0",
"p-queue": "6.6.2"
},
"ava": {
"failFast": false,
"files": [
"./test/*.js"
],
"ignoredByWatcher": [
"**/.cache/**"
]
"watchMode": {
"ignoreChanges": [
"**/.cache/**",
"**/.customcache/**"
]
}
}
}
4 changes: 2 additions & 2 deletions src/AssetCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class AssetCache {
}

for (let k of key) {
k = ""+k;
if(k) {
k = "" + k;
if (k) {
hash.update(k);
} else {
throw new Error(`Not able to convert asset key (${k}) to string.`);
Expand Down
6 changes: 1 addition & 5 deletions test/RemoteAssetCacheTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,11 @@ test("Fetching pass non-stringable", async (t) => {
try {
await ac.fetch();
} catch (e) {
t.is(
e.message,
"Failed to parse URL from [object Object]"
);
t.is(e.message, "Failed to parse URL from [object Object]");
t.truthy(e.cause);
}
});


test("formatUrlForDisplay (manual query param removal)", async (t) => {
let finalUrl = "https://example.com/207115/photos/243-0-1.jpg";
let longUrl =
Expand Down

0 comments on commit 058bbff

Please sign in to comment.