Skip to content

Commit

Permalink
Remove all special characters from filename prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
etr2460 committed Apr 22, 2019
1 parent 6f47664 commit 6902c63
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/jest-transform/src/ScriptTransformer.ts
Expand Up @@ -94,7 +94,6 @@ export default class ScriptTransformer {
rootDir: this._config.rootDir,
}),
)
.update(filename)
.update(CACHE_VERSION)
.digest('hex');
} else {
Expand Down Expand Up @@ -125,7 +124,7 @@ export default class ScriptTransformer {
const cacheDir = path.join(baseCacheDir, cacheKey[0] + cacheKey[1]);
const cacheFilenamePrefix = path
.basename(filename, path.extname(filename))
.replace(/:/g, '_COLON_');
.replace(/\W/g, '');
const cachePath = slash(
path.join(cacheDir, cacheFilenamePrefix + '_' + cacheKey),
);
Expand Down

0 comments on commit 6902c63

Please sign in to comment.