-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20671 from storybookjs/norbert/fix-20580
Fix the d.ts file of addon-links, mark LinkTo in index as deprecated
- Loading branch information
Showing
6 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './dist/react'; | ||
export { default } from './dist/react'; | ||
export * from './dist/react/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import LinkTo from './dist/react'; | ||
import LinkTo from './dist/react/index'; | ||
|
||
export default LinkTo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { readFile, writeFile } from 'fs-extra'; | ||
|
||
/* I wish this wasn't needed.. | ||
* There seems to be some bug in tsup / the unlaying lib that does DTS bundling | ||
* ...that makes it mess up the generation. | ||
*/ | ||
const run = async () => { | ||
const content = await readFile('./dist/index.d.ts', 'utf-8'); | ||
|
||
const regexp = /'lib\/preview-api/; | ||
const replaced = content.replace(regexp, "'@storybook/preview-api"); | ||
|
||
await writeFile('./dist/index.d.ts', replaced); | ||
}; | ||
|
||
run().catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters