From 3496e3af2e3b2681491f8bcd96081b0080e2d718 Mon Sep 17 00:00:00 2001 From: Ricky Miller Date: Tue, 13 Sep 2022 12:46:39 -0400 Subject: [PATCH 1/3] build to dist --- .gitignore | 1 + package.json | 5 +---- tsconfig.json | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 4c01810..ed6cb47 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /test/*.d.ts /test/*.js /node_modules +/dist diff --git a/package.json b/package.json index 8050ee9..8bc4351 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,7 @@ "description": "MetaMask fork of @scure/bip39: a secure, audited & minimal implementation of BIP39 mnemonic phrases", "main": "index.js", "files": [ - "index.js", - "index.d.ts", - "wordlists/*.js", - "wordlists/*.d.ts" + "dist/" ], "types": "index.d.ts", "dependencies": { diff --git a/tsconfig.json b/tsconfig.json index 606c1fb..7be1c09 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "rootDirs": [ "." ], - "outDir": ".", + "outDir": "./dist", "sourceMap": false, "noUnusedLocals": true, "declaration": true, @@ -17,4 +17,4 @@ "src" ], "exclude": ["node_modules", "./*.d.ts", "./test/*.d.ts"] -} \ No newline at end of file +} From fd9e0342273014d6c10b2a6de008b1136c798421 Mon Sep 17 00:00:00 2001 From: Ricky Miller Date: Tue, 13 Sep 2022 12:50:49 -0400 Subject: [PATCH 2/3] fix tests --- test/bip39.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/bip39.test.ts b/test/bip39.test.ts index 6f6b5d7..75e4666 100644 --- a/test/bip39.test.ts +++ b/test/bip39.test.ts @@ -5,7 +5,7 @@ import { mnemonicToSeed, mnemonicToSeedSync, validateMnemonic, -} from '..'; +} from '../dist'; import { wordlist as englishWordlist } from '../wordlists/english'; import { wordlist as japaneseWordlist } from '../wordlists/japanese'; import { wordlist as spanishWordlist } from '../wordlists/spanish'; From 855ebc95fd9e146931b834ef05dc3b00a506434c Mon Sep 17 00:00:00 2001 From: Ricky Miller Date: Tue, 13 Sep 2022 12:52:31 -0400 Subject: [PATCH 3/3] fix tests --- test/bip39.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/bip39.test.ts b/test/bip39.test.ts index 75e4666..c6c4e35 100644 --- a/test/bip39.test.ts +++ b/test/bip39.test.ts @@ -6,9 +6,9 @@ import { mnemonicToSeedSync, validateMnemonic, } from '../dist'; -import { wordlist as englishWordlist } from '../wordlists/english'; -import { wordlist as japaneseWordlist } from '../wordlists/japanese'; -import { wordlist as spanishWordlist } from '../wordlists/spanish'; +import { wordlist as englishWordlist } from '../dist/wordlists/english'; +import { wordlist as japaneseWordlist } from '../dist/wordlists/japanese'; +import { wordlist as spanishWordlist } from '../dist/wordlists/spanish'; import { bytesToHex as toHex } from '@noble/hashes/utils'; import { deepStrictEqual, throws } from './assert';