npm package diff

Package: @forge/cli-shared

Versions: 6.8.0-next.10 - 6.8.0-next.11

File: package/out/shared/test.js

Index: package/out/shared/test.js
===================================================================
--- package/out/shared/test.js
+++ package/out/shared/test.js
@@ -18,9 +18,9 @@
         snapshotLog: jest.fn()
     };
 }
 exports.mockLogger = mockLogger;
-async function createTestApp({ userCode, packages }) {
+async function createTestApp({ userCode, packages, withI18nBundle = false }) {
     const appDirectory = (0, directories_1.tmpDir)();
     const srcDirectory = path_1.default.join(appDirectory, 'src');
     await (0, fs_extra_1.ensureDir)(srcDirectory);
     const userCodePath = path_1.default.join(srcDirectory, 'index.ts');
@@ -43,8 +43,13 @@
         const dest = path_1.default.join(appDirectory, 'node_modules', pkg);
         await (0, fs_extra_1.ensureDir)(dest);
         await (0, fs_extra_1.copy)(src, dest);
     }
+    if (withI18nBundle) {
+        const localeFolder = 'locales';
+        await (0, fs_extra_1.ensureDir)(path_1.default.join(appDirectory, localeFolder));
+        await (0, promises_1.writeFile)(path_1.default.join(appDirectory, localeFolder, 'en-US.json'), JSON.stringify({ title: 'i18n' }));
+    }
     return {
         appDirectory,
         entryPoints: [{ name: 'main', path: userCodePath }]
     };