mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-05 06:40:56 -06:00
* 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
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:
corscontains utilities for Cross-Origin Resource Sharingdocument-domain-injectioncontains utilities related to document.domain injection of the Cypress driveruricontains 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