bigint-crypto-utils
Advanced tools
Comparing version 2.4.3 to 2.4.4
@@ -12,2 +12,5 @@ 'use strict'; | ||
const pkgJson = require('../package.json'); | ||
const pkg_name = pkgJson.name; | ||
const mocha_version = pkgJson.devDependencies.mocha.replace(/[\^~*><=]/g, ''); | ||
const chai_version = pkgJson.devDependencies.chai.replace(/[\^~*><=]/g, ''); | ||
@@ -25,4 +28,4 @@ const rootDir = path.join(__dirname, '..'); | ||
<script type="module"> | ||
import * as ${camelise(pkgJson.name)} from '${path.relative(templatePath, pkgJson.browser)}' | ||
window.${camelise(pkgJson.name)} = ${camelise(pkgJson.name)}; | ||
import * as ${camelise(pkg_name)} from '${path.relative(templatePath, pkgJson.browser)}' | ||
window.${camelise(pkg_name)} = ${camelise(pkg_name)}; | ||
import './tests.js'; | ||
@@ -32,4 +35,7 @@ mocha.run(); | ||
`; | ||
fs.writeFileSync(dstFileName, template.replace('{{TESTS}}', testsJs).replace('{{PKG_NAME}}', pkgJson.name)); | ||
fs.writeFileSync(dstFileName, | ||
template.replace(/{{TESTS}}/g, testsJs).replace(/{{PKG_NAME}}/g, pkgJson.name).replace(/{{MOCHA_VERSION}}/g, mocha_version).replace(/{{CHAI_VERSION}}/g, chai_version) | ||
); | ||
/* | ||
@@ -36,0 +42,0 @@ Now we create a bundle of all the tests called test.js |
{ | ||
"name": "bigint-crypto-utils", | ||
"version": "2.4.3", | ||
"description": "Utils for working with cryptography using native JS (stage 3) implementation of BigInt. It includes arbitrary precision modular arithmetics, cryptographically secure random numbers and strong probable prime generation/testing.", | ||
"version": "2.4.4", | ||
"description": "Utils for working with cryptography using native JS implementation of BigInt. It includes arbitrary precision modular arithmetics, cryptographically secure random numbers and strong probable prime generation/testing.", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "modular arithmetics", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
286420
4882