@graphprotocol/graph-cli 0.51.0-alpha-20230528161031-ede80fb → 0.51.0-alpha-20230530051447-89a2d32

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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.51.0-alpha-20230528161031-ede80fb
3
+ ## 0.51.0-alpha-20230530051447-89a2d32
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#1296](https://github.com/graphprotocol/graph-tooling/pull/1296)
8
- [`ede80fb`](https://github.com/graphprotocol/graph-tooling/commit/ede80fbf0aceac2729c209ebb2c6e20f10894837)
8
+ [`89a2d32`](https://github.com/graphprotocol/graph-tooling/commit/89a2d3287458c90e09944db0dfcf30a98ec2a81a)
9
9
  Thanks [@dotansimha](https://github.com/dotansimha)! - Added support for handling GraphQL `Int8`
10
10
  scalar as `i64` (AssemblyScript)
11
11
 
@@ -61,9 +61,12 @@ const TYPE_SUGGESTIONS = [
61
61
  ['float', 'BigDecimal'],
62
62
  ['Float', 'BigDecimal'],
63
63
  ['int', 'Int'],
64
+ ['int8', 'Int8'],
64
65
  ['uint', 'BigInt'],
65
66
  ['owner', 'String'],
66
67
  ['Owner', 'String'],
68
+ [/^(u|uint)8$/, 'Int8'],
69
+ [/^(i|int)8$/, 'Int8'],
67
70
  [/^(u|uint)(8|16|24)$/, 'Int'],
68
71
  [/^(i|int)(8|16|24|32)$/, 'Int'],
69
72
  [/^(u|uint)32$/, 'BigInt'],
@@ -14,13 +14,17 @@ describe('Schema validation', () => {
14
14
  expect((0, schema_1.typeSuggestion)(`int`)).toBe('Int');
15
15
  expect((0, schema_1.typeSuggestion)(`uint`)).toBe('BigInt');
16
16
  expect((0, schema_1.typeSuggestion)(`uint32`)).toBe('BigInt');
17
- // Test i8..i32, int8..int32
18
- for (let i = 8; i <= 32; i += 8) {
17
+ expect((0, schema_1.typeSuggestion)(`int8`)).toBe('Int8');
18
+ expect((0, schema_1.typeSuggestion)(`i8`)).toBe('Int8');
19
+ expect((0, schema_1.typeSuggestion)(`u8`)).toBe('Int8');
20
+ expect((0, schema_1.typeSuggestion)(`uint8`)).toBe('Int8');
21
+ // Test i16..i32, int17..int32
22
+ for (let i = 16; i <= 32; i += 8) {
19
23
  expect((0, schema_1.typeSuggestion)(`i${i}`)).toBe('Int');
20
24
  expect((0, schema_1.typeSuggestion)(`int${i}`)).toBe('Int');
21
25
  }
22
- // Test u8..u24, uint8..uint24
23
- for (let i = 8; i <= 24; i += 8) {
26
+ // Test u16..u24, uint16..uint24
27
+ for (let i = 16; i <= 24; i += 8) {
24
28
  expect((0, schema_1.typeSuggestion)(`u${i}`)).toBe('Int');
25
29
  expect((0, schema_1.typeSuggestion)(`uint${i}`)).toBe('Int');
26
30
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.51.0-alpha-20230528161031-ede80fb",
2
+ "version": "0.51.0-alpha-20230530051447-89a2d32",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.51.0-alpha-20230528161031-ede80fb",
3
+ "version": "0.51.0-alpha-20230530051447-89a2d32",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {