You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use types for documentation, but 'any' where types don't match reality
141
+
// due to limitations in generated type definitions
142
+
}
143
+
}
144
+
```
145
+
146
+
**Note**: The current transformers use `any` types in many places because the generated type definitions don't accurately reflect the actual parser output structure. This is documented in `TYPING_STATUS.md`.
we are a building transformers so we can upgrade PG13 ASTs to PG17, stepwise, so one major version at a time.
3
+
4
+
First only work on packages/transform/src/transformers/v13-to-v14.ts
5
+
6
+
and only work by testing like this to only run tests inside of the PG13 -> PG14 :
7
+
8
+
yarn test:watch__tests__/kitchen-sink/13-14
9
+
10
+
More info:
11
+
review packages/transform/AST_TEST_STRATEGY.md
12
+
review packages/transform/AST_NOTES.md
13
+
review packages/transform/AST_PLAN.md
14
+
review packages/transform/AST_RESEARCH.md
15
+
review packages/transform/AST_TRANSLATION.md
16
+
review packages/transform/AST_PLAN.md
17
+
18
+
to test first, in root
19
+
20
+
yarn
21
+
yarn build
22
+
23
+
then
24
+
25
+
cd packages/transform
26
+
27
+
then to test you can use this:
28
+
yarn test
29
+
or
30
+
yarn test:watch
31
+
32
+
Rule:
33
+
34
+
DO not remove type types from the Transformers,
35
+
DO not do any special cases for TypeName or RangeVar — you must understand how to properly and dynamically return the proper type, either wrapped node or not (wrapped: { Type: Type } and inline: Type ) — based on either by studying the types, letting the type system help you, or as a last resort, using the runtime schema, and looking it up at runtime based on the FieldSpec.
0 commit comments