mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47705 Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D66094272 fbshipit-source-id: 25c0bc2d9e68ed1f4ede9dc5f0470a530b5db7d0
31 lines
608 B
JavaScript
31 lines
608 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const crypto = require('crypto');
|
|
const fs = require('fs');
|
|
|
|
module.exports = {
|
|
getHasteName(filePath) {
|
|
if (filePath.endsWith('ReactNativeInternalFeatureFlags.js')) {
|
|
return 'ReactNativeInternalFeatureFlags';
|
|
}
|
|
|
|
return null;
|
|
},
|
|
|
|
getCacheKey() {
|
|
return crypto
|
|
.createHash('sha1')
|
|
.update(fs.readFileSync(__filename))
|
|
.digest('hex');
|
|
},
|
|
};
|