react-cosmos 7.0.0-canary.f624342.0 → 7.0.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.
@@ -1 +1 @@
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.8.3"}
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.8.3"}
@@ -16,3 +16,4 @@ export declare function getDecoratorPatterns(): string[];
16
16
  export declare function createImportMap(paths: string[], rootDir: string, relativeToDir: string | null): Record<string, string>;
17
17
  export declare function importKeyPath(filePath: string, rootDir: string): string;
18
18
  export declare function importPath(filePath: string, relativeToDir: string | null): string;
19
+ export declare function sortedImportKeys(importMap: Record<string, string>): string[];
@@ -33,3 +33,6 @@ export function importPath(filePath, relativeToDir) {
33
33
  ? `.${path.sep}${path.relative(relativeToDir, filePath)}`
34
34
  : filePath);
35
35
  }
36
+ export function sortedImportKeys(importMap) {
37
+ return Object.keys(importMap).sort();
38
+ }
@@ -1,5 +1,5 @@
1
1
  import { flatten } from 'lodash-es';
2
- import { createImportMap, importPath, } from './shared.js';
2
+ import { createImportMap, importPath, sortedImportKeys, } from './shared.js';
3
3
  export function userImportsLazyTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }) {
4
4
  function ext(filePath) {
5
5
  // Add compat with projects where allowImportingTsExtensions isn't enabled
@@ -10,10 +10,10 @@ export function userImportsLazyTemplate({ globalImports, modulePaths: { fixtureP
10
10
  }
11
11
  const globalImportItems = globalImports.map(p => `import '${ext(importPath(p, relativeToDir))}';`);
12
12
  const fixtures = createImportMap(fixturePaths, rootDir, relativeToDir);
13
- const fixtureKeys = Object.keys(fixtures);
13
+ const fixtureKeys = sortedImportKeys(fixtures);
14
14
  const fixtureItems = fixtureKeys.map(k => ` '${k}': { getModule: () => import('${ext(fixtures[k])}') }`);
15
15
  const decorators = createImportMap(decoratorPaths, rootDir, relativeToDir);
16
- const decoratorKeys = Object.keys(decorators);
16
+ const decoratorKeys = sortedImportKeys(decorators);
17
17
  const decoratorItems = decoratorKeys.map(k => ` '${k}': { getModule: () => import('${ext(decorators[k])}') }`);
18
18
  const rendererConfigStr = JSON.stringify(rendererConfig, null, 2);
19
19
  let importGroups = [globalImportItems];
@@ -1,5 +1,5 @@
1
1
  import { flatten } from 'lodash-es';
2
- import { createImportMap, importPath, } from './shared.js';
2
+ import { createImportMap, importPath, sortedImportKeys, } from './shared.js';
3
3
  export function userImportsTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }) {
4
4
  function ext(filePath) {
5
5
  // Add compat with projects where allowImportingTsExtensions isn't enabled
@@ -10,11 +10,11 @@ export function userImportsTemplate({ globalImports, modulePaths: { fixturePaths
10
10
  }
11
11
  const globalImportItems = globalImports.map(p => `import '${ext(importPath(p, relativeToDir))}';`);
12
12
  const fixtures = createImportMap(fixturePaths, rootDir, relativeToDir);
13
- const fixtureKeys = Object.keys(fixtures);
13
+ const fixtureKeys = sortedImportKeys(fixtures);
14
14
  const fixtureImports = fixtureKeys.map((k, i) => `import * as fixture${i} from '${ext(fixtures[k])}';`);
15
15
  const fixtureItems = fixtureKeys.map((k, i) => ` '${k}': { module: fixture${i} }`);
16
16
  const decorators = createImportMap(decoratorPaths, rootDir, relativeToDir);
17
- const decoratorKeys = Object.keys(decorators);
17
+ const decoratorKeys = sortedImportKeys(decorators);
18
18
  const decoratorImports = decoratorKeys.map((k, i) => `import * as decorator${i} from '${ext(decorators[k])}';`);
19
19
  const decoratorItems = decoratorKeys.map((k, i) => ` '${k}': { module: decorator${i} }`);
20
20
  const rendererConfigStr = JSON.stringify(rendererConfig, null, 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-cosmos",
3
- "version": "7.0.0-canary.f624342.0+f624342",
3
+ "version": "7.0.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",
@@ -16,9 +16,9 @@
16
16
  "micromatch": "4.0.8",
17
17
  "open": "10.1.1",
18
18
  "pem": "1.14.8",
19
- "react-cosmos-core": "7.0.0-canary.f624342.0+f624342",
20
- "react-cosmos-renderer": "7.0.0-canary.f624342.0+f624342",
21
- "react-cosmos-ui": "7.0.0-canary.f624342.0+f624342",
19
+ "react-cosmos-core": "^7.0.0",
20
+ "react-cosmos-renderer": "^7.0.0",
21
+ "react-cosmos-ui": "^7.0.0",
22
22
  "ws": "8.18.1",
23
23
  "yargs": "17.7.2"
24
24
  },
@@ -27,5 +27,5 @@
27
27
  "cosmos-export": "./bin/cosmos-export.js",
28
28
  "cosmos-native": "./bin/cosmos-native.js"
29
29
  },
30
- "gitHead": "f624342fbe305584c468c0b952393e978aba3099"
30
+ "gitHead": "d4ec21150bc91933ac77c9e6078a68e43944674c"
31
31
  }