Files
cypress/packages/network-tools
Bill Glesias cf73b8a1d9 chore: package @packages/network as an independent bundle (#32633)
* chore: refactor network into two packages, network and network-tools. network-tools is expected to be used in simple environments, where network is intended to be used in the node context. additionally, makes these packages bundable and removes the ts-node entrypoint to make ESM possible.

* chore: sync cloud validations after building packages as the network libs are needed

* chore: fix cloud specs

* remove building packages for requiring build step for creating publish artifacts

* update ts-ignores with reasoning and fix cookie bug (though it shouldn't do this by reference

* bump cache

* update pull-request job as well
2025-10-10 13:41:51 -04:00
..

network-tools

A low-level package that contains networking-related classes and utilities to be used in the browser and Node.js environment.

Exports

You can see a list of the modules exported from this package in ./lib/index.ts. Here is a brief description of what's available:

  • cors contains utilities for Cross-Origin Resource Sharing
  • document-domain-injection contains utilities related to document.domain injection of the Cypress driver
  • uri contains utilities for URL parsing and formatting

See the individual class files in ./lib for more information.

Building

We currently build a CommonJS and an ESM version of this package. However, since this package is only consumed via CommonJS, we currently only build the CommonJS variant of the package.

yarn workspace @packages/network-tools build-prod

Testing

Tests are located in ./test

To run tests:

yarn workspace @packages/network-tools test
yarn workspace @packages/network-tools test-watch
yarn workspace @packages/network-tools test-debug