feat: migrate random#91
Merged
Shinigami92 merged 4 commits intomigrate-to-typescriptfrom Jan 12, 2022
Merged
Conversation
27 tasks
Shinigami92
commented
Jan 11, 2022
| } | ||
|
|
||
| export default Mersenne; | ||
| module.exports = Mersenne; |
Member
Author
There was a problem hiding this comment.
Currently this fails 🤔
> npx mocha test/random.unit.js
TypeError: mersenne_1.Mersenne is not a constructor
at new Faker (/home/shinigami/OpenSource/faker/lib/index.js:124:25)
at Object.<anonymous> (/home/shinigami/OpenSource/faker/index.js:3:13)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/shinigami/OpenSource/faker/test/random.unit.js:5:15)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.exports.requireOrImport (/home/shinigami/OpenSource/faker/node_modules/mocha/lib/esm-utils.js:42:12)
at Object.exports.loadFilesAsync (/home/shinigami/OpenSource/faker/node_modules/mocha/lib/esm-utils.js:55:34)
at Mocha.loadFilesAsync (/home/shinigami/OpenSource/faker/node_modules/mocha/lib/mocha.js:473:19)
at singleRun (/home/shinigami/OpenSource/faker/node_modules/mocha/lib/cli/run-helpers.js:125:15)
at exports.runMocha (/home/shinigami/OpenSource/faker/node_modules/mocha/lib/cli/run-helpers.js:190:10)
at Object.exports.handler (/home/shinigami/OpenSource/faker/node_modules/mocha/lib/cli/run.js:362:11)
at /home/shinigami/OpenSource/faker/node_modules/mocha/node_modules/yargs/build/index.cjs:443:71
Member
Author
There was a problem hiding this comment.
Maybe we need to change the test 😬
- var mersenne = new (require('../lib/mersenne'));
+ var mersenne = new (require('../lib/mersenne').Mersenne);And remove that again
export default Mersenne;
module.exports = Mersenne;
Member
Author
|
We need #90 to get merged, cause the tests depends on But also |
Shinigami92
commented
Jan 11, 2022
| var _ = require('lodash'); | ||
| var faker = require('../index'); | ||
| var mersenne = new (require('../lib/mersenne')); | ||
| var mersenne = new (require('../lib/mersenne').Mersenne); |
Member
Author
There was a problem hiding this comment.
This could be a breaking change, but hopefully no one tried to use it directly 🤔
So I would assume this breaking change would be okay and we just say that in the changelog, just to be safe
0e7e1ba to
64b8db8
Compare
72dfa01 to
005a49f
Compare
Shinigami92
added a commit
that referenced
this pull request
Jan 12, 2022
Shinigami92
added a commit
that referenced
this pull request
Jan 12, 2022
Shinigami92
added a commit
that referenced
this pull request
Jan 13, 2022
Shinigami92
added a commit
that referenced
this pull request
Jan 14, 2022
Shinigami92
added a commit
that referenced
this pull request
Jan 14, 2022
damienwebdev
pushed a commit
that referenced
this pull request
Jan 14, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test with
npm run build && npx mocha test/random.unit.js