diff --git a/packages/create-twenty-app/src/constants/template/.yarnrc.yml b/packages/create-twenty-app/src/constants/template/yarnrc.yml similarity index 100% rename from packages/create-twenty-app/src/constants/template/.yarnrc.yml rename to packages/create-twenty-app/src/constants/template/yarnrc.yml diff --git a/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts b/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts index b7de51bfd1..066cb2ce0c 100644 --- a/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts +++ b/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts @@ -17,6 +17,7 @@ const UNIVERSAL_IDENTIFIERS_PATH = join( 'constants', 'universal-identifiers.ts', ); +const YARNRC_PATH = 'yarnrc.yml'; // Template content matching template/src/constants/universal-identifiers.ts const TEMPLATE_UNIVERSAL_IDENTIFIERS = `export const APP_DISPLAY_NAME = 'DISPLAY-NAME-TO-BE-GENERATED'; @@ -173,6 +174,27 @@ describe('copyBaseApplicationProject', () => { expect(publicDirectoryContents).toHaveLength(0); }); + it('should rename yarnrc.yml to .yarnrc.yml in the scaffolded project', async () => { + await fs.writeFile( + join(testAppDirectory, YARNRC_PATH), + 'nodeLinker: node-modules', + ); + + await copyBaseApplicationProject({ + appName: 'my-test-app', + appDisplayName: 'My Test App', + appDescription: 'A test application', + appDirectory: testAppDirectory, + }); + + expect(await fs.pathExists(join(testAppDirectory, YARNRC_PATH))).toBe( + false, + ); + expect(await fs.pathExists(join(testAppDirectory, '.yarnrc.yml'))).toBe( + true, + ); + }); + it('should handle empty description', async () => { await copyBaseApplicationProject({ appName: 'my-test-app', diff --git a/packages/create-twenty-app/src/utils/app-template.ts b/packages/create-twenty-app/src/utils/app-template.ts index f16309726f..06884d8825 100644 --- a/packages/create-twenty-app/src/utils/app-template.ts +++ b/packages/create-twenty-app/src/utils/app-template.ts @@ -22,7 +22,7 @@ export const copyBaseApplicationProject = async ({ onProgress?.('Copying base template'); await fs.copy(join(__dirname, './constants/template'), appDirectory); - onProgress?.('Configuring dotfiles (.gitignore, .github)'); + onProgress?.('Configuring dotfiles (.gitignore, .github, .yarnrc.yml)'); await renameDotfiles({ appDirectory }); onProgress?.('Mirroring AGENTS.md to CLAUDE.md'); @@ -47,6 +47,7 @@ const renameDotfiles = async ({ appDirectory }: { appDirectory: string }) => { const renames = [ { from: 'gitignore', to: '.gitignore' }, { from: 'github', to: '.github' }, + { from: 'yarnrc.yml', to: '.yarnrc.yml' }, ]; for (const { from, to } of renames) {