Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJW34 committed Sep 24, 2021
2 parents 6e0c2c1 + db6f909 commit 1785016
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions npm/react/plugins/next/findNextWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const debug = require('debug')('@cypress/react')
const getNextJsBaseWebpackConfig = require('next/dist/build/webpack-config').default
const { findPagesDir } = require('../../dist/next/findPagesDir')
const { getRunWebpackSpan } = require('../../dist/next/getRunWebpackSpan')

async function getNextWebpackConfig (config) {
let loadConfig
Expand All @@ -20,6 +21,7 @@ async function getNextWebpackConfig (config) {
}
}
const nextConfig = await loadConfig('development', config.projectRoot)
const runWebpackSpan = await getRunWebpackSpan()
const nextWebpackConfig = await getNextJsBaseWebpackConfig(
config.projectRoot,
{
Expand All @@ -30,6 +32,7 @@ async function getNextWebpackConfig (config) {
pagesDir: findPagesDir(config.projectRoot),
entrypoints: {},
rewrites: { fallback: [], afterFiles: [], beforeFiles: [] },
...runWebpackSpan,
},
)

Expand Down
16 changes: 16 additions & 0 deletions npm/react/plugins/next/getRunWebpackSpan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Span } from 'next/dist/telemetry/trace/trace'

// Starting with v11.1.1, a trace is required.
// 'next/dist/telemetry/trace/trace' only exists since v10.0.9
// and our peerDeps support back to v8 so try-catch this import
export async function getRunWebpackSpan (): Promise<{ runWebpackSpan?: Span }> {
let trace: (name: string) => Span

try {
trace = await import('next/dist/telemetry/trace/trace').then((m) => m.trace)

return { runWebpackSpan: trace('cypress') }
} catch (_) {
return {}
}
}

4 comments on commit 1785016

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1785016 Sep 24, 2021

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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.5.0/circle-develop-1785016b1e516bb271d1194d413ca96906d56831/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1785016 Sep 24, 2021

Choose a reason for hiding this comment

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

AppVeyor has built the win32 ia32 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.5.0/appveyor-develop-1785016b1e516bb271d1194d413ca96906d56831/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1785016 Sep 24, 2021

Choose a reason for hiding this comment

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

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

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.5.0/appveyor-develop-1785016b1e516bb271d1194d413ca96906d56831/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1785016 Sep 24, 2021

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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.5.0/circle-develop-1785016b1e516bb271d1194d413ca96906d56831/cypress.tgz

Please sign in to comment.