Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: replayio/replay-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: replayio@1.4.1
Choose a base ref
...
head repository: replayio/replay-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jun 24, 2024

  1. Use modern moduleResolution setting (#553)

    * Use modern moduleResolution
    
    * revert redundant changes
    
    * move patch to resolutions
    
    * fixed test expectation
    
    * fixed the same expectation in another place
    Andarist authored Jun 24, 2024
    Copy the full SHA
    d208047 View commit details
  2. Copy the full SHA
    f1e815a View commit details
  3. add changeset for PRO-647 (#555)

    * add changeset
    
    * add PR number
    miriambudayr authored Jun 24, 2024
    Copy the full SHA
    40a1ec8 View commit details

Commits on Jun 25, 2024

  1. Update glob version to fix nested dependency deprecation warning (#556)

    * Update glob version
    
    * Update glob usage
    
    * Update Webpack plugin readme
    
    * Create large-cups-grin.md
    markerikson authored Jun 25, 2024
    Copy the full SHA
    89c5082 View commit details
  2. Copy the full SHA
    d7d654b View commit details
  3. Retry failed GitHub API requests with exponential backoff (#552)

    - Expand the existing `fetch` wrapper to also include automatic retries requests (with exponential backoff)
      - Add unit tests
    
    I imagine we can move this code into the `packages/shared` package as part of PRO-676
    bvaughn authored Jun 25, 2024
    Copy the full SHA
    4baf436 View commit details
  4. Copy the full SHA
    c6f2b8c View commit details
  5. Version Packages (#559)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jun 25, 2024
    Copy the full SHA
    26eff0a View commit details
  6. Setup Rollup-based build system for packages (#549)

    This PR creates a build system that allows us to inline/bundle some of the internal code into packages that are meant to be published. This reduces the versioning overhead and the result of all of this could look smth like this once we start moving things around:
    ```
    .
    ├── cypress
    │   └── import shared, test-utils
    ├── observability-node
    │   └── goes away
    ├── playwright
    │   └── import shared, test-utils
    ├── replay
    │   └── goes away
    ├── replayio
    │   └── imports shared
    ├── shared
    │   └── inlined
    └── test-utils
        └── inlined
    ```
    Andarist authored Jun 25, 2024
    Copy the full SHA
    ac7aa52 View commit details
  7. Move logger to shared (#560)

    - Move shared "logger" class from test-utils to the new shared package
    - Move shared GraphQL util methods from test-utils to the new shared package
    - Delete observability-node package
    Andarist authored Jun 25, 2024
    Copy the full SHA
    fb95bbe View commit details
  8. Copy the full SHA
    e7bd234 View commit details
  9. Version Packages (#563)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jun 25, 2024
    Copy the full SHA
    31a4fbe View commit details

Commits on Jun 26, 2024

  1. Make build script to be executed per pkg and introduce a watch script (

    …#567)
    
    * Make build script to be executed per pkg and introduce a watch script
    
    * add missing build script
    
    * fixed build
    
    * prettierignore turbo files
    Andarist authored Jun 26, 2024
    Copy the full SHA
    40beb19 View commit details
  2. Version Packages (#568)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jun 26, 2024
    Copy the full SHA
    a4fcfd8 View commit details
  3. Move legacy @replayio/replay Node APIs to new shared package (#562)

    - [x] Remove Node entrypoint from `replayio` package
      - This should technically require a new major version but since there was only a single, useless API exported up until this point– I think we can safely assume that nothing was using it
    - [x] Update cypress, playwright, puppeteer, and test-utils packages to depend on the new `@replay-cli/shared` package
    - [x] Moved some of the code from the legacy `@replayio/replay` package to `shared` or `test-utils` packages
      - At this point the only package still depending on the legacy `@replayio/replay` package (Node APIs) is `test-utils` which will require follow up work because some of the code is harder to extricate
    
    As of this PR the following dependencies have been updated:
    * `@replayio/cypress`
      * ✅  `@replay-cli/shared`
      * ❌ ~~`@replayio/replay`~~
    * `@replayio/playwright`
      * ✅  `@replay-cli/shared`
      * ❌ ~~`@replayio/replay`~~
    * `@replayio/puppeteer`
      * ✅  `@replay-cli/shared`
      * ❌ ~~`@replayio/replay`~~
    
    ### Next steps
     
    The major remaining work will be to update `@replayio/test-utils` to no longer depend on `@replayio/replay` (so that we can delete that package entirely)
    bvaughn authored Jun 26, 2024
    Copy the full SHA
    61128fe View commit details

Commits on Jun 27, 2024

  1. Copy the full SHA
    1861a30 View commit details
  2. Fixed turborepo caching on replayio changes (#569)

    * Fixed turborepo caching on `replayio` changes
    
    * fixed which pkg we actually install temporarily
    
    * do the same thing in playwright tests
    Andarist authored Jun 27, 2024
    Copy the full SHA
    2185925 View commit details
  3. Change logger to singleton (#564)

    Closes PRO-722.
    
    This PR moves the logger to singleton, we can keep all tags centrally. Will be needed for the sessionId change I'm doing.
    callingmedic911 authored Jun 27, 2024
    Copy the full SHA
    6ce3100 View commit details

Commits on Jun 28, 2024

  1. Moving more code into shared (#571)

    Continuation of [PRO-720](https://linear.app/replay/issue/PRO-720); follows up to #562
    
    Moving much of the `replayio` utility-type code into the new `shared` package so that we can use those Node APIs for querying the list of recording and uploading or deleting them.
    
    Most of this was rote but I did make a couple of changes worth calling out explicitly:
    - I changed the value returned by `fetchAuthIdsFromGraphQL` from `{ userId: string | null; workspaceId: string | null }` to `{ id: string; type: "user" | "workspace" }` and updated the callers; this was easier to work with (from a types perspective)
      - Grafana still gets `userId` _or_ `workspaceId` though, just not both
    - `Logger` is now eagerly instantiated; the `initialize()` method will accept a name and version and pass them along to the Grafana instance. Logging before initialization (or in Jest tests) will be local-only.
      - Note that a version parameter is also supported now (so we can associate Grafana logs with specific releases)
      - Both name and version should probably be imported and passed directly from `package.json` (which is what I am currently doing for Puppeteer and replayio)
      - Note that I've replaced the previous "replayio" name prefix with whatever the passed package name is
    - Lots of `debug(...args)` logging has been changed to `logger.debug("...", {...args})`
    - I've moved `mixpanel` and `launch-darkly` code over to `shared` too, even though (for now) `replayio` is the only thing using this stuff
    - I also tidied up the `getRecordings` method to not create so many throw-away arrays; (I didn't just do this for performance, but TypeScript was complaining about the return array containing recordings _and_ `undefined` with the previous code structure)
    
    ## Next steps
    - Remove the `test-utils` dependency on `@replayio/replay` (and delete `@replayio/replay`)
    - Update `test-utils` to be a peer dependency so that it will get inlined as well (to resolve ambiguous logger ownership)
    - Audit `logger.debug` entries and decide which ones should be `info`, `log`, or even `error`
    - Address any added `TODO [PRO-720]` comments
    bvaughn authored Jun 28, 2024
    Copy the full SHA
    33656ea View commit details
  2. Copy the full SHA
    9494138 View commit details
  3. Add device and session ID to logger (#565)

    * Use singleton logger
    
    * Add deviceId and sessionId to logger
    
    * logger: warn if already initialized
    
    * Resolve cache path
    
    * Refactor observability profile path
    callingmedic911 authored Jun 28, 2024
    Copy the full SHA
    18d4972 View commit details
  4. Add "whoami" command (#572)

    - [x] Merge replayio/docs#211 to add the new API keys redirect page
    
    ### [Loom demo](https://www.loom.com/share/448e43d722e84fae975a2013cbbd73cb)
    
    ### Screenshots
    | Scenario | |
    | :--- | :--- |
    | Not authenticated | ![Not authenticated](https://github.com/replayio/replay-cli/assets/29597/aa0c5ab6-feb8-4a16-9987-dbdc4f7538d0) |
    | Authenticated by email and password | ![Authenticated by email and password](https://github.com/replayio/replay-cli/assets/29597/2caee8ce-891b-4b06-907f-c33f2c721daf)
    | Team API key | ![Team API key](https://github.com/replayio/replay-cli/assets/29597/08df1946-cf6c-4bda-80a1-a11f124976db)
    | Personal API key | ![Personal API key](https://github.com/replayio/replay-cli/assets/29597/a39723cc-ad23-4efa-b6bd-a5ad30c0c5a7)
    bvaughn authored Jun 28, 2024
    Copy the full SHA
    db3f422 View commit details
  5. Forked @replayio/replay Node APIs by copying them into test-utils (#575)

    To deprecate `@replayio/replay` we need to remove the following dependencies from `test-utils`:
    * `listAllRecordings`
    * `removeRecording`
    * `uploadRecording`
    
    The two options we can explore are:
    
    1. Update `test-utils` to use the new shared variations of these methods (e.g. replace `listAllRecordings` from the legacy CLI with the new shared `getRecordings`).
       - **Cons**: The in-memory types for recordings are different– the metadata and the status field(s)– and it's unclear how much work would be required to bring them into alignment.
       - **Pros**: Once it's done, there is no further clean up work. We can delete the legacy CLI code and be done with it. (Pending the outcome of [PRO-730](https://linear.app/replay/issue/PRO-730/take-care-of-github-actions-after-nuking-the-old-cli) possibly.)
    1. Fork those three methods from `@replayio/replay` into `test-utils` and leave the cleanup for later.
       - **Cons**: Those methods refer to a lot of other methods and it would probably end up being a pretty big amount of stuff to fork over. Maybe we could do it as a batch and separate it into its own `test-utils/legacy` directory or something so that it's clear we need to clean it up. (This doesn't really move us any closer toward our longer-term code sharing goals in other words.)
       - **Pros**: It's probably probably faster and a little less risky in the short term, and most importantly it unblocks the observability and funnel tracking work.
    
    After some discussion with Mateusz, this PR implements the second option above.
    
    This PR also updates Cypress, Jest, Playwright, and Puppeteer packages so that `@replayio/test-utils` is a _peer dependency_ (so it will be inlined).
    bvaughn authored Jun 28, 2024
    Copy the full SHA
    c9b0400 View commit details

Commits on Jul 1, 2024

  1. Migrate logs in playwright package (#574)

    Move logger init and close from ReplayReporter in test-utils to ReplayPlaywrightReporter.
    callingmedic911 authored Jul 1, 2024
    Copy the full SHA
    10fc3f2 View commit details
  2. Copy the full SHA
    ac23741 View commit details
  3. Copy the full SHA
    dd41fa8 View commit details
  4. Rework the dts generation (#576)

    * Switch to using virtual _bundled directory
    
    * js bundling works
    
    * try to avoid using \0, still unsure what's better
    
    * port preconstruct dts plkugin
    
    * tweak
    
    * fix cwd
    
    * working dts emit without replacements
    
    * fixed issues
    
    * test change
    
    * wip
    
    * switch to vfs module
    
    * make sure that unique ids are generated for bundled modules
    
    * use the correct system 😭😭😭
    
    * simplify bundled plugin
    
    * fix resolve errors
    
    * tweak resolve Errors plugin further
    
    * ignore resolve errors for entries
    
    * getting closer
    
    * fix bundling scenarios
    
    * rollback temp changes
    
    * bring back dev dep
    
    * fix build crashes with multiple bundled dependencies
    
    * fix dep
    
    * fix user agent thing
    
    * remove redundant check from `esbuild` plugin
    
    * small tweak
    
    * call init functions where appropriate
    
    * fix reference
    Andarist authored Jul 1, 2024
    Copy the full SHA
    adb0dff View commit details
  5. Migration logs in cypress package (#581)

    * Migration logs in `cypress` package
    
    * Move logger.close to after:run
    
    * Add back `onAfterRun` hook
    
    * Rename logs
    callingmedic911 authored Jul 1, 2024
    Copy the full SHA
    431eaad View commit details

Commits on Jul 2, 2024

  1. Change formatting for browser warning (#584)

    If you have not installed the Replay browser we will show the following message:
    ![Screenshot 2024-07-01 at 12 23 12 PM](https://github.com/replayio/replay-cli/assets/29597/57739d70-79f3-4d08-a5e5-367ab0f2ad16)
    
    If you have already installed the Replay browser, we will show:
    ![Screenshot 2024-07-01 at 12 25 43 PM](https://github.com/replayio/replay-cli/assets/29597/9f84c96d-1406-40b9-b5a6-32929f3adf77)
    bvaughn authored Jul 2, 2024
    Copy the full SHA
    5b80bcb View commit details
  2. Add Mixpanel to Playwright (#577)

    - [x] Reorganized Mixpanel code to be a bit easier to reason about and added some more unit tests
      - Most of the lines changed in this PR comes from this reorganization
    - [x] Add some basic Mixpanel logging to the `playwright` and `test-utils` packages
      - Playwright specific tracking:
        - Invalid reporter config
        - Replay reporter used without Replay browser
      - Test utils tracking (also applies to Cypress)
        - Reporter error
        - Missing API key
        - Recording metadata
        - Test end
        - Test suite begin and end
        - Test suite results (including number of crashed recordings and uploaded recordings)
    - [x] Spot test and verify that events are ending up in Mixpanel
    bvaughn authored Jul 2, 2024
    Copy the full SHA
    4624764 View commit details
  3. Change the log level and message for replayio logs (#582)

    * Change the log level and message for `replayio` logs
    
    * Log sourcemap upload failures
    
    * Fix logger.close reference in exitTask
    
    * Log unhandled exception
    
    * Log browser crash
    
    * Log error in `update` command
    callingmedic911 authored Jul 2, 2024
    Copy the full SHA
    6413d6b View commit details
  4. Improve the warning about Replay-less executions (#585)

    * Improve the warning about Replay-less executions
    
    * tweak warning
    
    * only check if the browser was installed when a project was executed using replay
    
    * Update packages/playwright/src/reporter.ts
    
    Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
    
    * Update packages/playwright/src/reporter.ts
    
    * Update packages/playwright/src/reporter.ts
    
    Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
    
    * fmt
    
    * avoid redundant mixpanel calls
    
    ---------
    
    Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
    Andarist and bvaughn authored Jul 2, 2024
    Copy the full SHA
    543dfc9 View commit details
  5. Copy the full SHA
    4f1dd73 View commit details
  6. migrate log points to the new logger in `packages/test-utils/src/lega…

    …cy-cli/main.ts` (#583)
    
    * migrate log points to the new logger
    
    * add getErrorTags util function
    
    * remove unused function
    
    * use getErrorTags to keep stacktrace
    
    * format errors from the Logger class
    
    * assign error tags to object key
    
    * pr feedback
    
    * truncate stack traces for maximum anonymity
    miriambudayr authored Jul 2, 2024
    Copy the full SHA
    951bc7d View commit details

Commits on Jul 3, 2024

  1. Update changeset (#590)

    bvaughn authored Jul 3, 2024
    Copy the full SHA
    f0f488d View commit details
  2. Only save test data for tests run with Replay browser (#586)

    Only upload test metadata for tests that were run with the Replay browser. If a given test run has no tests that match this criteria, then we should not even upload any metadata for it.
    bvaughn authored Jul 3, 2024
    Copy the full SHA
    2d78191 View commit details
  3. Initialize Mixpanel events for Cypress reporter (#587)

    This will unblock the logger done by test-utils (which previously would not have been sent anywhere, because it waits until Mixpanel has been initialized).
    bvaughn authored Jul 3, 2024
    Copy the full SHA
    78660e4 View commit details
  4. Copy the full SHA
    09609e9 View commit details
  5. migrate remaining logs in test-utils/* (#589)

    * migrate remaining logs
    
    * nit
    
    * err -> error
    miriambudayr authored Jul 3, 2024
    Copy the full SHA
    fe9b225 View commit details
  6. Add missing fetch imports (#593)

    * Add missing fetch imports
    
    * fixed undici mocking
    
    * actually fix it
    Andarist authored Jul 3, 2024
    Copy the full SHA
    92e7c4b View commit details
  7. Version Packages (#579)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jul 3, 2024
    Copy the full SHA
    75a32ec View commit details
  8. install stack-utils to all packages that inline the shared folder (#…

    …594)
    
    * add stack-utils to all packages that inline the shared folder
    
    * remove stack-utils from root, add to packages/replay package
    
    * revert changes to root package.json and yarn.lock files
    
    * update yarn.lock
    
    * add changeset
    miriambudayr authored Jul 3, 2024
    Copy the full SHA
    78f5c72 View commit details
  9. Version Packages (#595)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jul 3, 2024
    Copy the full SHA
    b803eea View commit details

Commits on Jul 4, 2024

  1. Copy the full SHA
    cfb419b View commit details
  2. Enable upload.statusThreshold usage in the Cypress plugin (#598)

    * Enable `upload.statusThreshold` usage in the Cypress plugin
    
    * rename type
    
    * Update packages/test-utils/src/types.ts
    
    Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
    
    ---------
    
    Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
    Andarist and bvaughn authored Jul 4, 2024
    Copy the full SHA
    0f9764b View commit details

Commits on Jul 5, 2024

  1. Fixed validation in the resolveErrors plugin (#597)

    * Fixed validation in the `resolveErrors` plugin
    
    * Use import instead of require to load `stack-utils` (#596)
    
    * remove redundant tsconfig options
    
    * ok, ok, esModuleInterop is still needed by ts-jest
    Andarist authored Jul 5, 2024
    Copy the full SHA
    2ad92e5 View commit details
  2. Remove unused bits from the test utils (#601)

    * Remove unused bits from the test utils
    
    * fix things
    Andarist authored Jul 5, 2024
    Copy the full SHA
    ca8e62e View commit details
  3. Version Packages (#600)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jul 5, 2024
    Copy the full SHA
    5b3f3b1 View commit details
  4. Copy the full SHA
    f2b1c82 View commit details
  5. Fixed changeset markdown

    bvaughn committed Jul 5, 2024
    Copy the full SHA
    02a4de3 View commit details
Showing 329 changed files with 7,240 additions and 7,880 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
@@ -20,8 +20,10 @@ jobs:
node-version: "18"
cache: "yarn"
- run: yarn --immutable
- run: yarn run bootstrap
- run: npx replayio install
- run: yarn run build
# it's added here to deps to avoid affecting Turborepo's dependency graph and related caching
- run: yarn add --dev "replayio@workspace:^"
- run: npx --no replayio install
# @playwright/test depends on fixed version of playwright and that depends on fixed version of playwright-core
# so it should be enough to only enforce the version of @playwright/test here
- run: yarn set resolution "@playwright/test@*" ${{ matrix.playwright-version }}
4 changes: 1 addition & 3 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:

- id: check_authorization
run: |
if [[ $AUTHOR_ASSOCIATION == 'MEMBER' || $AUTHOR_ASSOCIATION == 'OWNER' ]]
if [[ $AUTHOR_ASSOCIATION == 'MEMBER' || $AUTHOR_ASSOCIATION == 'OWNER' || $AUTHOR_ASSOCIATION == 'COLLABORATOR' ]]
then
echo "User is authorized to release"
else
@@ -60,8 +60,6 @@ jobs:

- run: yarn --immutable

- run: yarn run bootstrap

- name: Set up NPM token
run: |
echo "npmAuthToken: $NPM_TOKEN" >> .yarnrc.yml
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ jobs:

- run: yarn --immutable

- run: yarn run bootstrap
- run: yarn run build

- name: Set up NPM token
run: |
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ dist
lerna-debug.log
e2e-repos
tsconfig.tsbuildinfo
.turbo

.pnp.*
.yarn/*
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ node_modules
**/lib/index.js
package-lock.json
e2e-repos
.turbo
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@
"version": "2.0.0",
"tasks": [
{
"label": "tsc -w",
"label": "turbo watch",
"type": "shell",
"command": "yarn build -w",
"command": "yarn run watch",
"presentation": {
"echo": true,
"reveal": "silent",
12 changes: 12 additions & 0 deletions .yarn/patches/superstruct-npm-1.0.4-44d328b887.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/package.json b/package.json
index 6f759661ef1f6ad76ed41b150b63a922b00e11b3..9928998719f56bb23d1b0603ee45ba7e737e1604 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,6 @@
"version": "1.0.4",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/superstruct.git",
- "type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
10 changes: 8 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -5,7 +5,11 @@ WORKDIR /usr/build

build:
COPY . .
RUN yarn --immutable && yarn run bootstrap
RUN yarn --immutable && yarn run build

typecheck:
FROM +build
RUN yarn run typecheck

lint:
FROM +build
@@ -18,7 +22,8 @@ test:
setup:
FROM +build
RUN apt update && apt install xz-utils
RUN npx replayio install
# it's added here to deps to avoid affecting Turborepo's dependency graph and related caching
RUN yarn add --dev "replayio@workspace:^" && npx --no replayio install
# download binary openssl packages from Impish builds
RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2.22_amd64.deb
RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.22_amd64.deb
@@ -61,6 +66,7 @@ e2e:
BUILD +flake

ci:
BUILD +typecheck
BUILD +lint
BUILD +test
BUILD +e2e
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ To use Replay with a Desktop Browser, visit [replay.io](https://www.replay.io/)

## Packages

- [`/replay`](./packages/replay/README.md) CLI for viewing + uploading recordings
- [`/replayio`](./packages/replayio/README.md) CLI for viewing and uploading recordings
- [`/cypress`](./packages/cypress/README.md) Beta Plugin for recording and capturing metadata for Cypress tests.
- [`/playwright`](./packages/playwright/README.md) Beta Plugin for recording and capturing metadata for Playwright tests.
- [`/puppeteer`](./packages/puppeteer/README.md) Experimental Plugin for recording Puppeteer tests.
@@ -17,7 +17,7 @@ To use Replay with a Desktop Browser, visit [replay.io](https://www.replay.io/)
## Developing

1. `yarn`
2. `yarn run bootstrap`
2. `yarn run build`

That should create an installed version of the package in `dist` within each directory in `packages`.

2 changes: 1 addition & 1 deletion examples/create-react-app-typescript/package.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"dependencies": {
"@playwright/test": "^1.40.1",
"@replayio/playwright": "workspace:^",
"@replayio/replay": "workspace:^",
"@replayio/replay": "latest",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ const assert = require("assert");
const { WebSocket } = require("ws");
const { SimpleProtocolClient } = require("@replayio/protocol");
const replay = require("@replayio/replay");
const fetch = require("node-fetch");

(async () => {
try {
@@ -29,7 +30,6 @@ const replay = require("@replayio/replay");
})();

async function getTestMetadata(recordingId, apiKey) {
const { default: fetch } = await import("node-fetch");
const resp = await fetch("https://api.replay.io/v1/graphql", {
method: "POST",
headers: {
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -12,11 +12,12 @@
"example": "examples"
},
"scripts": {
"bootstrap": "yarn workspaces foreach --all --exclude=. --exclude=examples/create-react-app-typescript --exclude=packages/cypress/example --exclude=packages/node --topological run build",
"build": "tsc -b",
"build": "turbo run build --filter=\"./packages/*\"",
"watch": "turbo watch build --filter=\"./packages/*\"",
"test": "yarn run test:unit",
"test:unit": "yarn workspaces foreach --all --exclude=. --exclude=examples/create-react-app-typescript --exclude=packages/cypress/example --topological run test",
"typecheck": "yarn workspaces foreach --all run typecheck",
"typecheck": "turbo run typecheck --filter=\"./packages/*\" --filter=\"./scripts/*\"",
"typecheck:watch": "turbo watch typecheck --filter=\"./packages/*\" --filter=\"./scripts/*\"",
"lint": "prettier --check .",
"changeset": "changeset",
"release": "yarn workspaces foreach --no-private --all --topological npm publish --tolerate-republish --access public && changeset tag",
@@ -28,21 +29,18 @@
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.5",
"@replayio/protocol": "^0.73.0",
"@replayio/replay": "workspace:^",
"@types/ws": "^8",
"prettier": "^2.7.1",
"replayio": "workspace:^",
"turbo": "^2.0.5",
"typescript": "^5.5.2",
"ws": "^8.17.0"
},
"dependencies": {
"node-fetch": "^3.3.1"
},
"resolutions": {
"@jest/types": "^27.5.1",
"@types/jest": "^28.1.5",
"@types/node": "^20.11.27",
"@jest/environment@npm:^27.5.1": "patch:@jest/environment@npm%3A28.1.3#~/.yarn/patches/@jest-environment-npm-28.1.3-506a81a227.patch",
"@jest/environment@npm:^28.1.3": "patch:@jest/environment@npm%3A28.1.3#~/.yarn/patches/@jest-environment-npm-28.1.3-506a81a227.patch"
"@jest/environment@npm:^28.1.3": "patch:@jest/environment@npm%3A28.1.3#~/.yarn/patches/@jest-environment-npm-28.1.3-506a81a227.patch",
"superstruct": "patch:superstruct@npm%3A1.0.4#~/.yarn/patches/superstruct-npm-1.0.4-44d328b887.patch"
}
}
60 changes: 60 additions & 0 deletions packages/cypress/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# @replayio/cypress

## 3.1.3

### Patch Changes

- [#624](https://github.com/replayio/replay-cli/pull/624) [`82852c2`](https://github.com/replayio/replay-cli/commit/82852c2d1e9f58c7036a8c0ab5b50e8ef79efa3e) Thanks [@bvaughn](https://github.com/bvaughn)! - Improve async initialization and teardown logic

## 3.1.2

### Patch Changes

- [#592](https://github.com/replayio/replay-cli/pull/592) [`134591c`](https://github.com/replayio/replay-cli/commit/134591ccd4ead6098aa855f2b751b505f43c7b80) Thanks [@Andarist](https://github.com/Andarist)! - Improved resiliency to GitHub API errors when auto-populating PR-related information metadata

## 3.1.1

### Patch Changes

- [#603](https://github.com/replayio/replay-cli/pull/603) [`f2b1c82`](https://github.com/replayio/replay-cli/commit/f2b1c82ef9df926d3cc94aae1e3e8a26fb82042a) Thanks [@bvaughn](https://github.com/bvaughn)! - Gather data about deprecated `filter` config usage (as preparation to remove it)

## 3.1.0

### Minor Changes

- [#598](https://github.com/replayio/replay-cli/pull/598) [`0f9764b`](https://github.com/replayio/replay-cli/commit/0f9764ba114471a5f39f76dc1dbcb3265ad02940) Thanks [@Andarist](https://github.com/Andarist)! - Added a new `upload.statusThreshold` option. It accepts one of `'all'`, `'failed-and-flaky'` or `'failed'` and it's used to skip uploading recordings for test runs that don't satisfy the desired threshold (eg. it allows to filter out recordings of passed tests).

## 3.0.7

### Patch Changes

- [#594](https://github.com/replayio/replay-cli/pull/594) [`78f5c72`](https://github.com/replayio/replay-cli/commit/78f5c72a62a38772cad90cccf1283b80eea49b61) Thanks [@miriambudayr](https://github.com/miriambudayr)! - Add missing stack-utils dependencies

## 3.0.6

### Patch Changes

- [#573](https://github.com/replayio/replay-cli/pull/573) [`9494138`](https://github.com/replayio/replay-cli/commit/9494138fe6235fd365ce952be384524d30415f21) Thanks [@hbenl](https://github.com/hbenl)! - Log broken entries when reading the recordings.log file

## 3.0.5

### Patch Changes

- Updated dependencies [[`40beb19`](https://github.com/replayio/replay-cli/commit/40beb199c1d1dec640611fec0e04e911e24b5fe3)]:
- @replayio/replay@0.22.10
- @replayio/test-utils@3.0.5

## 3.0.4

### Patch Changes

- Updated dependencies []:
- @replayio/replay@0.22.9
- @replayio/test-utils@3.0.4

## 3.0.3

### Patch Changes

- Updated dependencies [[`40a1ec8`](https://github.com/replayio/replay-cli/commit/40a1ec8a828b398605c3855746d675bea3090d0c)]:
- @replayio/test-utils@3.0.3
- @replayio/replay@0.22.8

## 3.0.2

### Patch Changes
30 changes: 26 additions & 4 deletions packages/cypress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@replayio/cypress",
"version": "3.0.2",
"version": "3.1.3",
"description": "Plugin to record your Cypress tests with Replay",
"main": "./dist/index.js",
"exports": {
@@ -18,7 +18,7 @@
],
"scripts": {
"prepare": "npm run build",
"build": "rm -rf dist/ tsconfig.tsbuildinfo && tsc",
"build": "pkg-build",
"test": "echo \"Error: no test specified\"",
"typecheck": "tsc --noEmit"
},
@@ -33,27 +33,49 @@
},
"homepage": "https://github.com/replayio/replay-cli/blob/main/packages/cypress/README.md",
"devDependencies": {
"@replay-cli/pkg-build": "workspace:^",
"@replay-cli/shared": "workspace:^",
"@replay-cli/tsconfig": "workspace:^",
"@replayio/test-utils": "workspace:^",
"@types/debug": "^4.1.7",
"@types/node": "^20.11.27",
"@types/semver": "^7.3.13",
"@types/stack-utils": "^2.0.3",
"@types/uuid": "^9.0.1",
"@types/ws": "^8.5.10",
"cypress": "^13.11.0",
"turbo": "^2.0.5",
"typescript": "^5.5.2"
},
"dependencies": {
"@replayio/replay": "workspace:^",
"@replayio/test-utils": "workspace:^",
"chalk": "^4.1.2",
"debug": "^4.3.4",
"fs-extra": "^11.2.0",
"is-uuid": "^1.0.2",
"jsonata": "^1.8.6",
"launchdarkly-node-client-sdk": "^3.2.1",
"mixpanel": "^0.18.0",
"node-fetch": "^2.6.7",
"p-map": "^4.0.0",
"semver": "^7.5.2",
"sha-1": "^1.0.0",
"stack-utils": "^2.0.6",
"superstruct": "^1.0.4",
"terminate": "^2.6.1",
"txml": "^3.2.5",
"undici": "^5.28.4",
"uuid": "^8.3.2",
"winston": "^3.13.0",
"winston-loki": "^6.1.2",
"ws": "^8.14.2"
},
"peerDependencies": {
"cypress": "^13"
},
"@replay-cli/pkg-build": {
"entrypoints": [
"./src/index.ts",
"./src/support.ts"
]
}
}
10 changes: 5 additions & 5 deletions packages/cypress/src/fixture.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { logInfo } from "@replay-cli/shared/logger";
import { writeFileSync, appendFileSync, mkdirSync } from "fs";
import path from "path";
import dbg from "debug";

const debug = dbg("replay:cypress:fixture");

function getFixtureFile() {
return (
@@ -16,9 +14,11 @@ function getFixtureFile() {
}

export function initFixtureFile() {
debug("REPLAY_CYPRESS_UPDATE_FIXTURE: %s", process.env.REPLAY_CYPRESS_UPDATE_FIXTURE);
logInfo("InitFixtureFile:Started", {
updateFixture: process.env.REPLAY_CYPRESS_UPDATE_FIXTURE,
});
if (process.env.REPLAY_CYPRESS_UPDATE_FIXTURE) {
debug("Initializing fixture file %s", getFixtureFile());
logInfo("InitFixtureFile:FixtureFile", { fixtureFile: getFixtureFile() });
try {
mkdirSync(path.dirname(getFixtureFile()), { recursive: true });
writeFileSync(getFixtureFile(), "");
Loading