-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Typescript-Migration: @storybook/addons #5018
Merged
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
9d2f1fc
WIP working on migration for @storybook/addons
kroeder 231470a
Merge remote-tracking branch 'origin/ts-migration/channels' into ts-m…
igor-dv 3857828
Unfinished things
igor-dv fa2c957
Rewrote @storybook/addons
kroeder 7b56599
removed unnecessary module declaration
kroeder 46eb123
Merge branch 'next' into ts-migration/addons
kroeder 4beeba3
Fixed export issue in lib/addons
kroeder cd7eb71
Removed addons from devDep because it is already a dependency
kroeder 6f6b119
Renamed createChannel to mockChannel in storybook-mock-channel
kroeder 7b6a9c3
Remove jsnext:main with ts + add global as a module declaration to notes
igor-dv ac730de
Added exports for register.tsx in public_api
kroeder 2652e10
Try to fix CI smoke-test
kroeder b681f0d
Removed types for react in package; types are already in the root pac…
kroeder ec0a8c2
Still trying to fix CI
kroeder c617694
yarn.lock
kroeder afc55ca
revert debug output
kroeder 17075d9
Use named imports
kroeder 395f776
Use named imports
kroeder 60c6320
Added types entry in channel package.json
kroeder d90fba2
Removed jsx tsconfig entry in addon-notes
kroeder 05b1f5a
Workaround proposal for splitting up pure ts projects from mixed ones
kroeder 0d88e53
Check existence of types
kroeder 8d7005a
Merge branch 'next' into ts-migration/addons
kroeder ce41026
fix require path
kroeder 33ad476
Set jsx to react
kroeder 86a2813
Set require back to js instead of jsx
kroeder 3132aec
Exclude test files
kroeder 5e34e42
Debugging native-smoke CI - revert this
kroeder b778871
Merge branch 'next' into ts-migration/addons
kroeder b24a792
silent false for test purpose
kroeder 05119a8
more debug messages
kroeder 3343b93
Enhanced error output on CI build errors
kroeder 13123b7
Improved error output
kroeder a903991
try to fix ci
kroeder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -29,23 +29,21 @@ function removeTsFromDist() { | |
} | ||
} | ||
|
||
function logError(type, packageJson, shellExecReturn) { | ||
function logError(type, packageJson) { | ||
log.error( | ||
`FAILED to compile ${type}: ${chalk.bold( | ||
`${packageJson.name}@${packageJson.version}\n ${shellExecReturn}` | ||
)}` | ||
`FAILED to compile ${type}: ${chalk.bold(`${packageJson.name}@${packageJson.version}`)}` | ||
); | ||
} | ||
|
||
const packageJson = getPackageJson(); | ||
|
||
removeDist(); | ||
if (packageJson && packageJson.types && packageJson.types.indexOf('d.ts') !== -1) { | ||
tscfy({ errorCallback: shellExecMessage => logError('ts', packageJson, shellExecMessage) }); | ||
tscfy({ errorCallback: () => logError('ts', packageJson) }); | ||
} else { | ||
babelify({ errorCallback: shellExecMessage => logError('js', packageJson, shellExecMessage) }); | ||
babelify({ errorCallback: () => logError('js', packageJson) }); | ||
removeTsFromDist(); | ||
tscfy({ errorCallback: shellExecMessage => logError('ts', packageJson, shellExecMessage) }); | ||
tscfy({ errorCallback: () => logError('ts', packageJson) }); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pure ts projects may cause unexpected behavior when it runs through babelify as well |
||
|
||
console.log(chalk.gray(`Built: ${chalk.bold(`${packageJson.name}@${packageJson.version}`)}`)); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove --parallel in order to fix
native-smoke-test
The ts build of
addons
always failed because it seemed thatchannels
wasn't build butaddons
relied onchannels
so it could not build as wellI found this lerna/lerna#1681 and thought "give it a shot", though I'm not sure if this is okay? I spent a lot of time on fixing this, if this is not the right fix I definitely need help for another way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗