react-cosmos 7.2.1-canary.e6e39db.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/client.d.ts +1 -1
  2. package/dist/corePlugins/fixtureWatcherPlugin.d.ts +1 -1
  3. package/dist/corePlugins/fixturesJsonPlugin.d.ts +1 -1
  4. package/dist/corePlugins/httpProxyPlugin.d.ts +1 -1
  5. package/dist/corePlugins/index.d.ts +1 -1
  6. package/dist/corePlugins/openFilePlugin.d.ts +1 -1
  7. package/dist/corePlugins/openFilePlugin.js +1 -1
  8. package/dist/corePlugins/pluginEndpointPlugin.d.ts +1 -1
  9. package/dist/corePlugins/portRetryPlugin.d.ts +1 -1
  10. package/dist/corePlugins/remoteRendererUrlPlugin.d.ts +1 -1
  11. package/dist/cosmosConfig/createCosmosConfig.d.ts +1 -1
  12. package/dist/cosmosConfig/types.d.ts +1 -1
  13. package/dist/cosmosPlugin/findCosmosPluginConfigs.d.ts +2 -2
  14. package/dist/cosmosPlugin/pluginConfigs.d.ts +3 -3
  15. package/dist/cosmosPlugin/readCosmosPluginConfig.d.ts +2 -2
  16. package/dist/cosmosPlugin/types.d.ts +4 -4
  17. package/dist/devServer/expressApp.d.ts +4 -4
  18. package/dist/devServer/httpServer.d.ts +1 -1
  19. package/dist/devServer/httpsCreds.d.ts +1 -1
  20. package/dist/devServer/messageHandler.d.ts +2 -2
  21. package/dist/devServer/startDevServer.d.ts +1 -1
  22. package/dist/getFixtures/getFixtures.d.ts +2 -2
  23. package/dist/getFixtures/importUserModules.d.ts +3 -3
  24. package/dist/index.d.ts +1 -1
  25. package/dist/shared/applyServerConfigPlugins.d.ts +4 -4
  26. package/dist/shared/getServerPlugins.d.ts +1 -1
  27. package/dist/shared/importServerPlugins.d.ts +2 -2
  28. package/dist/shared/logPluginInfo.d.ts +1 -1
  29. package/dist/shared/playgroundHtml.d.ts +3 -3
  30. package/dist/shared/playgroundHtml.js +1 -1
  31. package/dist/shared/playgroundUrl.d.ts +1 -1
  32. package/dist/shared/remoteRendererUrl.d.ts +1 -1
  33. package/dist/shared/serverAddress.d.ts +1 -1
  34. package/dist/shared/serverFixtureList.d.ts +2 -2
  35. package/dist/shared/staticServer.d.ts +1 -1
  36. package/dist/shared/webSocketUrl.d.ts +1 -1
  37. package/dist/testHelpers/mockConsole.js +0 -3
  38. package/dist/testHelpers/mockFetch.d.ts +1 -1
  39. package/dist/testHelpers/mockFs.d.ts +1 -1
  40. package/dist/userModules/findUserModulePaths.d.ts +2 -2
  41. package/dist/userModules/findUserModulePaths.js +1 -1
  42. package/dist/userModules/fixtureWatcher.d.ts +2 -2
  43. package/dist/userModules/generateUserImports.d.ts +4 -4
  44. package/dist/userModules/shared.d.ts +1 -1
  45. package/dist/userModules/userImportsLazyTemplate.d.ts +2 -2
  46. package/dist/userModules/userImportsLazyTemplate.js +1 -1
  47. package/dist/userModules/userImportsTemplate.d.ts +2 -2
  48. package/dist/userModules/userImportsTemplate.js +1 -1
  49. package/dist/utils/cli.d.ts +2 -2
  50. package/dist/utils/fs.js +1 -1
  51. package/package.json +5 -5
  52. package/tsconfig.build.tsbuildinfo +1 -0
  53. package/dist/tsconfig.build.tsbuildinfo +0 -1
package/dist/client.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { DecoratorProps } from 'react-cosmos-core';
1
+ export type { DecoratorProps } from 'react-cosmos-core';
2
2
  export { ClassStateMock, FixtureContext, Viewport, useCosmosNotification, useFixtureInput, useFixtureSelect, useFixtureState, useSelect, useValue, } from 'react-cosmos-renderer/client';
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const fixtureWatcherPlugin: CosmosServerPlugin;
@@ -1,4 +1,4 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export type CosmosFixtureJson = {
3
3
  filePath: string;
4
4
  cleanPath: string[];
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const httpProxyPlugin: CosmosServerPlugin;
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const coreServerPlugins: CosmosServerPlugin[];
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const openFilePlugin: CosmosServerPlugin;
@@ -25,7 +25,7 @@ export const openFilePlugin = {
25
25
  // Fall back to open in case launchEditor fails. launchEditor only works
26
26
  // when the editor app is already open, but is favorable because it can
27
27
  // open a code file on a specific line & column.
28
- .catch(err => open(absFilePath))
28
+ .catch(() => open(absFilePath))
29
29
  .catch(err => {
30
30
  console.log(err);
31
31
  res.status(500).send('Failed to open file');
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const pluginEndpointPlugin: CosmosServerPlugin;
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const portRetryPlugin: CosmosServerPlugin;
@@ -1,2 +1,2 @@
1
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
2
2
  export declare const remoteRendererUrlPlugin: CosmosServerPlugin;
@@ -1,2 +1,2 @@
1
- import { CosmosConfig, CosmosConfigInput } from './types.js';
1
+ import type { CosmosConfig, CosmosConfigInput } from './types.js';
2
2
  export declare function createCosmosConfig(rootDir: string, cosmosConfigInput?: CosmosConfigInput): CosmosConfig;
@@ -1,4 +1,4 @@
1
- import { CosmosRendererUrl } from 'react-cosmos-core';
1
+ import type { CosmosRendererUrl } from 'react-cosmos-core';
2
2
  interface HttpsOptions {
3
3
  keyPath: string;
4
4
  certPath: string;
@@ -1,8 +1,8 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
2
  type Args = {
3
3
  rootDir: string;
4
4
  relativePaths: boolean;
5
5
  ignore?: string[];
6
6
  };
7
- export declare function findCosmosPluginConfigs({ rootDir, relativePaths, ignore, }: Args): Promise<CosmosPluginConfig[]>;
7
+ export declare function findCosmosPluginConfigs({ rootDir, relativePaths, ignore }: Args): Promise<CosmosPluginConfig[]>;
8
8
  export {};
@@ -1,8 +1,8 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
3
  type GetPluginConfigArgs = {
4
4
  config: CosmosConfig;
5
5
  relativePaths: boolean;
6
6
  };
7
- export declare function getPluginConfigs({ config, relativePaths, }: GetPluginConfigArgs): Promise<CosmosPluginConfig[]>;
7
+ export declare function getPluginConfigs({ config, relativePaths }: GetPluginConfigArgs): Promise<CosmosPluginConfig[]>;
8
8
  export {};
@@ -1,8 +1,8 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
2
  type ReadCosmosPluginConfigArgs = {
3
3
  rootDir: string;
4
4
  configPath: string;
5
5
  relativePaths: boolean;
6
6
  };
7
- export declare function readCosmosPluginConfig({ rootDir, configPath, relativePaths, }: ReadCosmosPluginConfigArgs): Promise<CosmosPluginConfig>;
7
+ export declare function readCosmosPluginConfig({ rootDir, configPath, relativePaths }: ReadCosmosPluginConfigArgs): Promise<CosmosPluginConfig>;
8
8
  export {};
@@ -1,7 +1,7 @@
1
- import http from 'http';
2
- import { Express } from 'express';
3
- import { CosmosMode, MessageType } from 'react-cosmos-core';
4
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type http from 'http';
2
+ import type { Express } from 'express';
3
+ import type { CosmosMode, MessageType } from 'react-cosmos-core';
4
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
5
5
  export type CosmosPlatform = 'web' | 'native';
6
6
  export type CosmosConfigPluginArgs = {
7
7
  config: CosmosConfig;
@@ -1,5 +1,5 @@
1
- import { Express } from 'express';
2
- import { CosmosPluginConfig } from 'react-cosmos-core';
3
- import { CosmosConfig } from '../cosmosConfig/types.js';
4
- import { CosmosPlatform } from '../cosmosPlugin/types.js';
1
+ import type { Express } from 'express';
2
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
3
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
4
+ import type { CosmosPlatform } from '../cosmosPlugin/types.js';
5
5
  export declare function createExpressApp(platform: CosmosPlatform, config: CosmosConfig, pluginConfigs: CosmosPluginConfig[]): Promise<Express>;
@@ -1,6 +1,6 @@
1
1
  import http from 'http';
2
2
  import https from 'https';
3
- import { CosmosConfig } from '../cosmosConfig/types.js';
3
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
4
4
  type RequestListener = (request: http.IncomingMessage, response: http.ServerResponse) => void;
5
5
  export declare function createHttpServer(config: CosmosConfig, requestListener: RequestListener): Promise<{
6
6
  server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse> | https.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
@@ -1,4 +1,4 @@
1
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
2
2
  type HttpsCreds = {
3
3
  key: string;
4
4
  cert: string;
@@ -1,5 +1,5 @@
1
- import http from 'http';
2
- import { ServerMessage } from 'react-cosmos-core';
1
+ import type http from 'http';
2
+ import type { ServerMessage } from 'react-cosmos-core';
3
3
  export declare function createMessageHandler(httpServer: http.Server): {
4
4
  sendMessage: (msg: ServerMessage) => void;
5
5
  close: () => void;
@@ -1,2 +1,2 @@
1
- import { CosmosPlatform } from '../cosmosPlugin/types.js';
1
+ import type { CosmosPlatform } from '../cosmosPlugin/types.js';
2
2
  export declare function startDevServer(platform: CosmosPlatform): Promise<() => Promise<void>>;
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { ReactElement } from 'react';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
3
  export type FixtureApi = {
4
4
  absoluteFilePath: string;
5
5
  fileName: string;
@@ -1,8 +1,8 @@
1
- import { ByPath, ReactDecoratorModule, ReactFixtureModule } from 'react-cosmos-core';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { ByPath, ReactDecoratorModule, ReactFixtureModule } from 'react-cosmos-core';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
3
  type UserModules = {
4
4
  fixtures: ByPath<ReactFixtureModule>;
5
5
  decorators: ByPath<ReactDecoratorModule>;
6
6
  };
7
- export declare function importUserModules({ rootDir, fixturesDir, fixtureFileSuffix, ignore, }: CosmosConfig): Promise<UserModules>;
7
+ export declare function importUserModules({ rootDir, fixturesDir, fixtureFileSuffix, ignore }: CosmosConfig): Promise<UserModules>;
8
8
  export {};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { CosmosFixtureJson, CosmosFixturesJson, } from './corePlugins/fixturesJsonPlugin.js';
1
+ export type { CosmosFixtureJson, CosmosFixturesJson, } from './corePlugins/fixturesJsonPlugin.js';
2
2
  export * from './cosmosConfig/createCosmosConfig.js';
3
3
  export * from './cosmosConfig/detectCosmosConfig.js';
4
4
  export * from './cosmosConfig/getCosmosConfigAtPath.js';
@@ -1,11 +1,11 @@
1
- import { CosmosMode } from 'react-cosmos-core';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
3
- import { CosmosPlatform, CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosMode } from 'react-cosmos-core';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
+ import type { CosmosPlatform, CosmosServerPlugin } from '../cosmosPlugin/types.js';
4
4
  type Args = {
5
5
  config: CosmosConfig;
6
6
  serverPlugins: CosmosServerPlugin[];
7
7
  mode: CosmosMode;
8
8
  platform: CosmosPlatform;
9
9
  };
10
- export declare function applyServerConfigPlugins({ config, serverPlugins, mode, platform, }: Args): Promise<CosmosConfig>;
10
+ export declare function applyServerConfigPlugins({ config, serverPlugins, mode, platform }: Args): Promise<CosmosConfig>;
11
11
  export {};
@@ -1,2 +1,2 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
2
  export declare function getServerPlugins(pluginConfigs: CosmosPluginConfig[], rootDir: string): Promise<import("../index.js").CosmosServerPlugin[]>;
@@ -1,3 +1,3 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
2
- import { CosmosServerPlugin } from '../cosmosPlugin/types.js';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
+ import type { CosmosServerPlugin } from '../cosmosPlugin/types.js';
3
3
  export declare function importServerPlugins(pluginConfigs: CosmosPluginConfig[], rootDir: string): Promise<CosmosServerPlugin[]>;
@@ -1,2 +1,2 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
2
  export declare function logPluginInfo(pluginConfigs: CosmosPluginConfig[]): void;
@@ -1,5 +1,5 @@
1
- import { CosmosPluginConfig } from 'react-cosmos-core';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
3
- import { CosmosPlatform } from '../cosmosPlugin/types.js';
1
+ import type { CosmosPluginConfig } from 'react-cosmos-core';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
+ import type { CosmosPlatform } from '../cosmosPlugin/types.js';
4
4
  export declare function getDevPlaygroundHtml(platform: CosmosPlatform, config: CosmosConfig, pluginConfigs: CosmosPluginConfig[]): Promise<string>;
5
5
  export declare function getExportPlaygroundHtml(config: CosmosConfig, pluginConfigs: CosmosPluginConfig[]): Promise<string>;
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import { readFile } from 'fs/promises';
3
3
  import path from 'path';
4
- import { pickRendererUrl, replaceKeys, } from 'react-cosmos-core';
4
+ import { pickRendererUrl, replaceKeys } from 'react-cosmos-core';
5
5
  import { findUp } from '../utils/findUp.js';
6
6
  import { getServerFixtureList } from './serverFixtureList.js';
7
7
  import { getStaticPath } from './staticPath.js';
@@ -1,3 +1,3 @@
1
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
2
2
  export declare function getPlaygroundUrls(config: CosmosConfig): string[];
3
3
  export declare function logPlaygroundUrls(config: CosmosConfig): void;
@@ -1,2 +1,2 @@
1
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
2
2
  export declare function getRemoteRendererUrl(config: CosmosConfig): string | null;
@@ -1,3 +1,3 @@
1
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
2
2
  export declare function getServerHost(config: CosmosConfig): string;
3
3
  export declare function getServerAddress(config: CosmosConfig): string;
@@ -1,4 +1,4 @@
1
- import { FixtureList } from 'react-cosmos-core';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { FixtureList } from 'react-cosmos-core';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
3
  export declare function getServerFixtureList(config: CosmosConfig): Promise<FixtureList>;
4
4
  export declare function updateFixtureListCache(rootDir: string, fixturePaths: string[]): void;
@@ -1,2 +1,2 @@
1
- import { Application } from 'express';
1
+ import type { Application } from 'express';
2
2
  export declare function serveStaticDir(app: Application, staticPath: string, publicUrl: string): void;
@@ -1,2 +1,2 @@
1
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
2
2
  export declare function getWebSocketUrl(config: CosmosConfig): string;
@@ -14,9 +14,6 @@ export async function mockConsole(cb) {
14
14
  expectedLogs.forEach(msg => expect(console.log).toBeCalledWith(msg));
15
15
  return cbReturn;
16
16
  }
17
- catch (err) {
18
- throw err;
19
- }
20
17
  finally {
21
18
  console.log = origConsoleLog;
22
19
  }
@@ -1,2 +1,2 @@
1
- import { Mock } from 'vitest';
1
+ import type { Mock } from 'vitest';
2
2
  export declare function mockFetch(httpStatus: number, cb: (fetchMock: Mock) => Promise<unknown>): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
2
2
  export declare function mockFile(filePath: string, fileMock: {}): Promise<void>;
3
3
  export declare function mockCosmosConfig(configPath: string, config: Partial<CosmosConfig>): Promise<void>;
4
4
  export declare function mockCwdModuleDefault(filePath: string, fileMock: {}): Promise<void>;
@@ -1,9 +1,9 @@
1
- import { UserModulePaths } from './shared.js';
1
+ import type { UserModulePaths } from './shared.js';
2
2
  type FindUserModulePathsArgs = {
3
3
  rootDir: string;
4
4
  fixturesDir: string;
5
5
  fixtureFileSuffix: string;
6
6
  ignore: string[];
7
7
  };
8
- export declare function findUserModulePaths({ rootDir, fixturesDir, fixtureFileSuffix, ignore, }: FindUserModulePathsArgs): Promise<UserModulePaths>;
8
+ export declare function findUserModulePaths({ rootDir, fixturesDir, fixtureFileSuffix, ignore }: FindUserModulePathsArgs): Promise<UserModulePaths>;
9
9
  export {};
@@ -1,6 +1,6 @@
1
1
  import { glob } from 'glob';
2
2
  import micromatch from 'micromatch';
3
- import { getDecoratorPatterns, getFixturePatterns, } from './shared.js';
3
+ import { getDecoratorPatterns, getFixturePatterns } from './shared.js';
4
4
  export async function findUserModulePaths({ rootDir, fixturesDir, fixtureFileSuffix, ignore, }) {
5
5
  const paths = await glob('**/*', {
6
6
  cwd: rootDir,
@@ -1,3 +1,3 @@
1
- import { FSWatcher } from 'chokidar';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
1
+ import type { FSWatcher } from 'chokidar';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
3
  export declare function startFixtureWatcher(config: CosmosConfig, event: 'all' | 'add', callback: () => unknown): Promise<FSWatcher>;
@@ -1,6 +1,6 @@
1
- import { RendererConfig } from 'react-cosmos-core';
2
- import { CosmosConfig } from '../cosmosConfig/types.js';
3
- import { UserModulePaths } from './shared.js';
1
+ import type { RendererConfig } from 'react-cosmos-core';
2
+ import type { CosmosConfig } from '../cosmosConfig/types.js';
3
+ import type { UserModulePaths } from './shared.js';
4
4
  type Args<T extends RendererConfig> = {
5
5
  config: CosmosConfig;
6
6
  modulePaths: UserModulePaths;
@@ -8,5 +8,5 @@ type Args<T extends RendererConfig> = {
8
8
  relativeToDir: string | null;
9
9
  typeScript: boolean;
10
10
  };
11
- export declare function generateUserImports<T extends RendererConfig>({ config, modulePaths, rendererConfig, relativeToDir, typeScript, }: Args<T>): string;
11
+ export declare function generateUserImports<T extends RendererConfig>({ config, modulePaths, rendererConfig, relativeToDir, typeScript }: Args<T>): string;
12
12
  export {};
@@ -1,4 +1,4 @@
1
- import { RendererConfig } from 'react-cosmos-core';
1
+ import type { RendererConfig } from 'react-cosmos-core';
2
2
  export type UserModulePaths = {
3
3
  fixturePaths: string[];
4
4
  decoratorPaths: string[];
@@ -1,2 +1,2 @@
1
- import { UserImportsTemplateArgs } from './shared.js';
2
- export declare function userImportsLazyTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }: UserImportsTemplateArgs): string;
1
+ import type { UserImportsTemplateArgs } from './shared.js';
2
+ export declare function userImportsLazyTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript }: UserImportsTemplateArgs): string;
@@ -1,4 +1,4 @@
1
- import { createImportMap, importPath, sortedImportKeys, } from './shared.js';
1
+ import { createImportMap, importPath, sortedImportKeys } from './shared.js';
2
2
  export function userImportsLazyTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }) {
3
3
  function ext(filePath) {
4
4
  // Add compat with projects where allowImportingTsExtensions isn't enabled
@@ -1,2 +1,2 @@
1
- import { UserImportsTemplateArgs } from './shared.js';
2
- export declare function userImportsTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }: UserImportsTemplateArgs): string;
1
+ import type { UserImportsTemplateArgs } from './shared.js';
2
+ export declare function userImportsTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript }: UserImportsTemplateArgs): string;
@@ -1,4 +1,4 @@
1
- import { createImportMap, importPath, sortedImportKeys, } from './shared.js';
1
+ import { createImportMap, importPath, sortedImportKeys } from './shared.js';
2
2
  export function userImportsTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }) {
3
3
  function ext(filePath) {
4
4
  // Add compat with projects where allowImportingTsExtensions isn't enabled
@@ -1,6 +1,6 @@
1
1
  export declare function getCliArgs(): {
2
2
  [x: string]: unknown;
3
- lazy: boolean | undefined;
4
- _: (string | number)[];
5
3
  $0: string;
4
+ _: (string | number)[];
5
+ lazy: boolean | undefined;
6
6
  };
package/dist/utils/fs.js CHANGED
@@ -16,7 +16,7 @@ export function moduleExists(moduleId) {
16
16
  resolve(moduleId);
17
17
  return true;
18
18
  }
19
- catch (err) {
19
+ catch {
20
20
  return false;
21
21
  }
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-cosmos",
3
- "version": "7.2.1-canary.e6e39db.0+e6e39db",
3
+ "version": "7.3.0",
4
4
  "description": "Sandbox for developing and testing UI components in isolation",
5
5
  "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos",
6
6
  "license": "MIT",
@@ -15,9 +15,9 @@
15
15
  "micromatch": "4.0.8",
16
16
  "open": "10.2.0",
17
17
  "pem": "1.15.1",
18
- "react-cosmos-core": "7.2.1-canary.e6e39db.0+e6e39db",
19
- "react-cosmos-renderer": "7.2.1-canary.e6e39db.0+e6e39db",
20
- "react-cosmos-ui": "7.2.1-canary.e6e39db.0+e6e39db",
18
+ "react-cosmos-core": "^7.3.0",
19
+ "react-cosmos-renderer": "^7.3.0",
20
+ "react-cosmos-ui": "^7.3.0",
21
21
  "ws": "8.19.0",
22
22
  "yargs": "17.7.2"
23
23
  },
@@ -30,5 +30,5 @@
30
30
  "cosmos-export": "./bin/cosmos-export.js",
31
31
  "cosmos-native": "./bin/cosmos-native.js"
32
32
  },
33
- "gitHead": "e6e39db08377aa14bf0ef75b44096c403c0e560f"
33
+ "gitHead": "883eba284c16f2696967bc45ea2c64a3f083ad0f"
34
34
  }
@@ -0,0 +1 @@
1
+ {"version":"7.0.0-dev.20260417.1","root":["./src/client.ts","./src/index.ts","./src/vitest.ts","./src/@types/launch-editor.d.ts","./src/@types/mdx.d.ts","./src/@types/yargs.d.ts","./src/coreplugins/fixturewatcherplugin.ts","./src/coreplugins/fixturesjsonplugin.ts","./src/coreplugins/httpproxyplugin.ts","./src/coreplugins/index.ts","./src/coreplugins/openfileplugin.ts","./src/coreplugins/pluginendpointplugin.ts","./src/coreplugins/portretryplugin.ts","./src/coreplugins/remoterendererurlplugin.ts","./src/cosmosconfig/createcosmosconfig.ts","./src/cosmosconfig/detectcosmosconfig.ts","./src/cosmosconfig/getcosmosconfigatpath.ts","./src/cosmosconfig/shared.ts","./src/cosmosconfig/types.ts","./src/cosmosplugin/findcosmospluginconfigs.ts","./src/cosmosplugin/pluginconfigs.ts","./src/cosmosplugin/readcosmospluginconfig.ts","./src/cosmosplugin/types.ts","./src/devserver/expressapp.ts","./src/devserver/httpserver.ts","./src/devserver/httpscreds.ts","./src/devserver/messagehandler.ts","./src/devserver/startdevserver.ts","./src/export/generateexport.ts","./src/getfixtures/getfixtures.ts","./src/getfixtures/importusermodules.ts","./src/shared/applyserverconfigplugins.ts","./src/shared/findnextavailableport.ts","./src/shared/getserverplugins.ts","./src/shared/importserverplugins.ts","./src/shared/logplugininfo.ts","./src/shared/playgroundhtml.ts","./src/shared/playgroundurl.ts","./src/shared/remoterendererurl.ts","./src/shared/serveraddress.ts","./src/shared/serverfixturelist.ts","./src/shared/staticpath.ts","./src/shared/staticserver.ts","./src/shared/websocketurl.ts","./src/usermodules/findusermodulepaths.ts","./src/usermodules/fixturewatcher.ts","./src/usermodules/generateuserimports.ts","./src/usermodules/shared.ts","./src/usermodules/userimportslazytemplate.ts","./src/usermodules/userimportstemplate.ts","./src/utils/cli.ts","./src/utils/findup.ts","./src/utils/fs.ts","./src/utils/isnodeerror.ts","./src/utils/json.ts","./src/utils/requiremodule.ts","./src/utils/resolve.ts","./src/utils/resolveloose.ts","./src/utils/resolvesilent.ts","./src/utils/slash.ts"]}
@@ -1 +0,0 @@
1
- {"root":["../src/client.ts","../src/index.ts","../src/vitest.ts","../src/@types/launch-editor.d.ts","../src/@types/mdx.d.ts","../src/@types/yargs.d.ts","../src/corePlugins/fixtureWatcherPlugin.ts","../src/corePlugins/fixturesJsonPlugin.ts","../src/corePlugins/httpProxyPlugin.ts","../src/corePlugins/index.ts","../src/corePlugins/openFilePlugin.ts","../src/corePlugins/pluginEndpointPlugin.ts","../src/corePlugins/portRetryPlugin.ts","../src/corePlugins/remoteRendererUrlPlugin.ts","../src/cosmosConfig/createCosmosConfig.ts","../src/cosmosConfig/detectCosmosConfig.ts","../src/cosmosConfig/getCosmosConfigAtPath.ts","../src/cosmosConfig/shared.ts","../src/cosmosConfig/types.ts","../src/cosmosPlugin/findCosmosPluginConfigs.ts","../src/cosmosPlugin/pluginConfigs.ts","../src/cosmosPlugin/readCosmosPluginConfig.ts","../src/cosmosPlugin/types.ts","../src/devServer/expressApp.ts","../src/devServer/httpServer.ts","../src/devServer/httpsCreds.ts","../src/devServer/messageHandler.ts","../src/devServer/startDevServer.ts","../src/export/generateExport.ts","../src/getFixtures/getFixtures.ts","../src/getFixtures/importUserModules.ts","../src/shared/applyServerConfigPlugins.ts","../src/shared/findNextAvailablePort.ts","../src/shared/getServerPlugins.ts","../src/shared/importServerPlugins.ts","../src/shared/logPluginInfo.ts","../src/shared/playgroundHtml.ts","../src/shared/playgroundUrl.ts","../src/shared/remoteRendererUrl.ts","../src/shared/serverAddress.ts","../src/shared/serverFixtureList.ts","../src/shared/staticPath.ts","../src/shared/staticServer.ts","../src/shared/webSocketUrl.ts","../src/userModules/findUserModulePaths.ts","../src/userModules/fixtureWatcher.ts","../src/userModules/generateUserImports.ts","../src/userModules/shared.ts","../src/userModules/userImportsLazyTemplate.ts","../src/userModules/userImportsTemplate.ts","../src/utils/cli.ts","../src/utils/findUp.ts","../src/utils/fs.ts","../src/utils/isNodeError.ts","../src/utils/json.ts","../src/utils/requireModule.ts","../src/utils/resolve.ts","../src/utils/resolveLoose.ts","../src/utils/resolveSilent.ts","../src/utils/slash.ts"],"version":"5.9.3"}