@dataplan/json 0.0.1-alpha.14 → 0.0.1-alpha.15

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,5 +1,20 @@
1
1
  # @dataplan/json
2
2
 
3
+ ## 0.0.1-alpha.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [#422](https://github.com/benjie/postgraphile-private/pull/422)
8
+ [`9f87a26b1`](https://github.com/benjie/postgraphile-private/commit/9f87a26b10e5539aa88cfd9909e265513e941fd5)
9
+ Thanks [@benjie](https://github.com/benjie)! - Comments enabled in released
10
+ packages
11
+
12
+ - Updated dependencies
13
+ [[`ea003ca3a`](https://github.com/benjie/postgraphile-private/commit/ea003ca3a8f68fb87dca603582e47981ed033996),
14
+ [`57d88b5fa`](https://github.com/benjie/postgraphile-private/commit/57d88b5fa3ed296210c1fcb223452213fd57985b),
15
+ [`9f87a26b1`](https://github.com/benjie/postgraphile-private/commit/9f87a26b10e5539aa88cfd9909e265513e941fd5)]:
16
+ - grafast@0.0.1-alpha.15
17
+
3
18
  ## 0.0.1-alpha.14
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -29,6 +29,7 @@ And please give some love to our featured sponsors 🤩:
29
29
  </tr><tr>
30
30
  <td align="center"><a href=""><img src="https://graphile.org/images/sponsors/chadf.png" width="90" height="90" alt="Chad Furman" /><br />Chad Furman</a> *</td>
31
31
  <td align="center"><a href="https://stellate.co/"><img src="https://graphile.org/images/sponsors/Stellate.png" width="90" height="90" alt="Stellate" /><br />Stellate</a> *</td>
32
+ <td align="center"><a href="https://www.accenture.com/"><img src="https://graphile.org/images/sponsors/accenture.svg" width="90" height="90" alt="Accenture" /><br />Accenture</a> *</td>
32
33
  </tr></table>
33
34
 
34
35
  <em>\* Sponsors the entire Graphile suite</em>
@@ -3,6 +3,10 @@ import { ExecutableStep } from "grafast";
3
3
  export type JSONValue = string | number | boolean | null | {
4
4
  [key: string]: JSONValue;
5
5
  } | Array<JSONValue>;
6
+ /**
7
+ * This plan accepts as JSON string as its only input and will result in the
8
+ * parsed JSON object (or array, boolean, string, etc).
9
+ */
6
10
  export declare class JSONParseStep<TJSON extends JSONValue> extends ExecutableStep<TJSON> {
7
11
  static $$export: {
8
12
  moduleName: string;
@@ -17,5 +21,9 @@ export declare class JSONParseStep<TJSON extends JSONValue> extends ExecutableSt
17
21
  at<TIndex extends keyof TJSON & number>(index: TIndex): AccessStep<TJSON[TIndex]>;
18
22
  execute(count: number, values: [GrafastValuesList<string>]): GrafastResultsList<TJSON>;
19
23
  }
24
+ /**
25
+ * This plan accepts as JSON string as its only input and will result in the
26
+ * parsed JSON object (or array, boolean, string, etc).
27
+ */
20
28
  export declare function jsonParse<TJSON extends JSONValue>($string: ExecutableStep<string | null>): JSONParseStep<TJSON>;
21
29
  //# sourceMappingURL=jsonParse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsonParse.d.ts","sourceRoot":"","sources":["../../src/steps/jsonParse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAU,cAAc,EAAY,MAAM,SAAS,CAAC;AAE3D,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5B,KAAK,CAAC,SAAS,CAAC,CAAC;AAMrB,qBAAa,aAAa,CACxB,KAAK,SAAS,SAAS,CACvB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC7B,MAAM,CAAC,QAAQ;;;MAGb;IAGF,aAAa,UAAS;gBAEV,WAAW,EAAE,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC;IAKtD,YAAY,IAAI,MAAM;IAItB,GAAG,CAAC,IAAI,SAAS,MAAM,KAAK,EAC1B,GAAG,EAAE,IAAI,GAC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C,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAC/D;IAID,EAAE,CAAC,MAAM,SAAS,MAAM,KAAK,GAAG,MAAM,EACpC,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAI5B,OAAO,CACL,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAClC,kBAAkB,CAAC,KAAK,CAAC;CAyB7B;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,SAAS,SAAS,EAC/C,OAAO,EAAE,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,GACrC,aAAa,CAAC,KAAK,CAAC,CAEtB"}
@@ -4,6 +4,10 @@ exports.jsonParse = exports.JSONParseStep = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  const grafast_1 = require("grafast");
7
+ /**
8
+ * This plan accepts as JSON string as its only input and will result in the
9
+ * parsed JSON object (or array, boolean, string, etc).
10
+ */
7
11
  class JSONParseStep extends grafast_1.ExecutableStep {
8
12
  static { this.$$export = {
9
13
  moduleName: "@dataplan/json",
@@ -11,6 +15,8 @@ class JSONParseStep extends grafast_1.ExecutableStep {
11
15
  }; }
12
16
  constructor($stringPlan) {
13
17
  super();
18
+ // We're not safe because if parsing JSON fails we'll include a rejected
19
+ // promise.
14
20
  this.isSyncAndSafe = false;
15
21
  this.addDependency($stringPlan);
16
22
  }
@@ -24,7 +30,7 @@ class JSONParseStep extends grafast_1.ExecutableStep {
24
30
  return (0, grafast_1.access)(this, [index]);
25
31
  }
26
32
  execute(count, values) {
27
- const result = [];
33
+ const result = []; // new Array(count);
28
34
  const list = values[0];
29
35
  for (let i = 0; i < count; i++) {
30
36
  const v = list[i];
@@ -47,6 +53,10 @@ class JSONParseStep extends grafast_1.ExecutableStep {
47
53
  }
48
54
  }
49
55
  exports.JSONParseStep = JSONParseStep;
56
+ /**
57
+ * This plan accepts as JSON string as its only input and will result in the
58
+ * parsed JSON object (or array, boolean, string, etc).
59
+ */
50
60
  function jsonParse($string) {
51
61
  return new JSONParseStep($string);
52
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataplan/json",
3
- "version": "0.0.1-alpha.14",
3
+ "version": "0.0.1-alpha.15",
4
4
  "description": "JSON step classes for Grafast",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "node": ">=14.17"
34
34
  },
35
35
  "peerDependencies": {
36
- "grafast": "^0.0.1-alpha.14"
36
+ "grafast": "^0.0.1-alpha.15"
37
37
  },
38
38
  "files": [
39
39
  "dist"