Skip to content

Commit

Permalink
chore(deps): bump prettier from 3.0.3 to 3.1.1 (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Dec 14, 2023
1 parent d11a88a commit 9856b61
Show file tree
Hide file tree
Showing 29 changed files with 343 additions and 262 deletions.
18 changes: 9 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: 'weekly'
interval: "weekly"
groups:
babel:
patterns:
- '@babel/*'
- "@babel/*"
reviewers:
- '@ExpediaGroup/cypress-codegen-admins'
- package-ecosystem: 'github-actions'
directory: '/'
- "@ExpediaGroup/cypress-codegen-admins"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'weekly'
interval: "weekly"
reviewers:
- '@ExpediaGroup/cypress-codegen-admins'
- "@ExpediaGroup/cypress-codegen-admins"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
pnpm-lock.yaml
cypress
9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins:
- - '@semantic-release/commit-analyzer'
- - "@semantic-release/commit-analyzer"
- preset: angular
releaseRules:
- breaking: true
Expand All @@ -12,7 +12,7 @@ plugins:
release: patch
- scope: no-release
release: false
- '@semantic-release/release-notes-generator'
- '@semantic-release/github'
- "@semantic-release/release-notes-generator"
- "@semantic-release/github"
branches:
- main
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Push your changes to your branch and open a pull request against the parent repo

Upon Pull Request submission, your code will be reviewed by the maintainers. They will confirm at least the following:

- Tests run successfully (unit, coverage, integration, style).
- Contribution policy has been followed.
- Tests run successfully (unit, coverage, integration, style).
- Contribution policy has been followed.

One (human) reviewer will need to sign off on your Pull Request before it can be merged.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ A [Cypress](https://www.cypress.io/) plugin and CLI tool which automatically add

## Table of Contents

- [Why Do I Need This Plugin?](#why-do-i-need-this-plugin)
- [Installation](#installation)
- [Usage](#usage)
- [Example](#example)
- [Configuration](#configuration)
- [Why Do I Need This Plugin?](#why-do-i-need-this-plugin)
- [Installation](#installation)
- [Usage](#usage)
- [Example](#example)
- [Configuration](#configuration)

## Why Do I Need This Plugin?

Expand All @@ -33,27 +33,27 @@ Model your Cypress project exactly like [the one in this repository](https://git
1. Add the required plugin code to `cypress.config.ts` like so:

```ts
import { cypressCodegen } from 'cypress-codegen';
import { defineConfig } from 'cypress';
import { cypressCodegen } from "cypress-codegen";
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
cypressCodegen(on, config);
return config;
}
},

component: {
setupNodeEvents(on, config) {
cypressCodegen(on, config);
return config;
e2e: {
setupNodeEvents(on, config) {
cypressCodegen(on, config);
return config;
},
},

component: {
setupNodeEvents(on, config) {
cypressCodegen(on, config);
return config;
},
devServer: {
framework: "react",
bundler: "vite",
},
},
devServer: {
framework: 'react',
bundler: 'vite'
}
}
});
```

Expand Down
26 changes: 16 additions & 10 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
import { cypressCodegen } from 'cypress-codegen';
import { defineConfig } from 'cypress';
import { cypressCodegen } from "cypress-codegen";
import { defineConfig } from "cypress";

export default defineConfig({
screenshotOnRunFailure: false,
video: false,

e2e: {
setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) {
setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
) {
cypressCodegen(on, config);
return config;
}
},
},

component: {
devServer: {
framework: 'react',
bundler: 'vite',
viteConfig: {}
framework: "react",
bundler: "vite",
viteConfig: {},
},
setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) {
setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
) {
cypressCodegen(on, config);
return config;
}
}
},
},
});
4 changes: 2 additions & 2 deletions cypress/commands/custom-mount.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from 'react';
import * as React from "react";

export const customMount = (Component: React.FC) => {
cy.mount(
<div>
<Component />
</div>
</div>,
);
};

Expand Down
8 changes: 4 additions & 4 deletions cypress/commands/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ limitations under the License.
*/

export function functionExample(input: string) {
cy.log('Here is a custom command!')
.log('And it preserves my code styling')
.log('When I chain commands on new lines!');
cy.log("Here is a custom command!")
.log("And it preserves my code styling")
.log("When I chain commands on new lines!");
cy.contains(input);
}

export const arrowFunctionExample = (input: string) => {
cy.log('Here is a custom command from an arrow function!');
cy.log("Here is a custom command from an arrow function!");
cy.contains(input);
};

Expand Down
6 changes: 3 additions & 3 deletions cypress/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** Generated by cypress-codegen **/
export * from './example';
export * from './custom-mount';
export * from './nested/nested-example';
export * from "./example";
export * from "./custom-mount";
export * from "./nested/nested-example";
2 changes: 1 addition & 1 deletion cypress/commands/nested/nested-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ limitations under the License.
*/

export const nestedExample = (input: string) => {
cy.log('Here is a custom command in a nested directory!');
cy.log("Here is a custom command in a nested directory!");
cy.contains(input);
};

Expand Down
66 changes: 33 additions & 33 deletions cypress/component/component-example.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import * as React from 'react';

const componentText = 'Here is a component';

describe('Example Test', () => {
beforeEach(() => {
cy.mount(<p>{componentText}</p>);
});

it('should import custom commands in component tests', () => {
cy.functionExample(componentText);
});

it('should dynamically import custom commands from arrow functions', () => {
cy.arrowFunctionExample(componentText);
});

it('should dynamically import nested custom commands', () => {
cy.nestedExample(componentText);
});

it('should chain custom commands', () => {
cy.log(componentText)
.functionExample(componentText)
.arrowFunctionExample(componentText)
.nestedExample(componentText);
});

it('should support custom mount commands', () => {
const myComponent = () => <>{'Different text'}</>;
cy.customMount(myComponent);
cy.contains('Different text');
});
import * as React from "react";

const componentText = "Here is a component";

describe("Example Test", () => {
beforeEach(() => {
cy.mount(<p>{componentText}</p>);
});

it("should import custom commands in component tests", () => {
cy.functionExample(componentText);
});

it("should dynamically import custom commands from arrow functions", () => {
cy.arrowFunctionExample(componentText);
});

it("should dynamically import nested custom commands", () => {
cy.nestedExample(componentText);
});

it("should chain custom commands", () => {
cy.log(componentText)
.functionExample(componentText)
.arrowFunctionExample(componentText)
.nestedExample(componentText);
});

it("should support custom mount commands", () => {
const myComponent = () => <>{"Different text"}</>;
cy.customMount(myComponent);
cy.contains("Different text");
});
});
14 changes: 7 additions & 7 deletions cypress/e2e/e2e-example.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

const expectedText = 'Kitchen Sink';
const expectedText = "Kitchen Sink";

describe('Example Test', () => {
describe("Example Test", () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/');
cy.visit("https://example.cypress.io/");
});

it('should dynamically import custom commands from functions', () => {
it("should dynamically import custom commands from functions", () => {
cy.functionExample(expectedText);
});

it('should dynamically import custom commands from arrow functions', () => {
it("should dynamically import custom commands from arrow functions", () => {
cy.arrowFunctionExample(expectedText);
});

it('should dynamically import nested custom commands', () => {
it("should dynamically import nested custom commands", () => {
cy.nestedExample(expectedText);
});

it('should chain custom commands', () => {
it("should chain custom commands", () => {
cy.log(expectedText)
.functionExample(expectedText)
.arrowFunctionExample(expectedText)
Expand Down
18 changes: 9 additions & 9 deletions cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
6 changes: 3 additions & 3 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { mount } from 'cypress/react18';
import { mount } from "cypress/react18";

// Augment the Cypress namespace to include type definitions for
// your custom command.
Expand All @@ -25,7 +25,7 @@ declare global {
}
}

Cypress.Commands.add('mount', mount);
Cypress.Commands.add("mount", mount);

/** Generated by cypress-codegen **/
import('../commands').then(Cypress.Commands.addAll);
import("../commands").then(Cypress.Commands.addAll);
2 changes: 1 addition & 1 deletion cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/** Generated by cypress-codegen **/
import('../commands').then(Cypress.Commands.addAll);
import("../commands").then(Cypress.Commands.addAll);
3 changes: 1 addition & 2 deletions packages/cypress-codegen/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"github/no-then": "off",
"i18n-text/no-en": "off",
"import/no-unresolved": "off",
"filenames/match-regex": [2, "(^[a-z-]+$)|(^[a-z-]+\\.test$)"],
"quotes": ["error", "single"]
"filenames/match-regex": [2, "(^[a-z-]+$)|(^[a-z-]+\\.test$)"]
},
"env": {
"node": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/cypress-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"chalk": "4.1.2",
"commander": "11.1.0",
"glob": "10.3.10",
"prettier": "3.0.3"
"prettier": "3.1.1"
},
"peerDependencies": {
"cypress": ">=12"
Expand Down
2 changes: 1 addition & 1 deletion packages/cypress-codegen/reset.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// https://github.com/total-typescript/ts-reset
import '@total-typescript/ts-reset';
import "@total-typescript/ts-reset";
Loading

0 comments on commit 9856b61

Please sign in to comment.