Skip to content

Commit d27490e

Browse files
authored
fix: atoms dist size (calcom#22148)
* fix: reduce atoms dist size * test changesets entry * bump version
1 parent b3c191b commit d27490e

5 files changed

Lines changed: 32 additions & 39 deletions

File tree

.changeset/silly-lamps-create.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@calcom/atoms": patch
3+
---
4+
5+
test release

packages/platform/atoms/CHANGELOG.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
## 1.0.108
2-
3-
## 1.0.112
4-
5-
### Patch Changes
6-
7-
- [#22134](https://github.com/calcom/cal.com/pull/22134) [`3437c43`](https://github.com/calcom/cal.com/commit/3437c4331da892bd77afaea84be2db196543a207) Thanks [@supalarry](https://github.com/supalarry)! - ignore this test log
8-
9-
## 1.0.110
10-
11-
### Patch Changes
12-
13-
- [#22107](https://github.com/calcom/cal.com/pull/22107) [`88a2bd3`](https://github.com/calcom/cal.com/commit/88a2bd3317a2cfaf6b367524e2736445544dbd63) Thanks [@supalarry](https://github.com/supalarry)! - test log can ignore
14-
15-
### Patch Changes
16-
17-
- [#22103](https://github.com/calcom/cal.com/pull/22103) [`61274bc`](https://github.com/calcom/cal.com/commit/61274bc7efc67b162d46b59cd75bd376ad515c51) Thanks [@supalarry](https://github.com/supalarry)! - testing changesets - can ignore this
18-
19-
## 1.0.107
20-
21-
### Patch Changes
22-
23-
- [#22095](https://github.com/calcom/cal.com/pull/22095) [`3c43ce4`](https://github.com/calcom/cal.com/commit/3c43ce4165bce1da29b203d5f2eb62090c5fddd2) Thanks [@supalarry](https://github.com/supalarry)! - test by updating changelog
24-
25-
- [#21864](https://github.com/calcom/cal.com/pull/21864) [`540bf86`](https://github.com/calcom/cal.com/commit/540bf868b5b60a98d9d3aeb565e2089f15c3dfd3) Thanks [@supalarry](https://github.com/supalarry)! - fix saving event type settings
261

272
## 1.0.63
283

packages/platform/atoms/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"description": "Customizable UI components to integrate scheduling into your product.",
66
"authors": "Cal.com, Inc.",
7-
"version": "1.0.112",
7+
"version": "1.0.113",
88
"scripts": {
99
"dev": "yarn vite build --watch & npx tailwindcss -i ./globals.css -o ./globals.min.css --postcss --minify --watch",
1010
"build": "NODE_OPTIONS='--max_old_space_size=12288' rm -rf dist && yarn vite build && npx tailwindcss -i ./globals.css -o ./globals.min.css --postcss --minify && mkdir ./dist/packages/prisma-client && cp -rf ../../../node_modules/.prisma/client/*.d.ts ./dist/packages/prisma-client",
@@ -37,11 +37,9 @@
3737
"dist",
3838
"globals.min.css"
3939
],
40-
"main": "./dist/cal-atoms.umd.cjs",
4140
"module": "./dist/cal-atoms.js",
4241
"exports": {
4342
".": {
44-
"require": "./dist/cal-atoms.umd.cjs",
4543
"import": "./dist/cal-atoms.js",
4644
"types": "./dist/index.d.ts"
4745
},

packages/platform/atoms/tsconfig.json

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,32 @@
3131
"../../types/@wojtekmaj__react-daterange-picker.d.ts",
3232
"../../types/business-days-plugin.d.ts",
3333
"../../types/window.d.ts",
34-
"../../lib",
35-
"../../features",
3634
"../types",
3735
"../constants",
3836
"../utils",
3937
"../libraries",
40-
"../../prisma",
4138
"../../dayjs",
42-
"../../trpc",
43-
"../../app-store"
39+
"../../prisma/zod-utils.ts",
40+
"../../prisma/zod",
41+
"../../trpc/react",
42+
"../../trpc/server/routers/viewer/slots",
43+
"../../trpc/server/types",
44+
"../../features/eventtypes",
45+
"../../features/schedules",
46+
"../../features/bookings/Booker",
47+
"../../features/bookings/Booker",
48+
"../../features/instant-meeting",
49+
"../../features/bookings/handleMarkNoShow.ts",
50+
"../../features/bookings/types.ts",
51+
"../../features/bookings/lib",
52+
"../../features/ee/workflows",
53+
"../../features/ee/payments",
54+
"../../features/ee/round-robin",
55+
"../../features/ee/billing",
56+
"../../features/shell",
57+
"../../features/components",
58+
"../../features/form-builder",
59+
"../../features/data-table"
4460
],
4561
"exclude": [
4662
"dist",

packages/platform/atoms/vite.config.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import path from "path";
33
import { resolve } from "path";
44
import { defineConfig, loadEnv } from "vite";
55
import dts from "vite-plugin-dts";
6-
import Inspect from "vite-plugin-inspect";
76

87
export default defineConfig(({ mode }) => {
98
const env = loadEnv(mode, process.cwd(), ""); // .env inside of packages/platform/atoms
@@ -20,25 +19,24 @@ export default defineConfig(({ mode }) => {
2019
"@calcom/platform-utils",
2120
],
2221
},
23-
plugins: [Inspect(), react(), dts({ insertTypesEntry: true })],
22+
plugins: [react(), dts({ insertTypesEntry: true })],
2423
define: {
2524
"process.env.NEXT_PUBLIC_WEBAPP_URL": `"${webAppUrl}"`,
2625
},
2726
ssr: {
2827
noExternal: ["turndown"], // Example if you want to disable SSR for your library
2928
},
3029
build: {
31-
commonjsOptions: {
32-
include: [/@calcom\/lib/, /@calcom\/features/, /node_modules/],
33-
},
3430
lib: {
3531
entry: [resolve(__dirname, "index.ts")],
3632
name: "CalAtoms",
3733
fileName: "cal-atoms",
34+
formats: ["es"],
3835
},
3936
rollupOptions: {
40-
external: ["react", "fs", "path", "os", "react-dom", "react-awesome-query-builder"],
37+
external: ["react", "fs", "path", "os", "react/jsx-runtime", "react-dom", "react-dom/client"],
4138
output: {
39+
format: "esm", // Force ESM output
4240
globals: {
4341
react: "React",
4442
"react-dom": "ReactDOM",
@@ -58,6 +56,7 @@ export default defineConfig(({ mode }) => {
5856
"@radix-ui/react-dialog": path.resolve(__dirname, "./src/components/ui/dialog.tsx"),
5957
".prisma/client": path.resolve(__dirname, "../../prisma-client"),
6058
"@prisma/client": path.resolve(__dirname, "../../prisma-client"),
59+
"@calcom/prisma/client": path.resolve(__dirname, "../../prisma-client"),
6160
"@calcom/prisma": path.resolve(__dirname, "../../prisma"),
6261
"@calcom/dayjs": path.resolve(__dirname, "../../dayjs"),
6362
"@calcom/platform-constants": path.resolve(__dirname, "../constants/index.ts"),

0 commit comments

Comments
 (0)