The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(create-twenty-app): preserve .yarnrc.yml in template (#20623)
sonarly[bot]b821061526ca
diff --git a/packages/create-twenty-app/src/constants/template/.yarnrc.yml b/packages/create-twenty-app/src/constants/template/yarnrc.ymlsimilarity index 100%rename from packages/create-twenty-app/src/constants/template/.yarnrc.ymlrename to packages/create-twenty-app/src/constants/template/yarnrc.ymldiff --git a/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts b/packages/create-twenty-app/src/utils/__tests__/app-template.spec.tsindex b7de51bfd15..066cb2ce0cd 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.tsconst 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.tsindex f16309726f3..06884d88252 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) {