We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d222f9 commit 76dae2bCopy full SHA for 76dae2b
src/helpers/serverTsSignature.js
@@ -7,7 +7,12 @@ const knownSignatures = require('./knownServerTsSignatures.json')
7
* @param {string} content Text of module to generate signature for
8
* @returns {string} Signature
9
*/
10
-const generateServerTsSignature = (content) => createHash('sha256').update(content).digest('hex')
+const generateServerTsSignature = (content) => {
11
+ // windows or unix line endings should not affect the signature
12
+ const normalizedContent = content.replaceAll('\r', '')
13
+
14
+ return createHash('sha256').update(normalizedContent).digest('hex')
15
+}
16
17
module.exports.generateServerTsSignature = generateServerTsSignature
18
0 commit comments