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

Removed the CLI script from the @replayio/cypress package #525

Merged
merged 3 commits into from
Jun 13, 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
5 changes: 5 additions & 0 deletions .changeset/gentle-bats-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@replayio/cypress": major
---

Removed the CLI script from the package. It's no longer possible to execute `npx @replayio/cypress run`
4 changes: 0 additions & 4 deletions packages/cypress/bin.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "2.1.3",
"description": "Plugin to record your Cypress tests with Replay",
"main": "./dist/index.js",
"bin": {
"replayio-cypress": "./bin.js"
},
"exports": {
".": "./dist/index.js",
"./support": "./dist/support.js",
Expand Down
92 changes: 0 additions & 92 deletions packages/cypress/src/bin.ts

This file was deleted.

185 changes: 0 additions & 185 deletions packages/cypress/src/cypress-repeat.ts

This file was deleted.

23 changes: 0 additions & 23 deletions packages/cypress/src/cypress-run.ts

This file was deleted.

7 changes: 2 additions & 5 deletions packages/cypress/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import chalk from "chalk";

import { CONNECT_TASK_NAME } from "./constants";
import CypressReporter, { PluginOptions, getMetadataFilePath, isStepEvent } from "./reporter";
import run from "./run";
import { PluginFeature } from "./features";
import { updateJUnitReports } from "./junit";
import type { StepEvent } from "./support";
Expand Down Expand Up @@ -98,16 +97,15 @@ function onBeforeBrowserLaunch(

const config = cypressReporter.config;
if (browser.name !== "electron" && config.version && semver.gte(config.version, "10.9.0")) {
const diagnosticConfig = cypressReporter.getDiagnosticConfig();
const noRecord = !!process.env.RECORD_REPLAY_NO_RECORD || diagnosticConfig.noRecord;
const noRecord = !!process.env.RECORD_REPLAY_NO_RECORD;

const env: NodeJS.ProcessEnv = {
...launchOptions.env,
RECORD_REPLAY_DRIVER: noRecord && browser.family === "chromium" ? __filename : undefined,
RECORD_ALL_CONTENT: noRecord ? undefined : "1",
RECORD_REPLAY_METADATA_FILE: initMetadataFile(getMetadataFilePath()),
RECORD_REPLAY_ENABLE_ASSERTS: process.env.RECORD_REPLAY_ENABLE_ASSERTS,
...diagnosticConfig.env,
...cypressReporter.getExtraEnv(),
};

debugEvents("Adding environment variables to browser: %o", env);
Expand Down Expand Up @@ -345,7 +343,6 @@ export function getCypressReporter() {
export default plugin;
export {
plugin,
run,
cypressOnWrapper as wrapOn,
onBeforeRun,
onBeforeBrowserLaunch,
Expand Down
Loading