New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

allure-playwright

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-playwright - npm Package Compare versions

Comparing version 3.0.0-beta.10 to 3.0.0-beta.11

33

dist/cjs/index.js

@@ -20,3 +20,2 @@ "use strict";

var _nodeFs = require("node:fs");
var _nodeOs = _interopRequireDefault(require("node:os"));
var _nodePath = _interopRequireDefault(require("node:path"));

@@ -62,3 +61,2 @@ var _nodeProcess = _interopRequireDefault(require("node:process"));

_defineProperty(this, "allureRuntime", void 0);
_defineProperty(this, "hostname", _nodeProcess["default"].env.ALLURE_HOST_NAME || _nodeOs["default"].hostname());
_defineProperty(this, "globalStartTime", new Date());

@@ -159,4 +157,4 @@ _defineProperty(this, "processedDiffs", []);

var project = suite.project();
var pathElements = _nodePath["default"].relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file).split(_nodePath["default"].sep);
var relativeFile = pathElements.join("/");
var testFilePath = _nodePath["default"].relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file);
var relativeFile = testFilePath.split(_nodePath["default"].sep).join("/");
// root > project > file path > test.describe...

@@ -176,18 +174,9 @@ var _suite$titlePath = suite.titlePath(),

};
result.labels.push((0, _reporter.getLanguageLabel)());
result.labels.push((0, _reporter.getFrameworkLabel)("playwright"));
result.labels.push((0, _reporter.getPackageLabel)(testFilePath));
result.labels.push({
name: _allureJsCommons.LabelName.LANGUAGE,
value: "JavaScript"
});
result.labels.push({
name: _allureJsCommons.LabelName.FRAMEWORK,
value: "Playwright"
});
result.labels.push({
name: "titlePath",
value: suite.titlePath().join(" > ")
});
result.labels.push({
name: _allureJsCommons.LabelName.PACKAGE,
value: pathElements.join(".")
});

@@ -280,14 +269,8 @@ // support for earlier playwright versions

threadId = result.parallelIndex !== undefined ? result.parallelIndex : result.workerIndex;
thread = _nodeProcess["default"].env.ALLURE_THREAD_NAME || "".concat(this.hostname, "-").concat(_nodeProcess["default"].pid, "-playwright-worker-").concat(threadId);
thread = "pid-".concat(_nodeProcess["default"].pid, "-worker-").concat(threadId);
error = result.error; // only apply default suites if not set by user
_test$parent$titlePat = test.parent.titlePath(), _test$parent$titlePat2 = _toArray(_test$parent$titlePat), projectSuiteTitle = _test$parent$titlePat2[1], fileSuiteTitle = _test$parent$titlePat2[2], suiteTitles = _test$parent$titlePat2.slice(3);
this.allureRuntime.updateTest(testUuid, function (testResult) {
testResult.labels.push({
name: _allureJsCommons.LabelName.HOST,
value: _this.hostname
});
testResult.labels.push({
name: _allureJsCommons.LabelName.THREAD,
value: thread
});
testResult.labels.push((0, _reporter.getHostLabel)());
testResult.labels.push((0, _reporter.getThreadLabel)(thread));
if (projectSuiteTitle && !(0, _sdk.hasLabel)(testResult, _allureJsCommons.LabelName.PARENT_SUITE)) {

@@ -294,0 +277,0 @@ testResult.labels.push({

@@ -24,3 +24,2 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

import { existsSync } from "node:fs";
import os from "node:os";
import path from "node:path";

@@ -30,3 +29,3 @@ import process from "node:process";

import { extractMetadataFromString, getMessageAndTraceFromError, hasLabel, stripAnsi } from "allure-js-commons/sdk";
import { ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE, ReporterRuntime, createDefaultWriter, escapeRegExp, getEnvironmentLabels, md5, parseTestPlan, readImageAsBase64 } from "allure-js-commons/sdk/reporter";
import { ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE, ReporterRuntime, createDefaultWriter, escapeRegExp, getEnvironmentLabels, getFrameworkLabel, getHostLabel, getLanguageLabel, getPackageLabel, getThreadLabel, md5, parseTestPlan, readImageAsBase64 } from "allure-js-commons/sdk/reporter";
import { allurePlaywrightLegacyApi } from "./legacy.js";

@@ -44,3 +43,2 @@ import { statusToAllureStats } from "./utils.js";

_defineProperty(this, "allureRuntime", void 0);
_defineProperty(this, "hostname", process.env.ALLURE_HOST_NAME || os.hostname());
_defineProperty(this, "globalStartTime", new Date());

@@ -141,4 +139,4 @@ _defineProperty(this, "processedDiffs", []);

var project = suite.project();
var pathElements = path.relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file).split(path.sep);
var relativeFile = pathElements.join("/");
var testFilePath = path.relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file);
var relativeFile = testFilePath.split(path.sep).join("/");
// root > project > file path > test.describe...

@@ -158,18 +156,9 @@ var _suite$titlePath = suite.titlePath(),

};
result.labels.push(getLanguageLabel());
result.labels.push(getFrameworkLabel("playwright"));
result.labels.push(getPackageLabel(testFilePath));
result.labels.push({
name: LabelName.LANGUAGE,
value: "JavaScript"
});
result.labels.push({
name: LabelName.FRAMEWORK,
value: "Playwright"
});
result.labels.push({
name: "titlePath",
value: suite.titlePath().join(" > ")
});
result.labels.push({
name: LabelName.PACKAGE,
value: pathElements.join(".")
});

@@ -262,14 +251,8 @@ // support for earlier playwright versions

threadId = result.parallelIndex !== undefined ? result.parallelIndex : result.workerIndex;
thread = process.env.ALLURE_THREAD_NAME || "".concat(this.hostname, "-").concat(process.pid, "-playwright-worker-").concat(threadId);
thread = "pid-".concat(process.pid, "-worker-").concat(threadId);
error = result.error; // only apply default suites if not set by user
_test$parent$titlePat = test.parent.titlePath(), _test$parent$titlePat2 = _toArray(_test$parent$titlePat), projectSuiteTitle = _test$parent$titlePat2[1], fileSuiteTitle = _test$parent$titlePat2[2], suiteTitles = _test$parent$titlePat2.slice(3);
this.allureRuntime.updateTest(testUuid, function (testResult) {
testResult.labels.push({
name: LabelName.HOST,
value: _this.hostname
});
testResult.labels.push({
name: LabelName.THREAD,
value: thread
});
testResult.labels.push(getHostLabel());
testResult.labels.push(getThreadLabel(thread));
if (projectSuiteTitle && !hasLabel(testResult, LabelName.PARENT_SUITE)) {

@@ -276,0 +259,0 @@ testResult.labels.push({

@@ -27,3 +27,2 @@ /// <reference types="node" />

private allureRuntime;
private hostname;
private globalStartTime;

@@ -30,0 +29,0 @@ private processedDiffs;

{
"name": "allure-playwright",
"version": "3.0.0-beta.10",
"version": "3.0.0-beta.11",
"description": "Allure Playwright integration",

@@ -58,3 +58,3 @@ "keywords": [

"dependencies": {
"allure-js-commons": "3.0.0-beta.10"
"allure-js-commons": "3.0.0-beta.11"
},

@@ -76,3 +76,3 @@ "devDependencies": {

"allure-commandline": "^2.29.0",
"allure-vitest": "3.0.0-beta.10",
"allure-vitest": "3.0.0-beta.11",
"eslint": "^8.57.0",

@@ -79,0 +79,0 @@ "eslint-config-prettier": "^9.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc