Skip to content

Commit

Permalink
fix: invalid redirection paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jpudysz committed Dec 10, 2024
1 parent 82b5bf9 commit 83df317
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion docs/src/content/docs/v3/other/babel-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const ref = useRef()
```

```ts title="Babel transform"
import { View } from 'react-native-unistyles/components/native/View'
import { View } from 'react-native-unistyles/src/components/native/View'
const ref = useRef()
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"main": "lib/commonjs/index",
"module": "lib/module/index",
"types": "lib/typescript/src/index.d.ts",
"react-native": "src",
"source": "src",
"react-native": "src/index",
"source": "src/index",
"files": [
"src",
"lib",
Expand Down
40 changes: 20 additions & 20 deletions plugin/__tests__/dependencies.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -102,8 +102,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -154,8 +154,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -264,8 +264,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -386,8 +386,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -441,8 +441,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -488,8 +488,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -538,8 +538,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -608,8 +608,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -680,8 +680,8 @@ pluginTester({
}))
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down
32 changes: 16 additions & 16 deletions plugin/__tests__/ref.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ pluginTester({
})
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
export const Example = () => {
return (
Expand Down Expand Up @@ -112,7 +112,7 @@ pluginTester({
})
`,
output: `
import { View } from 'react-native-unistyles/components/native/View'
import { View } from 'react-native-unistyles/src/components/native/View'
import { Text } from 'custom-lib'
Expand Down Expand Up @@ -161,8 +161,8 @@ pluginTester({
})
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import React from 'react'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -217,8 +217,8 @@ pluginTester({
})
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import { useRef } from 'react'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -283,8 +283,8 @@ pluginTester({
})
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import React from 'react'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -354,8 +354,8 @@ pluginTester({
})
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import React from 'react'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -423,8 +423,8 @@ pluginTester({
})
`,
output: `
import { Text } from 'react-native-unistyles/components/native/Text'
import { View } from 'react-native-unistyles/components/native/View'
import { Text } from 'react-native-unistyles/src/components/native/Text'
import { View } from 'react-native-unistyles/src/components/native/View'
import React from 'react'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -486,7 +486,7 @@ pluginTester({
}))
`,
output: `
import { View } from 'react-native-unistyles/components/native/View'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -538,7 +538,7 @@ pluginTester({
}))
`,
output: `
import { View } from 'react-native-unistyles/components/native/View'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down Expand Up @@ -582,7 +582,7 @@ pluginTester({
}))
`,
output: `
import { View } from 'react-native-unistyles/components/native/View'
import { View } from 'react-native-unistyles/src/components/native/View'
import { StyleSheet } from 'react-native-unistyles'
Expand Down
Loading

0 comments on commit 83df317

Please sign in to comment.