@tamagui/proxy-worm 1.0.1-beta.99 → 1.0.1-rc.0.1

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.
@@ -0,0 +1,17 @@
1
+ import { View } from 'react-native'
2
+
3
+ export default new Proxy(
4
+ {
5
+ get default() {
6
+ return View
7
+ },
8
+ },
9
+ {
10
+ get(_, key) {
11
+ if (key === 'createAnimatedComponent') {
12
+ return (x) => x
13
+ }
14
+ return View
15
+ },
16
+ }
17
+ )
package/index.js CHANGED
@@ -8,11 +8,28 @@ function worm(root = false) {
8
8
  },
9
9
  }
10
10
  : function () {
11
+ // dev warning in debug mode
12
+ if (process.env.NODE_ENV === 'development' && process.env.DEBUG?.startsWith('tamagui')) {
13
+ // eslint-disable-next-line no-console
14
+ console.warn(`
15
+
16
+ This has been excluded via Tamagui!
17
+ Check "excludeReactNativeWebExports" setting and include it to fix.
18
+
19
+ ${new Error().stack}
20
+
21
+ `)
22
+ }
23
+
11
24
  return worm()
12
25
  }
13
26
 
27
+ obj.displayName = `ProxyWorm - Check excludeReactNativeWebExports`
28
+ obj._isProxyWorm = true
29
+
14
30
  return new Proxy(obj, {
15
- get() {
31
+ get(_, key) {
32
+ if (Reflect.has(obj, key)) return Reflect.get(obj, key)
16
33
  return worm()
17
34
  },
18
35
  apply() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/proxy-worm",
3
- "version": "1.0.1-beta.99",
3
+ "version": "1.0.1-rc.0.1",
4
4
  "main": "index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,5 +9,12 @@
9
9
  "build": "true",
10
10
  "watch": "true"
11
11
  },
12
+ "exports": {
13
+ "./empty-react-native-view": {
14
+ "import": "./empty-react-native-view.mjs",
15
+ "require": "./empty-react-native-view.js"
16
+ },
17
+ ".": "./index.js"
18
+ },
12
19
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14"
13
20
  }
@@ -1 +0,0 @@
1
- @tamagui/proxy-worm:build: cache hit, replaying output b5f3098e5a4174b2