[SDK] Pure ESM (#18427)

# Introduction
While testing the sdk and overall apps in
https://github.com/prastoin/twenty-app-hello-world
Faced a lot of pure `CJS` external dependencies import issue

Replaced all the cjs deps to either esm equivalent or node native
replacement
This commit is contained in:
Paul Rastoin
2026-03-05 17:19:01 +01:00
committed by GitHub
parent cfeea43eaf
commit 57d8954973
41 changed files with 574 additions and 243 deletions
@@ -1,8 +1,9 @@
import { AppDevCommand } from '@/cli/commands/app/app-dev';
import * as fs from 'fs-extra';
import { join } from 'path';
import { OUTPUT_DIR } from 'twenty-shared/application';
import { AppDevCommand } from '@/cli/commands/app/app-dev';
import { pathExists } from '@/cli/utilities/file/fs-utils';
export type RunAppDevResult = {
success: boolean;
events?: { message: string; status: string }[];
@@ -23,7 +24,7 @@ export const runAppDevInProcess = async (options: {
const startTime = Date.now();
while (Date.now() - startTime < timeout) {
if (await fs.pathExists(manifestPath)) {
if (await pathExists(manifestPath)) {
await new Promise((resolve) => setTimeout(resolve, 500));
await command.close();