Skip to content

Commit

Permalink
next.js: cap test range to 14.2.6 for now (#4636)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter authored and bengl committed Aug 30, 2024
1 parent d1b6194 commit 80c8eb3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ jobs:
version:
- 18
- 22.6
range: ['9.5.0', '11.1.4', '13.2.0', '*']
runs-on: ubuntu-latest
env:
PLUGINS: next
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ jobs:
version:
- 18
- 22.6
range: ['9.5.0', '11.1.4', '13.2.0', '*']
runs-on: ubuntu-latest
env:
PLUGINS: next
Expand Down
10 changes: 5 additions & 5 deletions packages/datadog-instrumentations/src/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function finish (ctx, result, err) {
// however, it is not provided as a class function or exported property
addHook({
name: 'next',
versions: ['>=13.3.0'],
versions: ['>=13.3.0 <14.2.7'],
file: 'dist/server/web/spec-extension/adapters/next-request.js'
}, NextRequestAdapter => {
shimmer.wrap(NextRequestAdapter.NextRequestAdapter, 'fromNodeNextRequest', fromNodeNextRequest => {
Expand All @@ -203,7 +203,7 @@ addHook({

addHook({
name: 'next',
versions: ['>=11.1'],
versions: ['>=11.1 <14.2.7'],
file: 'dist/server/serve-static.js'
}, serveStatic => shimmer.wrap(serveStatic, 'serveStatic', wrapServeStatic))

Expand All @@ -213,7 +213,7 @@ addHook({
file: 'dist/next-server/server/serve-static.js'
}, serveStatic => shimmer.wrap(serveStatic, 'serveStatic', wrapServeStatic))

addHook({ name: 'next', versions: ['>=11.1'], file: 'dist/server/next-server.js' }, nextServer => {
addHook({ name: 'next', versions: ['>=11.1 <14.2.7'], file: 'dist/server/next-server.js' }, nextServer => {
const Server = nextServer.default

shimmer.wrap(Server.prototype, 'handleRequest', wrapHandleRequest)
Expand All @@ -230,7 +230,7 @@ addHook({ name: 'next', versions: ['>=11.1'], file: 'dist/server/next-server.js'
})

// `handleApiRequest` changes parameters/implementation at 13.2.0
addHook({ name: 'next', versions: ['>=13.2'], file: 'dist/server/next-server.js' }, nextServer => {
addHook({ name: 'next', versions: ['>=13.2 <14.2.7'], file: 'dist/server/next-server.js' }, nextServer => {
const Server = nextServer.default
shimmer.wrap(Server.prototype, 'handleApiRequest', wrapHandleApiRequestWithMatch)
return nextServer
Expand Down Expand Up @@ -264,7 +264,7 @@ addHook({

addHook({
name: 'next',
versions: ['>=13'],
versions: ['>=13 <14.2.7'],
file: 'dist/server/web/spec-extension/request.js'
}, request => {
const nextUrlDescriptor = Object.getOwnPropertyDescriptor(request.NextRequest.prototype, 'nextUrl')
Expand Down

0 comments on commit 80c8eb3

Please sign in to comment.