Skip to content

Add base application project yarn release file#16238

Merged
charlesBochet merged 8 commits intomainfrom
add-back-yarn-utils-in-base-app-project
Dec 2, 2025
Merged

Add base application project yarn release file#16238
charlesBochet merged 8 commits intomainfrom
add-back-yarn-utils-in-base-app-project

Conversation

@martmull
Copy link
Copy Markdown
Contributor

@martmull martmull commented Dec 2, 2025

As title

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Dec 2, 2025

Greptile Overview

Greptile Summary

Refactored create-twenty-app to use static template files instead of programmatically generating configuration files. This adds the yarn 4.9.2 release binary, .nvmrc, .yarnrc.yml, eslint.config.mjs, and tsconfig.json as static files that get copied during project creation.

  • Added two-step build process in project.json: TypeScript compilation followed by copying static template files to dist
  • Added new .gitignore generation in app-template.ts to properly exclude .yarn/* but preserve releases directory
  • The .yarnrc.yml now correctly includes yarnPath configuration (was missing before)
  • New ESLint config provides comprehensive linting rules aligned with the main project
  • Yarn release file is identical to the main project's (verified by checksum)

Confidence Score: 5/5

  • This PR is safe to merge - straightforward refactoring that improves maintainability of template generation.
  • The changes are well-structured and improve code organization. The yarn release binary matches the main project's checksum, configuration files are standard, and the build process correctly handles copying static files.
  • No files require special attention.

Important Files Changed

File Analysis

Filename Score Overview
packages/create-twenty-app/src/utils/app-template.ts 5/5 Refactored to copy static template files instead of generating them programmatically. Added new createGitignore function and removed inline config generation functions.
packages/create-twenty-app/project.json 5/5 Added two-step build process: before-build runs TypeScript compilation, build copies static template files to dist.
packages/create-twenty-app/src/constants/base-application/.yarnrc.yml 5/5 Yarn configuration with yarnPath pointing to bundled release and nodeLinker: node-modules.
packages/create-twenty-app/src/constants/base-application/eslint.config.mjs 5/5 New ESLint flat config with TypeScript, import, prettier, and unused-imports rules aligned with main project.
packages/create-twenty-app/src/constants/base-application/tsconfig.json 4/5 TypeScript config with strict settings. Contains trailing comma after resolveJsonModule which is non-standard JSON but accepted by TS parser.

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as create-twenty-app CLI
    participant FS as File System
    participant Template as base-application/

    User->>CLI: npx create-twenty-app
    CLI->>FS: fs.copy(base-application/, appDir/)
    Note over FS: Copies .nvmrc, .yarnrc.yml,<br/>eslint.config.mjs, tsconfig.json,<br/>.yarn/releases/yarn-4.9.2.cjs
    CLI->>FS: createPackageJson()
    CLI->>FS: createGitignore()
    CLI->>FS: createYarnLock()
    CLI->>FS: createApplicationConfig()
    CLI->>FS: createReadmeContent()
    FS-->>User: New Twenty app created
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@martmull martmull force-pushed the add-back-yarn-utils-in-base-app-project branch from 82e086d to 3a83644 Compare December 2, 2025 09:46
@martmull martmull force-pushed the add-back-yarn-utils-in-base-app-project branch from 3eaee4b to d010344 Compare December 2, 2025 09:54

const execPromise = promisify(exec);

const isInGitRepository = async (root: string): Promise<boolean> => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martmull I don't think we want to init git for the user

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having git initialized is really nice for dev x

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is any other project doing that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM!

@charlesBochet charlesBochet merged commit 6ea817d into main Dec 2, 2025
91 of 93 checks passed
@charlesBochet charlesBochet deleted the add-back-yarn-utils-in-base-app-project branch December 2, 2025 12:10
@twenty-eng-sync
Copy link
Copy Markdown

Hey @martmull! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants