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

Update to nx 19.3, angular 18, storybook 8 #33

Merged
merged 5 commits into from
Jul 1, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@
{
"argsIgnorePattern": "^_"
}
]
],
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
// ngrx stores
Expand Down Expand Up @@ -201,7 +203,9 @@
"no-var": "error",
"prefer-const": "error",
"prefer-template": "error",
"unused-imports/no-unused-imports-ts": 2
"unused-imports/no-unused-imports-ts": 2,
Markus-Ende marked this conversation as resolved.
Show resolved Hide resolved
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
// All test related files
Expand All @@ -211,15 +215,10 @@
"*.cy.ts",
"*.integration-spec.ts",
"*.po.ts",
// cypress page objects
"**/support/*.ts",
// cypress commands, e2e etc
"**/fixtures/**/*",
// cypress fixtures,
"**/e2e/**/*.ts",
// cypress fixtures,
"**/global.setup.ts",
// cypress fixtures,
"*.stories.ts",
"**/test-setup.ts",
"**/setup-app.ts"
Expand All @@ -245,8 +244,6 @@
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
},
// Dimension: CONTEXT
// Available contexts: node, nestjs, angular, typescript, native-mobile, cypress
{
"sourceTag": "context:node",
"bannedExternalImports": [
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ jobs:
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: package.json
Markus-Ende marked this conversation as resolved.
Show resolved Hide resolved
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- uses: nrwl/nx-set-shas@v4

- run: npx nx format:check
- run: npx nx affected -t lint test build e2e-ci
- run: npx nx affected -t lint test build e2e-ci build-storybook
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ testem.log
Thumbs.db

.nx/cache
.nx/workspace-data
.angular
.eslintcache
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/coverage
/.nx/cache
.angular

/.nx/workspace-data
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
}
}
2 changes: 1 addition & 1 deletion libs/sketch/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { StorybookConfig } from '@storybook/angular';

const config: StorybookConfig = {
stories: ['../**/*.stories.@(js|jsx|ts|tsx|mdx)'],
stories: ['../**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
Markus-Ende marked this conversation as resolved.
Show resolved Hide resolved
addons: ['@storybook/addon-essentials'],
framework: {
name: '@storybook/angular',
Expand Down
10 changes: 5 additions & 5 deletions libs/sketch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "@qupaya/sketch",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^17.3.0",
"@angular/cdk": "^17.3.3",
"@angular/forms": "~17.3.0",
"@angular/core": "^17.3.0",
"@angular/router": "~17.3.0",
"@angular/cdk": ">=18.0.0",
"@angular/common": ">=18.0.0",
"@angular/core": ">=18.0.0",
"@angular/forms": ">=18.0.0",
"@angular/router": ">=18.0.0",
"rxjs": "~7.8.0"
},
"dependencies": {},
Expand Down
31 changes: 14 additions & 17 deletions libs/sketch/src/lib/components/dialog/dialog.component.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { ArgTypes, Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { CommonModule } from '@angular/common';
import { CloseButtonPosition, DialogComponent } from './dialog.component';
import { InputSignal } from '@angular/core';

const meta: Meta<DialogComponent> = {
component: DialogComponent,
Expand Down Expand Up @@ -69,12 +68,11 @@ export const Default: Story = {
}),
};
Default.args = {
fullscreen: false as unknown as InputSignal<boolean>,
contentShadow: false as unknown as InputSignal<boolean>,
showCloseButton: false as unknown as InputSignal<boolean>,
innerCloseButton: false as unknown as InputSignal<boolean>,
closeButtonPosition:
CloseButtonPosition.Right as unknown as InputSignal<CloseButtonPosition>,
fullscreen: false,
contentShadow: false,
showCloseButton: false,
innerCloseButton: false,
closeButtonPosition: CloseButtonPosition.Right,
};
Default.argTypes = {
fullscreen: {
Expand All @@ -99,7 +97,7 @@ Default.argTypes = {
description: 'the position of the close button',
defaultValue: { summary: CloseButtonPosition.Right },
},
};
} satisfies ArgTypes;
Markus-Ende marked this conversation as resolved.
Show resolved Hide resolved

/**
* This is one unstyled Dialog and one completely styled Dialog. **Custom Properties** are used to style it.
Expand Down Expand Up @@ -177,9 +175,9 @@ export const Styling: Story = {
}),
};
Styling.args = {
fullscreen: false as unknown as InputSignal<boolean>,
contentShadow: false as unknown as InputSignal<boolean>,
showCloseButton: false as unknown as InputSignal<boolean>,
fullscreen: false,
contentShadow: false,
showCloseButton: false,
};

/**
Expand Down Expand Up @@ -222,10 +220,9 @@ export const CloseButton: Story = {
}),
};
CloseButton.args = {
showCloseButton: true as unknown as InputSignal<boolean>,
innerCloseButton: false as unknown as InputSignal<boolean>,
closeButtonPosition:
CloseButtonPosition.Right as unknown as InputSignal<CloseButtonPosition>,
showCloseButton: true,
innerCloseButton: false,
closeButtonPosition: CloseButtonPosition.Right,
};
CloseButton.argTypes = {
closeButtonPosition: {
Expand Down Expand Up @@ -288,6 +285,6 @@ export const NestedDialog: StoryObj<
}),
};
NestedDialog.args = {
showCloseButton: false as unknown as InputSignal<boolean>,
showCloseButton: false,
showNestedCloseButton: false,
};
72 changes: 72 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
Markus-Ende marked this conversation as resolved.
Show resolved Hide resolved
"migrations": [
{
"cli": "nx",
"version": "19.2.0-beta.2",
"description": "Updates the default workspace data directory to .nx/workspace-data",
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
"package": "nx",
"name": "19-2-0-move-graph-cache-directory"
},
{
"cli": "nx",
"version": "19.2.2-beta.0",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"package": "nx",
"name": "19-2-2-update-nx-wrapper"
},
{
"version": "19.2.4-beta.0",
"description": "Set project name in nx.json explicitly",
"implementation": "./src/migrations/update-19-2-4/set-project-name",
"x-repair-skip": true,
"package": "nx",
"name": "19-2-4-set-project-name"
},
{
"cli": "nx",
"version": "19.1.0-beta.6",
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
"package": "@nx/eslint-plugin",
"name": "update-19-1-0-rename-no-extra-semi"
},
{
"cli": "nx",
"version": "19.1.0-beta.2",
"requires": {
"@angular/core": ">=18.0.0"
},
"description": "Update the @angular/cli package version to ~18.0.0.",
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-18-0-0"
},
{
"cli": "nx",
"version": "19.2.1-beta.0",
"requires": {
"@angular-eslint/eslint-plugin": ">=18.0.0"
},
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
"package": "@nx/angular",
"name": "add-typescript-eslint-utils"
},
{
"version": "18.0.0",
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
"factory": "./migrations/invalid-two-way-bindings/bundle",
"package": "@angular/core",
"name": "invalid-two-way-bindings"
},
{
"version": "18.0.0",
"description": "Replace deprecated HTTP related modules with provider functions",
"factory": "./migrations/http-providers/bundle",
"package": "@angular/core",
"name": "migration-http-providers"
}
]
}
Loading