@planningcenter/tapestry-migration-cli 3.6.0 → 3.6.1-qa-1035.0

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.
Files changed (25) hide show
  1. package/dist/tapestry-react-shim.cjs +195 -11
  2. package/package.json +3 -3
  3. package/src/components/flex/index.test.ts +151 -0
  4. package/src/components/flex/index.ts +14 -0
  5. package/src/components/flex/transforms/auditSpreadProps.test.ts +93 -0
  6. package/src/components/flex/transforms/auditSpreadProps.ts +6 -0
  7. package/src/components/flex/transforms/axisToDirection.test.ts +15 -0
  8. package/src/components/flex/transforms/axisToDirection.ts +26 -0
  9. package/src/components/flex/transforms/convertStyleProps.test.ts +147 -0
  10. package/src/components/flex/transforms/convertStyleProps.ts +23 -0
  11. package/src/components/flex/transforms/cssFlexAliasesToProps.test.ts +202 -0
  12. package/src/components/flex/transforms/cssFlexAliasesToProps.ts +110 -0
  13. package/src/components/flex/transforms/flexPropToExpand.test.ts +156 -0
  14. package/src/components/flex/transforms/flexPropToExpand.ts +100 -0
  15. package/src/components/flex/transforms/mediaQueriesToResponsive.test.ts +714 -0
  16. package/src/components/flex/transforms/mediaQueriesToResponsive.ts +523 -0
  17. package/src/components/flex/transforms/paddingPropsToFlex.test.ts +252 -0
  18. package/src/components/flex/transforms/paddingPropsToFlex.ts +150 -0
  19. package/src/components/flex/transforms/setDefaultAxis.test.ts +12 -0
  20. package/src/components/flex/transforms/setDefaultAxis.ts +1 -0
  21. package/src/components/flex/transforms/unsupportedProps.test.ts +141 -0
  22. package/src/components/flex/transforms/unsupportedProps.ts +17 -0
  23. package/src/components/shared/helpers/unsupportedPropsHelpers.ts +41 -0
  24. package/src/components/shared/transformFactories/stylePropTransformFactory.test.ts +47 -0
  25. package/src/components/shared/transformFactories/stylePropTransformFactory.ts +16 -0
@@ -0,0 +1,147 @@
1
+ import jscodeshift from "jscodeshift"
2
+ import { describe, expect, it } from "vitest"
3
+
4
+ import transform from "./convertStyleProps"
5
+
6
+ const j = jscodeshift.withParser("tsx")
7
+
8
+ function applyTransform(source: string): string | null {
9
+ const fileInfo = { path: "test.tsx", source }
10
+ return transform(
11
+ fileInfo,
12
+ { j, jscodeshift: j, report: () => {}, stats: () => {} },
13
+ {}
14
+ ) as string | null
15
+ }
16
+
17
+ describe("convertStyleProps transform", () => {
18
+ it("moves a margin style prop to a style object", () => {
19
+ const input = `
20
+ import { StackView } from "@planningcenter/tapestry-react"
21
+
22
+ export default function Test() {
23
+ return <StackView marginTop={2}>Test</StackView>
24
+ }
25
+ `.trim()
26
+
27
+ expect(applyTransform(input)).toMatchInlineSnapshot(`
28
+ "import { StackView } from "@planningcenter/tapestry-react"
29
+
30
+ export default function Test() {
31
+ return (
32
+ <StackView style={{
33
+ marginTop: "16px"
34
+ }}>Test</StackView>
35
+ );
36
+ }"
37
+ `)
38
+ })
39
+
40
+ it("moves a padding style prop to a style object (splitStyles expands shorthand)", () => {
41
+ const input = `
42
+ import { StackView } from "@planningcenter/tapestry-react"
43
+
44
+ export default function Test() {
45
+ return <StackView paddingTop={2}>Test</StackView>
46
+ }
47
+ `.trim()
48
+
49
+ expect(applyTransform(input)).toMatchInlineSnapshot(`
50
+ "import { StackView } from "@planningcenter/tapestry-react"
51
+
52
+ export default function Test() {
53
+ return (
54
+ <StackView style={{
55
+ paddingTop: "16px"
56
+ }}>Test</StackView>
57
+ );
58
+ }"
59
+ `)
60
+ })
61
+
62
+ it("migrates non-excluded style props while leaving excluded Flex props in place", () => {
63
+ const input = `
64
+ import { StackView } from "@planningcenter/tapestry-react"
65
+
66
+ export default function Test() {
67
+ return <StackView gap={2} marginTop={2}>Test</StackView>
68
+ }
69
+ `.trim()
70
+
71
+ expect(applyTransform(input)).toMatchInlineSnapshot(`
72
+ "import { StackView } from "@planningcenter/tapestry-react"
73
+
74
+ export default function Test() {
75
+ return (
76
+ <StackView gap={2} style={{
77
+ marginTop: "16px"
78
+ }}>Test</StackView>
79
+ );
80
+ }"
81
+ `)
82
+ })
83
+
84
+ it("leaves Flex first-class props untouched", () => {
85
+ const input = `
86
+ import { StackView } from "@planningcenter/tapestry-react"
87
+
88
+ export default function Test() {
89
+ return <StackView gap={2} padding={1} direction="row" wrap="wrap" alignSelf="center" columnGap={1} basis="100%" grow={1} shrink={0}>Test</StackView>
90
+ }
91
+ `.trim()
92
+
93
+ expect(applyTransform(input)).toBe(null)
94
+ })
95
+
96
+ it.each(["grow", "shrink", "basis"] as const)(
97
+ "leaves %s untouched and emits no TODO",
98
+ (prop) => {
99
+ const value = prop === "basis" ? '"100%"' : "{1}"
100
+ const input = `
101
+ import { StackView } from "@planningcenter/tapestry-react"
102
+ export default function Test() {
103
+ return <StackView ${prop}=${value}>Test</StackView>
104
+ }
105
+ `.trim()
106
+
107
+ expect(applyTransform(input)).toBe(null)
108
+ }
109
+ )
110
+
111
+ it("leaves axis/alignment/distribution/spacing for the dedicated rename transforms", () => {
112
+ const input = `
113
+ import { StackView } from "@planningcenter/tapestry-react"
114
+
115
+ export default function Test() {
116
+ return <StackView axis="horizontal" alignment="center" distribution="center" spacing={2}>Test</StackView>
117
+ }
118
+ `.trim()
119
+
120
+ const result = applyTransform(input)
121
+ expect(result).toBe(null)
122
+ })
123
+
124
+ it("returns null when there are no style props to migrate", () => {
125
+ const input = `
126
+ import { StackView } from "@planningcenter/tapestry-react"
127
+
128
+ export default function Test() {
129
+ return <StackView>Test</StackView>
130
+ }
131
+ `.trim()
132
+
133
+ expect(applyTransform(input)).toBe(null)
134
+ })
135
+
136
+ it("returns null when StackView is not imported from tapestry-react", () => {
137
+ const input = `
138
+ import { StackView } from "some-other-package"
139
+
140
+ export default function Test() {
141
+ return <StackView marginTop={2}>Test</StackView>
142
+ }
143
+ `.trim()
144
+
145
+ expect(applyTransform(input)).toBe(null)
146
+ })
147
+ })
@@ -0,0 +1,23 @@
1
+ import { stylePropTransformFactory } from "../../shared/transformFactories/stylePropTransformFactory"
2
+
3
+ const FLEX_PROP_NAMES = [
4
+ "alignItems",
5
+ "alignSelf",
6
+ "basis",
7
+ "columnGap",
8
+ "direction",
9
+ "flex",
10
+ "gap",
11
+ "grow",
12
+ "justifyContent",
13
+ "padding",
14
+ "shrink",
15
+ "wrap",
16
+ ]
17
+
18
+ export default stylePropTransformFactory({
19
+ stylesToExclude: FLEX_PROP_NAMES,
20
+ stylesToRemove: [],
21
+ targetComponent: "StackView",
22
+ targetPackage: "@planningcenter/tapestry-react",
23
+ })
@@ -0,0 +1,202 @@
1
+ import jscodeshift from "jscodeshift"
2
+ import { describe, expect, it } from "vitest"
3
+
4
+ import transform from "./cssFlexAliasesToProps"
5
+
6
+ const j = jscodeshift.withParser("tsx")
7
+
8
+ function applyTransform(source: string): string | null {
9
+ const fileInfo = { path: "test.tsx", source }
10
+ return transform(
11
+ fileInfo,
12
+ { j, jscodeshift: j, report: () => {}, stats: () => {} },
13
+ {}
14
+ ) as string | null
15
+ }
16
+
17
+ describe("cssFlexAliasesToProps transform", () => {
18
+ it("renames flexGrow to grow", () => {
19
+ const input = `
20
+ import { StackView } from "@planningcenter/tapestry-react"
21
+ export default function Test() {
22
+ return <StackView flexGrow={1}>Test</StackView>
23
+ }
24
+ `.trim()
25
+
26
+ const result = applyTransform(input)
27
+ expect(result).toContain("grow={1}")
28
+ expect(result).not.toContain("flexGrow")
29
+ })
30
+
31
+ it("renames flexShrink to shrink", () => {
32
+ const input = `
33
+ import { StackView } from "@planningcenter/tapestry-react"
34
+ export default function Test() {
35
+ return <StackView flexShrink={0}>Test</StackView>
36
+ }
37
+ `.trim()
38
+
39
+ const result = applyTransform(input)
40
+ expect(result).toContain("shrink={0}")
41
+ expect(result).not.toContain("flexShrink")
42
+ })
43
+
44
+ it("renames flexBasis to basis", () => {
45
+ const input = `
46
+ import { StackView } from "@planningcenter/tapestry-react"
47
+ export default function Test() {
48
+ return <StackView flexBasis="0%">Test</StackView>
49
+ }
50
+ `.trim()
51
+
52
+ const result = applyTransform(input)
53
+ expect(result).toContain('basis="0%"')
54
+ expect(result).not.toContain("flexBasis")
55
+ })
56
+
57
+ it("handles all three together", () => {
58
+ const input = `
59
+ import { StackView } from "@planningcenter/tapestry-react"
60
+ export default function Test() {
61
+ return <StackView flexGrow={1} flexShrink={0} flexBasis="auto">Test</StackView>
62
+ }
63
+ `.trim()
64
+
65
+ const result = applyTransform(input)
66
+ expect(result).toContain("grow={1}")
67
+ expect(result).toContain("shrink={0}")
68
+ expect(result).toContain('basis="auto"')
69
+ expect(result).not.toContain("flexGrow")
70
+ expect(result).not.toContain("flexShrink")
71
+ expect(result).not.toContain("flexBasis")
72
+ })
73
+
74
+ it("renames flexDirection to direction", () => {
75
+ const input = `
76
+ import { StackView } from "@planningcenter/tapestry-react"
77
+ export default function Test() {
78
+ return <StackView flexDirection="row">Test</StackView>
79
+ }
80
+ `.trim()
81
+
82
+ const result = applyTransform(input)
83
+ expect(result).toContain('direction="row"')
84
+ expect(result).not.toContain("flexDirection")
85
+ expect(result).not.toContain("TODO")
86
+ })
87
+
88
+ it("renames flexWrap to wrap", () => {
89
+ const input = `
90
+ import { StackView } from "@planningcenter/tapestry-react"
91
+ export default function Test() {
92
+ return <StackView flexWrap="wrap">Test</StackView>
93
+ }
94
+ `.trim()
95
+
96
+ const result = applyTransform(input)
97
+ expect(result).toContain('wrap="wrap"')
98
+ expect(result).not.toContain("flexWrap")
99
+ expect(result).not.toContain("TODO")
100
+ })
101
+
102
+ it("migrates justifyContent to justify with value normalization", () => {
103
+ const input = `
104
+ import { StackView } from "@planningcenter/tapestry-react"
105
+ export default function Test() {
106
+ return <StackView justifyContent="flex-start">Test</StackView>
107
+ }
108
+ `.trim()
109
+
110
+ const result = applyTransform(input)
111
+ expect(result).toContain('justify="start"')
112
+ expect(result).not.toContain("justifyContent")
113
+ expect(result).not.toContain("TODO")
114
+ })
115
+
116
+ it("migrates justifyContent center without normalization", () => {
117
+ const input = `
118
+ import { StackView } from "@planningcenter/tapestry-react"
119
+ export default function Test() {
120
+ return <StackView justifyContent="center">Test</StackView>
121
+ }
122
+ `.trim()
123
+
124
+ const result = applyTransform(input)
125
+ expect(result).toContain('justify="center"')
126
+ expect(result).not.toContain("TODO")
127
+ })
128
+
129
+ it("adds a TODO for an unmappable justifyContent value", () => {
130
+ const input = `
131
+ import { StackView } from "@planningcenter/tapestry-react"
132
+ export default function Test() {
133
+ return <StackView justifyContent="stretch">Test</StackView>
134
+ }
135
+ `.trim()
136
+
137
+ const result = applyTransform(input)
138
+ expect(result).toContain("TODO")
139
+ expect(result).toContain("justifyContent")
140
+ })
141
+
142
+ it("adds a TODO for a dynamic justifyContent value", () => {
143
+ const input = `
144
+ import { StackView } from "@planningcenter/tapestry-react"
145
+ export default function Test() {
146
+ return <StackView justifyContent={myVar}>Test</StackView>
147
+ }
148
+ `.trim()
149
+
150
+ const result = applyTransform(input)
151
+ expect(result).toContain("TODO")
152
+ })
153
+
154
+ it("migrates alignItems to align with value normalization", () => {
155
+ const input = `
156
+ import { StackView } from "@planningcenter/tapestry-react"
157
+ export default function Test() {
158
+ return <StackView alignItems="flex-end">Test</StackView>
159
+ }
160
+ `.trim()
161
+
162
+ const result = applyTransform(input)
163
+ expect(result).toContain('align="end"')
164
+ expect(result).not.toContain("alignItems")
165
+ expect(result).not.toContain("TODO")
166
+ })
167
+
168
+ it("adds a TODO for an unmappable alignItems value", () => {
169
+ const input = `
170
+ import { StackView } from "@planningcenter/tapestry-react"
171
+ export default function Test() {
172
+ return <StackView alignItems="space-between">Test</StackView>
173
+ }
174
+ `.trim()
175
+
176
+ const result = applyTransform(input)
177
+ expect(result).toContain("TODO")
178
+ expect(result).toContain("alignItems")
179
+ })
180
+
181
+ it("returns null when StackView has none of the CSS alias props", () => {
182
+ const input = `
183
+ import { StackView } from "@planningcenter/tapestry-react"
184
+ export default function Test() {
185
+ return <StackView gap={2}>Test</StackView>
186
+ }
187
+ `.trim()
188
+
189
+ expect(applyTransform(input)).toBe(null)
190
+ })
191
+
192
+ it("returns null when StackView is not imported from tapestry-react", () => {
193
+ const input = `
194
+ import { StackView } from "some-other-package"
195
+ export default function Test() {
196
+ return <StackView flexGrow={1}>Test</StackView>
197
+ }
198
+ `.trim()
199
+
200
+ expect(applyTransform(input)).toBe(null)
201
+ })
202
+ })
@@ -0,0 +1,110 @@
1
+ import { JSXAttribute } from "jscodeshift"
2
+
3
+ import { addCommentToAttribute } from "../../shared/actions/addCommentToAttribute"
4
+ import { getAttribute } from "../../shared/actions/getAttribute"
5
+ import { transformAttributeName } from "../../shared/actions/transformAttributeName"
6
+ import { hasAttribute } from "../../shared/conditions/hasAttribute"
7
+ import { orConditions } from "../../shared/conditions/orConditions"
8
+ import { attributeTransformFactory } from "../../shared/transformFactories/attributeTransformFactory"
9
+
10
+ const FLEX_START_END_MAP: Record<string, string> = {
11
+ "flex-end": "end",
12
+ "flex-start": "start",
13
+ }
14
+
15
+ const VALID_JUSTIFY_VALUES = new Set([
16
+ "start",
17
+ "center",
18
+ "end",
19
+ "space-between",
20
+ "space-evenly",
21
+ ])
22
+
23
+ const VALID_ALIGN_VALUES = new Set([
24
+ "start",
25
+ "center",
26
+ "end",
27
+ "stretch",
28
+ "baseline",
29
+ ])
30
+
31
+ function getStringValue(attr: JSXAttribute): string | null {
32
+ const { value } = attr
33
+ if (value?.type === "StringLiteral") return value.value
34
+ if (
35
+ value?.type === "JSXExpressionContainer" &&
36
+ value.expression.type === "StringLiteral"
37
+ )
38
+ return value.expression.value
39
+ return null
40
+ }
41
+
42
+ export default attributeTransformFactory({
43
+ condition: orConditions(
44
+ hasAttribute("alignItems"),
45
+ hasAttribute("flexBasis"),
46
+ hasAttribute("flexDirection"),
47
+ hasAttribute("flexGrow"),
48
+ hasAttribute("flexShrink"),
49
+ hasAttribute("flexWrap"),
50
+ hasAttribute("justifyContent")
51
+ ),
52
+ targetComponent: "StackView",
53
+ targetPackage: "@planningcenter/tapestry-react",
54
+ transform: (element, { j, options }) => {
55
+ let changed = false
56
+
57
+ if (transformAttributeName("flexBasis", "basis", { element, j, options }))
58
+ changed = true
59
+ if (
60
+ transformAttributeName("flexDirection", "direction", {
61
+ element,
62
+ j,
63
+ options,
64
+ })
65
+ )
66
+ changed = true
67
+ if (transformAttributeName("flexGrow", "grow", { element, j, options }))
68
+ changed = true
69
+ if (transformAttributeName("flexShrink", "shrink", { element, j, options }))
70
+ changed = true
71
+ if (transformAttributeName("flexWrap", "wrap", { element, j, options }))
72
+ changed = true
73
+
74
+ const justifyAttr = getAttribute({ element, name: "justifyContent" })
75
+ if (justifyAttr) {
76
+ const raw = getStringValue(justifyAttr)
77
+ const normalized = raw !== null ? (FLEX_START_END_MAP[raw] ?? raw) : null
78
+ if (normalized !== null && VALID_JUSTIFY_VALUES.has(normalized)) {
79
+ justifyAttr.name.name = "justify"
80
+ justifyAttr.value = j.stringLiteral(normalized)
81
+ } else {
82
+ addCommentToAttribute({
83
+ attribute: justifyAttr,
84
+ j,
85
+ text: `could not migrate to justify automatically; valid values are: ${[...VALID_JUSTIFY_VALUES].join(", ")}`,
86
+ })
87
+ }
88
+ changed = true
89
+ }
90
+
91
+ const alignAttr = getAttribute({ element, name: "alignItems" })
92
+ if (alignAttr) {
93
+ const raw = getStringValue(alignAttr)
94
+ const normalized = raw !== null ? (FLEX_START_END_MAP[raw] ?? raw) : null
95
+ if (normalized !== null && VALID_ALIGN_VALUES.has(normalized)) {
96
+ alignAttr.name.name = "align"
97
+ alignAttr.value = j.stringLiteral(normalized)
98
+ } else {
99
+ addCommentToAttribute({
100
+ attribute: alignAttr,
101
+ j,
102
+ text: `could not migrate to align automatically; valid values are: ${[...VALID_ALIGN_VALUES].join(", ")}`,
103
+ })
104
+ }
105
+ changed = true
106
+ }
107
+
108
+ return changed
109
+ },
110
+ })
@@ -0,0 +1,156 @@
1
+ import jscodeshift from "jscodeshift"
2
+ import { describe, expect, it } from "vitest"
3
+
4
+ import transform from "./flexPropToExpand"
5
+
6
+ const j = jscodeshift.withParser("tsx")
7
+
8
+ function applyTransform(source: string): string | null {
9
+ const fileInfo = { path: "test.tsx", source }
10
+ return transform(
11
+ fileInfo,
12
+ { j, jscodeshift: j, report: () => {}, stats: () => {} },
13
+ {}
14
+ ) as string | null
15
+ }
16
+
17
+ describe("flexPropToExpand transform", () => {
18
+ it("converts flex={1} to expand", () => {
19
+ const input = `
20
+ import { StackView } from "@planningcenter/tapestry-react"
21
+ export default function Test() {
22
+ return <StackView flex={1}>Test</StackView>
23
+ }
24
+ `.trim()
25
+
26
+ const result = applyTransform(input)
27
+ expect(result).toContain("expand")
28
+ expect(result).not.toContain("flex")
29
+ expect(result).not.toContain("TODO")
30
+ })
31
+
32
+ it('converts flex="1" to expand', () => {
33
+ const input = `
34
+ import { StackView } from "@planningcenter/tapestry-react"
35
+ export default function Test() {
36
+ return <StackView flex="1">Test</StackView>
37
+ }
38
+ `.trim()
39
+
40
+ const result = applyTransform(input)
41
+ expect(result).toContain("expand")
42
+ expect(result).not.toContain("flex")
43
+ expect(result).not.toContain("TODO")
44
+ })
45
+
46
+ it('expands flex="1 1 0" into grow, shrink, and basis', () => {
47
+ const input = `
48
+ import { StackView } from "@planningcenter/tapestry-react"
49
+ export default function Test() {
50
+ return <StackView flex="1 1 0">Test</StackView>
51
+ }
52
+ `.trim()
53
+
54
+ const result = applyTransform(input)
55
+ expect(result).toContain("grow={1}")
56
+ expect(result).toContain("shrink={1}")
57
+ expect(result).toContain('basis="0"')
58
+ expect(result).not.toContain("flex")
59
+ expect(result).not.toContain("TODO")
60
+ })
61
+
62
+ it('expands flex="1 0 0%" into grow, shrink, and basis', () => {
63
+ const input = `
64
+ import { StackView } from "@planningcenter/tapestry-react"
65
+ export default function Test() {
66
+ return <StackView flex="1 0 0%">Test</StackView>
67
+ }
68
+ `.trim()
69
+
70
+ const result = applyTransform(input)
71
+ expect(result).toContain("grow={1}")
72
+ expect(result).toContain("shrink={0}")
73
+ expect(result).toContain('basis="0%"')
74
+ expect(result).not.toContain("flex")
75
+ expect(result).not.toContain("TODO")
76
+ })
77
+
78
+ it('expands flex="0 0 auto" into grow, shrink, and basis', () => {
79
+ const input = `
80
+ import { StackView } from "@planningcenter/tapestry-react"
81
+ export default function Test() {
82
+ return <StackView flex="0 0 auto">Test</StackView>
83
+ }
84
+ `.trim()
85
+
86
+ const result = applyTransform(input)
87
+ expect(result).toContain("grow={0}")
88
+ expect(result).toContain("shrink={0}")
89
+ expect(result).toContain('basis="auto"')
90
+ expect(result).not.toContain("flex")
91
+ expect(result).not.toContain("TODO")
92
+ })
93
+
94
+ it("expands flex={0} into grow={0} shrink={1} basis='0'", () => {
95
+ const input = `
96
+ import { StackView } from "@planningcenter/tapestry-react"
97
+ export default function Test() {
98
+ return <StackView flex={0}>Test</StackView>
99
+ }
100
+ `.trim()
101
+
102
+ const result = applyTransform(input)
103
+ expect(result).toContain("grow={0}")
104
+ expect(result).toContain("shrink={1}")
105
+ expect(result).toContain('basis="0"')
106
+ expect(result).not.toContain("flex=")
107
+ expect(result).not.toContain("TODO")
108
+ })
109
+
110
+ it("adds a TODO for a dynamic flex value", () => {
111
+ const input = `
112
+ import { StackView } from "@planningcenter/tapestry-react"
113
+ export default function Test() {
114
+ return <StackView flex={flexValue}>Test</StackView>
115
+ }
116
+ `.trim()
117
+
118
+ const result = applyTransform(input)
119
+ expect(result).toContain("TODO")
120
+ expect(result).toContain("flex={flexValue}")
121
+ })
122
+
123
+ it('adds a TODO for flex="auto"', () => {
124
+ const input = `
125
+ import { StackView } from "@planningcenter/tapestry-react"
126
+ export default function Test() {
127
+ return <StackView flex="auto">Test</StackView>
128
+ }
129
+ `.trim()
130
+
131
+ const result = applyTransform(input)
132
+ expect(result).toContain("TODO")
133
+ })
134
+
135
+ it("returns null when StackView has no flex prop", () => {
136
+ const input = `
137
+ import { StackView } from "@planningcenter/tapestry-react"
138
+ export default function Test() {
139
+ return <StackView gap={2}>Test</StackView>
140
+ }
141
+ `.trim()
142
+
143
+ expect(applyTransform(input)).toBe(null)
144
+ })
145
+
146
+ it("returns null when StackView is not imported from tapestry-react", () => {
147
+ const input = `
148
+ import { StackView } from "some-other-package"
149
+ export default function Test() {
150
+ return <StackView flex={1}>Test</StackView>
151
+ }
152
+ `.trim()
153
+
154
+ expect(applyTransform(input)).toBe(null)
155
+ })
156
+ })