Skip to content

Commit

Permalink
remove the dependency on client-logger in shared node/browser code
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed May 16, 2024
1 parent 69b4c28 commit 5fdece8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/parser/extract-id.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { logger } from '@storybook/client-logger';

function hashCode(str: string): string {
const h = str
.split('')
Expand Down Expand Up @@ -30,7 +28,7 @@ export function extractId(

let generated = name.replace(/\W+(.|$)/g, (_, chr) => chr.toUpperCase());
if (allocatedIds.indexOf(generated) >= 0) {
logger.warn(`Story name conflict with exports - Please add an explicit id for story ${name}`);
console.warn(`Story name conflict with exports - Please add an explicit id for story ${name}`);
generated += hashCode(name);
}
return generated;
Expand Down

0 comments on commit 5fdece8

Please sign in to comment.