Skip to content
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/channels #4977

Merged
merged 30 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
237c594
WIP; Migrating @storybook/channels to TypeScript
kroeder Dec 11, 2018
176b650
WIP; Updated tests
kroeder Dec 11, 2018
6ae40ed
Added todo
kroeder Dec 11, 2018
f029b4c
Added missing export
kroeder Dec 11, 2018
766e576
Added lots of todos to tests and made them fail on purpose until they…
kroeder Dec 11, 2018
4008a90
Removed tests in order to write new ones that actually test the usage…
kroeder Dec 15, 2018
153fa26
Merge branch 'next' into ts-migration/channels
kroeder Dec 15, 2018
ec73e52
Working on tests and some smaller refactorings
kroeder Dec 15, 2018
22c2139
Support tests in TS
igor-dv Dec 16, 2018
f67bf03
Big refactoring + testing
kroeder Dec 16, 2018
f000c52
Resolved any
kroeder Dec 16, 2018
8db6baf
Refactoring
kroeder Dec 16, 2018
77b928e
Fixed jsnext:main
kroeder Dec 16, 2018
e47c348
Starting to migrate @storybook/channel-websocket
kroeder Dec 17, 2018
fa1d548
Added more types
kroeder Dec 17, 2018
bd543a8
Merge branch 'next' into ts-migration/channels
kroeder Dec 17, 2018
6ceb338
FIX CI by ignoring ng cli generated test file
ndelangen Dec 17, 2018
7fc0eb6
RENAME test.ts to karma.ts
ndelangen Dec 17, 2018
5815486
FIX CI by removing .spec. from jest testPattern
ndelangen Dec 17, 2018
1e860fe
Refactoring
kroeder Dec 17, 2018
fad2849
FIX missing tests, maybe
ndelangen Dec 17, 2018
a96a0b2
removed prepend and prependonce listener
kroeder Dec 17, 2018
e17a3d0
Merge remote-tracking branch 'origin/ts-migration/channels' into ts-m…
kroeder Dec 17, 2018
d328c27
Trying to fix CI error
kroeder Dec 19, 2018
068c118
Removed jsnext:main again
kroeder Dec 19, 2018
3f9579b
Reverted channel-websocket migration due to CI issues; the changes ar…
kroeder Dec 19, 2018
b49e201
Merge branch 'next' into ts-migration/channels
kroeder Dec 19, 2018
b0ded47
yarn.lock
kroeder Dec 19, 2018
708fdc7
Removed generics; they do not make sense - see PR discussion https://…
kroeder Dec 20, 2018
a92a3c5
This enum was wrong here, it should stick to string
kroeder Dec 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = {
},
overrides: [
{
files: ['**/__tests__/**', '**/*.test.js/**', '**/*.spec.js/**'],
files: ['**/__tests__/**', '**/*.test.js/**'],
rules: {
'import/no-extraneous-dependencies': ignore,
},
Expand Down
2 changes: 1 addition & 1 deletion examples/angular-cli/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../src/tsconfig.app.json",
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
"exclude": ["../src/karma.ts", "../src/**/*.spec.ts"],
"include": ["../src/**/*"]
}
2 changes: 1 addition & 1 deletion examples/angular-cli/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"main": "src/karma.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
Expand Down
4 changes: 2 additions & 2 deletions examples/angular-cli/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ module.exports = {
},
roots: [__dirname],
transform: {
...config.transform,
'^.+\\.jsx?$': '<rootDir>/scripts/babel-jest.js',
'^.+[/\\\\].storybook[/\\\\]config\\.ts$': '<rootDir>/scripts/jest-ts-babel.js',
'^.+\\.(ts|html)$': '<rootDir>/node_modules/jest-preset-angular/preprocessor.js',
},
moduleFileExtensions: [...config.moduleFileExtensions, 'ts', 'tsx', 'html'],
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
};
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/angular-cli/src/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"exclude": [
"test.ts",
"karma.ts",
"**/*.spec.ts"
]
}
2 changes: 1 addition & 1 deletion examples/angular-cli/src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
},
"files": [
"test.ts"
"karma.ts"
],
"include": [
"**/*.spec.ts",
Expand Down
10 changes: 6 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ module.exports = {
snapshotSerializers: ['@emotion/snapshot-serializer'],
transform: {
'^.+\\.jsx?$': '<rootDir>/scripts/babel-jest.js',
'^.+\\.tsx?$': '<rootDir>/node_modules/ts-jest',
},
testMatch: ['**/__tests__/**/*.(j|t)s?(x)', '**/?(*.)+(spek|test).(j|t)s?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', 'addon-jest.test.js', '/cli/test/'],
collectCoverage: false,
collectCoverageFrom: [
'app/**/*.{js,jsx}',
'lib/**/*.{js,jsx}',
'addons/**/*.{js,jsx}',
'app/**/*.{js,jsx,ts,tsx}',
'lib/**/*.{js,jsx,ts,tsx}',
'addons/**/*.{js,jsx,ts,tsx}',
'!**/cli/test/**',
'!**/dist/**',
'!**/generators/**',
Expand All @@ -44,5 +46,5 @@ module.exports = {
setupFiles: ['raf/polyfill'],
testURL: 'http://localhost',
modulePathIgnorePatterns: ['/dist/.*/__mocks__/'],
moduleFileExtensions: ['js', 'jsx', 'json', 'node'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
};
2 changes: 1 addition & 1 deletion lib/channels/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"license": "MIT",
"main": "dist/index.js",
"jsnext:main": "src/index.js",
"jsnext:main": "src/index.ts",
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
Expand Down
110 changes: 0 additions & 110 deletions lib/channels/src/index.js

This file was deleted.

Loading