Skip to content

Commit

Permalink
fix(storybook): 🐛 update critical dependencies and fix store
Browse files Browse the repository at this point in the history
update critical dependencies found by audit, fix store missing in
storybook
  • Loading branch information
konradst committed Jul 6, 2024
1 parent a029748 commit 821ed6c
Show file tree
Hide file tree
Showing 9 changed files with 32,456 additions and 32,731 deletions.
41 changes: 21 additions & 20 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
import { CommonModule } from "@angular/common";
import { EffectsModule } from "@ngrx/effects";
import { StoreModule } from "@ngrx/store";
import { setCompodocJson } from "@storybook/addon-docs/angular";
import { provideMockStore } from "@ngrx/store/testing";
import { moduleMetadata } from "@storybook/angular";
import { AppEffects } from "../src/app/app.effects";
import { BehaviorsModule } from "../src/app/behaviors";
import { AppComponentsModule } from "../src/app/components";
import { metaReducers, reducers } from "../src/app/models";
import { CombatEffects } from "../src/app/models/combat/combat.effects";
import { GameStateEffects } from "../src/app/models/game-state/game-state.effects";
import { SpritesEffects } from "../src/app/models/sprites/sprites.effects";
import { ServicesModule } from "../src/app/services";
import { CombatModule } from "../src/app/routes/combat";
import { WorldModule } from "../src/app/routes/world";
import docJson from "../src/documentation.json";
import { PowCoreModule } from "../src/app/core";
import { RouterModule } from "@angular/router";
import { MatButtonModule } from "@angular/material/button";
import { MatGridListModule } from "@angular/material/grid-list";

import { setCompodocJson } from "@storybook/addon-docs/angular";
import docJson from "../src/documentation.json";
import { MockProvider, MockProviders } from "ng-mocks";
import { RPGGame } from "../src/app/services/rpg-game";
import { GameStateService } from "../src/app/models/game-state/game-state.service";
import { GameWorld } from "../src/app/services/game-world";

setCompodocJson(docJson);

export const APP_IMPORTS = [
StoreModule.forRoot(reducers, { metaReducers }),
CommonModule,
// RouterModule.forRoot(),

// Components
ServicesModule.forRoot(),
Expand All @@ -36,17 +34,20 @@ export const APP_IMPORTS = [
CombatModule.forRoot(),
WorldModule.forRoot(),
PowCoreModule.forRoot(),
EffectsModule.forRoot([
GameStateEffects,
// CombatEffects,
SpritesEffects,
// AppEffects,
]),
];

setCompodocJson(docJson);
export const APP_PROVIDERS = [
provideMockStore({}),
MockProviders(RPGGame, GameStateService, GameWorld),
];

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
};
export const decorators = [moduleMetadata({ imports: APP_IMPORTS })];

export const decorators = [
moduleMetadata({
imports: APP_IMPORTS,
providers: APP_PROVIDERS,
}),
];
70 changes: 70 additions & 0 deletions changelog.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module.exports = {
disableEmoji: false,
format: "{type}{scope}: {emoji}{subject}",
list: ["test", "feat", "fix", "chore", "docs", "refactor", "style", "ci", "perf"],
maxMessageLength: 64,
minMessageLength: 3,
questions: ["type", "scope", "subject", "body", "breaking", "issues", "lerna"],
scopes: ["storybook", "combat", "camera", "party"],
types: {
chore: {
description: "Build process or auxiliary tool changes",
emoji: "🤖",
value: "chore",
},
ci: {
description: "CI related changes",
emoji: "🎡",
value: "ci",
},
docs: {
description: "Documentation only changes",
emoji: "✏️",
value: "docs",
},
feat: {
description: "A new feature",
emoji: "🎸",
value: "feat",
},
fix: {
description: "A bug fix",
emoji: "🐛",
value: "fix",
},
perf: {
description: "A code change that improves performance",
emoji: "⚡️",
value: "perf",
},
refactor: {
description: "A code change that neither fixes a bug or adds a feature",
emoji: "💡",
value: "refactor",
},
release: {
description: "Create a release commit",
emoji: "🏹",
value: "release",
},
style: {
description: "Markup, white-space, formatting, missing semi-colons...",
emoji: "💄",
value: "style",
},
test: {
description: "Adding missing tests",
emoji: "💍",
value: "test",
},
messages: {
type: "Select the type of change that you're committing:",
customScope: "Select the scope this component affects:",
subject: "Write a short, imperative mood description of the change:\n",
body: "Provide a longer description of the change:\n ",
breaking: "List any breaking changes:\n",
footer: "Issues this commit closes, e.g #123:",
confirmCommit: "The packages that this commit has affected\n",
},
},
};
Loading

0 comments on commit 821ed6c

Please sign in to comment.