diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 974f0ad1ab56..4db5e5cee841 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -6,6 +6,7 @@ _Released 03/1/2023 (PENDING)_ **Bugfixes:** - Fixed an issue where cookies were being duplicated with the same hostname, but a prepended dot. Fixed an issue where cookies may not be expiring correctly. Fixes [#25174](https://github.com/cypress-io/cypress/issues/25174), [#25205](https://github.com/cypress-io/cypress/issues/25205) and [#25495](https://github.com/cypress-io/cypress/issues/25495). +- Added missing TypeScript type definitions for the [`cy.reload()`](https://docs.cypress.io/api/commands/reload) command. Addressed in [#25779](https://github.com/cypress-io/cypress/pull/25779). ## 12.6.0 diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 60ad410061e2..17a27f2b3eda 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -1816,9 +1816,21 @@ declare namespace Cypress { * * @see https://on.cypress.io/reload * @example + * cy.visit('http://localhost:3000/admin') * cy.reload() */ - reload(options?: Partial): Chainable + reload(): Chainable + /** + * Reload the page. + * + * @see https://on.cypress.io/reload + * @param {Partial} options Pass in an options object to modify the default behavior of cy.reload() + * @example + * // Reload the page, do not log it in the command log and timeout after 15s + * cy.visit('http://localhost:3000/admin') + * cy.reload({log: false, timeout: 15000}) + */ + reload(options: Partial): Chainable /** * Reload the page without cache * @@ -1830,6 +1842,18 @@ declare namespace Cypress { * cy.reload(true) */ reload(forceReload: boolean): Chainable + /** + * Reload the page without cache and with log and timeout options + * + * @see https://on.cypress.io/reload + * @param {Boolean} forceReload Whether to reload the current page without using the cache. true forces the reload without cache. + * @param {Partial} options Pass in an options object to modify the default behavior of cy.reload() + * @example + * // Reload the page without using the cache, do not log it in the command log and timeout after 15s + * cy.visit('http://localhost:3000/admin') + * cy.reload(true, {log: false, timeout: 15000}) + */ + reload(forceReload: boolean, options: Partial): Chainable /** * Make an HTTP GET request. diff --git a/scripts/semantic-commits/get-binary-release-data.js b/scripts/semantic-commits/get-binary-release-data.js index 6e5d1f9dcf63..a2a4dad8aad5 100644 --- a/scripts/semantic-commits/get-binary-release-data.js +++ b/scripts/semantic-commits/get-binary-release-data.js @@ -7,12 +7,12 @@ const { getCurrentReleaseData } = require('./get-current-release-data') const { getNextVersionForBinary } = require('../get-next-version') const { getLinkedIssues } = require('./get-linked-issues') -if (process.env.CIRCLECI && !process.env.GH_TOKEN) { - throw new Error('The GITHUB_TOKEN env is not set.') +const ensureAuth = () => { + if (!process.env.GH_TOKEN) { + throw new Error('The GH_TOKEN env is not set.') + } } -const octokit = new Octokit({ auth: process.env.GH_TOKEN }) - /** * Get the list of file names that have been added, deleted or changed since the git * sha associated with the latest tag published on npm. @@ -46,6 +46,9 @@ const getChangedFilesSinceLastRelease = (latestReleaseInfo) => { * @param {string} latestReleaseInfo.buildSha - git commit associated with published content */ const getReleaseData = async (latestReleaseInfo) => { + ensureAuth() + const octokit = new Octokit({ auth: process.env.GH_TOKEN }) + let { nextVersion, commits: semanticCommits,