fix: [embed-react] types fix for compatible with TypeScript's "moduleResolution": "bundler"#12327
fix: [embed-react] types fix for compatible with TypeScript's "moduleResolution": "bundler"#12327PeerRich merged 4 commits intocalcom:mainfrom
Conversation
…on to comply with the standard + Update version so a new release can be rolled out + ref: calcom#11432
|
@LarsArtmann is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
…Resolution": "bundler" (#12327) Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
|
@PeerRich can you publish the https://www.npmjs.com/package/@calcom/embed-react?activeTab=versions
|
…Resolution": "bundler" (calcom#12327) Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
|
Is this ever going to be published? It's been months and this is a breaking change that prevents anyone trying to use this package from being able to compile it |
|
Since this is still not published, I wanted to share my current work around. Adding it to your scripts in the package.json will let it run after every install....
"scripts": {
"postinstall": "node fix-type.js",
}
...TypeScript versionimport fs from "node:fs"
function fixType() {
fixTypeAt("./node_modules/@calcom/embed-react/package.json")
fixTypeAt("../../node_modules/@calcom/embed-react/package.json")
}
function fixTypeAt(path: string) {
if (!fs.existsSync(path)) {
console.warn("Cannot find package.json at", path)
return
}
console.log("Found package.json at", path)
const packageJsonRaw = fs.readFileSync(path, "utf8")
const packageJson = JSON.parse(packageJsonRaw)
packageJson.exports["."].types = "./dist/embed-react/src/index.d.ts"
fs.writeFileSync(path, JSON.stringify(packageJson, null, 2))
}
fixType()JavaScript versionimport fs from "node:fs";
function fixType() {
fixTypeAt("./node_modules/@calcom/embed-react/package.json");
fixTypeAt("../../node_modules/@calcom/embed-react/package.json");
}
function fixTypeAt(path) {
if (!fs.existsSync(path)) {
console.warn("Cannot find package.json at", path);
return;
}
console.log("Found package.json at", path);
const packageJsonRaw = fs.readFileSync(path, "utf8");
const packageJson = JSON.parse(packageJsonRaw);
packageJson.exports["."].types = "./dist/embed-react/src/index.d.ts";
fs.writeFileSync(path, JSON.stringify(packageJson, null, 2));
}
fixType(); |

fix: [embed-react] types fix for compatible with TypeScript's "moduleResolution": "bundler"
References
#11432
#11408