Skip to content

Commit

Permalink
chore(storybook): do not remove configurations even if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Jun 20, 2024
1 parent 3cdf28a commit 5dfffbf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ describe('Storybook - Convert To Inferred', () => {
],
},
"storybook": {
"configurations": {
"ci": {},
},
"options": {
"config-dir": ".storybook",
},
Expand Down Expand Up @@ -311,6 +314,9 @@ describe('Storybook - Convert To Inferred', () => {
],
},
"storybook": {
"configurations": {
"ci": {},
},
"options": {
"config-dir": ".storybook",
},
Expand Down Expand Up @@ -378,6 +384,9 @@ describe('Storybook - Convert To Inferred', () => {
],
},
"storybook": {
"configurations": {
"ci": {},
},
"options": {
"config-dir": ".storybook",
},
Expand Down Expand Up @@ -413,6 +422,9 @@ describe('Storybook - Convert To Inferred', () => {
expect(updatedProject.targets).toMatchInlineSnapshot(`
{
"build-storybook": {
"configurations": {
"dev": {},
},
"options": {
"config-dir": ".storybook",
"output-dir": "../../dist/storybook/apps/app1",
Expand All @@ -426,6 +438,10 @@ describe('Storybook - Convert To Inferred', () => {
],
},
"storybook": {
"configurations": {
"ci": {},
"dev": {},
},
"options": {
"config-dir": ".storybook",
},
Expand Down Expand Up @@ -534,6 +550,9 @@ describe('Storybook - Convert To Inferred', () => {
],
},
"storybook": {
"configurations": {
"ci": {},
},
"options": {
"config-dir": ".storybook",
},
Expand All @@ -558,6 +577,9 @@ describe('Storybook - Convert To Inferred', () => {
],
},
"storybook": {
"configurations": {
"ci": {},
},
"options": {
"config-dir": ".storybook",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ export function buildPostTargetTransformer(migrationLogs: AggregatedLog) {
configValues[configurationName],
migrationLogs
);

if (Object.keys(configuration).length === 0) {
delete target.configurations[configurationName];
}
}

for (const configurationName in target.configurations) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ export function servePostTargetTransformer(migrationLogs: AggregatedLog) {
projectDetails.root,
migrationLogs
);

if (Object.keys(configuration).length === 0) {
delete target.configurations[configurationName];
}
}

if (Object.keys(target.configurations).length === 0) {
Expand Down

0 comments on commit 5dfffbf

Please sign in to comment.