Skip to content

Commit

Permalink
fix: update tsconfig files to match previous config (#30856)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile authored Jan 13, 2025
1 parent a46c2dd commit ab2f0c1
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 10 deletions.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addr
- Fixed a visibility issue for elements with `textContent` but without a width or height. Fixed in [#29688](https://github.com/cypress-io/cypress/pull/29688). Fixes [#29687](https://github.com/cypress-io/cypress/issues/29687).
- Elements whose parent elements has `overflow: clip` and no height/width will now correctly show as hidden. Fixed in [#29778](https://github.com/cypress-io/cypress/pull/29778). Fixes [#23852](https://github.com/cypress-io/cypress/issues/23852).
- The CSS pseudo-class `:dir()` is now supported when testing in Electron. Addresses [#29766](https://github.com/cypress-io/cypress/issues/29766).
- Fixed an issue where the spec filename was not updating correctly when changing specs in `open` mode. Fixes [#30852](https://github.com/cypress-io/cypress/issues/30852).

**Misc:**

Expand Down
20 changes: 20 additions & 0 deletions packages/app/cypress/e2e/specs_list_e2e.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,26 @@ describe('App: Spec List (E2E)', () => {
cy.findByTestId('runnable-header').should('be.visible')
})

it('updates the spec filename when a new spec is selected', () => {
// load the first spec
cy.findAllByTestId('spec-item-link').contains('accounts_list.spec.js').click()

// ensure the tests are loaded
cy.contains('[aria-controls=reporter-inline-specs-list]', 'Specs')
cy.findByText('Your tests are loading...').should('not.be.visible')

// open the inline spec list
cy.get('body').type('f')

// verify the first spec filename
cy.findByTestId('runnable-header').contains('accounts_list.spec.js')

// select the second spec from the inline spec list
cy.findAllByTestId('spec-file-item').contains('accounts_new.spec.js').click()
// verify the spec filename was updated
cy.findByTestId('runnable-header').contains('accounts_new.spec.js')
})

it('cannot open the Spec File Row link in a new tab with "cmd + click"', (done) => {
let numTargets
let newNumTargets
Expand Down
2 changes: 2 additions & 0 deletions packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
],
"compilerOptions": {
"noImplicitThis": true,
"useDefineForClassFields": true,
"paths": {
"@cy/i18n": ["../frontend-shared/src/locales/i18n"],
"@cy/components/*": ["../frontend-shared/src/components/*"],
"@cy/gql-components/*": ["../frontend-shared/src/gql-components/*"],
"@cy/store/*": ["../frontend-shared/src/store/*"],
"@packages/*": ["../*"]
},
"allowJs": true,
"types": [
"cypress",
"cypress-real-events",
Expand Down
3 changes: 2 additions & 1 deletion packages/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"allowJs": false,
"rootDir": "src",
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"types": ["node"],
"typeRoots": [
"../../node_modules/@types"
],
}
}
}
3 changes: 2 additions & 1 deletion packages/data-context/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"lib": ["esnext"],
"allowJs": false,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"types": ["cypress"],
}
}
}
1 change: 0 additions & 1 deletion packages/driver/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"preserveWatchOutput": true,
"sourceMap": true,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"outDir": "dist",
"noErrorTruncation": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/errors/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"allowJs": false,
"noImplicitAny": true,
"noImplicitReturns": false,
"noUncheckedIndexedAccess": true,
}
}
}
1 change: 1 addition & 0 deletions packages/extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../ts/tsconfig.json",
"compilerOptions": {
"target": "es2015",
"allowJs": true,
"strict": false
}
}
2 changes: 1 addition & 1 deletion packages/graphql/src/utils/nexusTypegenUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const nexusTypegenDebounced = (cfg: NexusTypegenCfg) => {
debounced[cfg.filePath] =
debounced[cfg.filePath] ?? _.debounce(nexusTypegen, 500)

debounced[cfg.filePath](cfg)
debounced[cfg.filePath]?.(cfg)
}

interface NexusTypegenWatchCfg extends NexusTypegenCfg {
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"lib": ["esnext"],
"allowJs": false,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"types": []
},
}
3 changes: 2 additions & 1 deletion packages/icons/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"allowJs": false,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"outDir": "dist",
},
}
}
1 change: 1 addition & 0 deletions packages/reporter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../ts/tsconfig.json",
"compilerOptions": {
"useDefineForClassFields": true,
"types": [
"node",
"cypress",
Expand Down
3 changes: 2 additions & 1 deletion packages/scaffold-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"lib": ["esnext"],
"allowJs": false,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"types": []
}
}
}
1 change: 1 addition & 0 deletions packages/telemetry/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"lib": ["esnext", "DOM"],
"allowJs": false,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"types": ["cypress"],
}
}
6 changes: 3 additions & 3 deletions packages/ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
Expand Down Expand Up @@ -98,8 +98,8 @@
"noUnusedLocals": false, /* Enable error reporting when local variables aren't read. */
"noUnusedParameters": false, /* Raise an error when a function parameter isn't read. */
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
Expand Down

4 comments on commit ab2f0c1

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ab2f0c1 Jan 13, 2025

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/14.0.0/linux-x64/develop-ab2f0c1fdb9dba91ee1ffdb3bf01768c6c670f33/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ab2f0c1 Jan 13, 2025

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/14.0.0/linux-arm64/develop-ab2f0c1fdb9dba91ee1ffdb3bf01768c6c670f33/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ab2f0c1 Jan 13, 2025

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/14.0.0/win32-x64/develop-ab2f0c1fdb9dba91ee1ffdb3bf01768c6c670f33/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ab2f0c1 Jan 13, 2025

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/14.0.0/darwin-x64/develop-ab2f0c1fdb9dba91ee1ffdb3bf01768c6c670f33/cypress.tgz

Please sign in to comment.