309340d3f3
* fix: add missing peer dependencies and fix inconsistent peer dependency declarations - @calcom/ui: Move react from dependencies to peerDependencies (was inconsistent with react-dom being a peer) - @calcom/emails: Move react and react-dom to peerDependencies - @coss/ui: Add react and react-dom as peerDependencies (uses lucide-react and @base-ui/react) - @calcom/app-store: Add react, react-dom, zod as peerDependencies (depends on @calcom/features which has these peers) - @calcom/platform-libraries: Add react, react-dom, stripe, zod as peerDependencies (depends on @calcom/features) - @calcom/features: Add next as peerDependency (depends on @calcom/trpc which has next as peer), update react/react-dom to flexible version ranges - @calcom/features/ee: Add react, react-dom, react-hook-form as peerDependencies (uses @calcom/ui and @hookform packages) Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * fix: add more peer dependencies for PnP compatibility Additional changes: - @calcom/app-store: Move stripe from dependencies to peerDependencies - @calcom/ui: Move @tanstack/react-query to peerDependencies (singleton pattern) - @calcom/trpc: Move @tanstack/react-query to peerDependencies (singleton pattern) - @calcom/atoms: Move @tanstack/react-query to peerDependencies (singleton pattern) - @calcom/stripepayment: Add react, react-dom, stripe as peerDependencies - @calcom/caldavcalendar: Add react, react-dom, react-hook-form as peerDependencies - @calcom/exchange2013calendar: Add react, react-dom, react-hook-form as peerDependencies - @calcom/exchange2016calendar: Add react, react-dom, react-hook-form as peerDependencies - @calcom/ics-feed: Add react, react-dom, react-hook-form as peerDependencies Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * fix: revert dependency moves for packages with own builds Packages with their own build step should not have dependencies moved to peerDependencies as they need those deps at build time. Reverted: - @calcom/trpc: Keep @tanstack/react-query out of peerDependencies - @calcom/atoms: Restore @tanstack/react-query to dependencies - @calcom/stripepayment: Restore stripe to dependencies Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
How to work with platform libraries in Dev
We version this package using NPM: https://www.npmjs.com/package/@calcom/platform-libraries?activeTab=code
Here is the workflow:
- If you change platform libraries for the first time, then run
yarn localto build them locally for the first time. This will also make v2 api point to the local libraries. - If you change them for the second time, then run
yarn build:devto re-build them. - Once you are happy with platform libraries:
- run
yarn publish-npm- it will check "@calcom/platform-libraries" version in npm and update it's package.json to the next version and then it will publish the package to npm, update the version of "@calcom/platform-libraries" in the api v2 package.json, reset "@calcom/platform-libraries" to 0.0.0 and run yarn install.
Before Merging to main
- Publish Your Version of Libraries on NPM:
- To publish, ensure you are a contributor to the platform libraries' NPM package.
- Authenticate yourself via the CLI using npm auth.
- Increment the version number accordingly.
- Run yarn publish to publish your version.
- Once it's published, change back the version in packages/platform/libraries/package.json back to 0.0.0
- Run yarn
- You should now be using the npm package instead of the locally built version
When to publish new version of platform libraries
- New exports in the index.js of platform libraries
- Code change in the functions already exported
- Prisma schema change breaking implementation of functions in the currently used releases of platform libraries