mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
Ignore home package.json no license field
This commit is contained in:
parent
3539625d7f
commit
8a08d40f77
@ -1,5 +1,6 @@
|
||||
import { spawn } from 'cross-spawn';
|
||||
import hasYarn from './has_yarn';
|
||||
import whitelistedWarnings from './whitelisted_warnings';
|
||||
|
||||
const packageManager = hasYarn() ? 'yarn' : 'npm';
|
||||
|
||||
@ -34,7 +35,11 @@ export default function latestVersion(packageName) {
|
||||
command.stderr.on('data', data => {
|
||||
// yarn error
|
||||
const info = JSON.parse(data);
|
||||
reject(new Error(info.data));
|
||||
whitelistedWarnings.forEach(whitelistedWarning => {
|
||||
if (!info.data.includes(whitelistedWarning)) {
|
||||
reject(new Error(info.data));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
1
lib/cli/lib/whitelisted_warnings.js
Normal file
1
lib/cli/lib/whitelisted_warnings.js
Normal file
@ -0,0 +1 @@
|
||||
export default ['package.json: No license field'];
|
Loading…
x
Reference in New Issue
Block a user