Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: polkadot-js/common
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v12.1.1
Choose a base ref
...
head repository: polkadot-js/common
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v12.1.2
Choose a head ref
  • 4 commits
  • 38 files changed
  • 2 contributors

Commits on Apr 29, 2023

  1. Align u8aToBigInt tests with u8aToBn (#1820)

    * Align u8aToBigInt tests with u8aToBn
    
    * Remove unused import
    jacogr authored Apr 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f2e79ff View commit details
  2. [CI Skip] bump/beta 12.1.2-0-x

    skip-checks: true
    github-actions[bot] committed Apr 29, 2023
    Copy the full SHA
    8ccfecf View commit details

Commits on May 1, 2023

  1. Fix typings for isChildClass (#1824)

    * Fix typings for isChildClass
    
    * Adjust
    jacogr authored May 1, 2023
    Copy the full SHA
    dba5d3e View commit details
  2. [CI Skip] release/stable 12.1.2

    skip-checks: true
    github-actions[bot] committed May 1, 2023
    Copy the full SHA
    e5cb0ba View commit details
Showing with 389 additions and 169 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 CONTRIBUTORS
  3. +5 −5 package.json
  4. +2 −2 packages/hw-ledger-transports/package.json
  5. +1 −1 packages/hw-ledger-transports/src/packageInfo.ts
  6. +3 −3 packages/hw-ledger/package.json
  7. +1 −1 packages/hw-ledger/src/packageInfo.ts
  8. +5 −5 packages/keyring/package.json
  9. +1 −1 packages/keyring/src/packageInfo.ts
  10. +3 −3 packages/networks/package.json
  11. +1 −1 packages/networks/src/packageInfo.ts
  12. +6 −6 packages/util-crypto/package.json
  13. +1 −1 packages/util-crypto/src/packageInfo.ts
  14. +6 −6 packages/util/package.json
  15. +1 −1 packages/util/src/is/childClass.ts
  16. +1 −1 packages/util/src/is/class.ts
  17. +1 −1 packages/util/src/packageInfo.ts
  18. +2 −1 packages/util/src/types.ts
  19. +242 −35 packages/util/src/u8a/toBigInt.spec.ts
  20. +6 −6 packages/util/src/u8a/toBigInt.ts
  21. +5 −0 packages/util/src/u8a/toBn.spec.ts
  22. +2 −2 packages/x-bigint/package.json
  23. +1 −1 packages/x-bigint/src/packageInfo.ts
  24. +2 −2 packages/x-bundle/package.json
  25. +1 −1 packages/x-bundle/src/packageInfo.ts
  26. +2 −2 packages/x-fetch/package.json
  27. +1 −1 packages/x-fetch/src/packageInfo.ts
  28. +1 −1 packages/x-global/package.json
  29. +1 −1 packages/x-global/src/packageInfo.ts
  30. +4 −4 packages/x-randomvalues/package.json
  31. +1 −1 packages/x-randomvalues/src/packageInfo.ts
  32. +2 −2 packages/x-textdecoder/package.json
  33. +1 −1 packages/x-textdecoder/src/packageInfo.ts
  34. +2 −2 packages/x-textencoder/package.json
  35. +1 −1 packages/x-textencoder/src/packageInfo.ts
  36. +2 −2 packages/x-ws/package.json
  37. +1 −1 packages/x-ws/src/packageInfo.ts
  38. +63 −63 yarn.lock
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 12.1.2 May 1, 2023

Changes:

- Adjust typing for `isChildClass` & `Constructor` usage


## 12.1.1 Apr 29, 2023

Changes:
2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1606 Jaco 12.1.1 (#1819)
1608 Jaco Fix typings for isChildClass (#1824)
12 Carlo Sala feat(networks): support ledger for pendulum (#1739)
9 Antoine Estienne Add eth uri keyring test (#1291)
6 Amaury Martiny Add tests from Rust (#283)
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -14,10 +14,10 @@
},
"sideEffects": false,
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"versions": {
"git": "12.1.1",
"npm": "12.1.1"
"git": "12.1.2",
"npm": "12.1.2"
},
"workspaces": [
"packages/*"
@@ -37,8 +37,8 @@
"test:one": "polkadot-dev-run-test --env browser"
},
"devDependencies": {
"@polkadot/dev": "^0.73.6",
"@types/node": "^18.16.2"
"@polkadot/dev": "^0.73.8",
"@types/node": "^18.16.3"
},
"resolutions": {
"typescript": "^5.0.4"
4 changes: 2 additions & 2 deletions packages/hw-ledger-transports/package.json
Original file line number Diff line number Diff line change
@@ -14,15 +14,15 @@
},
"sideEffects": false,
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@ledgerhq/hw-transport": "^6.28.2",
"@ledgerhq/hw-transport-webhid": "^6.27.13",
"@ledgerhq/hw-transport-webusb": "^6.27.13",
"@polkadot/util": "12.1.1",
"@polkadot/util": "12.1.2",
"tslib": "^2.5.0"
},
"optionalDependencies": {
2 changes: 1 addition & 1 deletion packages/hw-ledger-transports/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '12.1.1' };
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '12.1.2' };
6 changes: 3 additions & 3 deletions packages/hw-ledger/package.json
Original file line number Diff line number Diff line change
@@ -17,11 +17,11 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"main": "index.js",
"dependencies": {
"@polkadot/hw-ledger-transports": "12.1.1",
"@polkadot/util": "12.1.1",
"@polkadot/hw-ledger-transports": "12.1.2",
"@polkadot/util": "12.1.2",
"@zondax/ledger-substrate": "^0.40.7",
"tslib": "^2.5.0"
}
2 changes: 1 addition & 1 deletion packages/hw-ledger/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '12.1.1' };
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '12.1.2' };
10 changes: 5 additions & 5 deletions packages/keyring/package.json
Original file line number Diff line number Diff line change
@@ -18,15 +18,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"main": "index.js",
"dependencies": {
"@polkadot/util": "12.1.1",
"@polkadot/util-crypto": "12.1.1",
"@polkadot/util": "12.1.2",
"@polkadot/util-crypto": "12.1.2",
"tslib": "^2.5.0"
},
"peerDependencies": {
"@polkadot/util": "12.1.1",
"@polkadot/util-crypto": "12.1.1"
"@polkadot/util": "12.1.2",
"@polkadot/util-crypto": "12.1.2"
}
}
2 changes: 1 addition & 1 deletion packages/keyring/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '12.1.1' };
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '12.1.2' };
6 changes: 3 additions & 3 deletions packages/networks/package.json
Original file line number Diff line number Diff line change
@@ -15,14 +15,14 @@
},
"sideEffects": false,
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"main": "index.js",
"dependencies": {
"@polkadot/util": "12.1.1",
"@polkadot/util": "12.1.2",
"@substrate/ss58-registry": "^1.40.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/hw-ledger": "12.1.1"
"@polkadot/hw-ledger": "12.1.2"
}
}
2 changes: 1 addition & 1 deletion packages/networks/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '12.1.1' };
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '12.1.2' };
12 changes: 6 additions & 6 deletions packages/util-crypto/package.json
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"browser": {
"crypto": false,
"stream": false
@@ -29,16 +29,16 @@
"dependencies": {
"@noble/curves": "1.0.0",
"@noble/hashes": "1.3.0",
"@polkadot/networks": "12.1.1",
"@polkadot/util": "12.1.1",
"@polkadot/networks": "12.1.2",
"@polkadot/util": "12.1.2",
"@polkadot/wasm-crypto": "^7.1.2",
"@polkadot/wasm-util": "^7.1.2",
"@polkadot/x-bigint": "12.1.1",
"@polkadot/x-randomvalues": "12.1.1",
"@polkadot/x-bigint": "12.1.2",
"@polkadot/x-randomvalues": "12.1.2",
"@scure/base": "1.1.1",
"tslib": "^2.5.0"
},
"peerDependencies": {
"@polkadot/util": "12.1.1"
"@polkadot/util": "12.1.2"
}
}
2 changes: 1 addition & 1 deletion packages/util-crypto/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '12.1.1' };
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '12.1.2' };
12 changes: 6 additions & 6 deletions packages/util/package.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "12.1.1",
"version": "12.1.2",
"main": "index.js",
"exports": {
"./hex/toU8a": {
@@ -35,15 +35,15 @@
}
},
"dependencies": {
"@polkadot/x-bigint": "12.1.1",
"@polkadot/x-global": "12.1.1",
"@polkadot/x-textdecoder": "12.1.1",
"@polkadot/x-textencoder": "12.1.1",
"@polkadot/x-bigint": "12.1.2",
"@polkadot/x-global": "12.1.2",
"@polkadot/x-textdecoder": "12.1.2",
"@polkadot/x-textencoder": "12.1.2",
"@types/bn.js": "^5.1.1",
"bn.js": "^5.2.1",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/x-randomvalues": "12.1.1"
"@polkadot/x-randomvalues": "12.1.2"
}
}
2 changes: 1 addition & 1 deletion packages/util/src/is/childClass.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import { isClass } from './class.js';
* console.log('isChildClass', isChildClass(BN, Uint8Array); // => false
* ```
*/
export function isChildClass <P extends Constructor> (Parent: P, Child?: Constructor | null | unknown): Child is P {
export function isChildClass <P extends Constructor> (Parent: P, Child?: unknown): Child is P {
// https://stackoverflow.com/questions/30993434/check-if-a-constructor-inherits-another-in-es6/30993664
return isClass(Child) && isClass(Parent)
// eslint-disable-next-line no-prototype-builtins
2 changes: 1 addition & 1 deletion packages/util/src/is/class.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,6 @@ import { isOnFunction } from './helpers.js';

/**
* @name isClass
* Tests if the supplied agrument is a Class
* Tests if the supplied argument is a Class
*/
export const isClass: <T extends Constructor> (value?: unknown) => value is T = /*#__PURE__*/ isOnFunction('isPrototypeOf', 'hasOwnProperty');
2 changes: 1 addition & 1 deletion packages/util/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '12.1.1' };
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '12.1.2' };
3 changes: 2 additions & 1 deletion packages/util/src/types.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@ import type { BN } from './bn/bn.js';

export interface Constructor<T extends object = object> {
prototype: T;
new (...args: never[]): T;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
new (...args: any[]): T;

hasOwnProperty (prop: string): boolean;
isPrototypeOf (other: unknown): boolean;
Loading