File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 4747 "dateformat-converter" : " ^2.0.1" ,
4848 "eval" : " ^0.1.2" ,
4949 "fs-extra" : " ^5.0.0" ,
50- "hash.js" : " ^1.1.3" ,
5150 "htmlspecialchars" : " ^1.0.5" ,
5251 "iconv-lite" : " ^0.4.19" ,
5352 "is-integer" : " ^1.0.7" ,
6362 "regex-parser" : " ^2.2.8" ,
6463 "require-uncached" : " ^1.0.3" ,
6564 "secure-filters" : " ^1.1.0" ,
66- "sha.js" : " ^2.4.9 " ,
65+ "sha.js" : " ^2.4.10 " ,
6766 "snake-case" : " ^2.1.0" ,
6867 "stack-trace" : " 0.0.10" ,
6968 "tmp" : " 0.0.33" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import {TwingCacheInterface} from "../cache-interface";
22
33let fs = require ( 'fs-extra' ) ;
44let path = require ( 'path' ) ;
5- let hashJs = require ( 'hash .js' ) ;
5+ let hashJs = require ( 'sha .js' ) ;
66let tmp = require ( 'tmp' ) ;
77
88/**
@@ -26,7 +26,7 @@ export class TwingCacheFilesystem implements TwingCacheInterface {
2626 }
2727
2828 generateKey ( name : string , className : string ) {
29- let hash : string = hashJs . sha256 ( ) . update ( className ) . digest ( 'hex' ) ;
29+ let hash : string = hashJs ( 'sha256' ) . update ( className ) . digest ( 'hex' ) ;
3030
3131 return path . join (
3232 this . directory ,
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import {TwingRuntimeLoaderInterface} from "./runtime-loader-interface";
3333import { TwingReflectionObject } from "./reflection-object" ;
3434
3535const merge = require ( 'merge' ) ;
36- const hash = require ( 'hash .js' ) ;
36+ const hash = require ( 'sha .js' ) ;
3737const path = require ( 'path' ) ;
3838
3939/**
@@ -290,7 +290,7 @@ export class TwingEnvironment {
290290 getTemplateClass ( name : string , index : number = null ) {
291291 let key = this . getLoader ( ) . getCacheKey ( name ) + this . optionsHash ;
292292
293- return this . templateClassPrefix + hash . sha256 ( ) . update ( key ) . digest ( 'hex' ) + ( index === null ? '' : '_' + index ) ;
293+ return this . templateClassPrefix + hash ( 'sha256' ) . update ( key ) . digest ( 'hex' ) + ( index === null ? '' : '_' + index ) ;
294294 }
295295
296296 /**
@@ -450,7 +450,7 @@ export class TwingEnvironment {
450450 */
451451 createTemplate ( template : string ) {
452452 let result : TwingTemplate ;
453- let name = `__string_template__${ hash . sha256 ( ) . update ( template ) . digest ( 'hex' ) } ` ;
453+ let name = `__string_template__${ hash ( 'sha256' ) . update ( template ) . digest ( 'hex' ) } ` ;
454454 let current = this . getLoader ( ) ;
455455
456456 let loader = new TwingLoaderChain ( [
You can’t perform that action at this time.
0 commit comments