Skip to content

Commit

Permalink
chore: update skyux-dev-infra and nx (#1977)
Browse files Browse the repository at this point in the history
* chore: update skyux-dev-infra and nx

* Fix intl-tel-input css import with esbuild

* Prettier

* Update test

* Satisfy cypress chaining lint rule.

* Fix e2e test

* Simplify change

* Fix e2e test
  • Loading branch information
johnhwhite authored Feb 6, 2024
1 parent 79d86fb commit 5f3b384
Show file tree
Hide file tree
Showing 471 changed files with 3,101 additions and 3,067 deletions.
4 changes: 2 additions & 2 deletions apps/code-examples/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"apps/code-examples/src/**/*.ts",
"apps/code-examples/src/**/*.html"
"{projectRoot}/src/**/*.ts",
"{projectRoot}/src/**/*.html"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DEPARTMENTS = [
},
];

export const JOB_TITLES: { [name: string]: AutocompleteOption[] } = {
export const JOB_TITLES: Record<string, AutocompleteOption[]> = {
Marketing: [
{
id: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
} from '@angular/forms';
import { SkyRadioModule } from '@skyux/forms';

type Item = {
interface Item {
icon: string;
label: string;
name: string;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
import { SkyRadioModule } from '@skyux/forms';
import { SkyHelpInlineModule } from '@skyux/indicators';

type Item = {
interface Item {
disabled: boolean;
name: string;
value: string;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
} from '@angular/forms';
import { SkyRadioModule } from '@skyux/forms';

type Item = {
interface Item {
name: string;
value: string;
disabled: boolean;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
} from '@angular/forms';
import { SkyToggleSwitchModule } from '@skyux/forms';

type ToggleSwitchFormType = {
interface ToggleSwitchFormType {
controlToggle: FormControl<boolean | null>;
dynamicToggle: FormControl<boolean | null>;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { SkyHelpInlineModule } from '@skyux/indicators';

import { Subject, takeUntil } from 'rxjs';

type ToggleSwitchFormType = {
interface ToggleSwitchFormType {
controlToggle: FormControl<boolean | null>;
dynamicToggle: FormControl<boolean | null>;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {

import { Subject } from 'rxjs';

type TokenItem = {
interface TokenItem {
label: string;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
} from '@skyux/inline-form';
import { SkyRepeaterModule } from '@skyux/lists';

type Item = {
interface Item {
id: string;
title: string | undefined;
note: string | undefined;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { SkyCheckboxModule, SkyInputBoxModule } from '@skyux/forms';
import { SkyToolbarModule } from '@skyux/layout';
import { SkyFilterModule, SkyRepeaterModule } from '@skyux/lists';

type Filter = {
interface Filter {
name: string;
value: string | boolean;
};
}

type Fruit = {
interface Fruit {
name: string;
type: string;
color: string;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export class FilterModalComponent {
}

#setFormFilters(appliedFilters: Filter[]): void {
for (let i = 0; i < appliedFilters.length; i++) {
if (appliedFilters[i].name === 'fruitType') {
this.fruitType = `${appliedFilters[i].value}`;
for (const appliedFilter of appliedFilters) {
if (appliedFilter.name === 'fruitType') {
this.fruitType = `${appliedFilter.value}`;
}

if (appliedFilters[i].name === 'hideOrange') {
this.hideOrange = !!appliedFilters[i].value;
if (appliedFilter.name === 'hideOrange') {
this.hideOrange = !!appliedFilter.value;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
} from '@skyux/inline-form';
import { SkyRepeaterModule } from '@skyux/lists';

type Item = {
interface Item {
id: string;
title: string | undefined;
note: string | undefined;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { Component, OnInit } from '@angular/core';
import { SkyToolbarModule } from '@skyux/layout';
import { SkyRepeaterModule, SkySortModule } from '@skyux/lists';

type Item = {
interface Item {
title: string;
note: string;
assignee: string;
date: Date;
};
type SortOption = {
}
interface SortOption {
id: number;
label: string;
name: keyof Item;
descending: boolean;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import { ColDef, GridOptions, ICellRendererParams } from 'ag-grid-community';

import { ContactContextMenuComponent } from './contact-context-menu.component';

type Contact = {
interface Contact {
name: string;
organization: string;
emailAddress: string;
};
}

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { SkyDropdownModule } from '@skyux/popovers';

type DropdownItem = {
interface DropdownItem {
name: string;
disabled: boolean;
};
}

@Component({
standalone: true,
Expand Down
3 changes: 1 addition & 2 deletions apps/e2e/a11y-storybook-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/e2e/a11y-storybook-e2e/**/*.{js,ts}"]
"lintFilePatterns": ["{projectRoot}/**/*.{js,ts}"]
}
}
},
Expand Down
10 changes: 3 additions & 7 deletions apps/e2e/a11y-storybook-e2e/src/e2e/skip-link.component.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ describe('a11y-storybook', () => {
),
);
it('should render the component', () => {
cy.get('#ready')
.should('exist')
.end()
.get('.sky-skip-link')
.should('exist')
.focus()
.should('be.visible');
cy.get('#ready').should('exist');
cy.get('.sky-skip-link').should('exist').focus();
cy.get('.sky-skip-link').should('be.visible');
cy.skyVisualTest(`skiplinkcomponent-skiplink--skip-link-${theme}`, {
capture: 'fullPage',
overwrite: true,
Expand Down
5 changes: 1 addition & 4 deletions apps/e2e/a11y-storybook/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"apps/e2e/a11y-storybook/**/*.ts",
"apps/e2e/a11y-storybook/**/*.html"
]
"lintFilePatterns": ["{projectRoot}/**/*.ts", "{projectRoot}/**/*.html"]
}
},
"storybook": {
Expand Down
3 changes: 1 addition & 2 deletions apps/e2e/action-bars-storybook-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/e2e/action-bars-storybook-e2e/**/*.{js,ts}"]
"lintFilePatterns": ["{projectRoot}/**/*.{js,ts}"]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ describe('action-bars-storybook - summary action bar', () => {
cy.get('sky-modal-content')
.should('exist')
.should('be.visible')
.click()
.end();
.click();
}

cy.window().skyVisualTest(
Expand Down Expand Up @@ -121,11 +120,11 @@ describe('action-bars-storybook - summary action bar', () => {
.get('sky-summary-action-bar-secondary-actions button')
.should('exist')
.should('be.visible')
.click()
.end()
.get(
'sky-dropdown-menu sky-summary-action-bar-secondary-action',
)
.click();

cy.get(
'sky-dropdown-menu sky-summary-action-bar-secondary-action',
)
.should('exist')
.should('be.visible')
.end()
Expand Down
6 changes: 1 addition & 5 deletions apps/e2e/action-bars-storybook/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,8 @@
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/e2e/action-bars-storybook/**/*.ts",
"apps/e2e/action-bars-storybook/**/*.html"
]
"lintFilePatterns": ["{projectRoot}/**/*.ts", "{projectRoot}/**/*.html"]
}
},
"serve-static": {
Expand Down
Loading

0 comments on commit 5f3b384

Please sign in to comment.