Skip to content

Commit

Permalink
chore: update node types from v14 to v16 latest to be current (no 16.…
Browse files Browse the repository at this point in the history
…16.0 types exist). Fixes types issues with webpack upgrade. (#27425)

chore: bump the Typescript minimum version in the CLI from 3.4 to 3.9
  • Loading branch information
AtofStryker committed Aug 1, 2023
1 parent 0336922 commit 68f8f99
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 22 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@cypress/request": "^2.88.11",
"@cypress/xvfb": "^1.2.4",
"@types/node": "^14.14.31",
"@types/node": "^16.18.39",
"@types/sinonjs__fake-timers": "8.1.1",
"@types/sizzle": "^2.3.2",
"arch": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion cli/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Mike Woudenberg <https://github.com/mikewoudenberg>
// Robbert van Markus <https://github.com/rvanmarkus>
// Nicholas Boll <https://github.com/nicholasboll>
// TypeScript Version: 3.4
// TypeScript Version: 3.9
// Updated by the Cypress team: https://www.cypress.io/about/

/// <reference path="./cy-blob-util.d.ts" />
Expand Down
2 changes: 1 addition & 1 deletion npm/create-cypress-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/babel__core": "^7.1.2",
"@types/inquirer": "7.3.1",
"@types/mock-fs": "4.10.0",
"@types/node": "14.14.31",
"@types/node": "16.18.39",
"@types/ora": "^3.2.0",
"@types/semver": "7.5.0",
"copy": "0.3.2",
Expand Down
1 change: 1 addition & 0 deletions npm/webpack-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"webpack-merge": "^5.4.0"
},
"devDependencies": {
"@types/node": "16.18.39",
"@types/proxyquire": "^1.3.28",
"@types/speed-measure-webpack-plugin": "^1.3.4",
"@types/webpack-dev-server-3": "npm:@types/webpack-dev-server@^3",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"@types/markdown-it": "12.2.3",
"@types/mini-css-extract-plugin": "1.2.3",
"@types/mocha": "8.0.3",
"@types/node": "14.14.31",
"@types/node": "16.18.39",
"@types/prismjs": "1.16.0",
"@types/react": "16.9.50",
"@types/react-dom": "16.9.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@packages/types": "0.0.0-development",
"@types/chai": "4.2.15",
"@types/mocha": "8.2.2",
"@types/node": "14.14.31",
"@types/node": "16.18.39",
"@types/pngjs": "^6.0.1",
"@types/strip-ansi": "^5.2.1",
"ansi-styles": "^5",
Expand Down
2 changes: 0 additions & 2 deletions packages/launcher/lib/linux/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ async function isFirefoxSnap (binary: string): Promise<boolean> {

// read the first 16kb, don't read the entire file into memory in case it is a binary
const fd = await fs.open(binaryPath, 'r')
// @ts-ignore - needs @types/node at least 16
// https://github.com/cypress-io/cypress/issues/21329
const { buffer, bytesRead } = await fd.read<Buffer>({ length: 16384 })

await fd.close()
Expand Down
1 change: 1 addition & 0 deletions packages/packherd-require/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ export class PackherdModuleLoader {
: this._createRequire(fullPath, moduleUri, parent)

return {
isPreloading: false,
children: [],
exports: {},
filename: fullPath,
Expand Down
1 change: 1 addition & 0 deletions packages/proxy/lib/http/response-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ const PatchExpressSetHeader: ResponseMiddleware = function () {

const ctxDebug = this.debug

// @ts-expect-error
this.res.setHeader = function (name, value) {
// express.Response.setHeader does all kinds of silly/nasty stuff to the content-type...
// but we don't want to change it at all!
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/browsers/firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export function _createDetachedInstance (browserInstance: BrowserInstance, brows
browserCriClient = undefined
}

treeKill(browserInstance.pid, (err?, result?) => {
treeKill(browserInstance.pid as number, (err?, result?) => {
debug('force-exit of process tree complete %o', { err, result })
detachedInstance.emit('exit')
})
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/browsers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type BrowserInstance = EventEmitter & {
* In all other browsers, the process tree of `BrowserInstance.pid` can be used instead of `allPids`.
*/
allPids?: number[]
pid: number
pid?: number
/**
* After `.open`, this is set to the `Browser` used to launch this instance.
* TODO: remove need for this
Expand Down
1 change: 0 additions & 1 deletion packages/server/lib/unhandled_exceptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function handle (shouldExitCb?: (err: Error) => boolean) {
}

process.removeAllListeners('unhandledRejection')
// @ts-expect-error missing unhandledRejection here
process.once('unhandledRejection', globalExceptionHandler)
process.removeAllListeners('uncaughtException')
process.once('uncaughtException', globalExceptionHandler)
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/util/socket_allowed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class SocketAllowed {
const { localPort } = socket

debug('allowing socket %o', { localPort })
this.allowedLocalPorts.push(localPort)
this.allowedLocalPorts.push(localPort as number)

socket.once('close', () => {
debug('allowed socket closed, removing %o', { localPort })
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"@types/chrome-remote-interface": "0.31.4",
"@types/http-proxy": "1.17.4",
"@types/mime": "3.0.1",
"@types/node": "14.14.31",
"@types/node": "16.18.39",
"babel-loader": "8.3.0",
"chai": "1.10.0",
"chai-as-promised": "7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {},
"devDependencies": {
"@types/node": "14.14.31",
"@types/node": "16.18.39",
"typescript": "^4.7.4"
},
"files": [
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6945,21 +6945,16 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98"
integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==

"@types/node@14.14.31", "@types/node@^14.14.31":
version "14.14.31"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055"
integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==
"@types/node@16.18.39", "@types/node@^16.11.26", "@types/node@^16.18.39":
version "16.18.39"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.39.tgz#aa39a1a87a40ef6098ee69689a1acb0c1b034832"
integrity sha512-8q9ZexmdYYyc5/cfujaXb4YOucpQxAV4RMG0himLyDUOEr8Mr79VrqsFI+cQ2M2h89YIuy95lbxuYjxT4Hk4kQ==

"@types/node@^12.12.29", "@types/node@^12.12.7":
version "12.20.55"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==

"@types/node@^16.11.26":
version "16.11.34"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.34.tgz#520224e4be4448c279ecad09639ab460cc441a50"
integrity sha512-UrWGDyLAlQ2Z8bNOGWTsqbP9ZcBeTYBVuTRNxXTztBy5KhWUFI3BaeDWoCP/CzV/EVGgO1NTYzv9ZytBI9GAEw==

"@types/node@^8.0.7":
version "8.10.66"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3"
Expand Down

6 comments on commit 68f8f99

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68f8f99 Aug 1, 2023

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-x64/develop-68f8f99a9db73a30dbd10cc584798a59506df6a3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68f8f99 Aug 1, 2023

Choose a reason for hiding this comment

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

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-arm64/develop-68f8f99a9db73a30dbd10cc584798a59506df6a3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68f8f99 Aug 1, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/darwin-x64/develop-68f8f99a9db73a30dbd10cc584798a59506df6a3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68f8f99 Aug 1, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/darwin-arm64/develop-68f8f99a9db73a30dbd10cc584798a59506df6a3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68f8f99 Aug 1, 2023

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-x64/develop-68f8f99a9db73a30dbd10cc584798a59506df6a3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68f8f99 Aug 1, 2023

Choose a reason for hiding this comment

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

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/win32-x64/develop-68f8f99a9db73a30dbd10cc584798a59506df6a3/cypress.tgz

Please sign in to comment.