react-cosmos-core
Advanced tools
Comparing version 6.1.2-canary.5da46eb.0 to 6.1.2-canary.71267f3.0
@@ -5,3 +5,9 @@ import { isElement } from 'react-is'; | ||
typeof fixtureExport === 'object' && | ||
!isElement(fixtureExport)); | ||
!isElement(fixtureExport) && | ||
// With React Server Components, fixture exports of Client fixtures are | ||
// wrapped in a Promise. The React ComponentType union does include | ||
// PromiseLikeOfReactNode but for some reason it's impossible do type | ||
// narrowing or use a type predicate function. | ||
// @ts-ignore Sadly, we resort to the "cause I said so" type assertion | ||
typeof fixtureExport.then !== 'function'); | ||
} |
@@ -1,2 +0,2 @@ | ||
import { ComponentType, FunctionComponent, ReactNode } from 'react'; | ||
import { ComponentType, ReactNode } from 'react'; | ||
type FixtureMap<FixtureType> = { | ||
@@ -15,3 +15,3 @@ [fixtureName: string]: FixtureType; | ||
}; | ||
export type ReactFixture = ReactNode | FunctionComponent; | ||
export type ReactFixture = ReactNode | ComponentType; | ||
export type ReactFixtureMap = FixtureMap<ReactFixture>; | ||
@@ -18,0 +18,0 @@ export type ReactFixtureExport = FixtureExport<ReactFixture>; |
{ | ||
"name": "react-cosmos-core", | ||
"version": "6.1.2-canary.5da46eb.0+5da46eb", | ||
"version": "6.1.2-canary.71267f3.0+71267f3", | ||
"description": "React Cosmos Core", | ||
@@ -15,3 +15,3 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-core", | ||
}, | ||
"gitHead": "5da46eb86dab5ebfb0d2b6a8273ca10a32deda2d" | ||
"gitHead": "71267f34230c703f89e58b12a87a25572c9cd5d8" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
57169
1413