From f3289cddefc73262aaf5c6583cff17a78c3d74d3 Mon Sep 17 00:00:00 2001 From: Romain Lanz Date: Wed, 6 Mar 2024 08:43:57 +0100 Subject: [PATCH] fix(configure): add entry to metaFiles --- configure.ts | 1 + tests/configure.spec.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ts b/configure.ts index 8c4b031..33a107c 100644 --- a/configure.ts +++ b/configure.ts @@ -42,5 +42,6 @@ export async function configure(command: Configure) { */ await codemods.updateRcFile((rcFile) => { rcFile.addProvider('@adonisjs/i18n/i18n_provider') + rcFile.addMetaFile('resources/lang/**/*.json', false) }) } diff --git a/tests/configure.spec.ts b/tests/configure.spec.ts index 6a5c93d..fd4d76d 100644 --- a/tests/configure.spec.ts +++ b/tests/configure.spec.ts @@ -20,7 +20,7 @@ test.group('Configure', (group) => { context.fs.basePath = fileURLToPath(BASE_URL) }) - test('create config file and register provider', async ({ fs, assert }) => { + test('create config file, register provider and update meta files', async ({ fs, assert }) => { const ignitor = new IgnitorFactory() .withCoreProviders() .withCoreConfig() @@ -51,6 +51,7 @@ test.group('Configure', (group) => { await assert.fileExists('app/middleware/detect_user_locale_middleware.ts') await assert.fileExists('adonisrc.ts') await assert.fileContains('adonisrc.ts', '@adonisjs/i18n/i18n_provider') + await assert.fileContains('adonisrc.ts', 'resources/lang/**/*.json') await assert.fileContains('config/i18n.ts', 'defineConfig') await assert.fileContains( 'start/kernel.ts',