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

CLI: Remove unsupported frameworks/renderers and improve builder detection #22492

Merged
merged 11 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ addon
addons
api
apollo
aurelia
bundlers
center
centered
Expand Down
6 changes: 0 additions & 6 deletions code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ module.exports = {
'spaced-comment': 'off',
},
},
{
files: ['**/mithril/**/*'],
rules: {
'react/no-unknown-property': 'off', // Need to deactivate otherwise eslint replaces some unknown properties with React ones
},
},
{
files: ['**/e2e-tests/**/*'],
rules: {
Expand Down
1 change: 0 additions & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
"displayName": "Links",
"icon": "https://user-images.githubusercontent.com/263385/101991673-48355c80-3c7c-11eb-9b6e-b627c96a75f6.png",
"unsupportedFrameworks": [
"marko",
"react-native"
]
}
Expand Down
9 changes: 4 additions & 5 deletions code/addons/storyshots-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,10 @@ initStoryshots({

Use this table as a reference for manually specifying the framework.

| angular | html | preact |
| -------------- | ---- | ------------ |
| react | riot | react-native |
| svelte | vue | vue3 |
| web-components | rax | |
| angular | html | preact |
| ------- | ------------ | -------------- |
| react | react-native | vue3 |
| svelte | vue | web-components |

### `test`

Expand Down
4 changes: 1 addition & 3 deletions code/addons/storyshots-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@
"displayName": "Storyshots",
"icon": "https://user-images.githubusercontent.com/263385/101991676-48cdf300-3c7c-11eb-8aa1-944dab6ab29b.png",
"unsupportedFrameworks": [
"ember",
"mithril",
"marko"
"ember"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ export type SupportedFramework =
| 'html'
| 'preact'
| 'react'
| 'riot'
| 'react-native'
| 'svelte'
| 'vue'
| 'vue3'
| 'web-components'
| 'rax';
| 'web-components';
60 changes: 0 additions & 60 deletions code/addons/storyshots-core/src/frameworks/rax/loader.ts

This file was deleted.

12 changes: 0 additions & 12 deletions code/addons/storyshots-core/src/frameworks/rax/renderTree.ts

This file was deleted.

65 changes: 0 additions & 65 deletions code/addons/storyshots-core/src/frameworks/riot/loader.ts

This file was deleted.

36 changes: 0 additions & 36 deletions code/addons/storyshots-core/src/frameworks/riot/renderTree.ts

This file was deleted.

1 change: 0 additions & 1 deletion code/addons/storyshots-core/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
declare module 'jest-preset-angular/*';
declare module 'preact-render-to-string/jsx';
declare module 'react-test-renderer*';
declare module 'rax-test-renderer*';

declare module '@storybook/babel-plugin-require-context-hook/register';

Expand Down
15 changes: 0 additions & 15 deletions code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@ describe('new-frameworks fix', () => {
).resolves.toBeFalsy();
});

it('in sb 7 with unsupported package', async () => {
const packageJson = { dependencies: { '@storybook/riot': '^7.0.0' } };
await expect(
checkNewFrameworks({
packageJson,
main: {
framework: '@storybook/riot',
core: {
builder: 'webpack5',
},
},
})
).resolves.toBeFalsy();
});

it('in sb 7 with correct structure already', async () => {
const packageJson = { dependencies: { '@storybook/angular': '^7.0.0' } };
await expect(
Expand Down
32 changes: 0 additions & 32 deletions code/lib/cli/src/detect-webpack.ts

This file was deleted.

61 changes: 0 additions & 61 deletions code/lib/cli/src/detect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,46 +212,6 @@ const MOCK_FRAMEWORK_FILES: {
},
},
},
{
name: ProjectType.MITHRIL,
files: {
'package.json': {
dependencies: {
mithril: '1.0.0',
},
},
},
},
{
name: ProjectType.MARIONETTE,
files: {
'package.json': {
dependencies: {
'backbone.marionette': '1.0.0',
},
},
},
},
{
name: ProjectType.MARKO,
files: {
'package.json': {
dependencies: {
marko: '1.0.0',
},
},
},
},
{
name: ProjectType.RIOT,
files: {
'package.json': {
dependencies: {
riot: '1.0.0',
},
},
},
},
{
name: ProjectType.PREACT,
files: {
Expand All @@ -272,27 +232,6 @@ const MOCK_FRAMEWORK_FILES: {
},
},
},
{
name: ProjectType.RAX,
files: {
'.rax': 'file content',
'package.json': {
dependencies: {
rax: '1.0.0',
},
},
},
},
{
name: ProjectType.AURELIA,
files: {
'package.json': {
dependencies: {
'aurelia-bootstrapper': '1.0.0',
},
},
},
},
];

describe('Detect', () => {
Expand Down