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

Fix peer deps, remove redundant deps #1046

Merged
merged 21 commits into from
Jul 5, 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
1,880 changes: 793 additions & 1,087 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/arg-npm-4.1.3-1748b966a8-969b491082.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/yn-npm-3.1.1-8ad4259784-2c487b0e14.zip
Binary file not shown.
6 changes: 1 addition & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ compressionLevel: mixed
enableGlobalCache: false

packageExtensions:
allure-js-commons@*:
dependencies:
allure-playwright: "workspace:*"
allure-vitest: "workspace:*"
codeceptjs@*:
dependencies:
debug: "*"
newman@*:
dependencies:
peerDependencies:
newman-reporter-allure: "workspace:*"

plugins:
Expand Down
4 changes: 2 additions & 2 deletions packages/allure-codeceptjs/babel.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
[
"@babel/preset-env",
{
"modules": "commonjs",
"modules": "commonjs"
}
]
],
"plugins": [
"babel-plugin-add-module-exports",
"babel-plugin-add-module-exports"
],
"targets": {
"esmodules": false,
Expand Down
5 changes: 3 additions & 2 deletions packages/allure-codeceptjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"expect": "^29.7.0",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"codeceptjs": ">=2.3.6"
}
}
8 changes: 4 additions & 4 deletions packages/allure-codeceptjs/test/spec/skipped.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { runCodeceptJsInlineTest } from "../utils.js";
it("doesn't report skipped features and steps", async () => {
const { tests } = await runCodeceptJsInlineTest({
"skipped_feature1.test.js": `
xFeature("logout-feature");
xFeature("logout-feature1");
Scenario("logout-scenario1", async () => {});
`,
"skipped_feature2.test.js": `
Feature.skip("logout-feature");
Feature.skip("logout-feature2");
Scenario("logout-scenario1", async () => {});
`,
"skipped_scenario1.test.js": `
Feature("logout-feature");
Feature("logout-feature3");
xScenario("logout-scenario1", async () => {});
`,
"skipped_scenario2.test.js": `
Feature("logout-feature");
Feature("logout-feature4");
Scenario.skip("logout-scenario1", async () => {});
`,
});
Expand Down
17 changes: 2 additions & 15 deletions packages/allure-cucumberjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,16 @@
"@babel/preset-env": "^7.24.6",
"@babel/preset-typescript": "^7.24.6",
"@cucumber/cucumber": "^10.8.0",
"@cucumber/gherkin": "^28.0.0",
"@cucumber/gherkin-streams": "^5.0.1",
"@cucumber/gherkin-utils": "^9.0.0",
"@cucumber/message-streams": "^4.0.1",
"@cucumber/messages": "^25.0.1",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/chai": "^4.3.6",
"@types/chai-like": "^1.1.1",
"@types/chai-things": "^0.0.36",
"@types/eslint": "^8",
"@types/glob": "^8.1.0",
"@types/node": "^20.14.2",
"@types/sinon": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"allure-commandline": "^2.29.0",
"allure-vitest": "workspace:*",
"babel-plugin-add-module-exports": "^1.0.4",
"chai": "^4.3.8",
"chai-like": "^1.1.1",
"chai-things": "^0.2.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
Expand All @@ -86,12 +74,11 @@
"eslint-plugin-prefer-arrow": "^1.2.3",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"sinon": "^18.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"@cucumber/cucumber": "^10.8.0"
"@cucumber/cucumber": ">=10.8.0",
"@cucumber/messages": ">=24.1.0"
}
}
12 changes: 8 additions & 4 deletions packages/allure-cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/eslint": "^8",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "^20.14.2",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"allure-commandline": "^2.29.0",
"allure-vitest": "workspace:*",
"babel-plugin-add-module-exports": "^1.0.4",
"cypress": "^13.12.0",
"enquirer": "^2.3.6",
"esbuild": "^0.22.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -87,8 +84,15 @@
"eslint-plugin-prefer-arrow": "^1.2.3",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"cypress": ">=12.17.4"
},
"peerDependenciesMeta": {
"cypress": {
"optional": true
}
}
}
11 changes: 9 additions & 2 deletions packages/allure-jasmine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,18 @@
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"jasmine": "^3.4.0",
"jasmine": "^5.1.0",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"jasmine": ">=2.7.0"
},
"peerDependenciesMeta": {
"jasmine": {
"optional": true
}
}
}
21 changes: 13 additions & 8 deletions packages/allure-jasmine/test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fork } from "node:child_process";
import { randomUUID } from "node:crypto";
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
import { dirname, extname, join } from "node:path";
import path from "node:path";
import { attachment, step } from "allure-js-commons";
import type { AllureResults } from "allure-js-commons/sdk";
import { MessageReader } from "allure-js-commons/sdk/reporter";
Expand All @@ -10,9 +10,9 @@ export const runJasmineInlineTest = async (
files: Record<string, string>,
env?: Record<string, string>,
): Promise<AllureResults> => {
const testDir = join(__dirname, "fixtures", randomUUID());
const testDir = path.join(__dirname, "fixtures", randomUUID());
const testFiles = {
"spec/support/jasmine.json": await readFile(join(__dirname, "./samples/spec/support/jasmine.json"), "utf8"),
"spec/support/jasmine.json": await readFile(path.join(__dirname, "./samples/spec/support/jasmine.json"), "utf8"),
// eslint-disable-next-line @typescript-eslint/no-require-imports
"spec/helpers/allure.js": require("./samples/spec/helpers/modern/allure.cjs"),
...files,
Expand All @@ -22,16 +22,22 @@ export const runJasmineInlineTest = async (

for (const file of Object.keys(testFiles)) {
await step(file, async () => {
const filePath = join(testDir, file);
const filePath = path.join(testDir, file);

await mkdir(dirname(filePath), { recursive: true });
await mkdir(path.dirname(filePath), { recursive: true });
const content: string = testFiles[file as keyof typeof testFiles];
await writeFile(filePath, content, "utf8");
await attachment(file, content, { encoding: "utf-8", contentType: "text/plain", fileExtension: extname(file) });
await attachment(file, content, {
encoding: "utf-8",
contentType: "text/plain",
fileExtension: path.extname(file),
});
});
}

const modulePath = await step("resolve jasmine", () => require.resolve("jasmine/bin/jasmine"));
const modulePath = await step("resolve jasmine", () =>
path.resolve(require.resolve("jasmine"), "../../bin/jasmine.js"),
);
const args: string[] = [];
const testProcess = await step(`${modulePath} ${args.join(" ")}`, () => {
return fork(modulePath, args, {
Expand All @@ -47,7 +53,6 @@ export const runJasmineInlineTest = async (

const messageReader = new MessageReader();

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
testProcess.on("message", messageReader.handleMessage);
testProcess.stdout?.setEncoding("utf8").on("data", (chunk) => {
process.stdout.write(String(chunk));
Expand Down
34 changes: 24 additions & 10 deletions packages/allure-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,20 @@
"test": "vitest run"
},
"dependencies": {
"@jest/expect": "^29.7.0",
"allure-js-commons": "workspace:*",
"jest-circus": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0"
"allure-js-commons": "workspace:*"
},
"devDependencies": {
"@babel/cli": "^7.24.6",
"@babel/core": "^7.24.6",
"@babel/preset-env": "^7.24.6",
"@babel/preset-typescript": "^7.24.6",
"@jest/core": "^29.7.0",
"@jest/environment": "^29.7.0",
"@jest/expect": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/eslint": "^8",
"@types/node": "^20.14.2",
"@types/source-map-support": "^0.5.7",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"allure-commandline": "^2.29.0",
Expand All @@ -79,12 +74,31 @@
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"jest-cli": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"jest": ">=28.0.0",
"jest-cli": ">=28.0.0",
"jest-environment-jsdom": ">=28.0.0",
"jest-environment-node": ">=28.0.0"
},
"peerDependenciesMeta": {
"jest": {
"optional": true
},
"jest-cli": {
"optional": true
},
"jest-environment-jsdom": {
"optional": true
},
"jest-environment-node": {
"optional": true
}
}
}
13 changes: 8 additions & 5 deletions packages/allure-js-commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"@types/eslint": "^8",
"@types/md5": "^2",
"@types/node": "^20.14.2",
"@types/source-map-support": "^0.5.7",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.57.0",
Expand All @@ -82,13 +81,17 @@
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"expect": "^29.7.0",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"allure-playwright": "workspace:*"
baev marked this conversation as resolved.
Show resolved Hide resolved
},
"peerDependenciesMeta": {
"allure-playwright": {
"optional": true
}
}
}
11 changes: 2 additions & 9 deletions packages/allure-mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"@babel/preset-typescript": "^7.24.6",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/chai": "^4.3.6",
"@types/eslint": "^8",
"@types/mocha": "^10.0.1",
"@types/node": "^20.14.2",
Expand All @@ -74,9 +73,6 @@
"allure-vitest": "workspace:*",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-transform-import-meta": "^2.2.1",
"chai": "^4.3.8",
"chai-like": "^1.1.1",
"chai-things": "^0.2.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
Expand All @@ -85,16 +81,13 @@
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"glob": "^10.4.1",
"mocha": "^10.2.0",
"mocha": "^10.6.0",
"npm-run-all2": "^6.1.2",
"rimraf": "^5.0.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"mocha": ">=6.2.x"
"mocha": ">=6.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/allure-mocha/src/AllureMochaReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class AllureMochaReporter extends Mocha.reporters.Base {
return;
}

const name = hook.originalTitle ?? "";
const name = hook.originalTitle ?? hook.title ?? "";
if (hookCategory) {
this.currentHook = this.runtime.startFixture(scopeUuid, hookCategory, { name });
}
Expand Down
4 changes: 2 additions & 2 deletions packages/allure-mocha/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export const applyTestPlan = (ids: ReadonlySet<string>, selectors: ReadonlySet<s
const hookTypeRegexp = /^"(before|after) (all|each)"/;

export const getHookType = (hook: Mocha.Hook): HookType => {
if (hook.originalTitle) {
const match = hookTypeRegexp.exec(hook.originalTitle);
if (hook.title) {
const match = hookTypeRegexp.exec(hook.title);
if (match) {
return [match[1] as HookCategory, match[2] as HookScope];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cjs: const { it } = require("mocha");
// cjs: const { describe, it } = require("mocha");
// cjs: const { parentSuite } = require("allure-js-commons");
// esm: import { it } from "mocha";
// esm: import { describe, it } from "mocha";
// esm: import { parentSuite } from "allure-js-commons";

describe("foo", async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cjs: const { it } = require("mocha");
// cjs: const { describe, it } = require("mocha");
// cjs: const { subSuite } = require("allure-js-commons");
// esm: import { it } from "mocha";
// esm: import { describe, it } from "mocha";
// esm: import { subSuite } from "allure-js-commons";

describe("foo", async () => {
Expand Down
Loading
Loading