bundles weren't including bigint-mod-arith!

This commit is contained in:
Juanra Dikal 2021-11-15 12:00:37 +01:00
parent e0e6c8862f
commit 626e89ba0b
5 changed files with 994 additions and 921 deletions

View File

@ -8,7 +8,7 @@ import commonjs from '@rollup/plugin-commonjs'
import { dirname, join } from 'path' import { dirname, join } from 'path'
import { existsSync, moveSync, removeSync } from 'fs-extra' import { existsSync, moveSync, removeSync } from 'fs-extra'
import { directories, name as _name, dependencies, peerDependencies, exports, types } from '../package.json' import { directories, name as _name, /* dependencies, peerDependencies, */ exports, types } from '../package.json'
const rootDir = join(__dirname, '..') const rootDir = join(__dirname, '..')
const dstDir = join(rootDir, directories.dist) const dstDir = join(rootDir, directories.dist)
@ -34,7 +34,7 @@ const tsBundleOptions = {
exclude: ['test/**/*', 'src/**/*.spec.ts', './build/typings/global-this-pkg.d.ts'] exclude: ['test/**/*', 'src/**/*.spec.ts', './build/typings/global-this-pkg.d.ts']
} }
const external = [...Object.keys(dependencies || {}), ...Object.keys(peerDependencies || {})] // const external = [...Object.keys(dependencies || {}), ...Object.keys(peerDependencies || {})]
const sourcemapOutputOptions = { const sourcemapOutputOptions = {
sourcemap: 'inline', sourcemap: 'inline',
@ -66,15 +66,14 @@ export default [
IS_BROWSER: true, IS_BROWSER: true,
preventAssignment: true preventAssignment: true
}), }),
typescriptPlugin(tsBundleOptions),
resolve({ resolve({
browser: true, browser: true,
exportConditions: ['browser', 'module', 'import', 'default'] exportConditions: ['browser', 'module', 'import', 'default']
}), })
typescriptPlugin(tsBundleOptions) ]
],
external
}, },
{ // Browser bundles { // Other Browser bundles
input: input, input: input,
output: [ output: [
{ {
@ -125,13 +124,12 @@ export default [
declarationMap: true declarationMap: true
}), }),
resolve({ resolve({
browser: true, browser: false,
exportConditions: ['node', 'module', 'require'] exportConditions: ['node', 'module', 'require']
}), }),
commonjs({ extensions: ['.js', '.cjs', '.ts'] }), // the ".ts" extension is required commonjs({ extensions: ['.js', '.cjs', '.ts'] }), // the ".ts" extension is required
moveDirPlugin(join(rootDir, dirname(exports['.'].node.import), 'types'), join(rootDir, dirname(types))) moveDirPlugin(join(rootDir, dirname(exports['.'].node.import), 'types'), join(rootDir, dirname(types)))
], ]
external
}, },
{ // Node CJS { // Node CJS
input: input, input: input,
@ -154,7 +152,7 @@ export default [
}), }),
typescriptPlugin(tsBundleOptions), typescriptPlugin(tsBundleOptions),
resolve({ resolve({
browser: true, browser: false,
exportConditions: ['node', 'module', 'require'] exportConditions: ['node', 'module', 'require']
}), }),
commonjs({ extensions: ['.js', '.cjs', '.ts'] }) // the ".ts" extension is required commonjs({ extensions: ['.js', '.cjs', '.ts'] }) // the ".ts" extension is required

File diff suppressed because one or more lines are too long

265
dist/esm/index.node.js vendored

File diff suppressed because one or more lines are too long

View File

@ -153,7 +153,7 @@ A promise that resolves to a boolean that is either true (a probably prime numbe
#### Defined in #### Defined in
[src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/isProbablyPrime.ts#L21) [src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/isProbablyPrime.ts#L21)
___ ___
@ -317,7 +317,7 @@ A promise that resolves to a bigint probable prime of bitLength bits.
#### Defined in #### Defined in
[src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/prime.ts#L21) [src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/prime.ts#L21)
___ ___
@ -346,7 +346,7 @@ A bigint probable prime of bitLength bits.
#### Defined in #### Defined in
[src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/prime.ts#L100) [src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/prime.ts#L100)
___ ___
@ -374,7 +374,7 @@ A cryptographically secure random bigint between [min,max]
#### Defined in #### Defined in
[src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/randBetween.ts#L15) [src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/randBetween.ts#L15)
___ ___
@ -402,7 +402,7 @@ A Promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
#### Defined in #### Defined in
[src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/randBits.ts#L14) [src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/randBits.ts#L14)
___ ___
@ -430,7 +430,7 @@ A Uint8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
#### Defined in #### Defined in
[src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/randBits.ts#L45) [src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/randBits.ts#L45)
___ ___
@ -458,7 +458,7 @@ A promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
#### Defined in #### Defined in
[src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/randBytes.ts#L12) [src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/randBytes.ts#L12)
___ ___
@ -486,7 +486,7 @@ A UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
#### Defined in #### Defined in
[src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/7b390e8/src/ts/randBytes.ts#L46) [src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/e0e6c88/src/ts/randBytes.ts#L46)
___ ___

1370
package-lock.json generated

File diff suppressed because it is too large Load Diff