Skip to content

Commit

Permalink
Merge pull request #20952 from storybookjs/fix/undo-mainjs-default-ex…
Browse files Browse the repository at this point in the history
…port-check

undo AST main.js check in validateConfigFile
  • Loading branch information
yannbf authored Feb 6, 2023
2 parents 6ab515a + 80790c8 commit 0da5c75
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion code/lib/core-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
},
"dependencies": {
"@babel/core": "^7.20.2",
"@storybook/csf-tools": "7.0.0-beta.43",
"@storybook/node-logger": "7.0.0-beta.43",
"@storybook/types": "7.0.0-beta.43",
"@types/babel__core": "^7.1.20",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { dedent } from 'ts-dedent';
import { promise as glob } from 'glob-promise';
import path from 'path';
import slash from 'slash';
import { readConfig } from '@storybook/csf-tools';
import { once } from '@storybook/node-logger';

import { boost } from './interpret-files';
Expand All @@ -25,13 +24,5 @@ export async function validateConfigurationFiles(configDir: string) {
No configuration files have been found in your configDir (${path.resolve(configDir)}).
Storybook needs "main.js" file, please add it.
`);
} else {
const main = await readConfig(mainConfigPath);
if (!main.hasDefaultExport) {
once.warn(dedent`
Your main.js is not using a default export, which is the recommended format. Please update it.
For more info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#esm-format-in-mainjs
`);
}
}
}
1 change: 0 additions & 1 deletion code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6068,7 +6068,6 @@ __metadata:
resolution: "@storybook/core-common@workspace:lib/core-common"
dependencies:
"@babel/core": ^7.20.2
"@storybook/csf-tools": 7.0.0-beta.43
"@storybook/node-logger": 7.0.0-beta.43
"@storybook/types": 7.0.0-beta.43
"@types/babel__core": ^7.1.20
Expand Down

0 comments on commit 0da5c75

Please sign in to comment.