-
Notifications
You must be signed in to change notification settings - Fork 14
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 #51 from ngraveio/fix-types
Add registry support for items that has NaN as tag Update readme Fix error on commonjs types when importing cbor2
- Loading branch information
Showing
9 changed files
with
961 additions
and
478 deletions.
There are no files selected for viewing
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,6 +1,6 @@ | ||
{ | ||
"name": "@ngraveio/bc-ur", | ||
"version": "2.0.1-beta.1", | ||
"version": "2.0.0-beta.4", | ||
"author": "Antonis Poulakis <[email protected]>, Irfan Bilaloğlu <[email protected]>, Pieter Uyttersprot <[email protected]>", | ||
"description": "A JS implementation of the Uniform Resources (UR) specification from Blockchain Commons", | ||
"license": "MIT", | ||
|
@@ -17,10 +17,10 @@ | |
"scripts": { | ||
"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo", | ||
"build": "yarn clean && yarn compile", | ||
"compile": "tshy && rollup -c", | ||
"compile": "tshy && rollup -c && \\cp -f ./src/wrappers/cbor2Wrapper.ts ./dist/commonjs/wrappers/cbor2Wrapper.d.ts", | ||
"test": "node --experimental-vm-modules node_modules/.bin/jest", | ||
"prepublishOnly": "yarn build", | ||
"postinstall": "patch-package", | ||
"prebuild": "patch-package", | ||
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0", | ||
"start": "live-server --watch=src,dist --port=8080" | ||
}, | ||
|
@@ -49,6 +49,9 @@ | |
"tslib": "^2.8.1", | ||
"typescript": "5.6.2" | ||
}, | ||
"bundleDependencies": [ | ||
"@keystonehq/alias-sampling" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ngraveio/bc-ur.git" | ||
|
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,37 +1,44 @@ | ||
diff --git a/node_modules/@keystonehq/alias-sampling/dist/cjs/index.d.ts b/node_modules/@keystonehq/alias-sampling/dist/cjs/index.d.ts | ||
index a11c780..814932f 100644 | ||
index a11c780..600c193 100644 | ||
--- a/node_modules/@keystonehq/alias-sampling/dist/cjs/index.d.ts | ||
+++ b/node_modules/@keystonehq/alias-sampling/dist/cjs/index.d.ts | ||
@@ -8,3 +8,4 @@ declare const sample: (probabilities: number[], outcomes?: any[], rng?: RNGFunct | ||
@@ -7,4 +7,5 @@ declare const next: (aliasData: AliasData, outcomes: any[], rng: RNGFunction, nu | ||
declare const sample: (probabilities: number[], outcomes?: any[], rng?: RNGFunction) => { | ||
next: (numOfSamples?: number) => any | any[]; | ||
}; | ||
export default sample; | ||
-export default sample; | ||
+export default sample; // Next line patched | ||
+export { sample } | ||
diff --git a/node_modules/@keystonehq/alias-sampling/dist/cjs/index.js b/node_modules/@keystonehq/alias-sampling/dist/cjs/index.js | ||
index 48c7d33..5bc3815 100644 | ||
index 48c7d33..8db5def 100644 | ||
--- a/node_modules/@keystonehq/alias-sampling/dist/cjs/index.js | ||
+++ b/node_modules/@keystonehq/alias-sampling/dist/cjs/index.js | ||
@@ -77,3 +77,4 @@ var sample = function (probabilities, outcomes, rng) { | ||
@@ -76,4 +76,5 @@ var sample = function (probabilities, outcomes, rng) { | ||
} | ||
}; | ||
}; | ||
exports.default = sample; | ||
-exports.default = sample; | ||
+exports.default = sample; // Next line patched | ||
+exports.sample = sample; | ||
diff --git a/node_modules/@keystonehq/alias-sampling/dist/esm/index.d.ts b/node_modules/@keystonehq/alias-sampling/dist/esm/index.d.ts | ||
index a11c780..2ec4586 100644 | ||
index a11c780..a50cde5 100644 | ||
--- a/node_modules/@keystonehq/alias-sampling/dist/esm/index.d.ts | ||
+++ b/node_modules/@keystonehq/alias-sampling/dist/esm/index.d.ts | ||
@@ -8,3 +8,5 @@ declare const sample: (probabilities: number[], outcomes?: any[], rng?: RNGFunct | ||
@@ -7,4 +7,5 @@ declare const next: (aliasData: AliasData, outcomes: any[], rng: RNGFunction, nu | ||
declare const sample: (probabilities: number[], outcomes?: any[], rng?: RNGFunction) => { | ||
next: (numOfSamples?: number) => any | any[]; | ||
}; | ||
export default sample; | ||
-export default sample; | ||
+export default sample; // Next line patched | ||
+export { sample }; | ||
+ | ||
diff --git a/node_modules/@keystonehq/alias-sampling/dist/esm/index.js b/node_modules/@keystonehq/alias-sampling/dist/esm/index.js | ||
index 0761ba7..1d598ec 100644 | ||
index 0761ba7..cfee806 100644 | ||
--- a/node_modules/@keystonehq/alias-sampling/dist/esm/index.js | ||
+++ b/node_modules/@keystonehq/alias-sampling/dist/esm/index.js | ||
@@ -75,3 +75,4 @@ var sample = function (probabilities, outcomes, rng) { | ||
@@ -74,4 +74,5 @@ var sample = function (probabilities, outcomes, rng) { | ||
} | ||
}; | ||
}; | ||
export default sample; | ||
-export default sample; | ||
+export default sample; // Next line patched | ||
+export { sample }; |
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
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
// If you need a provide an ESM dialect that doesn't support CommonJS (eg, deno, browser, etc), then you can do this: | ||
// No dual package hazard here | ||
//@ts-ignore | ||
export { decode, encode, Tag, registerEncoder } from "./cbor2Wrapper.js"; | ||
//@ts-ignore | ||
export type { DecodeOptions, EncodeOptions } from "./cbor2Wrapper.js"; |
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
Oops, something went wrong.