Skip to content

Conversation

MikeMcC399
Copy link
Contributor

@MikeMcC399 MikeMcC399 commented Aug 29, 2025

Additional details

@cypress/schematic was querying the npm registry registry.npmjs.org using the http protocol.

Since Oct 4, 2021, the npm registry requires TLS 1.2, see The npm registry is deprecating TLS 1.0 and TLS 1.1. Attempting to use http does not meet this requirement.

The attempt to query the npm package record http://registry.npmjs.org/cypress was failing and instead Cypress installation fell back to using the literal version latest, also leaving this value in the updated package.json if ng add @cypress/schematic was invoked.

npm/cypress-schematic/src/schematics/utils/index.ts is updated to query the npm registry using https instead of http.

Steps to test

On Ubuntu 24.04.3 LTS, execute:

git clone --branch issue-32388-schematic-http-registry-query https://github.com/MikeMcC399/cypress
cd cypress
n auto # or manually set Node.js to 22.15.1
npm install yarn@latest -g
yarn
cd ..
git clone --branch 32388-angular-20 https://github.com/MikeMcC399/cypress-test-tiny
cd cypress-test-tiny
cd angular-app
ng add ../../cypress/npm/cypress-schematic --e2e --component
npm why cypress
npx cypress info

Confirm that cypress shows a numerical version, not the literal text latest

$ npm why cypress
[email protected] dev
node_modules/cypress
  dev cypress@"15.0.0" from the root project

How has the user experience changed?

When following the instructions in npm/cypress-schematic > README > Adding E2E and Component Testing using ng add @cypress/schematic, Cypress is saved to the devDependencies key section of the package.json file with its exact latest version, for example:

    "cypress": "15.0.0"

instead of

    "cypress": "latest"

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor Author

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually check this - looks fine. Thanks! Previous tests passed on a commit before this.

@jennifer-shehane jennifer-shehane merged commit 21be37e into cypress-io:develop Sep 2, 2025
9 of 11 checks passed
@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

I checked the released version https://www.npmjs.com/package/@cypress/schematic/v/4.1.2 and it is working as expected. 👍🏻 It's installing the explicit version [email protected], not just cypress@latest.

cd $(mktemp -d)
git clone --branch 32388-angular-20 https://github.com/MikeMcC399/cypress-test-tiny
cd cypress-test-tiny
cd angular-app
ng add @cypress/schematic --e2e --component
cat package.json | grep cypress

Logs

$ cd $(mktemp -d)
git clone --branch 32388-angular-20 https://github.com/MikeMcC399/cypress-test-tiny
cd cypress-test-tiny
cd angular-app
ng add @cypress/schematic --e2e --component
cat package.json | grep cypress
Cloning into 'cypress-test-tiny'...
remote: Enumerating objects: 12397, done.
remote: Counting objects: 100% (423/423), done.
remote: Compressing objects: 100% (207/207), done.
remote: Total 12397 (delta 304), reused 285 (delta 212), pack-reused 11974 (from 3)
Receiving objects: 100% (12397/12397), 2.43 MiB | 2.78 MiB/s, done.
Resolving deltas: 100% (11725/11725), done.
✔ Determining Package Manager
  › Using package manager: npm
✔ Searching for compatible package version
  › Found compatible package version: @cypress/[email protected].
✔ Loading package information from registry
✔ Confirming installation
✔ Installing package
CREATE cypress.config.ts (264 bytes)
CREATE cypress/tsconfig.json (139 bytes)
CREATE cypress/e2e/spec.cy.ts (142 bytes)
CREATE cypress/fixtures/example.json (85 bytes)
CREATE cypress/support/commands.ts (1377 bytes)
CREATE cypress/support/e2e.ts (649 bytes)
CREATE cypress/support/component-index.html (290 bytes)
CREATE cypress/support/component.ts (1123 bytes)
UPDATE package.json (1287 bytes)
UPDATE angular.json (3805 bytes)
✔ Packages installed successfully.
    "cypress:open": "cypress open",
    "cypress:run": "cypress run"
    "@cypress/schematic": "^4.1.2",
    "cypress": "15.1.0"

@MikeMcC399 MikeMcC399 deleted the issue-32388-schematic-http-registry-query branch September 3, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@cypress/schematic installs literal Cypress version "latest"
3 participants