Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

express v5 beta support #1249

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 219 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-monorepo-cop": "^1.0.2",
"express": "^4.19.2",
"express-beta": "npm:express@^5.0.0-beta.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We encountered an ERESOLVE error while resolving [email protected] due to a version conflict with Express. Specifically:

The version of Express required by [email protected] conflicts with the beta version of Express we are using. To address this, I am using express-beta to avoid the dependency conflict.

"express-winston": "^4.2.0",
"fastify": "^4.28.1",
"fastify-v3": "npm:fastify@^3.21.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-fargate/test/metadata_mock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process.on('SIGTERM', () => {
});

const bodyParser = require('body-parser');
const express = require('express');
const express = require('express-beta');
const morgan = require('morgan');
const pino = require('pino')();

Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/apps/agentStub.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process.on('SIGTERM', () => {

const bodyParser = require('body-parser');
const bunyan = require('bunyan');
const express = require('express');
const express = require('express-beta');
const _ = require('lodash');
// const morgan = require('morgan');
const app = express();
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/apps/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const instana = require('../..')({
}
});

const express = require('express');
const express = require('express-beta');
const morgan = require('morgan');
const path = require('path');
const fs = require('fs');
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/immediate/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process.on('SIGTERM', () => {
// This application is deliberately not instrumented manually with require('@instana/collector'), it is meant to be used
// with NODE_OPTIONS="--require ...".

const express = require('express');
const express = require('express-beta');
const morgan = require('morgan');

const app = express();
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/metrics/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process.on('SIGTERM', () => {

require('../../..')();

const express = require('express');
const express = require('express-beta');
const morgan = require('morgan');

const app = express();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (!process.env.NODE_OPTIONS || !process.env.NODE_OPTIONS.includes('src/immedia
require('../../..')();
}

const express = require('express');
const express = require('express-beta');
const morgan = require('morgan');
const port = require('../../test_util/app-port')();

Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/opentelemetry/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ require('express');
// 4.x throws shimmer problems
require('mongodb');

const express = require('express');
const express = require('express-beta');
const port = require('../test_util/app-port')();
const app = express();

Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/opentelemetry/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const expect = require('chai').expect;
const path = require('path');
const semver = require('semver');
const express = require('express');
const express = require('express-beta');

const supportedVersion = require('@instana/core').tracing.supportedVersion;
const config = require('../../../core/test/config');
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/tracing/api/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process.on('SIGTERM', () => {

const instana = require('../../..')();

const express = require('express');
const express = require('express-beta');
const morgan = require('morgan');
const bodyParser = require('body-parser');
const port = require('../../test_util/app-port')();
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/tracing/api/app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const instana = instanaFactory();
import getAppPort from '../../test_util/app-port.js';
const port = getAppPort();

import express from 'express';
import express from 'express-beta';
import morgan from 'morgan';
import bodyParser from 'body-parser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const fetch = require('node-fetch-v2');
const delay = require('@instana/core/test/test_util/delay');

const AWS = require('aws-sdk');
const express = require('express');
const express = require('express-beta');
const logPrefix = `Combined AWS SDK v2 products (${process.pid}):\t`;
AWS.config.update({ region: 'us-east-2' });
const s3 = new AWS.S3();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const fetch = require('node-fetch-v2');
const delay = require('../../../../../../../core/test/test_util/delay');

const AWS = require('aws-sdk');
const express = require('express');
const express = require('express-beta');
const logPrefix = `AWS SDK v2 DynamoDB (${process.pid}):\t`;
AWS.config.update({ region: 'us-east-2' });
const dynamoDB = new AWS.DynamoDB();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import logger from '@instana/core/test/test_util/log.js';
const port = getAppPort();

import AWS from 'aws-sdk';
import express from 'express';
import express from 'express-beta';
const logPrefix = `AWS SDK v2 DynamoDB (${process.pid}):\t`;
AWS.config.update({ region: 'us-east-2' });
const dynamoDB = new AWS.DynamoDB();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process.on('SIGTERM', () => {
});

require('../../../../../..')();
const express = require('express');
const express = require('express-beta');
const app = express();
const port = require('../../../../../test_util/app-port')();
const streamName = process.env.AWS_KINESIS_STREAM_NAME || 'nodejs-team';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process.on('SIGTERM', () => {
process.exit(0);
});

import express from 'express';
import express from 'express-beta';
const app = express();

import getAppPort from '../../../../../test_util/app-port.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process.on('SIGTERM', () => {
require('../../../../../../src')();

const AWS = require('aws-sdk');
const express = require('express');
const express = require('express-beta');
const logPrefix = `AWS SDK v2 Lambda (${process.pid}):\t`;
AWS.config.update({ region: 'us-east-2' });
const lambda = new AWS.Lambda();
Expand Down
Loading