fix: Booking atom phone booking field and booking fields order (#18678)

* chore: examples app make managed user admin

* fix: phone field not appearing

* fix: booking fields order

* feat: local libraries setup script

* chore: add log when parsing booking field fails

* fix: backwards compatbile name booking field

* chore: libraries publish support scripts

* chore: bump libraries

* docs

* fix: phone default field return label and placeholder

* fix: e2e tests
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-01-16 11:10:06 +02:00
1 parent 79a8ab79f8
commit f582faed2b
15 files changed
+336 -163

No files matched your search

+8 -26
View File
@@ -1,34 +1,16 @@
# How to work with platform libraries in Dev
whenever you want to change anything in platform libraries, or if you modify the code of one of the functions imported in libraries you will need to build the code again.
first thing to know is that we version this package using NPM
We version this package using NPM:
https://www.npmjs.com/package/@calcom/platform-libraries?activeTab=code
In order to work using the locally built platform libraries you need to:
Here is the workflow:
1. If you change platform libraries for the first time, then run `yarn local` to build them locally for the first time. This will also make v2 api point to the local libraries.
2. If you change them for the second time, then run `yarn build:dev` to re-build them.
3. Once you are happy with platform libraries:
- run `yarn publish` - 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 np.
- run `yarn postpublish` - it will 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.
- in packages/platform/libraries/package.json set the version to for example 1.2.3
- in apps/api/v2/package.json add to dependencies:
"@calcom/platform-libraries-1.2.3": "npm:@calcom/platform-libraries@1.2.3"
- in api v2 code simply import using the new alias:
import {
getAllUserBookings as getAllUserBookings1.2.3,
} from "@calcom/platform-libraries-1.2.3";
since the versions are matching in both package.json yarn will try to use the locally built code
now go to packages/platform/libraries and do
- yarn build:dev
then go back to /apps/api/v2 and run
- yarn
- yarn dev
note(Lauris) - we could have 1 publish script but the problem is that `yarn publish` does not exit for some reason.
# Before Merging to main