mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-18 05:02:23 -06:00
breaking: Remove support for Node.js 16, Node.js 21, and glibc < 2.28 (#30307)
* Update minimum node engines BREAKING CHANGE: Remove Node.js 16 and Node.js 21 support * update changelog * change entry to addresses * trigger publish-binary pipeline on appropriate branch * remove better-sqlite code * Update changelog * changelog
This commit is contained in:
@@ -345,9 +345,6 @@ commands:
|
||||
only-cache-for-root-user:
|
||||
type: boolean
|
||||
default: false
|
||||
build-better-sqlite3:
|
||||
type: boolean
|
||||
default: false
|
||||
steps:
|
||||
- install_cache_helpers_dependencies
|
||||
- run:
|
||||
@@ -356,18 +353,9 @@ commands:
|
||||
- run:
|
||||
name: Generate platform key
|
||||
command: node ./scripts/get-platform-key.js > platform_key
|
||||
- when:
|
||||
condition: <<parameters.build-better-sqlite3>>
|
||||
steps:
|
||||
- restore_cache:
|
||||
name: Restore cache state, to check for known modules cache existence
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}-centos7
|
||||
- unless:
|
||||
condition: <<parameters.build-better-sqlite3>>
|
||||
steps:
|
||||
- restore_cache:
|
||||
name: Restore cache state, to check for known modules cache existence
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}
|
||||
- restore_cache:
|
||||
name: Restore cache state, to check for known modules cache existence
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}
|
||||
- run:
|
||||
name: Bail if cache exists
|
||||
command: |
|
||||
@@ -389,10 +377,6 @@ commands:
|
||||
PERCY_POSTINSTALL_BROWSER=true \
|
||||
yarn --prefer-offline --frozen-lockfile --cache-folder ~/.yarn
|
||||
no_output_timeout: 20m
|
||||
- when:
|
||||
condition: <<parameters.build-better-sqlite3>>
|
||||
steps:
|
||||
- build-better-sqlite3
|
||||
- prepare-modules-cache:
|
||||
dont-move: <<parameters.only-cache-for-root-user>> # we don't move, so we don't hit any issues unpacking symlinks
|
||||
- when:
|
||||
@@ -415,22 +399,11 @@ commands:
|
||||
paths:
|
||||
- /tmp/node_modules_cache
|
||||
- run: touch node_modules_installed
|
||||
- when:
|
||||
condition: <<parameters.build-better-sqlite3>>
|
||||
steps:
|
||||
- save_cache:
|
||||
name: Saving node-modules cache state key
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}-centos7
|
||||
paths:
|
||||
- node_modules_installed
|
||||
- unless:
|
||||
condition: <<parameters.build-better-sqlite3>>
|
||||
steps:
|
||||
- save_cache:
|
||||
name: Saving node-modules cache state key
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}
|
||||
paths:
|
||||
- node_modules_installed
|
||||
- save_cache:
|
||||
name: Saving node-modules cache state key
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}
|
||||
paths:
|
||||
- node_modules_installed
|
||||
- save_cache:
|
||||
name: Save weekly yarn cache
|
||||
key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-deps-root-weekly-{{ checksum "cache_date" }}
|
||||
@@ -513,40 +486,6 @@ commands:
|
||||
echo "Location of Google Chrome Installation: `which google-chrome-<<parameters.channel>>`"
|
||||
echo "Google Chrome Version: `google-chrome-<<parameters.channel>> --version`"
|
||||
|
||||
# This code builds better-sqlite3 on CentOS 7. This is necessary because CentOS 7 has the oldest glibc version
|
||||
# that we support. This job uses the cypress/centos7-builder https://hub.docker.com/repository/docker/cypress/centos7-builder/general
|
||||
# image to build better-sqlite3 against an older version of glibc (2.17).
|
||||
# Since this is running Docker remote, we need to copy the project into the container, and copy the built plugin out
|
||||
# of the container because the host running docker does not have access to the project directory so volume mounts are
|
||||
# not possible. The built plugin is copied to the project directory so it can be injected into the final binary.
|
||||
build-better-sqlite3:
|
||||
description: Build better-sqlite3 for CentOS 7
|
||||
steps:
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Build better-sqlite3 for CentOS 7
|
||||
command: |
|
||||
if [[ ! -f better_sqlite3.node ]]; then
|
||||
set -x
|
||||
apt update && apt install -y docker.io
|
||||
docker run -d --name centos7-builder cypress/centos7-builder:latest /bin/bash -c "sleep 1000000000"
|
||||
docker cp ~/cypress/node_modules/better-sqlite3 centos7-builder:/better-sqlite3
|
||||
docker exec -it centos7-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 27.1.3 --include-regex 'better_sqlite3.node$'"
|
||||
docker cp centos7-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
||||
docker rm -f centos7-builder
|
||||
cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node
|
||||
else
|
||||
cp ~/cypress/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
||||
fi
|
||||
- save_cache:
|
||||
key: better-sqlite3-{{ checksum "node_modules/better-sqlite3/package.json" }}-{{ checksum "node_modules/electron/package.json" }}-centos7
|
||||
paths:
|
||||
- better_sqlite3.node
|
||||
- run:
|
||||
name: Clean up top level better-sqlite3 file
|
||||
command: |
|
||||
rm ~/cypress/better_sqlite3.node
|
||||
|
||||
run-driver-integration-tests:
|
||||
parameters:
|
||||
browser:
|
||||
@@ -1337,9 +1276,6 @@ jobs:
|
||||
resource_class:
|
||||
type: string
|
||||
default: medium
|
||||
build-better-sqlite3:
|
||||
type: boolean
|
||||
default: false
|
||||
resource_class: << parameters.resource_class >>
|
||||
steps:
|
||||
- update_known_hosts
|
||||
@@ -1356,7 +1292,6 @@ jobs:
|
||||
- ProgramData/nvm # windows
|
||||
- caching-dependency-installer:
|
||||
only-cache-for-root-user: <<parameters.only-cache-for-root-user>>
|
||||
build-better-sqlite3: <<parameters.build-better-sqlite3>>
|
||||
- store-npm-logs
|
||||
|
||||
## restores node_modules from previous step & builds if first step skipped
|
||||
@@ -2643,8 +2578,7 @@ jobs:
|
||||
|
||||
linux-x64-workflow: &linux-x64-workflow
|
||||
jobs:
|
||||
- node_modules_install:
|
||||
build-better-sqlite3: true
|
||||
- node_modules_install
|
||||
- build:
|
||||
context: test-runner:env-canary
|
||||
requires:
|
||||
|
||||
@@ -5,6 +5,9 @@ _Released 12/3/2024 (PENDING)_
|
||||
|
||||
**Breaking Changes:**
|
||||
|
||||
- Removed support for Node.js 16 and Node.js 21. Addresses [#29930](https://github.com/cypress-io/cypress/issues/29930).
|
||||
- Prebuilt binaries for Linux are no longer compatible with Linux distributions based on glibc <2.28, for example: Ubuntu 14-18, RHEL 7, CentOS 7, Amazon Linux 2. Addresses [#29601](https://github.com/cypress-io/cypress/issues/29601).
|
||||
|
||||
## 13.15.1
|
||||
|
||||
_Released 10/1/2024 (PENDING)_
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"cypress": "bin/cypress"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || ^18.0.0 || >=20.0.0"
|
||||
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
|
||||
},
|
||||
"types": "types",
|
||||
"exports": {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
"docker": "cd ../.. && WORKING_DIR=/packages/server ./scripts/run-docker-local.sh",
|
||||
"postinstall": "patch-package",
|
||||
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
|
||||
"rebuild-better-sqlite3": "electron-rebuild -f -o better-sqlite3",
|
||||
"repl": "node repl.js",
|
||||
"start": "node ../../scripts/cypress open --dev --global",
|
||||
"test": "node ./test/scripts/run.js",
|
||||
|
||||
@@ -10,6 +10,7 @@ const { getNextVersionForBinary } = require('../get-next-version')
|
||||
const { nextVersion } = await getNextVersionForBinary()
|
||||
|
||||
const body = JSON.stringify({
|
||||
branch: 'remove-centos7-support',
|
||||
parameters: {
|
||||
temp_dir: os.tmpdir(),
|
||||
sha: process.env.CIRCLE_SHA1,
|
||||
|
||||
@@ -3,8 +3,8 @@ const { execSync } = require('child_process')
|
||||
const executionEnv = process.env.CI ? 'ci' : 'local'
|
||||
|
||||
const postInstallCommands = {
|
||||
local: 'patch-package && yarn-deduplicate --strategy=highest && lerna run rebuild-better-sqlite3 --scope @packages/server && yarn build && yarn build-v8-snapshot-dev',
|
||||
ci: 'patch-package && lerna run rebuild-better-sqlite3 --scope @packages/server',
|
||||
local: 'patch-package && yarn-deduplicate --strategy=highest && yarn build && yarn build-v8-snapshot-dev',
|
||||
ci: 'patch-package',
|
||||
}
|
||||
|
||||
execSync(postInstallCommands[executionEnv], {
|
||||
|
||||
Reference in New Issue
Block a user