New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-cosmos-core

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cosmos-core - npm Package Compare versions

Comparing version 6.0.0-canary.ac3eae1.0 to 6.0.0-canary.ada5aec.0

dist/renderer/createPostMessageConnect.d.ts

11

dist/fixtureTree/createFixtureTree/createRawFixtureTree.js

@@ -16,3 +16,3 @@ import { get, set } from 'lodash-es';

type: 'fixture',
fixtureId: { path: fixturePath },
path: fixturePath,
},

@@ -25,3 +25,4 @@ });

type: 'multiFixture',
fixtureIds: createFixtureIds(fixturePath, fixtureItem.fixtureNames),
path: fixturePath,
names: fixtureItem.fixtureNames,
},

@@ -44,8 +45,2 @@ });

}
function createFixtureIds(fixturePath, fixtureNames) {
return fixtureNames.reduce((fixtureIds, fixtureName) => ({
...fixtureIds,
[fixtureName]: { path: fixturePath, name: fixtureName },
}), {});
}
function injectNode(rootNode, parents, childName, childNode) {

@@ -52,0 +47,0 @@ if (parents.length === 0)

@@ -13,5 +13,5 @@ export function flattenFixtureTree(treeNode, parents = []) {

if (childData.type === 'multiFixture')
Object.keys(childData.fixtureIds).forEach(fixtureName => flatFixtureTree.push({
childData.names.forEach(fixtureName => flatFixtureTree.push({
fileName: childName,
fixtureId: childData.fixtureIds[fixtureName],
fixtureId: { path: childData.path, name: fixtureName },
parents,

@@ -23,3 +23,3 @@ name: fixtureName,

fileName: childName,
fixtureId: childData.fixtureId,
fixtureId: { path: childData.path },
parents,

@@ -26,0 +26,0 @@ name: null,

@@ -1,2 +0,1 @@

import { FixtureId } from '../fixture/types.js';
import { TreeNode } from '../utils/tree.js';

@@ -7,6 +6,7 @@ export type FixtureTreeNode = TreeNode<{

type: 'fixture';
fixtureId: FixtureId;
path: string;
} | {
type: 'multiFixture';
fixtureIds: Record<string, FixtureId>;
path: string;
names: string[];
}>;

@@ -13,12 +13,12 @@ export * from './fixture/FixtureContext.js';

export * from './playground/playgroundUrl.js';
export * from './renderer/FixtureLoader/FixtureLoader.js';
export * from './renderer/FixtureLoader/getDecoratedFixtureElement/index.js';
export * from './renderer/FixtureLoader/postMessage.js';
export * from './renderer/FixtureLoader/webSockets.js';
export * from './renderer/createPostMessageConnect.js';
export * from './renderer/createWebSocketsConnect.js';
export * from './renderer/FixtureConnect.js';
export * from './renderer/getDecoratedFixtureElement/index.js';
export * from './renderer/getFixtureList.js';
export * from './renderer/getSortedDecoratorsForFixturePath.js';
export * from './renderer/reactTypes.js';
export * from './renderer/registerPlaygroundShortcuts.js';
export * from './renderer/rendererConfig.js';
export * from './renderer/types.js';
export * from './renderer/rendererConnectTypes.js';
export * from './renderer/userModuleTypes.js';
export * from './server/cosmosPluginConfig.js';

@@ -25,0 +25,0 @@ export * from './server/serverMessage.js';

@@ -13,12 +13,12 @@ export * from './fixture/FixtureContext.js';

export * from './playground/playgroundUrl.js';
export * from './renderer/FixtureLoader/FixtureLoader.js';
export * from './renderer/FixtureLoader/getDecoratedFixtureElement/index.js';
export * from './renderer/FixtureLoader/postMessage.js';
export * from './renderer/FixtureLoader/webSockets.js';
export * from './renderer/createPostMessageConnect.js';
export * from './renderer/createWebSocketsConnect.js';
export * from './renderer/FixtureConnect.js';
export * from './renderer/getDecoratedFixtureElement/index.js';
export * from './renderer/getFixtureList.js';
export * from './renderer/getSortedDecoratorsForFixturePath.js';
export * from './renderer/reactTypes.js';
export * from './renderer/registerPlaygroundShortcuts.js';
export * from './renderer/rendererConfig.js';
export * from './renderer/types.js';
export * from './renderer/rendererConnectTypes.js';
export * from './renderer/userModuleTypes.js';
export * from './server/cosmosPluginConfig.js';

@@ -25,0 +25,0 @@ export * from './server/serverMessage.js';

@@ -1,8 +0,7 @@

import { FixtureListItem } from '../fixture/types.js';
import { ReactFixtureExports, ReactFixtureWrappers } from './reactTypes.js';
export declare function getFixtureListFromWrappers(wrappers: ReactFixtureWrappers): {
import { FixtureList, FixtureListItem } from '../fixture/types.js';
import { ByPath, ReactFixtureExport, UserModuleWrappers } from './userModuleTypes.js';
export declare function getFixtureListFromWrappers(wrappers: UserModuleWrappers): FixtureList;
export declare function getFixtureListFromExports(exports: ByPath<ReactFixtureExport>): {
[x: string]: FixtureListItem;
};
export declare function getFixtureListFromExports(exports: ReactFixtureExports): {
[x: string]: FixtureListItem;
};
export declare function getFixtureItemFromExport(fixtureExport: ReactFixtureExport): FixtureListItem;
import { isMultiFixture } from './isMultiFixture.js';
export function getFixtureListFromWrappers(wrappers) {
return Object.keys(wrappers).reduce((acc, fixturePath) => {
return { ...acc, [fixturePath]: getItemFromWrapper(wrappers[fixturePath]) };
return Object.keys(wrappers.fixtures).reduce((acc, fixturePath) => {
return {
...acc,
[fixturePath]: wrappers.lazy
? { type: 'single' }
: getFixtureItemFromExport(wrappers.fixtures[fixturePath].module.default),
};
}, {});

@@ -9,9 +14,9 @@ }

return Object.keys(exports).reduce((acc, fixturePath) => {
return { ...acc, [fixturePath]: getItemFromExport(exports[fixturePath]) };
return {
...acc,
[fixturePath]: getFixtureItemFromExport(exports[fixturePath]),
};
}, {});
}
function getItemFromWrapper(wrapper) {
return getItemFromExport(wrapper.module.default);
}
function getItemFromExport(fixtureExport) {
export function getFixtureItemFromExport(fixtureExport) {
return isMultiFixture(fixtureExport)

@@ -18,0 +23,0 @@ ? { type: 'multi', fixtureNames: Object.keys(fixtureExport) }

@@ -1,2 +0,2 @@

import { ReactDecorator, ReactDecorators } from './reactTypes.js';
export declare function getSortedDecoratorsForFixturePath(fixturePath: string, decoratorsByPath: ReactDecorators): ReactDecorator[];
import { ByPath } from './userModuleTypes.js';
export declare function getSortedDecoratorsForFixturePath<T>(fixturePath: string, decoratorsByPath: ByPath<T>): T[];

@@ -1,2 +0,2 @@

import { ReactFixtureExport, ReactFixtureMap } from './reactTypes.js';
import { ReactFixtureExport, ReactFixtureMap } from './userModuleTypes.js';
export declare function isMultiFixture(fixtureExport: ReactFixtureExport): fixtureExport is ReactFixtureMap;
export type RawCosmosPluginConfig = {
name: string;
ui?: string;
devServer?: string;
export?: string;
server?: string;
};

@@ -11,4 +10,3 @@ export type CosmosPluginConfig = {

ui?: string;
devServer?: string;
export?: string;
server?: string;
};

@@ -15,0 +13,0 @@ export type UiCosmosPluginConfig = CosmosPluginConfig & {

{
"name": "react-cosmos-core",
"version": "6.0.0-canary.ac3eae1.0+ac3eae1",
"version": "6.0.0-canary.ada5aec.0+ada5aec",
"description": "React Cosmos Core",

@@ -12,5 +12,5 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-core",

"lodash-es": "^4.17.21",
"react-is": "^18.0.0"
"react-is": "^18.2.0"
},
"gitHead": "ac3eae1bf11f7ebd88b485e2bd04275f83ab2816"
"gitHead": "ada5aec5d92c3602f6c7ab2c0f3869b968b334e5"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc