Skip to content

Commit

Permalink
Removed the CLI script from the @replayio/cypress package (#525)
Browse files Browse the repository at this point in the history
* Removed the CLI script from the `@replayio/cypress` package

* update lock file

* remove extra files that are no longer used
  • Loading branch information
Andarist authored Jun 13, 2024
1 parent b7113e9 commit 82a525e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 548 deletions.
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

0 comments on commit 82a525e

Please sign in to comment.