Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit c56fe45

Browse files
committed
fix(cache): deprecation warning
1 parent 43f4146 commit c56fe45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cache.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as fs from 'fs';
2-
import * as crypto from 'crypto';
32
import * as os from 'os';
43
import * as path from 'path';
54
import * as zlib from 'zlib';
5+
import { createHash } from 'crypto';
66

77
export interface CompiledModule {
88
fileName: string;
@@ -86,7 +86,7 @@ function write(filename: string, result: any, callback) {
8686
* @return {String}
8787
*/
8888
function filename(source: string, identifier, options) {
89-
let hash = crypto.createHash('sha512') as any;
89+
let hash = createHash('sha512') as any;
9090
let contents = JSON.stringify({
9191
identifier: identifier,
9292
options: options,

0 commit comments

Comments
 (0)