From 043e271ab18b7603d0f785b64a7fd6a5077c0a69 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Fri, 30 May 2025 12:09:28 -0400 Subject: [PATCH 1/2] spike: include wp and wbip with the binary --- .circleci/cache-version.txt | 2 +- .circleci/workflows.yml | 10 +++++----- cli/.eslintignore | 4 +++- cli/.gitignore | 2 ++ cli/package.json | 13 ++++++++++++- cli/scripts/post-build.js | 2 ++ .../package.json | 1 + npm/webpack-preprocessor/package.json | 1 + 8 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 94c6d8a28870..b49eac050775 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -5-21-2025 +5-30-2025-wbip-with-binary diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 0ed20304c6a8..c00d987b9756 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'feat/wbip_full_resolve_ts_config' + - 'spike/preprocessor-cli' # usually we don't build Mac app - it takes a long time # but sometimes we want to really confirm we are doing the right thing @@ -49,7 +49,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'feat/wbip_full_resolve_ts_config', << pipeline.git.branch >> ] + - equal: [ 'spike/preprocessor-cli', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -60,7 +60,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'feat/wbip_full_resolve_ts_config', << pipeline.git.branch >> ] + - equal: [ 'spike/preprocessor-cli', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -83,7 +83,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'feat/wbip_full_resolve_ts_config', << pipeline.git.branch >> ] + - equal: [ 'spike/preprocessor-cli', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -157,7 +157,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/wbip_full_resolve_ts_config" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "spike/preprocessor-cli" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command diff --git a/cli/.eslintignore b/cli/.eslintignore index 90471aa76fd3..a3445b9cda67 100644 --- a/cli/.eslintignore +++ b/cli/.eslintignore @@ -13,4 +13,6 @@ package.json /react /vue /svelte -/mount-utils \ No newline at end of file +/mount-utils +/webpack-preprocessor +/webpack-batteries-included-preprocessor \ No newline at end of file diff --git a/cli/.gitignore b/cli/.gitignore index 1c68b02ce1e5..f90e86d232da 100644 --- a/cli/.gitignore +++ b/cli/.gitignore @@ -20,3 +20,5 @@ react* mount-utils angular svelte +webpack-preprocessor +webpack-batteries-included-preprocessor \ No newline at end of file diff --git a/cli/package.json b/cli/package.json index f07ee7ff13d7..16284e4a89aa 100644 --- a/cli/package.json +++ b/cli/package.json @@ -74,6 +74,8 @@ "@cypress/sinon-chai": "2.9.1", "@cypress/svelte": "0.0.0-development", "@cypress/vue": "0.0.0-development", + "@cypress/webpack-batteries-included-preprocessor": "0.0.0-development", + "@cypress/webpack-preprocessor": "0.0.0-development", "@packages/root": "0.0.0-development", "@types/bluebird": "3.5.33", "@types/chai": "4.2.15", @@ -114,7 +116,9 @@ "vue", "react", "angular", - "svelte" + "svelte", + "webpack-preprocessor", + "webpack-batteries-included-preprocessor" ], "bin": { "cypress": "bin/cypress" @@ -156,6 +160,13 @@ "types": "./svelte/dist/index.d.ts", "import": "./svelte/dist/cypress-svelte.esm-bundler.js", "require": "./svelte/dist/cypress-svelte.cjs.js" + }, + "./webpack-preprocessor": { + "types": "./webpack-preprocessor/dist", + "require": "./webpack-preprocessor/dist" + }, + "./webpack-batteries-included-preprocessor": { + "require": "./webpack-batteries-included-preprocessor/undefined" } }, "workspaces": { diff --git a/cli/scripts/post-build.js b/cli/scripts/post-build.js index e31b9e2cf807..31ba22bc833d 100644 --- a/cli/scripts/post-build.js +++ b/cli/scripts/post-build.js @@ -12,6 +12,8 @@ const npmModulesToCopy = [ 'vue', 'angular', 'svelte', + 'webpack-preprocessor', + 'webpack-batteries-included-preprocessor', ] npmModulesToCopy.forEach((folder) => { diff --git a/npm/webpack-batteries-included-preprocessor/package.json b/npm/webpack-batteries-included-preprocessor/package.json index 95b351a9f4b5..53794b41c6f6 100644 --- a/npm/webpack-batteries-included-preprocessor/package.json +++ b/npm/webpack-batteries-included-preprocessor/package.json @@ -4,6 +4,7 @@ "description": "Cypress preprocessor for bundling JavaScript via webpack with dependencies included and support for various ES features, TypeScript, and CoffeeScript", "private": false, "scripts": { + "build": "node ../../scripts/sync-exported-npm-with-cli.js", "lint": "eslint --ext .js,.json, .", "test": "mocha test/**/*.spec.* --timeout 4000" }, diff --git a/npm/webpack-preprocessor/package.json b/npm/webpack-preprocessor/package.json index a07a422aa04e..6ca620530ab9 100644 --- a/npm/webpack-preprocessor/package.json +++ b/npm/webpack-preprocessor/package.json @@ -6,6 +6,7 @@ "main": "dist", "scripts": { "build": "rimraf dist && tsc || echo 'built, with errors'", + "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", "check-ts": "tsc --noEmit", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .", "secure": "nsp check", From 7fca97901cf7e3df0d368f827704b63b1cb6e213 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Fri, 30 May 2025 14:21:08 -0400 Subject: [PATCH 2/2] does this work --- cli/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/package.json b/cli/package.json index 16284e4a89aa..7192bbd7c4e7 100644 --- a/cli/package.json +++ b/cli/package.json @@ -21,6 +21,8 @@ }, "dependencies": { "@cypress/request": "^3.0.8", + "@cypress/webpack-batteries-included-preprocessor": "0.0.0-development", + "@cypress/webpack-preprocessor": "0.0.0-development", "@cypress/xvfb": "^1.2.4", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", @@ -74,8 +76,6 @@ "@cypress/sinon-chai": "2.9.1", "@cypress/svelte": "0.0.0-development", "@cypress/vue": "0.0.0-development", - "@cypress/webpack-batteries-included-preprocessor": "0.0.0-development", - "@cypress/webpack-preprocessor": "0.0.0-development", "@packages/root": "0.0.0-development", "@types/bluebird": "3.5.33", "@types/chai": "4.2.15",