Skip to content

Commit a6ac039

Browse files
committed
WIP
make @packages/network an independent bundle refactors build the network packages before running sync cloud validations build network package for e2e scaffold fix types rework failurs in server and remove bluebird usage from network wip ship network declarations to reduce global monorepo errors (still not entirely accurate with server fix package exports bump cache move network items to network-tools as we need a separation of the node and browser context
1 parent a4b7dcd commit a6ac039

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+517
-283
lines changed

.circleci/cache-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Bump this version to force CI to re-create the cache from scratch.
2-
9-30-2026
2+
10-02-2025

.circleci/src/pipeline/@pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ commands:
196196
name: Sync Cloud Validations
197197
command: |
198198
source ./scripts/ensure-node.sh
199+
yarn workspace @packages/network build
199200
yarn gulp syncCloudValidations
200201
- run:
201202
name: Build packages
@@ -1232,6 +1233,7 @@ commands:
12321233
name: Check if binary exists, exit if it does
12331234
command: |
12341235
source ./scripts/ensure-node.sh
1236+
yarn workspace @packages/network build
12351237
yarn gulp e2eTestScaffold
12361238
yarn check-binary-on-cdn --version $(node ./scripts/get-next-version.js) --type binary --file cypress.zip
12371239

guides/esm-migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ When migrating some of these projects away from the `ts-node` entry [see `@packa
5353
- [x] packages/launcher ✅ **COMPLETED**
5454
- [x] packages/launchpad ✅ **COMPLETED**
5555
- [x] packages/net-stubbing ✅ **COMPLETED**
56-
- [ ] packages/network **PARTIAL** - entry point is JS
56+
- [x] packages/network **COMPLETED**
5757
- [x] packages/packherd-require ✅ **COMPLETED**
5858
- [ ] packages/proxy **PARTIAL** - entry point is JS
5959
- [x] packages/reporter ✅ **COMPLETED**

packages/config/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
},
4141
"devDependencies": {
4242
"@packages/errors": "0.0.0-development",
43-
"@packages/network": "0.0.0-development",
43+
"@packages/network-tools": "0.0.0-development",
4444
"@packages/root": "0.0.0-development",
4545
"@packages/ts": "0.0.0-development",
4646
"@packages/types": "0.0.0-development",
4747
"babel-plugin-tester": "^10.1.0",
4848
"rimraf": "6.0.1",
49+
"typescript": "~5.4.5",
4950
"vitest": "^3.2.4"
5051
},
5152
"files": [

packages/config/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import _ from 'lodash'
22
import { toBoolean } from 'underscore.string'
3-
import * as uri from '@packages/network/lib/uri'
3+
import { origin } from '@packages/network-tools'
44

55
export const hideKeys = (token?: string | number | boolean) => {
66
if (!token) {
@@ -26,7 +26,7 @@ export function setUrls (obj: any) {
2626
const proxyUrl = `http://localhost:${obj.port}`
2727

2828
const rootUrl = obj.baseUrl
29-
? uri.origin(obj.baseUrl)
29+
? origin(obj.baseUrl)
3030
: proxyUrl
3131

3232
return {

packages/driver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@packages/config": "0.0.0-development",
2626
"@packages/errors": "0.0.0-development",
2727
"@packages/net-stubbing": "0.0.0-development",
28-
"@packages/network": "0.0.0-development",
28+
"@packages/network-tools": "0.0.0-development",
2929
"@packages/proxy": "0.0.0-development",
3030
"@packages/rewriter": "0.0.0-development",
3131
"@packages/runner": "0.0.0-development",

packages/driver/src/cy/commands/origin/validator.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import $utils from '../../../cypress/utils'
22
import $errUtils from '../../../cypress/error_utils'
33
import { difference, isPlainObject, isString, isFunction } from 'lodash'
44
import type { LocationObject } from '../../../cypress/location'
5-
import * as cors from '@packages/network/lib/cors'
6-
import { DocumentDomainInjection } from '@packages/network/lib/document-domain-injection'
5+
import { policyFromConfig, DocumentDomainInjection } from '@packages/network-tools'
76

87
const validOptionKeys = Object.freeze(['args'])
98

@@ -87,7 +86,7 @@ export class Validator {
8786

8887
const injector = DocumentDomainInjection.InjectionBehavior(Cypress.config())
8988

90-
const policy = cors.policyFromConfig({ injectDocumentDomain: Cypress.config('injectDocumentDomain') })
89+
const policy = policyFromConfig({ injectDocumentDomain: Cypress.config('injectDocumentDomain') })
9190

9291
if (injector.urlsMatch(originLocation.href, specHref)) {
9392
$errUtils.throwErrByPath('origin.invalid_url_argument_same_origin', {

packages/driver/src/cypress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { PrimaryOriginCommunicator, SpecBridgeCommunicator } from './cross-origi
4545
import { setupAutEventHandlers } from './cypress/aut_event_handlers'
4646

4747
import type { CachedTestState } from '@packages/types'
48-
import { DocumentDomainInjection } from '@packages/network/lib/document-domain-injection'
48+
import { DocumentDomainInjection } from '@packages/network-tools'
4949
import { setSpecContentSecurityPolicy } from './util/privileged_channel'
5050

5151
import { telemetry } from '@packages/telemetry/src/browser'

packages/driver/src/cypress/location.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import _ from 'lodash'
1010
import UrlParse from 'url-parse'
11-
import * as cors from '@packages/network/lib/cors'
11+
import { getSuperDomain, getSuperDomainOrigin } from '@packages/network-tools'
1212

1313
const reHttp = /^https?:\/\//
1414
const reWww = /^www/
@@ -106,11 +106,11 @@ export class $Location {
106106
}
107107

108108
getSuperDomainOrigin () {
109-
return cors.getSuperDomainOrigin(this.remote.href)
109+
return getSuperDomainOrigin(this.remote.href)
110110
}
111111

112112
getSuperDomain () {
113-
return cors.getSuperDomain(this.remote.href)
113+
return getSuperDomain(this.remote.href)
114114
}
115115

116116
getToString () {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/tsconfig.json

0 commit comments

Comments
 (0)