Skip to content

Commit becab4d

Browse files
authored
Merge pull request #409 from jpudysz/feature/paths
fix: invalid redirection paths
2 parents 73d003e + 83df317 commit becab4d

File tree

7 files changed

+102
-102
lines changed

7 files changed

+102
-102
lines changed

docs/src/content/docs/v3/other/babel-plugin.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const ref = useRef()
144144
```
145145

146146
```ts title="Babel transform"
147-
import { View } from 'react-native-unistyles/components/native/View'
147+
import { View } from 'react-native-unistyles/src/components/native/View'
148148
149149
const ref = useRef()
150150

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"main": "lib/commonjs/index",
1515
"module": "lib/module/index",
1616
"types": "lib/typescript/src/index.d.ts",
17-
"react-native": "src",
18-
"source": "src",
17+
"react-native": "src/index",
18+
"source": "src/index",
1919
"files": [
2020
"src",
2121
"lib",

plugin/__tests__/dependencies.spec.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ pluginTester({
4444
}))
4545
`,
4646
output: `
47-
import { Text } from 'react-native-unistyles/components/native/Text'
48-
import { View } from 'react-native-unistyles/components/native/View'
47+
import { Text } from 'react-native-unistyles/src/components/native/Text'
48+
import { View } from 'react-native-unistyles/src/components/native/View'
4949
5050
import { StyleSheet } from 'react-native-unistyles'
5151
@@ -102,8 +102,8 @@ pluginTester({
102102
}))
103103
`,
104104
output: `
105-
import { Text } from 'react-native-unistyles/components/native/Text'
106-
import { View } from 'react-native-unistyles/components/native/View'
105+
import { Text } from 'react-native-unistyles/src/components/native/Text'
106+
import { View } from 'react-native-unistyles/src/components/native/View'
107107
108108
import { StyleSheet } from 'react-native-unistyles'
109109
@@ -154,8 +154,8 @@ pluginTester({
154154
}))
155155
`,
156156
output: `
157-
import { Text } from 'react-native-unistyles/components/native/Text'
158-
import { View } from 'react-native-unistyles/components/native/View'
157+
import { Text } from 'react-native-unistyles/src/components/native/Text'
158+
import { View } from 'react-native-unistyles/src/components/native/View'
159159
160160
import { StyleSheet } from 'react-native-unistyles'
161161
@@ -264,8 +264,8 @@ pluginTester({
264264
}))
265265
`,
266266
output: `
267-
import { Text } from 'react-native-unistyles/components/native/Text'
268-
import { View } from 'react-native-unistyles/components/native/View'
267+
import { Text } from 'react-native-unistyles/src/components/native/Text'
268+
import { View } from 'react-native-unistyles/src/components/native/View'
269269
270270
import { StyleSheet } from 'react-native-unistyles'
271271
@@ -386,8 +386,8 @@ pluginTester({
386386
}))
387387
`,
388388
output: `
389-
import { Text } from 'react-native-unistyles/components/native/Text'
390-
import { View } from 'react-native-unistyles/components/native/View'
389+
import { Text } from 'react-native-unistyles/src/components/native/Text'
390+
import { View } from 'react-native-unistyles/src/components/native/View'
391391
392392
import { StyleSheet } from 'react-native-unistyles'
393393
@@ -441,8 +441,8 @@ pluginTester({
441441
}))
442442
`,
443443
output: `
444-
import { Text } from 'react-native-unistyles/components/native/Text'
445-
import { View } from 'react-native-unistyles/components/native/View'
444+
import { Text } from 'react-native-unistyles/src/components/native/Text'
445+
import { View } from 'react-native-unistyles/src/components/native/View'
446446
447447
import { StyleSheet } from 'react-native-unistyles'
448448
@@ -488,8 +488,8 @@ pluginTester({
488488
}))
489489
`,
490490
output: `
491-
import { Text } from 'react-native-unistyles/components/native/Text'
492-
import { View } from 'react-native-unistyles/components/native/View'
491+
import { Text } from 'react-native-unistyles/src/components/native/Text'
492+
import { View } from 'react-native-unistyles/src/components/native/View'
493493
494494
import { StyleSheet } from 'react-native-unistyles'
495495
@@ -538,8 +538,8 @@ pluginTester({
538538
}))
539539
`,
540540
output: `
541-
import { Text } from 'react-native-unistyles/components/native/Text'
542-
import { View } from 'react-native-unistyles/components/native/View'
541+
import { Text } from 'react-native-unistyles/src/components/native/Text'
542+
import { View } from 'react-native-unistyles/src/components/native/View'
543543
544544
import { StyleSheet } from 'react-native-unistyles'
545545
@@ -608,8 +608,8 @@ pluginTester({
608608
}))
609609
`,
610610
output: `
611-
import { Text } from 'react-native-unistyles/components/native/Text'
612-
import { View } from 'react-native-unistyles/components/native/View'
611+
import { Text } from 'react-native-unistyles/src/components/native/Text'
612+
import { View } from 'react-native-unistyles/src/components/native/View'
613613
614614
import { StyleSheet } from 'react-native-unistyles'
615615
@@ -680,8 +680,8 @@ pluginTester({
680680
}))
681681
`,
682682
output: `
683-
import { Text } from 'react-native-unistyles/components/native/Text'
684-
import { View } from 'react-native-unistyles/components/native/View'
683+
import { Text } from 'react-native-unistyles/src/components/native/Text'
684+
import { View } from 'react-native-unistyles/src/components/native/View'
685685
686686
import { StyleSheet } from 'react-native-unistyles'
687687

plugin/__tests__/ref.spec.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ pluginTester({
7070
})
7171
`,
7272
output: `
73-
import { Text } from 'react-native-unistyles/components/native/Text'
74-
import { View } from 'react-native-unistyles/components/native/View'
73+
import { Text } from 'react-native-unistyles/src/components/native/Text'
74+
import { View } from 'react-native-unistyles/src/components/native/View'
7575
7676
export const Example = () => {
7777
return (
@@ -112,7 +112,7 @@ pluginTester({
112112
})
113113
`,
114114
output: `
115-
import { View } from 'react-native-unistyles/components/native/View'
115+
import { View } from 'react-native-unistyles/src/components/native/View'
116116
117117
import { Text } from 'custom-lib'
118118
@@ -161,8 +161,8 @@ pluginTester({
161161
})
162162
`,
163163
output: `
164-
import { Text } from 'react-native-unistyles/components/native/Text'
165-
import { View } from 'react-native-unistyles/components/native/View'
164+
import { Text } from 'react-native-unistyles/src/components/native/Text'
165+
import { View } from 'react-native-unistyles/src/components/native/View'
166166
import React from 'react'
167167
168168
import { StyleSheet } from 'react-native-unistyles'
@@ -217,8 +217,8 @@ pluginTester({
217217
})
218218
`,
219219
output: `
220-
import { Text } from 'react-native-unistyles/components/native/Text'
221-
import { View } from 'react-native-unistyles/components/native/View'
220+
import { Text } from 'react-native-unistyles/src/components/native/Text'
221+
import { View } from 'react-native-unistyles/src/components/native/View'
222222
import { useRef } from 'react'
223223
224224
import { StyleSheet } from 'react-native-unistyles'
@@ -283,8 +283,8 @@ pluginTester({
283283
})
284284
`,
285285
output: `
286-
import { Text } from 'react-native-unistyles/components/native/Text'
287-
import { View } from 'react-native-unistyles/components/native/View'
286+
import { Text } from 'react-native-unistyles/src/components/native/Text'
287+
import { View } from 'react-native-unistyles/src/components/native/View'
288288
import React from 'react'
289289
290290
import { StyleSheet } from 'react-native-unistyles'
@@ -354,8 +354,8 @@ pluginTester({
354354
})
355355
`,
356356
output: `
357-
import { Text } from 'react-native-unistyles/components/native/Text'
358-
import { View } from 'react-native-unistyles/components/native/View'
357+
import { Text } from 'react-native-unistyles/src/components/native/Text'
358+
import { View } from 'react-native-unistyles/src/components/native/View'
359359
import React from 'react'
360360
361361
import { StyleSheet } from 'react-native-unistyles'
@@ -423,8 +423,8 @@ pluginTester({
423423
})
424424
`,
425425
output: `
426-
import { Text } from 'react-native-unistyles/components/native/Text'
427-
import { View } from 'react-native-unistyles/components/native/View'
426+
import { Text } from 'react-native-unistyles/src/components/native/Text'
427+
import { View } from 'react-native-unistyles/src/components/native/View'
428428
import React from 'react'
429429
430430
import { StyleSheet } from 'react-native-unistyles'
@@ -486,7 +486,7 @@ pluginTester({
486486
}))
487487
`,
488488
output: `
489-
import { View } from 'react-native-unistyles/components/native/View'
489+
import { View } from 'react-native-unistyles/src/components/native/View'
490490
491491
import { StyleSheet } from 'react-native-unistyles'
492492
@@ -538,7 +538,7 @@ pluginTester({
538538
}))
539539
`,
540540
output: `
541-
import { View } from 'react-native-unistyles/components/native/View'
541+
import { View } from 'react-native-unistyles/src/components/native/View'
542542
543543
import { StyleSheet } from 'react-native-unistyles'
544544
@@ -582,7 +582,7 @@ pluginTester({
582582
}))
583583
`,
584584
output: `
585-
import { View } from 'react-native-unistyles/components/native/View'
585+
import { View } from 'react-native-unistyles/src/components/native/View'
586586
587587
import { StyleSheet } from 'react-native-unistyles'
588588

0 commit comments

Comments
 (0)