Update dependency @types/object-hash to v2.2.1 (#8046)

This commit is contained in:
renovate[bot]
2021-09-15 14:08:13 -04:00
committed by GitHub
parent e243a33cd9
commit 13b92f86f3
4 changed files with 12 additions and 14 deletions

View File

@@ -187,7 +187,7 @@
"@types/node": "15.12.2",
"@types/node-cron": "2.0.4",
"@types/nodemailer": "6.4.4",
"@types/object-hash": "2.2.0",
"@types/object-hash": "2.2.1",
"@types/qs": "6.9.7",
"@types/sharp": "0.29.2",
"@types/stream-json": "1.7.1",

View File

@@ -2,7 +2,7 @@ import { Range, StatResponse } from '@directus/drive';
import { Semaphore } from 'async-mutex';
import { Knex } from 'knex';
import { contentType } from 'mime-types';
import ObjectHash from 'object-hash';
import hash from 'object-hash';
import path from 'path';
import sharp from 'sharp';
import getDatabase from '../database';
@@ -124,5 +124,5 @@ export class AssetsService {
const getAssetSuffix = (transforms: Transformation[]) => {
if (Object.keys(transforms).length === 0) return '';
return `__${ObjectHash.sha1(transforms)}`;
return `__${hash(transforms)}`;
};

View File

@@ -14,7 +14,5 @@ export function getCacheKey(req: Request): string {
};
const key = hash(info);
// hash() only returns a buffer if the encoding is set to 'buffer'
return key as string;
return key;
}

16
package-lock.json generated
View File

@@ -165,7 +165,7 @@
"@types/node": "15.12.2",
"@types/node-cron": "2.0.4",
"@types/nodemailer": "6.4.4",
"@types/object-hash": "2.2.0",
"@types/object-hash": "2.2.1",
"@types/qs": "6.9.7",
"@types/sharp": "0.29.2",
"@types/stream-json": "1.7.1",
@@ -7856,9 +7856,9 @@
"dev": true
},
"node_modules/@types/object-hash": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-2.2.0.tgz",
"integrity": "sha512-k88aPAwnW+F47Kc468N6KraBo6i3lIVIuemcRyM1JBAyUsIbqztSzOLTFDKNdn5//QaLz2FxSRlc9uHkgQ6waQ==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-2.2.1.tgz",
"integrity": "sha512-i/rtaJFCsPljrZvP/akBqEwUP2y5cZLOmvO+JaYnz01aPknrQ+hB5MRcO7iqCUsFaYfTG8kGfKUyboA07xeDHQ==",
"dev": true
},
"node_modules/@types/object-path": {
@@ -57078,9 +57078,9 @@
"dev": true
},
"@types/object-hash": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-2.2.0.tgz",
"integrity": "sha512-k88aPAwnW+F47Kc468N6KraBo6i3lIVIuemcRyM1JBAyUsIbqztSzOLTFDKNdn5//QaLz2FxSRlc9uHkgQ6waQ==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-2.2.1.tgz",
"integrity": "sha512-i/rtaJFCsPljrZvP/akBqEwUP2y5cZLOmvO+JaYnz01aPknrQ+hB5MRcO7iqCUsFaYfTG8kGfKUyboA07xeDHQ==",
"dev": true
},
"@types/object-path": {
@@ -65096,7 +65096,7 @@
"@types/node": "15.12.2",
"@types/node-cron": "2.0.4",
"@types/nodemailer": "6.4.4",
"@types/object-hash": "2.2.0",
"@types/object-hash": "2.2.1",
"@types/qs": "6.9.7",
"@types/sharp": "0.29.2",
"@types/stream-json": "1.7.1",