palantir / osdk-ts

Typescript related OSDK libraries
11 stars 15 forks source link

Fix circular deps in package to avoid warnings in react-native #943

Open nihalbhatnagar opened 1 week ago

nihalbhatnagar commented 1 week ago

We get this warning in expo/react-native:

λ node_modules/expo-router/node/render.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (974/974)λ  WARN  Require cycle: node_modules/@osdk/client/build/browser/objectSet/createObjectSet.js -> node_modules/@osdk/client/build/browser/object/fetchPage.js -> node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects.js -> node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js -> node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects/getDollarLink.js -> node_modules/@osdk/client/build/browser/objectSet/createObjectSet.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. 
  factory (node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects/getDollarLink.js:16:1)
  factory (node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js:20:1)
λ  WARN  Require cycle: node_modules/@osdk/client/build/browser/object/fetchPage.js -> node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects.js -> node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js -> node_modules/@osdk/client/build/browser/object/convertWireToOsdkObjects/getDollarLink.js -> node_modules/@osdk/client/build/browser/object/fetchSingle.js -> node_modules/@osdk/client/build/browser/object/fetchPage.js