-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from michaeldzjap/fix/10-incorrect-esm-build
Fix incorrect ESM build
- Loading branch information
Showing
24 changed files
with
659 additions
and
2,627 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ignore: | ||
- "__tests__/**/*" | ||
- "example/**/*" | ||
- '__tests__/**/*' | ||
- 'example/**/*' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import prettierConfig from 'eslint-config-prettier'; | ||
import jest from 'eslint-plugin-jest'; | ||
import jestDom from 'eslint-plugin-jest-dom'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default [ | ||
{ | ||
ignores: ['coverage/**', 'dist/**', 'example/**', '__tests__/**'], | ||
}, | ||
...tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, prettierConfig), | ||
...tseslint.config({ | ||
files: ['__tests__/**'], | ||
plugins: { jest }, | ||
...jest.configs['flat/recommended'], | ||
...jestDom.configs['flat/recommended'], | ||
}), | ||
]; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const Rand = require('../../dist/rand-seed').default; | ||
const PRNG = require('../../dist/rand-seed'); | ||
|
||
let rand = new Rand('1234', PRNG.mulberry32); | ||
const result1 = Array.from({ length: 10 }, () => rand.next()); | ||
|
||
rand = new Rand('1234'); | ||
const result2 = Array.from({ length: 10 }, () => rand.next()); | ||
|
||
console.log('RESULT1:', result1); | ||
console.log('RESULT2:', result2); | ||
console.log('RESULT1 == RESULT2:', JSON.stringify(result1) === JSON.stringify(result2)); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "example", | ||
"version": "1.0.0", | ||
"description": "A simple example of rand-seed", | ||
"main": "index.js", | ||
"type": "module", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/michaeldzjap/rand-seed.git" | ||
}, | ||
"keywords": [ | ||
"random", | ||
"seed", | ||
"prng" | ||
], | ||
"author": "Michael Dzjaparidze", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/michaeldzjap/rand-seed/issues" | ||
}, | ||
"homepage": "https://github.com/michaeldzjap/rand-seed#readme" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @type {import('jest').Config} */ | ||
export default { | ||
testEnvironment: 'node', | ||
testMatch: ['**/__tests__/**/*.[jt]s?(x)'], | ||
testPathIgnorePatterns: ['<rootDir>/node_modules/'], | ||
transform: { | ||
'\\.[jt]sx?$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: 'tsconfig.test.json', | ||
}, | ||
], | ||
}, | ||
collectCoverage: true, | ||
}; |
Oops, something went wrong.