Browse Source

Merge branch 'master' into minor

Michael Bromley 3 months ago
parent
commit
9f31c81e60

+ 8 - 0
license/signatures/version1/cla.json

@@ -767,6 +767,14 @@
       "created_at": "2025-09-25T11:01:03Z",
       "created_at": "2025-09-25T11:01:03Z",
       "repoId": 136938012,
       "repoId": 136938012,
       "pullRequestNo": 3836
       "pullRequestNo": 3836
+    },
+    {
+      "name": "fobaz",
+      "id": 7779903,
+      "comment_id": 3364676794,
+      "created_at": "2025-10-03T07:58:58Z",
+      "repoId": 136938012,
+      "pullRequestNo": 3860
     }
     }
   ]
   ]
 }
 }

+ 16 - 20
packages/dashboard/vite/tests/barrel-exports.spec.ts

@@ -6,25 +6,21 @@ import { compile } from '../utils/compiler.js';
 import { debugLogger, noopLogger } from '../utils/logger.js';
 import { debugLogger, noopLogger } from '../utils/logger.js';
 
 
 describe('detecting plugins in barrel exports', () => {
 describe('detecting plugins in barrel exports', () => {
-    it(
-        'should detect plugins in barrel exports',
-        async () => {
-            const tempDir = join(__dirname, './__temp/barrel-exports');
-            await rm(tempDir, { recursive: true, force: true });
-            const result = await compile({
-                outputPath: tempDir,
-                vendureConfigPath: join(__dirname, 'fixtures-barrel-exports', 'vendure-config.ts'),
-                logger: process.env.LOG ? debugLogger : noopLogger,
-            });
+    it('should detect plugins in barrel exports', { timeout: 60_000 }, async () => {
+        const tempDir = join(__dirname, './__temp/barrel-exports');
+        await rm(tempDir, { recursive: true, force: true });
+        const result = await compile({
+            outputPath: tempDir,
+            vendureConfigPath: join(__dirname, 'fixtures-barrel-exports', 'vendure-config.ts'),
+            logger: process.env.LOG ? debugLogger : noopLogger,
+        });
 
 
-            expect(result.pluginInfo).toHaveLength(1);
-            expect(result.pluginInfo[0].name).toBe('MyPlugin');
-            expect(result.pluginInfo[0].dashboardEntryPath).toBe('./dashboard/index.tsx');
-            expect(result.pluginInfo[0].sourcePluginPath).toBe(
-                join(__dirname, 'fixtures-barrel-exports', 'my-plugin', 'src', 'my.plugin.ts'),
-            );
-            expect(result.pluginInfo[0].pluginPath).toBe(join(tempDir, 'my-plugin', 'src', 'my.plugin.js'));
-        },
-        { timeout: 10_000 },
-    );
+        expect(result.pluginInfo).toHaveLength(1);
+        expect(result.pluginInfo[0].name).toBe('MyPlugin');
+        expect(result.pluginInfo[0].dashboardEntryPath).toBe('./dashboard/index.tsx');
+        expect(result.pluginInfo[0].sourcePluginPath).toBe(
+            join(__dirname, 'fixtures-barrel-exports', 'my-plugin', 'src', 'my.plugin.ts'),
+        );
+        expect(result.pluginInfo[0].pluginPath).toBe(join(tempDir, 'my-plugin', 'src', 'my.plugin.js'));
+    });
 });
 });

+ 29 - 33
packages/dashboard/vite/tests/npm-plugin.spec.ts

@@ -7,40 +7,36 @@ import { compile } from '../utils/compiler.js';
 import { debugLogger, noopLogger } from '../utils/logger.js';
 import { debugLogger, noopLogger } from '../utils/logger.js';
 
 
 describe('detecting plugins in npm packages', () => {
 describe('detecting plugins in npm packages', () => {
-    it(
-        'should detect plugins in npm packages',
-        async () => {
-            const tempDir = join(__dirname, './__temp/npm-plugin');
-            await rm(tempDir, { recursive: true, force: true });
-            const fakeNodeModules = join(__dirname, 'fixtures-npm-plugin', 'fake_node_modules');
+    it('should detect plugins in npm packages', { timeout: 60_000 }, async () => {
+        const tempDir = join(__dirname, './__temp/npm-plugin');
+        await rm(tempDir, { recursive: true, force: true });
+        const fakeNodeModules = join(__dirname, 'fixtures-npm-plugin', 'fake_node_modules');
 
 
-            // For this test to work, we need to use tsconfigPaths to point
-            // the `test-plugin` package to the `fake_node_modules` directory.
-            // This is because the `test-plugin` package is not installed in
-            // the `node_modules` directory, but in the `fake_node_modules`
-            // directory.
-            tsconfigPaths.register({
-                baseUrl: fakeNodeModules,
-                paths: {
-                    'test-plugin': [join(fakeNodeModules, 'test-plugin')],
-                },
-            });
+        // For this test to work, we need to use tsconfigPaths to point
+        // the `test-plugin` package to the `fake_node_modules` directory.
+        // This is because the `test-plugin` package is not installed in
+        // the `node_modules` directory, but in the `fake_node_modules`
+        // directory.
+        tsconfigPaths.register({
+            baseUrl: fakeNodeModules,
+            paths: {
+                'test-plugin': [join(fakeNodeModules, 'test-plugin')],
+            },
+        });
 
 
-            const result = await compile({
-                outputPath: tempDir,
-                vendureConfigPath: join(__dirname, 'fixtures-npm-plugin', 'vendure-config.ts'),
-                logger: process.env.LOG ? debugLogger : noopLogger,
-                pluginPackageScanner: {
-                    nodeModulesRoot: fakeNodeModules,
-                },
-            });
+        const result = await compile({
+            outputPath: tempDir,
+            vendureConfigPath: join(__dirname, 'fixtures-npm-plugin', 'vendure-config.ts'),
+            logger: process.env.LOG ? debugLogger : noopLogger,
+            pluginPackageScanner: {
+                nodeModulesRoot: fakeNodeModules,
+            },
+        });
 
 
-            expect(result.pluginInfo).toHaveLength(1);
-            expect(result.pluginInfo[0].name).toBe('TestPlugin');
-            expect(result.pluginInfo[0].dashboardEntryPath).toBe('./dashboard/index.tsx');
-            expect(result.pluginInfo[0].sourcePluginPath).toBeUndefined();
-            expect(result.pluginInfo[0].pluginPath).toBe(join(fakeNodeModules, 'test-plugin', 'index.js'));
-        },
-        { timeout: 10_000 },
-    );
+        expect(result.pluginInfo).toHaveLength(1);
+        expect(result.pluginInfo[0].name).toBe('TestPlugin');
+        expect(result.pluginInfo[0].dashboardEntryPath).toBe('./dashboard/index.tsx');
+        expect(result.pluginInfo[0].sourcePluginPath).toBeUndefined();
+        expect(result.pluginInfo[0].pluginPath).toBe(join(fakeNodeModules, 'test-plugin', 'index.js'));
+    });
 });
 });

+ 1 - 2
packages/testing/README.md

@@ -2,5 +2,4 @@
 
 
 This package contains utilities for writing end-to-end tests for Vendure.
 This package contains utilities for writing end-to-end tests for Vendure.
 
 
-For documentation, see [www.vendure.io/docs/developer-guide/testing/](https://www.vendure.io/docs/developer-guide/testing/)
-
+For documentation, see https://docs.vendure.io/guides/developer-guide/testing/