eslint-plugin-graphile-export 1.0.0-rc.3 → 1.0.0-rc.5

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.
@@ -5,8 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ExhaustiveDeps = void 0;
8
- const common_js_1 = require("./common.js");
9
- const utils_js_1 = require("./utils.js");
8
+ const common_ts_1 = require("./common.js");
9
+ const utils_ts_1 = require("./utils.js");
10
10
  function gatherDependenciesRecursively(dependencies, node, currentScope, monitoredScopes, rootNode) {
11
11
  for (const reference of currentScope.references) {
12
12
  // If this reference is not resolved or it is not declared in a pure
@@ -21,7 +21,7 @@ function gatherDependenciesRecursively(dependencies, node, currentScope, monitor
21
21
  }
22
22
  // Narrow the scope of a dependency if it is, say, a member expression.
23
23
  // Then normalize the narrowed dependency.
24
- const referenceNode = (0, common_js_1.fastFindReferenceWithParent)(node, reference.identifier);
24
+ const referenceNode = (0, common_ts_1.fastFindReferenceWithParent)(node, reference.identifier);
25
25
  if (!referenceNode) {
26
26
  console.warn("Could not find referenceNode");
27
27
  continue;
@@ -136,7 +136,7 @@ exports.ExhaustiveDeps = {
136
136
  return;
137
137
  }
138
138
  externalAssigns.add(key);
139
- (0, common_js_1.reportProblem)(context, options, {
139
+ (0, common_ts_1.reportProblem)(context, options, {
140
140
  node: writeExpr,
141
141
  message: `Assignments to the '${key}' variable from inside ` +
142
142
  `${context.sourceCode.getText(fnCall)} cannot be safely exported.`,
@@ -153,7 +153,7 @@ exports.ExhaustiveDeps = {
153
153
  const argNames = [];
154
154
  const invalid = node.params.some((arg) => {
155
155
  if (arg.type !== "Identifier") {
156
- (0, common_js_1.reportProblem)(context, options, {
156
+ (0, common_ts_1.reportProblem)(context, options, {
157
157
  node: arg,
158
158
  message: `${context.sourceCode.getText(fnCall)} has an argument which isn't a plain identifier, we don't support this currently.`,
159
159
  });
@@ -171,7 +171,7 @@ exports.ExhaustiveDeps = {
171
171
  // If the declared dependencies is not an object expression then we
172
172
  // can't verify that the user provided the correct dependencies. Tell
173
173
  // the user this in an error.
174
- (0, common_js_1.reportProblem)(context, options, {
174
+ (0, common_ts_1.reportProblem)(context, options, {
175
175
  node: declaredDependenciesNode,
176
176
  message: `${context.sourceCode.getText(fnCall)} was passed a ` +
177
177
  "dependency map that is not an array. This means we " +
@@ -187,7 +187,7 @@ exports.ExhaustiveDeps = {
187
187
  }
188
188
  // If we see a spread element then add a special warning.
189
189
  if (declaredDependencyNode.type === "SpreadElement") {
190
- (0, common_js_1.reportProblem)(context, options, {
190
+ (0, common_ts_1.reportProblem)(context, options, {
191
191
  node: declaredDependencyNode,
192
192
  message: `${context.sourceCode.getText(fnCall)} has a spread element ` +
193
193
  "in its dependency map. This means we can't " +
@@ -204,7 +204,7 @@ exports.ExhaustiveDeps = {
204
204
  });
205
205
  });
206
206
  if (node.params.length !== declaredDependenciesNode.elements.length) {
207
- (0, common_js_1.reportProblem)(context, options, {
207
+ (0, common_ts_1.reportProblem)(context, options, {
208
208
  node: declaredDependenciesNode,
209
209
  message: `${context.sourceCode.getText(fnCall)} has different arguments count (${node.params.length}) versus dependencies count (${declaredDependenciesNode.elements.length}); this is invalid.`,
210
210
  });
@@ -229,7 +229,7 @@ exports.ExhaustiveDeps = {
229
229
  (isSorted || !options.sortExports)) {
230
230
  return;
231
231
  }
232
- (0, common_js_1.reportProblem)(context, options, {
232
+ (0, common_ts_1.reportProblem)(context, options, {
233
233
  node: declaredDependenciesNode,
234
234
  message: `${context.sourceCode.getText(fnCall)} has ` +
235
235
  // To avoid a long message, show the next actionable item.
@@ -300,14 +300,14 @@ exports.ExhaustiveDeps = {
300
300
  const declaredDependenciesNode = node.arguments[callbackIndex + 1];
301
301
  // Check whether a callback is supplied.
302
302
  if (!callback) {
303
- (0, common_js_1.reportProblem)(context, options, {
303
+ (0, common_ts_1.reportProblem)(context, options, {
304
304
  node: fnCall,
305
305
  message: `EXPORTABLE must wrap a function.`,
306
306
  });
307
307
  return;
308
308
  }
309
309
  if (!declaredDependenciesNode) {
310
- (0, common_js_1.reportProblem)(context, options, {
310
+ (0, common_ts_1.reportProblem)(context, options, {
311
311
  node: fnCall,
312
312
  message: `EXPORTABLE does nothing when called with ` +
313
313
  `only one argument. Did you forget to pass an array of ` +
@@ -335,7 +335,7 @@ exports.ExhaustiveDeps = {
335
335
  return; // Handled
336
336
  case "Identifier":
337
337
  default:
338
- (0, common_js_1.reportProblem)(context, options, {
338
+ (0, common_ts_1.reportProblem)(context, options, {
339
339
  node: fnCall,
340
340
  message: `EXPORTABLE received a function whose dependencies ` +
341
341
  `are unknown. Pass an inline function instead.`,
@@ -533,7 +533,7 @@ function analyzePropertyChain(node) {
533
533
  * Returns 0 if this is a EXPORTABLE call, -1 otherwise.
534
534
  */
535
535
  function getScopesCallbackIndex(node) {
536
- if ((0, utils_js_1.isExportableCall)(node)) {
536
+ if ((0, utils_ts_1.isExportableCall)(node)) {
537
537
  return 0;
538
538
  }
539
539
  else {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExportInstances = void 0;
4
- const common_js_1 = require("./common.js");
5
- const NoNested_js_1 = require("./NoNested.js");
4
+ const common_ts_1 = require("./common.js");
5
+ const NoNested_ts_1 = require("./NoNested.js");
6
6
  const KNOWN_IMPORTS = [
7
7
  ["@dataplan/pg", "PgResource"],
8
8
  ["@dataplan/pg", "PgExecutor"],
@@ -53,9 +53,9 @@ exports.ExportInstances = {
53
53
  }
54
54
  // TODO: determine if the definition for this `callee` identifier is an import from any of these `possibles` (and if not, `return;`).
55
55
  //const scope = scopeManager.acquire(node);
56
- if ((0, NoNested_js_1.hasExportableParent)(node))
56
+ if ((0, NoNested_ts_1.hasExportableParent)(node))
57
57
  return;
58
- (0, common_js_1.reportProblem)(context, options, {
58
+ (0, common_ts_1.reportProblem)(context, options, {
59
59
  node: node,
60
60
  message: `${node.type === "NewExpression" ? "Construction" : "Call"} of '${constructorName}' without EXPORTABLE.`,
61
61
  suggest: [
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExportMethods = void 0;
4
- const common_js_1 = require("./common.js");
5
- const NoNested_js_1 = require("./NoNested.js");
4
+ const common_ts_1 = require("./common.js");
5
+ const NoNested_ts_1 = require("./NoNested.js");
6
6
  const dev = process.env.GRAPHILE_ENV === "development";
7
7
  /**
8
8
  * So we don't reach too wide we only want to match objects that look like
@@ -117,12 +117,12 @@ function processNode(context, options, node, match) {
117
117
  const disallowedSiblingKeys = parentObjectKeys.filter((key) => key == null ||
118
118
  (!ALLOWED_SIBLING_KEYS.includes(key) && !options.methods.includes(key)));
119
119
  if (disallowedSiblingKeys.length === 0) {
120
- if ((0, NoNested_js_1.hasExportableParent)(node))
120
+ if ((0, NoNested_ts_1.hasExportableParent)(node))
121
121
  return;
122
122
  // Match
123
123
  if (node.type === "ObjectMethod") {
124
124
  // replace with property -> EXPORTABLE
125
- (0, common_js_1.reportProblem)(context, options, {
125
+ (0, common_ts_1.reportProblem)(context, options, {
126
126
  node: node,
127
127
  message: "is not exportable.",
128
128
  // TODO: implement the suggestion
@@ -144,7 +144,7 @@ function processNode(context, options, node, match) {
144
144
  (value.type === "FunctionExpression" ||
145
145
  value.type === "ArrowFunctionExpression")) {
146
146
  // Wrap with EXPORTABLE
147
- (0, common_js_1.reportProblem)(context, options, {
147
+ (0, common_ts_1.reportProblem)(context, options, {
148
148
  node: node,
149
149
  message: "Step value is not exportable.",
150
150
  suggest: [
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExportPlans = void 0;
4
- const common_js_1 = require("./common.js");
5
- const NoNested_js_1 = require("./NoNested.js");
4
+ const common_ts_1 = require("./common.js");
5
+ const NoNested_ts_1 = require("./NoNested.js");
6
6
  /**
7
7
  * So we don't reach too wide we only want to match objects that look like
8
8
  * they're probably plan configurations. For now this is the GraphQLFieldConfig
@@ -58,12 +58,12 @@ exports.ExportPlans = {
58
58
  },
59
59
  };
60
60
  function processNode(context, options, node) {
61
- if ((0, NoNested_js_1.hasExportableParent)(node))
61
+ if ((0, NoNested_ts_1.hasExportableParent)(node))
62
62
  return;
63
63
  // Match
64
64
  if (node.type === "ObjectMethod") {
65
65
  // replace with property -> EXPORTABLE
66
- (0, common_js_1.reportProblem)(context, options, {
66
+ (0, common_ts_1.reportProblem)(context, options, {
67
67
  node: node,
68
68
  message: "is not exportable.",
69
69
  // TODO: implement the suggestion
@@ -85,7 +85,7 @@ function processNode(context, options, node) {
85
85
  (value.type === "FunctionExpression" ||
86
86
  value.type === "ArrowFunctionExpression")) {
87
87
  // Wrap with EXPORTABLE
88
- (0, common_js_1.reportProblem)(context, options, {
88
+ (0, common_ts_1.reportProblem)(context, options, {
89
89
  node: node,
90
90
  message: "Step value is not exportable.",
91
91
  suggest: [
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExportSubclasses = void 0;
4
4
  const path_1 = require("path");
5
- const common_js_1 = require("./common.js");
6
- const NoNested_js_1 = require("./NoNested.js");
5
+ const common_ts_1 = require("./common.js");
6
+ const NoNested_ts_1 = require("./NoNested.js");
7
7
  const KNOWN_IMPORTS = [
8
8
  ["grafast", "Step"],
9
9
  ["grafast", "Modifier"],
@@ -55,7 +55,7 @@ exports.ExportSubclasses = {
55
55
  if (!className) {
56
56
  return;
57
57
  }
58
- if ((0, NoNested_js_1.hasExportableParent)(node))
58
+ if ((0, NoNested_ts_1.hasExportableParent)(node))
59
59
  return;
60
60
  // ENHANCE: if the definition for the `superClass` identifier is not actually an import from any of these `possibles` then we should `return;`. It just happens to share the same name?
61
61
  //const scope = scopeManager.acquire(node);
@@ -67,7 +67,7 @@ exports.ExportSubclasses = {
67
67
  def.key.name === "$$export");
68
68
  if ($$export) {
69
69
  if (!$$export.static) {
70
- (0, common_js_1.reportProblem)(context, options, {
70
+ (0, common_ts_1.reportProblem)(context, options, {
71
71
  node: $$export,
72
72
  message: `$$export should be a static property; this is probably a mistake?`,
73
73
  suggest: [
@@ -94,13 +94,13 @@ exports.ExportSubclasses = {
94
94
  const safe = !$$export.value.properties.some((prop) => prop.type === "SpreadElement") &&
95
95
  !$$export.value.properties.some((prop) => prop.type === "Property" && prop.key.type !== "Identifier");
96
96
  if (safe && !moduleName) {
97
- (0, common_js_1.reportProblem)(context, options, {
97
+ (0, common_ts_1.reportProblem)(context, options, {
98
98
  node: $$export,
99
99
  message: `$$export specifier doesn't explicitly specify 'moduleName'`,
100
100
  });
101
101
  }
102
102
  if (safe && !exportName) {
103
- (0, common_js_1.reportProblem)(context, options, {
103
+ (0, common_ts_1.reportProblem)(context, options, {
104
104
  node: $$export,
105
105
  message: `$$export specifier doesn't explicitly specify 'exportName'`,
106
106
  });
@@ -109,14 +109,14 @@ exports.ExportSubclasses = {
109
109
  if (!moduleName.value ||
110
110
  !["StringLiteral", "Literal"].includes(moduleName.value.type)) {
111
111
  console.dir(moduleName.value);
112
- (0, common_js_1.reportProblem)(context, options, {
112
+ (0, common_ts_1.reportProblem)(context, options, {
113
113
  node: $$export,
114
114
  message: `$$export has invalid value for 'moduleName' - expected a string literal.`,
115
115
  });
116
116
  }
117
117
  if (!exportName.value ||
118
118
  !["StringLiteral", "Literal"].includes(exportName.value.type)) {
119
- (0, common_js_1.reportProblem)(context, options, {
119
+ (0, common_ts_1.reportProblem)(context, options, {
120
120
  node: $$export,
121
121
  message: `$$export has invalid value for 'exportName' - expected a string literal.`,
122
122
  });
@@ -150,14 +150,14 @@ exports.ExportSubclasses = {
150
150
  };
151
151
  const exportExample = `static $$export = { moduleName: /* TODO */ ".../path/to/module.js", exportName: "${className}" }`;
152
152
  if (isGeneric) {
153
- (0, common_js_1.reportProblem)(context, options, {
153
+ (0, common_ts_1.reportProblem)(context, options, {
154
154
  node: node,
155
155
  message: `Generic class '${className}' extending '${superClassIdentifier}' cannot be safely exported. Because it's generic we cannot make it EXPORTABLE, instead make it importable by putting it in its own module and declaring a '${exportExample}' property.`,
156
156
  suggest: [convertToImportable],
157
157
  });
158
158
  }
159
159
  else {
160
- (0, common_js_1.reportProblem)(context, options, {
160
+ (0, common_ts_1.reportProblem)(context, options, {
161
161
  node: node,
162
162
  message: `Class '${className}' extends '${superClassIdentifier}' but cannot be safely exported. Either make it EXPORTABLE or make it importable and add a '${exportExample}' property to indicate this.`,
163
163
  suggest: [convertToExportable, convertToImportable],
package/dist/NoNested.js CHANGED
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NoNested = void 0;
4
4
  exports.hasExportableParent = hasExportableParent;
5
- const common_js_1 = require("./common.js");
6
- const utils_js_1 = require("./utils.js");
5
+ const common_ts_1 = require("./common.js");
6
+ const utils_ts_1 = require("./utils.js");
7
7
  exports.NoNested = {
8
8
  meta: {
9
9
  type: "suggestion",
@@ -40,12 +40,12 @@ exports.NoNested = {
40
40
  };
41
41
  return {
42
42
  CallExpression(node) {
43
- if ((0, utils_js_1.isExportableCall)(node)) {
43
+ if ((0, utils_ts_1.isExportableCall)(node)) {
44
44
  if (hasExportableParent(node)) {
45
45
  const callback = node.arguments[0];
46
46
  if (callback.type === "ArrowFunctionExpression") {
47
47
  const body = callback.body;
48
- (0, common_js_1.reportProblem)(context, options, {
48
+ (0, common_ts_1.reportProblem)(context, options, {
49
49
  node: node,
50
50
  message: "Nested EXPORTABLE found",
51
51
  suggest: [
@@ -70,7 +70,7 @@ exports.NoNested = {
70
70
  function hasExportableParent(node) {
71
71
  let parent = node;
72
72
  while ((parent = parent.parent)) {
73
- if ((0, utils_js_1.isExportableCall)(parent)) {
73
+ if ((0, utils_ts_1.isExportableCall)(parent)) {
74
74
  return true;
75
75
  }
76
76
  }
package/dist/index.js CHANGED
@@ -2,12 +2,12 @@
2
2
  // Inspired by eslint-plugin-react-hooks
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.rules = exports.meta = exports.configs = void 0;
5
- const ExhaustiveDeps_js_1 = require("./ExhaustiveDeps.js");
6
- const ExportInstances_js_1 = require("./ExportInstances.js");
7
- const ExportMethods_js_1 = require("./ExportMethods.js");
8
- const ExportPlans_js_1 = require("./ExportPlans.js");
9
- const ExportSubclasses_js_1 = require("./ExportSubclasses.js");
10
- const NoNested_js_1 = require("./NoNested.js");
5
+ const ExhaustiveDeps_ts_1 = require("./ExhaustiveDeps.js");
6
+ const ExportInstances_ts_1 = require("./ExportInstances.js");
7
+ const ExportMethods_ts_1 = require("./ExportMethods.js");
8
+ const ExportPlans_ts_1 = require("./ExportPlans.js");
9
+ const ExportSubclasses_ts_1 = require("./ExportSubclasses.js");
10
+ const NoNested_ts_1 = require("./NoNested.js");
11
11
  exports.configs = {
12
12
  recommended: {
13
13
  name: "graphile-export/recommended",
@@ -79,12 +79,12 @@ exports.meta = {
79
79
  name: "eslint-plugin-graphile-export",
80
80
  };
81
81
  exports.rules = {
82
- "exhaustive-deps": ExhaustiveDeps_js_1.ExhaustiveDeps,
83
- "export-methods": ExportMethods_js_1.ExportMethods,
84
- "export-instances": ExportInstances_js_1.ExportInstances,
85
- "export-plans": ExportPlans_js_1.ExportPlans,
86
- "export-subclasses": ExportSubclasses_js_1.ExportSubclasses,
87
- "no-nested": NoNested_js_1.NoNested,
82
+ "exhaustive-deps": ExhaustiveDeps_ts_1.ExhaustiveDeps,
83
+ "export-methods": ExportMethods_ts_1.ExportMethods,
84
+ "export-instances": ExportInstances_ts_1.ExportInstances,
85
+ "export-plans": ExportPlans_ts_1.ExportPlans,
86
+ "export-subclasses": ExportSubclasses_ts_1.ExportSubclasses,
87
+ "no-nested": NoNested_ts_1.NoNested,
88
88
  };
89
89
  const plugin = {
90
90
  configs: exports.configs,
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "eslint-plugin-graphile-export",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0-rc.5",
4
4
  "description": "ESLint plugin to help ensure your schema is exportable by graphile-export",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
- "scripts": {
8
- "prepack": "tsc -b"
9
- },
10
7
  "repository": {
11
8
  "type": "git",
12
9
  "url": "git+https://github.com/graphile/crystal.git"
@@ -35,15 +32,5 @@
35
32
  },
36
33
  "files": [
37
34
  "dist"
38
- ],
39
- "devDependencies": {
40
- "@babel/types": "^7.28.5",
41
- "@types/eslint": "^9.6.1",
42
- "@types/estree": "^1.0.8",
43
- "@types/jest": "^30.0.0",
44
- "@types/node": "^22.19.1",
45
- "jest": "^30.2.0",
46
- "ts-node": "^10.9.2",
47
- "typescript": "^5.9.3"
48
- }
35
+ ]
49
36
  }
package/CHANGELOG.md DELETED
@@ -1,272 +0,0 @@
1
- # eslint-plugin-graphile-export
2
-
3
- ## 1.0.0-rc.3
4
-
5
- ### Patch Changes
6
-
7
- - [#2873](https://github.com/graphile/crystal/pull/2873)
8
- [`0772086`](https://github.com/graphile/crystal/commit/0772086411a55d56b4e345cff1eef133eee31b36)
9
- Thanks [@benjie](https://github.com/benjie)! - Update TypeScript configuration
10
- to support Node 22 minimum
11
-
12
- - [#2888](https://github.com/graphile/crystal/pull/2888)
13
- [`1a56db2`](https://github.com/graphile/crystal/commit/1a56db2f53bc455a3d3ba6555a2cd777b27b271c)
14
- Thanks [@benjaie](https://github.com/benjaie)! - Node v22+ is required for
15
- this module.
16
-
17
- ## 1.0.0-rc.2
18
-
19
- ### Patch Changes
20
-
21
- - [#2829](https://github.com/graphile/crystal/pull/2829)
22
- [`a82e6fa`](https://github.com/graphile/crystal/commit/a82e6fae099f7e9d62fb3fc1ee173368cdabca27)
23
- Thanks [@benjie](https://github.com/benjie)! - Update dependency ranges.
24
-
25
- ## 1.0.0-rc.1
26
-
27
- ### Patch Changes
28
-
29
- - [`8a5a7c5`](https://github.com/graphile/crystal/commit/8a5a7c536fc4b9b702600c5cc3d413724670c327)
30
- Thanks [@benjie](https://github.com/benjie)! - Bump to release candidate
31
-
32
- ## 0.0.2-beta.10
33
-
34
- ### Patch Changes
35
-
36
- - [#2634](https://github.com/graphile/crystal/pull/2634)
37
- [`598a912`](https://github.com/graphile/crystal/commit/598a9126a4081cea249c6000d51ae5a49d68e58d)
38
- Thanks [@benjie](https://github.com/benjie)! - Lint plugin now supports
39
- `build.EXPORTABLE` expressions.
40
-
41
- ## 0.0.2-beta.9
42
-
43
- ### Patch Changes
44
-
45
- - [#2585](https://github.com/graphile/crystal/pull/2585)
46
- [`63ab0fd`](https://github.com/graphile/crystal/commit/63ab0fd14a0eedd873267408c17f55f8046c304a)
47
- Thanks [@benjie](https://github.com/benjie)! - Minor tweak for updated deps.
48
-
49
- ## 0.0.2-beta.8
50
-
51
- ### Patch Changes
52
-
53
- - [#2574](https://github.com/graphile/crystal/pull/2574)
54
- [`ec25997a6a2557cde9aaa9e27eb202ad945b6015`](https://github.com/graphile/crystal/commit/ec25997a6a2557cde9aaa9e27eb202ad945b6015)
55
- Thanks [@benjie](https://github.com/benjie)! - Fix dependency ranges to allow
56
- ESLint 9
57
-
58
- ## 0.0.2-beta.7
59
-
60
- ### Patch Changes
61
-
62
- - [#2481](https://github.com/graphile/crystal/pull/2481)
63
- [`8c1dc528e3c03e2c2855adb7273319412f841c14`](https://github.com/graphile/crystal/commit/8c1dc528e3c03e2c2855adb7273319412f841c14)
64
- Thanks [@kzlar](https://github.com/kzlar)! - 🚨 Now uses a flat config for
65
- compatibility with ESLint v9.
66
-
67
- - [#2482](https://github.com/graphile/crystal/pull/2482)
68
- [`459e1869a2ec58925b2bac5458af487c52a8ca37`](https://github.com/graphile/crystal/commit/459e1869a2ec58925b2bac5458af487c52a8ca37)
69
- Thanks [@benjie](https://github.com/benjie)! - Minimum version of Node.js
70
- bumped to Node 22 (the latest LTS).
71
-
72
- ## 0.0.2-beta.6
73
-
74
- ### Patch Changes
75
-
76
- - [#2377](https://github.com/graphile/crystal/pull/2377)
77
- [`7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7`](https://github.com/graphile/crystal/commit/7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7)
78
- Thanks [@benjie](https://github.com/benjie)! - Since `ModifierStep` and
79
- `BaseStep` are no more; `ExecutableStep` can be renamed to simply `Step`. The
80
- old name (`ExecutableStep`) is now deprecated.
81
-
82
- - [#2398](https://github.com/graphile/crystal/pull/2398)
83
- [`c041fd250372c57601188b65a6411c8f440afab6`](https://github.com/graphile/crystal/commit/c041fd250372c57601188b65a6411c8f440afab6)
84
- Thanks [@benjie](https://github.com/benjie)! - Since the following have been
85
- removed from Grafast, throw an error if they're seen in the schema:
86
- - `autoApplyAfterParentInputPlan`
87
- - `autoApplyAfterParentApplyPlan`
88
- - `autoApplyAfterParentPlan`
89
- - `autoApplyAfterParentSubscribePlan`
90
- - `inputPlan`
91
- - `applyPlan` on input fields
92
-
93
- Also: when Query type fails to build, throw the underlying error directly.
94
-
95
- - [#2376](https://github.com/graphile/crystal/pull/2376)
96
- [`da6f3c04efe3d8634c0bc3fcf93ac2518de85322`](https://github.com/graphile/crystal/commit/da6f3c04efe3d8634c0bc3fcf93ac2518de85322)
97
- Thanks [@benjie](https://github.com/benjie)! - Overhaul Grafast to remove more
98
- input planning - inputs should be evaluated at runtime - and remove more
99
- plan-time step evaluation.
100
-
101
- `FieldArgs.get` is no more; use `FieldArgs.getRaw` or use `bakedInput()`
102
- (TODO: document) to get the "baked" version of a raw input value.
103
-
104
- Input object fields no longer have `applyPlan`/`inputPlan`, instead having the
105
- runtime equivalents `apply()` and `baked()`. `FieldArgs` is no longer
106
- available on input object fields, since these fields are no longer called at
107
- plantime; instead, the actual value is passed.
108
-
109
- `FieldArgs` gains `.typeAt(path)` method that details the GraphQL input type
110
- at the given path.
111
-
112
- Field arguments are no longer passed `FieldArgs`, instead they're passed a
113
- (similar) `FieldArg` object representing the argument value itself.
114
-
115
- `autoApplyAfterParentPlan` is no more - instead if an argument has `applyPlan`
116
- it will be called automatically unless it was called during the field plan
117
- resolver itself.
118
-
119
- `autoApplyAfterParentSubscribePlan` is no more - instead if an argument has
120
- `applySubscribePlan` it will be called automatically unless it was called
121
- during the field plan resolver itself.
122
-
123
- Field arguments no longer support `inputPlan` - use `bakedInput()` if you need
124
- that.
125
-
126
- Input fields no longer support `inputPlan`, `applyPlan`,
127
- `autoApplyAfterParentInputPlan` nor `autoApplyAfterParentApplyPlan`. Instead,
128
- `apply()` (which is called by `applyStep()` at runtime) has been added.
129
-
130
- `sqlValueWithCodec(value, codec)` can be used at runtime in places where
131
- `$step.placeholder($value, codec)` would have been used previously.
132
- `placeholder` has been removed from all places that are now runtime - namely
133
- the list of modifiers below...
134
-
135
- The following `ModifierStep` classes have all dropped their `Step` suffix,
136
- these `Modifier` classes now all run at runtime, and are thus no longer steps;
137
- they're invoked as part of the new `applyInput()` (TODO: document) step:
138
- - `ModifierStep` ⇒ `Modifier`
139
- - `PgBooleanFilterStep` ⇒ `PgBooleanFilter`
140
- - `PgClassFilterStep` ⇒ `PgClassFilter`
141
- - `PgConditionCapableParentStep` ⇒ `PgConditionCapableParent`
142
- - `PgConditionLikeStep` ⇒ `PgConditionLike`
143
- - `PgConditionStepMode` ⇒ `PgConditionMode`
144
- - `PgConditionStep` ⇒ `PgCondition`
145
- - `PgManyFilterStep` ⇒ `PgManyFilter`
146
- - `PgOrFilterStep` ⇒ `PgOrFilter`
147
- - `PgTempTableStep` ⇒ `PgTempTable`
148
- - `SetterCapableStep` ⇒ `SetterCapable`
149
- - `SetterStep` ⇒ `Setter`
150
-
151
- (Interestingly, other than the removal of `placeholder` and the fact they deal
152
- with runtime values rather than steps now, they're very similar to what they
153
- were before.)
154
-
155
- The deprecated forms of the above have been removed.
156
-
157
- Methods that rely on these modifier plans have been removed:
158
- - `PgUnionAllStep.wherePlan` - use
159
- `fieldArg.apply($unionAll, qb => qb.whereBuilder())` instead
160
- - `PgUnionAllStep.havingPlan` - use
161
- `fieldArg.apply($unionAll, qb => qb.havingBuilder())` instead
162
- - Same for PgSelectStep
163
-
164
- The following gain query builders:
165
- - `PgInsertSingle`
166
- - `PgUpdateSingle`
167
- - `PgDeleteSingle`
168
-
169
- Query builders gain `meta`, an object that can be augmented with metadata
170
- about the operation (typically this relates to cursors and similar
171
- functionality). This is now used to implement `clientMutationId`.
172
-
173
- Extends query builders with additional functionality.
174
-
175
- Many of the types have had their generics changed, TypeScript should guide you
176
- if you have issues here.
177
-
178
- `NodeIdHandler` now requires a `getIdentifiers` method that runs at runtime
179
- and returns the identifiers from a decoded NodeId string.
180
-
181
- Types around GraphQL Global Object Identification (i.e. `Node` / `id`) have
182
- changed.
183
-
184
- ## 0.0.2-beta.5
185
-
186
- ### Patch Changes
187
-
188
- - [#2175](https://github.com/graphile/crystal/pull/2175)
189
- [`c69b2fdec`](https://github.com/graphile/crystal/commit/c69b2fdec2d73f1101440eb96fe126f9ad77db98)
190
- Thanks [@benjie](https://github.com/benjie)! - Fix 'Container is falsy' error
191
- message the latest Babel patch release would cause.
192
-
193
- ## 0.0.2-beta.4
194
-
195
- ### Patch Changes
196
-
197
- - [#1933](https://github.com/graphile/crystal/pull/1933)
198
- [`3a2ea80ee`](https://github.com/graphile/crystal/commit/3a2ea80ee470b2aef91366727d7d60a0c65067f5)
199
- Thanks [@mattiarossi](https://github.com/mattiarossi)! -
200
- `eslint-plugin-graphile-export` now spots instances of `inputPlan`,
201
- `applyPlan` and `assertStep` so they can be checked - thanks @mattiarossi!
202
-
203
- ## 0.0.2-beta.3
204
-
205
- ### Patch Changes
206
-
207
- - [#514](https://github.com/graphile/crystal-pre-merge/pull/514)
208
- [`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b)
209
- Thanks [@benjie](https://github.com/benjie)! - Update package.json repository
210
- information
211
-
212
- ## 0.0.2-beta.2
213
-
214
- ### Patch Changes
215
-
216
- - [#496](https://github.com/benjie/crystal/pull/496)
217
- [`c9bfd9892`](https://github.com/benjie/crystal/commit/c9bfd989247f9433fb5b18c5175c9d8d64cd21a1)
218
- Thanks [@benjie](https://github.com/benjie)! - Update dependencies (sometimes
219
- through major versions).
220
-
221
- ## 0.0.2-beta.1
222
-
223
- ### Patch Changes
224
-
225
- - [`cbd987385`](https://github.com/benjie/crystal/commit/cbd987385f99bd1248bc093ac507cc2f641ba3e8)
226
- Thanks [@benjie](https://github.com/benjie)! - Bump all packages to beta
227
-
228
- ## 0.0.2-alpha.3
229
-
230
- ### Patch Changes
231
-
232
- - [#406](https://github.com/benjie/crystal/pull/406)
233
- [`ecd7598f1`](https://github.com/benjie/crystal/commit/ecd7598f1a12c724e744249246eec7b882198a8a)
234
- Thanks [@benjie](https://github.com/benjie)! - More docs for graphile-export
235
-
236
- ## 0.0.2-alpha.2
237
-
238
- ### Patch Changes
239
-
240
- - [`7f857950a`](https://github.com/benjie/crystal/commit/7f857950a7e4ec763c936eb6bd1fb77824041d71)
241
- Thanks [@benjie](https://github.com/benjie)! - Upgrade to the latest
242
- TypeScript/tslib
243
-
244
- ## 0.0.2-alpha.1
245
-
246
- ### Patch Changes
247
-
248
- - [`759ad403d`](https://github.com/benjie/crystal/commit/759ad403d71363312c5225c165873ae84b8a098c)
249
- Thanks [@benjie](https://github.com/benjie)! - Alpha release - see
250
- https://postgraphile.org/news/2023-04-26-version-5-alpha
251
-
252
- ## 0.0.2-1.1
253
-
254
- ### Patch Changes
255
-
256
- - [#260](https://github.com/benjie/crystal/pull/260)
257
- [`d5312e6b9`](https://github.com/benjie/crystal/commit/d5312e6b968fbeb46d074b82a41b4bdbc166598c)
258
- Thanks [@benjie](https://github.com/benjie)! - TypeScript v5 is now required
259
-
260
- ## 0.0.2-0.1
261
-
262
- ### Patch Changes
263
-
264
- - [`0ab95d0b1`](undefined) - Update sponsors.
265
-
266
- ## 0.0.2-0.0
267
-
268
- ### Patch Changes
269
-
270
- - [#125](https://github.com/benjie/crystal/pull/125)
271
- [`91f2256b3`](https://github.com/benjie/crystal/commit/91f2256b3fd699bec19fc86f1ca79df057e58639)
272
- Thanks [@benjie](https://github.com/benjie)! - Initial changesets release