Skip to content

Commit

Permalink
lolz
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed Aug 28, 2024
1 parent 1b37480 commit 15ac6da
Showing 1 changed file with 5 additions and 5 deletions.
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 15ac6da

Please sign in to comment.