@polkadot/types-create 8.11.3 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,6 @@ const packageInfo = {
11
11
  name: '@polkadot/types-create',
12
12
  path: typeof __dirname === 'string' ? __dirname : 'auto',
13
13
  type: 'cjs',
14
- version: '8.11.3'
14
+ version: '8.12.1'
15
15
  };
16
16
  exports.packageInfo = packageInfo;
@@ -1 +1,3 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ require("@polkadot/types-codec/types/registry");
@@ -208,7 +208,7 @@ function hasWrapper(type, _ref5) {
208
208
 
209
209
  const nestedExtraction = [['[', ']', _types.TypeDefInfo.VecFixed, _decodeFixedVec], ['{', '}', _types.TypeDefInfo.Struct, _decodeStruct], ['(', ')', _types.TypeDefInfo.Tuple, _decodeTuple], // the inner for these are the same as tuple, multiple values
210
210
  ['BTreeMap<', '>', _types.TypeDefInfo.BTreeMap, _decodeTuple], ['HashMap<', '>', _types.TypeDefInfo.HashMap, _decodeTuple], ['Int<', '>', _types.TypeDefInfo.Int, _decodeInt], ['Result<', '>', _types.TypeDefInfo.Result, _decodeTuple], ['UInt<', '>', _types.TypeDefInfo.UInt, _decodeUInt], ['DoNotConstruct<', '>', _types.TypeDefInfo.DoNotConstruct, _decodeDoNotConstruct]];
211
- const wrappedExtraction = [['BTreeSet<', '>', _types.TypeDefInfo.BTreeSet], ['Compact<', '>', _types.TypeDefInfo.Compact], ['Linkage<', '>', _types.TypeDefInfo.Linkage], ['Option<', '>', _types.TypeDefInfo.Option], ['Range<', '>', _types.TypeDefInfo.Range], ['RangeInclusive<', '>', _types.TypeDefInfo.RangeInclusive], ['Vec<', '>', _types.TypeDefInfo.Vec], ['WrapperKeepOpaque<', '>', _types.TypeDefInfo.WrapperKeepOpaque], ['WrapperOpaque<', '>', _types.TypeDefInfo.WrapperOpaque]];
211
+ const wrappedExtraction = [['BTreeSet<', '>', _types.TypeDefInfo.BTreeSet], ['Compact<', '>', _types.TypeDefInfo.Compact], ['Linkage<', '>', _types.TypeDefInfo.Linkage], ['Opaque<', '>', _types.TypeDefInfo.WrapperOpaque], ['Option<', '>', _types.TypeDefInfo.Option], ['Range<', '>', _types.TypeDefInfo.Range], ['RangeInclusive<', '>', _types.TypeDefInfo.RangeInclusive], ['Vec<', '>', _types.TypeDefInfo.Vec], ['WrapperKeepOpaque<', '>', _types.TypeDefInfo.WrapperKeepOpaque], ['WrapperOpaque<', '>', _types.TypeDefInfo.WrapperOpaque]];
212
212
 
213
213
  function extractSubType(type, _ref6) {
214
214
  let [start, end] = _ref6;
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./cjs/detectPackage.js"
21
21
  ],
22
22
  "type": "module",
23
- "version": "8.11.3",
23
+ "version": "8.12.1",
24
24
  "main": "./cjs/index.js",
25
25
  "module": "./index.js",
26
26
  "types": "./index.d.ts",
@@ -121,7 +121,7 @@
121
121
  },
122
122
  "dependencies": {
123
123
  "@babel/runtime": "^7.18.6",
124
- "@polkadot/types-codec": "8.11.3",
125
- "@polkadot/util": "^9.7.2"
124
+ "@polkadot/types-codec": "8.12.1",
125
+ "@polkadot/util": "^10.0.1"
126
126
  }
127
127
  }
package/packageInfo.js CHANGED
@@ -5,5 +5,5 @@ export const packageInfo = {
5
5
  name: '@polkadot/types-create',
6
6
  path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
7
7
  type: 'esm',
8
- version: '8.11.3'
8
+ version: '8.12.1'
9
9
  };
@@ -1,3 +1,4 @@
1
+ import '@polkadot/types-codec/types/registry';
1
2
  import type { Codec, CodecClass, ICompact, INumber } from '@polkadot/types-codec/types';
2
3
  import type { ILookup, TypeDef } from '@polkadot/types-create/types';
3
4
  declare module '@polkadot/types-codec/types/registry' {
@@ -1 +1,5 @@
1
- export {};
1
+ // Copyright 2017-2022 @polkadot/types-create authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // import type lookup before we augment - in some environments
4
+ // this is required to allow for ambient/previous definitions
5
+ import '@polkadot/types-codec/types/registry';
@@ -184,7 +184,7 @@ function hasWrapper(type, [start, end]) {
184
184
 
185
185
  const nestedExtraction = [['[', ']', TypeDefInfo.VecFixed, _decodeFixedVec], ['{', '}', TypeDefInfo.Struct, _decodeStruct], ['(', ')', TypeDefInfo.Tuple, _decodeTuple], // the inner for these are the same as tuple, multiple values
186
186
  ['BTreeMap<', '>', TypeDefInfo.BTreeMap, _decodeTuple], ['HashMap<', '>', TypeDefInfo.HashMap, _decodeTuple], ['Int<', '>', TypeDefInfo.Int, _decodeInt], ['Result<', '>', TypeDefInfo.Result, _decodeTuple], ['UInt<', '>', TypeDefInfo.UInt, _decodeUInt], ['DoNotConstruct<', '>', TypeDefInfo.DoNotConstruct, _decodeDoNotConstruct]];
187
- const wrappedExtraction = [['BTreeSet<', '>', TypeDefInfo.BTreeSet], ['Compact<', '>', TypeDefInfo.Compact], ['Linkage<', '>', TypeDefInfo.Linkage], ['Option<', '>', TypeDefInfo.Option], ['Range<', '>', TypeDefInfo.Range], ['RangeInclusive<', '>', TypeDefInfo.RangeInclusive], ['Vec<', '>', TypeDefInfo.Vec], ['WrapperKeepOpaque<', '>', TypeDefInfo.WrapperKeepOpaque], ['WrapperOpaque<', '>', TypeDefInfo.WrapperOpaque]];
187
+ const wrappedExtraction = [['BTreeSet<', '>', TypeDefInfo.BTreeSet], ['Compact<', '>', TypeDefInfo.Compact], ['Linkage<', '>', TypeDefInfo.Linkage], ['Opaque<', '>', TypeDefInfo.WrapperOpaque], ['Option<', '>', TypeDefInfo.Option], ['Range<', '>', TypeDefInfo.Range], ['RangeInclusive<', '>', TypeDefInfo.RangeInclusive], ['Vec<', '>', TypeDefInfo.Vec], ['WrapperKeepOpaque<', '>', TypeDefInfo.WrapperKeepOpaque], ['WrapperOpaque<', '>', TypeDefInfo.WrapperOpaque]];
188
188
 
189
189
  function extractSubType(type, [start, end]) {
190
190
  return type.substring(start.length, type.length - end.length);