diff --git a/packages/deparser/scripts/clean-utils.ts b/packages/deparser/scripts/clean-utils.ts index 4d32ebaa..f0dae2ca 100644 --- a/packages/deparser/scripts/clean-utils.ts +++ b/packages/deparser/scripts/clean-utils.ts @@ -64,6 +64,9 @@ export const cleanTree = (tree: any) => { stmt_len: noop, stmt_location: noop, location: noop, + arg_location: noop, + payload_location: noop, + conninfo_location: noop, rexpr_list_start: noop, rexpr_list_end: noop, list_start: noop, diff --git a/packages/plpgsql-deparser/test-utils/index.ts b/packages/plpgsql-deparser/test-utils/index.ts index c66b106b..e4cf69b5 100644 --- a/packages/plpgsql-deparser/test-utils/index.ts +++ b/packages/plpgsql-deparser/test-utils/index.ts @@ -248,6 +248,9 @@ export const transform = (obj: any, props: any): any => { const cleanProps: Record = { lineno: noop, location: noop, + arg_location: noop, + payload_location: noop, + conninfo_location: noop, stmt_len: noop, stmt_location: noop, // varno values are assigned based on position in datums array and can change diff --git a/packages/plpgsql-parser/__tests__/round-trip.test.ts b/packages/plpgsql-parser/__tests__/round-trip.test.ts index 5436977f..d067fd47 100644 --- a/packages/plpgsql-parser/__tests__/round-trip.test.ts +++ b/packages/plpgsql-parser/__tests__/round-trip.test.ts @@ -65,6 +65,9 @@ const cleanSqlTree = (tree: any) => { stmt_len: noop, stmt_location: noop, location: noop, + arg_location: noop, + payload_location: noop, + conninfo_location: noop, }); }; diff --git a/packages/transform-ast/test-utils/clean-tree.ts b/packages/transform-ast/test-utils/clean-tree.ts index 6b6a3779..3439783b 100644 --- a/packages/transform-ast/test-utils/clean-tree.ts +++ b/packages/transform-ast/test-utils/clean-tree.ts @@ -69,6 +69,9 @@ export const cleanTree = (tree: any) => { stmt_len: noop, stmt_location: noop, location: removeUndefined, + arg_location: noop, + payload_location: noop, + conninfo_location: noop, typemod: removeUndefined, rexpr_list_start: noop, rexpr_list_end: noop, diff --git a/packages/transform/__tests__/round-trip-core.test.ts b/packages/transform/__tests__/round-trip-core.test.ts index 9f6b3aa2..a888fb41 100644 --- a/packages/transform/__tests__/round-trip-core.test.ts +++ b/packages/transform/__tests__/round-trip-core.test.ts @@ -79,9 +79,12 @@ describe('firstDifference', () => { describe('cleanTree preset (upstream-compatible)', () => { it('exposes the upstream volatile key set', () => { expect([...CLEAN_TREE_VOLATILE_KEYS].sort()).toEqual([ + 'arg_location', + 'conninfo_location', 'list_end', 'list_start', 'location', + 'payload_location', 'rexpr_list_end', 'rexpr_list_start', 'stmt_len', diff --git a/packages/transform/src/round-trip-core.ts b/packages/transform/src/round-trip-core.ts index 88360043..db626565 100644 --- a/packages/transform/src/round-trip-core.ts +++ b/packages/transform/src/round-trip-core.ts @@ -104,6 +104,9 @@ export const CLEAN_TREE_VOLATILE_KEYS: ReadonlySet = new Set([ 'stmt_len', 'stmt_location', 'location', + 'arg_location', + 'payload_location', + 'conninfo_location', 'rexpr_list_start', 'rexpr_list_end', 'list_start',