Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-enable CYPRESS_INTERNAL_VITE_DEV development #25364

Merged
merged 2 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"check-ts": "vue-tsc --noEmit",
"build-prod-ui": "cross-env NODE_ENV=production vite build",
"clean": "rimraf dist && rimraf ./node_modules/.vite && echo 'cleaned'",
"clean": "rimraf dist && echo 'cleaned'",
"clean-deps": "rimraf node_modules",
"test": "echo 'ok'",
"cypress:run-cypress-in-cypress": "cross-env CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=1 HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS=http://localhost:4455 CYPRESS_REMOTE_DEBUGGING_PORT=6666 TZ=America/New_York",
Expand Down
2 changes: 1 addition & 1 deletion packages/launchpad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"check-ts": "vue-tsc --noEmit",
"build-prod-ui": "cross-env NODE_ENV=production vite build",
"clean": "rimraf dist && rimraf ./node_modules/.vite && rimraf dist-e2e && echo 'cleaned'",
"clean": "rimraf dist && rimraf dist-e2e && echo 'cleaned'",
"clean-deps": "rimraf node_modules",
"test": "yarn cypress:run:ct && yarn types",
"windi": "yarn windicss-analysis",
Expand Down
2 changes: 1 addition & 1 deletion scripts/gulp/gulpConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
CYPRESS_INTERNAL_ENV: 'staging' | 'development' | 'production'
CYPRESS_INTERNAL_ENV?: 'staging' | 'development' | 'production'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/gulp/tasks/gulpVite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function spawnViteDevServer (
) {
return spawnUntilMatch(prefix, {
command,
match: 'dev server running at',
match: /VITE v(\d+.)+ ready in \d+/,
options,
})
}
Expand Down
6 changes: 5 additions & 1 deletion scripts/gulp/utils/childProcessUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import util from 'util'

import { prefixLog, prefixStream } from './prefixStream'
import { addChildProcess } from '../tasks/gulpRegistry'
import stripAnsi from 'strip-ansi'

export type AllSpawnableApps =
| `cmd-${string}`
Expand Down Expand Up @@ -45,7 +46,7 @@ export async function spawnUntilMatch (
spawned(prefix, config.command, {
...config.options,
tapOut (chunk, enc, cb) {
if (!ready && String(chunk).match(config.match)) {
if (!ready && stripAnsi(String(chunk)).match(config.match)) {
ready = true
setTimeout(() => dfd.resolve(), 20) // flush the rest of the chunks
}
Expand Down Expand Up @@ -172,16 +173,19 @@ export const execAsync = async (
const { silent } = options

if (!silent) {
// eslint-disable-next-line no-console
console.log(command)
}

const result = await execAsyncLocal(command, options)

if (!silent && typeof result.stdout === 'string' && result.stdout.length) {
// eslint-disable-next-line no-console
console.log(result.stdout)
}

if (!silent && typeof result.stderr === 'string' && result.stderr.length) {
// eslint-disable-next-line no-console
console.error(result.stderr)
}

Expand Down