Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech: move reactPeerCheck to addon docs #20560

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { IndexerOptions, StoryIndexer, DocsOptions, Options } from '@storyb
import type { CsfPluginOptions } from '@storybook/csf-plugin';
import type { JSXOptions } from '@storybook/mdx2-csf';
import { loadCsf } from '@storybook/csf-tools';
import { ensureReactPeerDeps } from './ensure-react-peer-deps';

async function webpack(
webpackConfig: any = {},
Expand Down Expand Up @@ -164,4 +165,6 @@ const webpackX = webpack as any;
const storyIndexersX = storyIndexers as any;
const docsX = docs as any;

ensureReactPeerDeps();

export { webpackX as webpack, storyIndexersX as storyIndexers, docsX as docs };
4 changes: 0 additions & 4 deletions code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@
"strip-json-comments": "^3.1.1",
"typescript": "~4.9.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 0 additions & 3 deletions code/lib/cli/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import { sync as readUpSync } from 'read-pkg-up';
import { logger } from '@storybook/node-logger';
import { buildStaticStandalone, withTelemetry } from '@storybook/core-server';
import { cache } from '@storybook/core-common';
import { ensureReactPeerDeps } from './ensure-react-peer-deps';

export const build = async (cliOptions: any) => {
ensureReactPeerDeps();

try {
const options = {
...cliOptions,
Expand Down
3 changes: 0 additions & 3 deletions code/lib/cli/src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { sync as readUpSync } from 'read-pkg-up';
import { logger, instance as npmLog } from '@storybook/node-logger';
import { buildDevStandalone, withTelemetry } from '@storybook/core-server';
import { cache } from '@storybook/core-common';
import { ensureReactPeerDeps } from './ensure-react-peer-deps';

export const dev = async (cliOptions: any) => {
process.env.NODE_ENV = process.env.NODE_ENV || 'development';

ensureReactPeerDeps();

try {
const options = {
...cliOptions,
Expand Down
3 changes: 0 additions & 3 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6185,9 +6185,6 @@ __metadata:
ts-dedent: ^2.0.0
typescript: ~4.9.3
util-deprecate: ^1.0.2
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
bin:
getstorybook: ./bin/index.js
sb: ./bin/index.js
Expand Down