Skip to content

Commit

Permalink
Updated (nearly) all dependencies
Browse files Browse the repository at this point in the history
This relates to #1068 [1].

Upgrade of prettier to v3 entails a change in trailing commas, which can
be seen in the diff, in addition to eslint, which has made some changes
regarding configuration files.

[1] #1068
  • Loading branch information
badeball committed Aug 5, 2024
1 parent 9d2e562 commit 31bd585
Show file tree
Hide file tree
Showing 64 changed files with 707 additions and 683 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## Unreleased

- Updated all dependencies, including esbuild, relates to [#1068](https://github.com/badeball/cypress-cucumber-preprocessor/issues/1068).

## v20.1.1

- Omit outputting empty "then" entries to the command log, relates to [#1214](https://github.com/badeball/cypress-cucumber-preprocessor/discussions/1214).
Expand Down
59 changes: 59 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: [
"examples/**/*",
"tmp/**/*",
"**/*.js",
"**/*.d.ts",
"eslint.config.mjs",
],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: ["tsconfig.eslint.json"],
},
},

rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],

"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-floating-promises": "error",
},
},
];
4 changes: 2 additions & 2 deletions examples/browserify-ts/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { preprocessor } from "@badeball/cypress-cucumber-preprocessor/browserify

async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
Expand All @@ -13,7 +13,7 @@ async function setupNodeEvents(
"file:preprocessor",
preprocessor(config, {
typescript: require.resolve("typescript"),
})
}),
);

// Make sure to return the config object as it might have been modified by the plugin.
Expand Down
2 changes: 1 addition & 1 deletion examples/browserify-ts/cypress/e2e/duckduckgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Then("I should see a search bar", () => {
.should("have.attr", "placeholder")
.and(
"match",
/Search the web without being tracked|Search without being tracked/
/Search the web without being tracked|Search without being tracked/,
);

assert.deepEqual({}, {});
Expand Down
2 changes: 1 addition & 1 deletion examples/ct-webpack-react-ts/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { devServer } from "@cypress/webpack-dev-server";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";

const webpackConfig = (
cypressConfig: Cypress.PluginConfigOptions
cypressConfig: Cypress.PluginConfigOptions,
): Webpack.Configuration => {
return {
resolve: {
Expand Down
4 changes: 2 additions & 2 deletions examples/esbuild-ts/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esb

async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
Expand All @@ -14,7 +14,7 @@ async function setupNodeEvents(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
}),
);

// Make sure to return the config object as it might have been modified by the plugin.
Expand Down
2 changes: 1 addition & 1 deletion examples/esbuild-ts/cypress/e2e/duckduckgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Then("I should see a search bar", () => {
.should("have.attr", "placeholder")
.and(
"match",
/Search the web without being tracked|Search without being tracked/
/Search the web without being tracked|Search without being tracked/,
);

assert.deepEqual({}, {});
Expand Down
4 changes: 2 additions & 2 deletions examples/type-module/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esb

async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
Expand All @@ -14,7 +14,7 @@ async function setupNodeEvents(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
}),
);

// Make sure to return the config object as it might have been modified by the plugin.
Expand Down
2 changes: 1 addition & 1 deletion examples/type-module/cypress/e2e/duckduckgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Then("I should see a search bar", () => {
.should("have.attr", "placeholder")
.and(
"match",
/Search the web without being tracked|Search without being tracked/
/Search the web without being tracked|Search without being tracked/,
);

assert.deepEqual({}, {});
Expand Down
4 changes: 2 additions & 2 deletions examples/webpack-ts/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-prepro

async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
Expand Down Expand Up @@ -39,7 +39,7 @@ async function setupNodeEvents(
],
},
},
})
}),
);

// Make sure to return the config object as it might have been modified by the plugin.
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-ts/cypress/e2e/duckduckgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Then("I should see a search bar", () => {
.should("have.attr", "placeholder")
.and(
"match",
/Search the web without being tracked|Search without being tracked/
/Search the web without being tracked|Search without being tracked/,
);

assert.deepEqual({}, {});
Expand Down
Loading

0 comments on commit 31bd585

Please sign in to comment.