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

chore: revert changes to build process #27584

Merged
merged 5 commits into from
Aug 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
32 changes: 18 additions & 14 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mainBuildFilters: &mainBuildFilters
- 'update-v8-snapshot-cache-on-develop'
- 'chore/update_webpack_deps_to_latest_webpack4_compat'
- 'chore/bump_loaders_and_optimize_webpack'
- 'publish-binary'
- 'astone123/revert-caching'

# 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
Expand All @@ -44,7 +44,7 @@ macWorkflowFilters: &darwin-workflow-filters
# 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: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'chore/bump_loaders_and_optimize_webpack', << pipeline.git.branch >> ]
- equal: [ 'astone123/revert-caching', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -57,7 +57,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'chore/bump_loaders_and_optimize_webpack', << pipeline.git.branch >> ]
- equal: [ 'publish-binary', << pipeline.git.branch >> ]
- equal: [ 'astone123/revert-caching', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -78,7 +78,7 @@ windowsWorkflowFilters: &windows-workflow-filters
# 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: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'chore/bump_loaders_and_optimize_webpack', << pipeline.git.branch >> ]
- equal: [ 'astone123/revert-caching', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -148,7 +148,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" != "publish-binary" && "$CIRCLE_BRANCH" != "chore/bump_loaders_and_optimize_webpack" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "astone123/revert-caching" ]]; 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
Expand Down Expand Up @@ -1189,6 +1189,10 @@ commands:
command: |
source ./scripts/ensure-node.sh
yarn build --scope cypress
- run:
name: Copy Re-exported NPM Packages
command: node ./scripts/post-build.js
working_directory: cli
- run:
command: ls -la types
working_directory: cli/build
Expand Down Expand Up @@ -1523,7 +1527,6 @@ jobs:
- run: yarn test-scripts
# make sure packages with TypeScript can be transpiled to JS
- run: yarn lerna run build-prod --stream --concurrency 4
- run: yarn build --concurrency 4
# run unit tests from each individual package
- run: yarn test
# run type checking for each individual package
Expand Down Expand Up @@ -1906,7 +1909,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn build --scope @cypress/webpack-preprocessor
command: yarn workspace @cypress/webpack-preprocessor build
- run:
name: Run tests
command: yarn workspace @cypress/webpack-preprocessor test
Expand Down Expand Up @@ -1951,7 +1954,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn build --scope @cypress/vue
command: yarn lerna run build --scope @cypress/vue
- store_test_results:
path: npm/vue/test_results
- store_artifacts:
Expand All @@ -1964,7 +1967,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn build --scope @cypress/angular
command: yarn workspace @cypress/angular build
- store-npm-logs

npm-react:
Expand All @@ -1973,7 +1976,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn build --scope @cypress/react
command: yarn workspace @cypress/react build
- run:
name: Run tests
command: yarn test
Expand All @@ -1990,7 +1993,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn build --scope @cypress/vite-plugin-cypress-esm
command: yarn workspace @cypress/vite-plugin-cypress-esm build
- run:
name: Run tests
command: yarn test
Expand All @@ -2007,7 +2010,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn build --scope @cypress/mount-utils
command: yarn workspace @cypress/mount-utils build
- store-npm-logs

npm-grep:
Expand All @@ -2029,7 +2032,7 @@ jobs:
resource_class: small
steps:
- restore_cached_workspace
- run: yarn build --scope create-cypress-tests
- run: yarn workspace create-cypress-tests build

npm-eslint-plugin-dev:
<<: *defaults
Expand All @@ -2046,7 +2049,8 @@ jobs:
- run:
name: Build + Install
command: |
yarn build --scope @cypress/schematic
yarn workspace @cypress/schematic build
working_directory: npm/cypress-schematic
- run:
name: Run unit tests
command: |
Expand Down
14 changes: 0 additions & 14 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"clean": "node ./scripts/clean.js",
"prebuild": "yarn postinstall && node ./scripts/start-build.js",
"build": "node ./scripts/build.js",
"postbuild": "node ./scripts/post-build.js",
"dtslint": "dtslint types",
"postinstall": "patch-package && node ./scripts/post-install.js",
"size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
Expand Down Expand Up @@ -177,18 +176,5 @@
"nohoist": [
"@types/*"
]
},
"nx": {
"targets": {
"build": {
"outputs": [
"{projectRoot}/types",
"{projectRoot}/build"
]
}
},
"implicitDependencies": [
"@cypress/*"
]
}
}
13 changes: 1 addition & 12 deletions npm/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"prebuild": "rimraf dist",
"build": "rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
"check-ts": "tsc --noEmit",
"lint": "eslint --ext .js,.ts,.json, ."
},
Expand Down Expand Up @@ -58,18 +59,6 @@
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/scripts"
],
"outputs": [
"{workspaceRoot}/cli/angular"
]
}
}
},
"standard": {
"globals": [
"Cypress",
Expand Down
6 changes: 3 additions & 3 deletions npm/create-cypress-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/src/main.js",
"scripts": {
"build": "yarn prepare-example && tsc -p ./tsconfig.json && node scripts/example copy-to ./dist/initial-template && yarn prepare-copy-templates",
"build-prod": "yarn build",
"prepare-example": "node scripts/example copy-to ./initial-template",
"prepare-copy-templates": "node scripts/copy-templates copy-to ./dist/src",
"test": "cross-env TS_NODE_PROJECT=./tsconfig.test.json mocha --config .mocharc.json './src/**/*.test.ts'",
Expand All @@ -22,15 +23,14 @@
"commander": "6.2.1",
"find-up": "5.0.0",
"fs-extra": "^9.1.0",
"glob": "^7.1.6",
"inquirer": "8.2.4",
"inquirer": "7.3.3",
"ora": "^5.1.0",
"recast": "0.20.4",
"semver": "7.3.7"
},
"devDependencies": {
"@types/babel__core": "^7.1.2",
"@types/inquirer": "8.2.4",
"@types/inquirer": "7.3.1",
"@types/mock-fs": "4.10.0",
"@types/node": "16.18.39",
"@types/ora": "^3.2.0",
Expand Down
11 changes: 0 additions & 11 deletions npm/cypress-schematic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,5 @@
"ng-add": {
"save": "devDependencies"
},
"nx": {
"targets": {
"build": {
"outputs": [
"{projectRoot}/src/**/*.js",
"{projectRoot}/src/**/*.d.ts",
"{projectRoot}/src/**/*.js.map"
]
}
}
},
"schematics": "./src/schematics/collection.json"
}
14 changes: 1 addition & 13 deletions npm/mount-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"build": "tsc || echo 'built, with type errors'",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
"check-ts": "tsc --noEmit",
"watch": "tsc -w",
"lint": "eslint --ext .js,.ts,.json, ."
Expand All @@ -32,18 +33,5 @@
"bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/scripts"
],
"outputs": [
"{workspaceRoot}/cli/mount-utils",
"{projectRoot}/dist"
]
}
}
}
}
13 changes: 0 additions & 13 deletions npm/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,6 @@
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/scripts"
],
"outputs": [
"{workspaceRoot}/cli/react",
"{projectRoot}/dist"
]
}
}
},
"standard": {
"globals": [
"Cypress",
Expand Down
13 changes: 0 additions & 13 deletions npm/react18/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,5 @@
},
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/scripts"
],
"outputs": [
"{workspaceRoot}/cli/react18",
"{projectRoot}/dist"
]
}
}
}
}
14 changes: 1 addition & 13 deletions npm/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"prebuild": "rimraf dist",
"build": "rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"check-ts": "tsc --noEmit"
},
Expand Down Expand Up @@ -39,18 +40,5 @@
"module": "dist/cypress-svelte.esm-bundler.js",
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/scripts"
],
"outputs": [
"{workspaceRoot}/cli/svelte",
"{projectRoot}/dist"
]
}
}
}
}
10 changes: 1 addition & 9 deletions npm/vite-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"build": "tsc || echo 'built, with type errors'",
"build-prod": "tsc || echo 'built, with type errors'",
"check-ts": "tsc --noEmit",
"cypress:run": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --project . --browser chrome",
"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 Expand Up @@ -45,14 +46,5 @@
"module": "dist/index.js",
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"outputs": [
"{projectRoot}/dist"
]
}
}
}
}
10 changes: 1 addition & 9 deletions npm/vite-plugin-cypress-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"build": "tsc || echo 'built, with type errors'",
"build-prod": "tsc || echo 'built, with type errors'",
"check-ts": "tsc --noEmit",
"cypress:open": "node ../../scripts/cypress open --project . --component",
"cypress:run": "node ../../scripts/cypress run --project . --component",
Expand Down Expand Up @@ -41,14 +42,5 @@
"module": "dist/index.js",
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"outputs": [
"{projectRoot}/dist"
]
}
}
}
}
14 changes: 1 addition & 13 deletions npm/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Browser-based Component Testing for Vue.js with Cypress.io ✌️🌲",
"main": "dist/cypress-vue.cjs.js",
"scripts": {
"build-prod": "yarn build",
"cy:open": "node ../../scripts/cypress.js open --component --project ${PWD}",
"cy:run": "node ../../scripts/cypress.js run --component --project ${PWD}",
"build": "rimraf dist && rollup -c rollup.config.mjs",
Expand Down Expand Up @@ -79,18 +80,5 @@
},
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/scripts"
],
"outputs": [
"{workspaceRoot}/cli/vue",
"{projectRoot}/dist"
]
}
}
}
}
Loading