@tamagui/static 1.0.1-beta.171 → 1.0.1-beta.172

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.
package/dist/require.js CHANGED
@@ -62,14 +62,12 @@ function registerRequire() {
62
62
  const out = og.apply(this, arguments);
63
63
  return out;
64
64
  } catch (err) {
65
- if (import_constants.SHOULD_DEBUG) {
66
- console.error(
67
- `Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring
65
+ console.error(
66
+ `Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring
68
67
  `,
69
- err.message,
70
- err.stack
71
- );
72
- }
68
+ err.message,
69
+ err.stack
70
+ );
73
71
  const max = process.env.TAMAGUI_MAX_ERRORS ? +process.env.TAMAGUI_MAX_ERRORS : 200;
74
72
  if (++tries > max) {
75
73
  console.log(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/require.ts"],
4
- "sourcesContent": ["import { join, sep } from 'path'\n\nimport type { StaticConfig } from '@tamagui/core-node'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\n// just for catching egregious amounts of errors in a tight loop\nlet tries = 0\nsetInterval(() => {\n tries = 0\n}, 50)\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (SHOULD_DEBUG) {\n // eslint-disable-next-line no-console\n console.log('tamagui:require', path)\n }\n if (path.endsWith('.css') || path.endsWith('.json') || path.endsWith('.ttf')) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n if (SHOULD_DEBUG) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring\\n`,\n err.message,\n err.stack\n )\n }\n const max = process.env.TAMAGUI_MAX_ERRORS ? +process.env.TAMAGUI_MAX_ERRORS : 200\n if (++tries > max) {\n // eslint-disable-next-line no-console\n console.log(\n `Too many errors loading design system, exiting (set TAMAGUI_MAX_ERRORS to override)..`\n )\n // avoid infinite loops\n process.exit(1)\n }\n // return proxyWorm by default\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA0B;AAI1B,uBAA6B;AAE7B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,eAAe;AAEnB,MAAM,iBAAiB,MAAM;AAGpC,IAAI,QAA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O,UAAU,UAAU;AAC7B;",
4
+ "sourcesContent": ["import { join, sep } from 'path'\n\nimport type { StaticConfig } from '@tamagui/core-node'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\n// just for catching egregious amounts of errors in a tight loop\nlet tries = 0\nsetInterval(() => {\n tries = 0\n}, 50)\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (SHOULD_DEBUG) {\n // eslint-disable-next-line no-console\n console.log('tamagui:require', path)\n }\n if (path.endsWith('.css') || path.endsWith('.json') || path.endsWith('.ttf')) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring\\n`,\n err.message,\n err.stack\n )\n const max = process.env.TAMAGUI_MAX_ERRORS ? +process.env.TAMAGUI_MAX_ERRORS : 200\n if (++tries > max) {\n // eslint-disable-next-line no-console\n console.log(\n `Too many errors loading design system, exiting (set TAMAGUI_MAX_ERRORS to override)..`\n )\n // avoid infinite loops\n process.exit(1)\n }\n // return proxyWorm by default\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA0B;AAI1B,uBAA6B;AAE7B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,eAAe;AAEnB,MAAM,iBAAiB,MAAM;AAGpC,IAAI,QAAQ;AACZ,YAAY,MAAM;AAChB,UAAQ;AACV,GAAG,EAAE;AAEE,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,cAAc;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AACjD,QAAI,+BAAc;AAEhB,cAAQ,IAAI,mBAAmB,IAAI;AAAA,IACrC;AACA,QAAI,KAAK,SAAS,MAAM,KAAK,KAAK,SAAS,OAAO,KAAK,KAAK,SAAS,MAAM,GAAG;AAC5E,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc,KAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,eAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,iBAAiB;AAC5B,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAEA,cAAQ;AAAA,QACN,4BAA4B;AAAA;AAAA,QAC5B,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AACA,YAAM,MAAM,QAAQ,IAAI,qBAAqB,CAAC,QAAQ,IAAI,qBAAqB;AAC/E,UAAI,EAAE,QAAQ,KAAK;AAEjB,gBAAQ;AAAA,UACN;AAAA,QACF;AAEA,gBAAQ,KAAK,CAAC;AAAA,MAChB;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "1.0.1-beta.171",
3
+ "version": "1.0.1-beta.172",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "dist",
@@ -37,17 +37,17 @@
37
37
  "@babel/runtime": "^7.18.9",
38
38
  "@babel/traverse": "^7.18.11",
39
39
  "@expo/match-media": "^0.3.0",
40
- "@tamagui/build": "^1.0.1-beta.171",
41
- "@tamagui/cli-color": "^1.0.1-beta.171",
42
- "@tamagui/config-default-node": "^1.0.1-beta.171",
43
- "@tamagui/core-node": "^1.0.1-beta.171",
44
- "@tamagui/fake-react-native": "^1.0.1-beta.171",
45
- "@tamagui/helpers": "^1.0.1-beta.171",
46
- "@tamagui/helpers-node": "^1.0.1-beta.171",
47
- "@tamagui/patch-rnw": "^1.0.1-beta.171",
48
- "@tamagui/proxy-worm": "^1.0.1-beta.171",
49
- "@tamagui/react-native-svg": "^1.0.1-beta.171",
50
- "@tamagui/shorthands": "^1.0.1-beta.171",
40
+ "@tamagui/build": "^1.0.1-beta.172",
41
+ "@tamagui/cli-color": "^1.0.1-beta.172",
42
+ "@tamagui/config-default-node": "^1.0.1-beta.172",
43
+ "@tamagui/core-node": "^1.0.1-beta.172",
44
+ "@tamagui/fake-react-native": "^1.0.1-beta.172",
45
+ "@tamagui/helpers": "^1.0.1-beta.172",
46
+ "@tamagui/helpers-node": "^1.0.1-beta.172",
47
+ "@tamagui/patch-rnw": "^1.0.1-beta.172",
48
+ "@tamagui/proxy-worm": "^1.0.1-beta.172",
49
+ "@tamagui/react-native-svg": "^1.0.1-beta.172",
50
+ "@tamagui/shorthands": "^1.0.1-beta.172",
51
51
  "babel-literal-to-ast": "^2.1.0",
52
52
  "esbuild": "^0.15.6",
53
53
  "esbuild-register": "^3.3.3",
@@ -55,8 +55,8 @@
55
55
  "fs-extra": "^10.1.0",
56
56
  "invariant": "^2.2.4",
57
57
  "lodash": "^4.17.21",
58
- "react-native-web-lite": "^1.0.1-beta.171",
59
- "tamagui": "^1.0.1-beta.171"
58
+ "react-native-web-lite": "^1.0.1-beta.172",
59
+ "tamagui": "^1.0.1-beta.172"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/plugin-syntax-typescript": "^7.18.6",
package/src/require.ts CHANGED
@@ -82,14 +82,12 @@ export function registerRequire() {
82
82
  // }
83
83
  return out
84
84
  } catch (err: any) {
85
- if (SHOULD_DEBUG) {
86
- // eslint-disable-next-line no-console
87
- console.error(
88
- `Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring\n`,
89
- err.message,
90
- err.stack
91
- )
92
- }
85
+ // eslint-disable-next-line no-console
86
+ console.error(
87
+ `Tamagui failed requiring ${path} from your tamagui.config.ts file, ignoring\n`,
88
+ err.message,
89
+ err.stack
90
+ )
93
91
  const max = process.env.TAMAGUI_MAX_ERRORS ? +process.env.TAMAGUI_MAX_ERRORS : 200
94
92
  if (++tries > max) {
95
93
  // eslint-disable-next-line no-console