From 1f379b0dd7ceb541c729b4c438470e25495f8e43 Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Thu, 10 Nov 2022 21:12:28 -0800 Subject: [PATCH 1/2] feat: monkey patch snapshot config --- package.json | 4 +++- src/injected.ts | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8987f4a..34ab176 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,10 @@ }, "keywords": [ "cypress", - "wrapper", "sorry-cypress", + "cypress dashboard", + "cypress ci", + "cypress parallel", "currents" ], "devDependencies": { diff --git a/src/injected.ts b/src/injected.ts index 5aa31a2..516a3ff 100644 --- a/src/injected.ts +++ b/src/injected.ts @@ -1,6 +1,21 @@ const Mod = require('module'); const req = Mod.prototype.require; +// @ts-ignore +if (global.snapshotResult?.customRequire?.exports) { + // @ts-ignore + global.snapshotResult.customRequire.exports[ + './packages/server/config/app.json' + ].exports = { + development: { api_url: 'http://localhost:1234/' }, + test: { api_url: 'http://localhost:1234/' }, + staging: { api_url: 'https://api-staging.cypress.io/' }, + production: { + api_url: process.env.CYPRESS_API_URL || 'https://api.cypress.io', + }, + }; +} + Mod.prototype.require = function (...args) { if (args[0] === 'konfig') { return () => ({ From 613437e5163e96a71f16a54bbaa2d155d54a4afb Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Thu, 10 Nov 2022 21:16:08 -0800 Subject: [PATCH 2/2] Release 3.1.8-beta.0 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbe5530..747ef19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [3.1.8-beta.0](https://github.com/sorry-cypress/cy2/compare/v3.1.7...v3.1.8-beta.0) (2022-11-11) + + +### Features + +* monkey patch snapshot config ([d5a3fb9](https://github.com/sorry-cypress/cy2/commit/d5a3fb904dd95ea7f03e124cdbed713be0ac75b1)) + ## [3.1.7](https://github.com/sorry-cypress/cy2/compare/v3.1.6...v3.1.7) (2022-10-27) diff --git a/package.json b/package.json index 34ab176..dc606b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cy2", - "version": "3.1.7", + "version": "3.1.8-beta.0", "author": "Andrew Goldis", "main": "./dist", "typings": "./dist",