Skip to content

Commit 954f29c

Browse files
MSNevdyladanvmarchaud
authored
ci: [Bug] Web based karma tests are no longer running open-telemetry#1135 (open-telemetry#1137)
Co-authored-by: Daniel Dyla <[email protected]> Co-authored-by: Valentin Marchaud <[email protected]>
1 parent 4e4d22e commit 954f29c

File tree

19 files changed

+72
-239
lines changed

19 files changed

+72
-239
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ package.json.lerna_backup
8484

8585
# version.ts file is automatically generated at compile time
8686
version.ts
87+
/.vs

karma.base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
listenAddress: 'localhost',
1919
hostname: 'localhost',
2020
browsers: ['ChromeHeadless'],
21-
frameworks: ['mocha', 'webpack'],
21+
frameworks: ['mocha'],
2222
coverageIstanbulReporter: {
2323
reports: ['json'],
2424
dir: '.nyc_output',

karma.webpack.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const webpackNodePolyfills = require('./webpack.node-polyfills.js');
2020
module.exports = {
2121
mode: 'development',
2222
target: 'web',
23-
name: 'bundle',
23+
output: { filename: 'bundle.js' },
2424
resolve: { extensions: ['.ts', '.js', '.tsx'] },
2525
devtool: 'inline-source-map',
2626
module: {

metapackages/auto-instrumentations-web/karma.conf.js

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Copyright The OpenTelemetry Authors
2+
* Copyright 2020, OpenTelemetry Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,29 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
const webpack = require('webpack');
18-
1917
const karmaWebpackConfig = require('../../karma.webpack');
2018
const karmaBaseConfig = require('../../karma.base');
2119

2220
module.exports = (config) => {
23-
{
24-
const plugins = karmaWebpackConfig.plugins = [];
25-
plugins.push(new webpack.ProvidePlugin({
26-
process: 'process/browser',
27-
}));
28-
}
29-
30-
{
31-
const plugins = karmaBaseConfig.plugins = [];
32-
const toAdd = Object.keys(require('./package.json').devDependencies)
33-
.filter((packageName) => packageName.startsWith('karma-'))
34-
.map((packageName) => require(packageName));
35-
plugins.push(
36-
...toAdd
37-
);
38-
}
39-
4021
config.set(Object.assign({}, karmaBaseConfig, {
4122
webpack: karmaWebpackConfig
4223
}))

metapackages/auto-instrumentations-web/package.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,29 @@
3434
},
3535
"devDependencies": {
3636
"@babel/core": "7.15.0",
37-
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
3837
"@opentelemetry/api": "^1.0.0",
3938
"@types/mocha": "8.2.3",
4039
"@types/node": "16.11.21",
4140
"@types/sinon": "10.0.2",
4241
"@types/webpack-env": "1.16.2",
43-
"assert": "2.0.0",
4442
"babel-loader": "8.2.2",
4543
"gts": "3.1.0",
46-
"karma": "6.3.17",
47-
"karma-chrome-launcher": "3.1.1",
44+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
45+
"karma": "6.3.16",
46+
"karma-chrome-launcher": "3.1.0",
4847
"karma-coverage-istanbul-reporter": "3.0.3",
4948
"karma-mocha": "2.0.1",
50-
"karma-spec-reporter": "0.0.33",
51-
"karma-webpack": "5.0.0",
49+
"karma-spec-reporter": "0.0.32",
50+
"karma-webpack": "4.0.2",
5251
"mocha": "7.2.0",
5352
"nyc": "15.1.0",
54-
"process": "0.11.10",
5553
"rimraf": "3.0.2",
5654
"sinon": "14.0.0",
5755
"ts-loader": "8.3.0",
5856
"ts-mocha": "10.0.0",
5957
"typescript": "4.3.5",
60-
"util": "0.12.4",
61-
"webpack": "5.72.0",
62-
"webpack-cli": "4.9.2",
58+
"webpack": "4.46.0",
59+
"webpack-cli": "4.7.2",
6360
"webpack-merge": "5.8.0"
6461
},
6562
"dependencies": {

packages/opentelemetry-id-generator-aws-xray/karma.conf.js

+6-23
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
const webpack = require('webpack');
18-
1917
const karmaWebpackConfig = require('../../karma.webpack');
2018
const karmaBaseConfig = require('../../karma.base');
2119

22-
module.exports = (config) => {
23-
{
24-
const plugins = karmaWebpackConfig.plugins = [];
25-
plugins.push(new webpack.ProvidePlugin({
26-
process: 'process/browser',
27-
}));
28-
}
29-
30-
{
31-
const plugins = karmaBaseConfig.plugins = [];
32-
const toAdd = Object.keys(require('./package.json').devDependencies)
33-
.filter((packageName) => packageName.startsWith('karma-'))
34-
.map((packageName) => require(packageName));
35-
plugins.push(
36-
...toAdd
37-
);
38-
}
39-
40-
config.set(Object.assign({}, karmaBaseConfig, {
41-
webpack: karmaWebpackConfig
42-
}))
20+
module.exports = config => {
21+
config.set(
22+
Object.assign({}, karmaBaseConfig, {
23+
webpack: karmaWebpackConfig,
24+
})
25+
);
4326
};

packages/opentelemetry-id-generator-aws-xray/package.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,27 @@
5454
"@opentelemetry/api": "^1.0.0"
5555
},
5656
"devDependencies": {
57-
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
5857
"@opentelemetry/api": "^1.0.0",
5958
"@types/mocha": "8.2.3",
6059
"@types/node": "16.11.21",
6160
"@types/sinon": "10.0.2",
6261
"@types/webpack-env": "1.16.2",
63-
"assert": "2.0.0",
6462
"gts": "3.1.0",
65-
"karma": "6.3.17",
66-
"karma-chrome-launcher": "3.1.1",
63+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
64+
"karma": "6.3.16",
65+
"karma-chrome-launcher": "3.1.0",
6766
"karma-coverage-istanbul-reporter": "3.0.3",
6867
"karma-mocha": "2.0.1",
69-
"karma-spec-reporter": "0.0.33",
70-
"karma-webpack": "5.0.0",
68+
"karma-spec-reporter": "0.0.32",
69+
"karma-webpack": "4.0.2",
7170
"mocha": "7.2.0",
7271
"nyc": "15.1.0",
73-
"process": "0.11.10",
7472
"rimraf": "3.0.2",
7573
"sinon": "14.0.0",
7674
"ts-loader": "8.3.0",
7775
"ts-mocha": "10.0.0",
7876
"typescript": "4.3.5",
79-
"webpack": "5.72.0"
77+
"webpack": "4.46.0"
8078
},
8179
"dependencies": {
8280
"@opentelemetry/core": "^1.0.0"

plugins/web/opentelemetry-instrumentation-document-load/karma.conf.js

-19
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
const webpack = require('webpack');
18-
1917
const karmaWebpackConfig = require('../../../karma.webpack');
2018
const karmaBaseConfig = require('../../../karma.base');
2119

2220
module.exports = (config) => {
23-
{
24-
const plugins = karmaWebpackConfig.plugins = [];
25-
plugins.push(new webpack.ProvidePlugin({
26-
process: 'process/browser',
27-
}));
28-
}
29-
30-
{
31-
const plugins = karmaBaseConfig.plugins = [];
32-
const toAdd = Object.keys(require('./package.json').devDependencies)
33-
.filter((packageName) => packageName.startsWith('karma-'))
34-
.map((packageName) => require(packageName));
35-
plugins.push(
36-
...toAdd
37-
);
38-
}
39-
4021
config.set(Object.assign({}, karmaBaseConfig, {
4122
webpack: karmaWebpackConfig
4223
}))

plugins/web/opentelemetry-instrumentation-document-load/package.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -51,32 +51,29 @@
5151
},
5252
"devDependencies": {
5353
"@babel/core": "7.15.0",
54-
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
5554
"@opentelemetry/api": "^1.0.0",
5655
"@types/mocha": "8.2.3",
5756
"@types/node": "16.11.21",
5857
"@types/sinon": "10.0.2",
5958
"@types/webpack-env": "1.16.2",
60-
"assert": "2.0.0",
6159
"babel-loader": "8.2.2",
6260
"gts": "3.1.0",
63-
"karma": "6.3.17",
64-
"karma-chrome-launcher": "3.1.1",
61+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
62+
"karma": "6.3.16",
63+
"karma-chrome-launcher": "3.1.0",
6564
"karma-coverage-istanbul-reporter": "3.0.3",
6665
"karma-mocha": "2.0.1",
67-
"karma-spec-reporter": "0.0.33",
68-
"karma-webpack": "5.0.0",
66+
"karma-spec-reporter": "0.0.32",
67+
"karma-webpack": "4.0.2",
6968
"mocha": "7.2.0",
7069
"nyc": "15.1.0",
71-
"process": "0.11.10",
7270
"rimraf": "3.0.2",
7371
"sinon": "14.0.0",
7472
"ts-loader": "8.3.0",
7573
"ts-mocha": "10.0.0",
7674
"typescript": "4.3.5",
77-
"util": "0.12.4",
78-
"webpack": "5.72.0",
79-
"webpack-cli": "4.9.2",
75+
"webpack": "4.46.0",
76+
"webpack-cli": "4.7.2",
8077
"webpack-merge": "5.8.0"
8178
},
8279
"dependencies": {

plugins/web/opentelemetry-instrumentation-long-task/karma.conf.js

+1-20
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
const webpack = require('webpack');
18-
1917
const karmaWebpackConfig = require('../../../karma.webpack');
2018
const karmaBaseConfig = require('../../../karma.base');
2119

2220
module.exports = (config) => {
23-
{
24-
const plugins = karmaWebpackConfig.plugins = [];
25-
plugins.push(new webpack.ProvidePlugin({
26-
process: 'process/browser',
27-
}));
28-
}
29-
30-
{
31-
const plugins = karmaBaseConfig.plugins = [];
32-
const toAdd = Object.keys(require('./package.json').devDependencies)
33-
.filter((packageName) => packageName.startsWith('karma-'))
34-
.map((packageName) => require(packageName));
35-
plugins.push(
36-
...toAdd
37-
);
38-
}
39-
4021
config.set(Object.assign({}, karmaBaseConfig, {
4122
frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']),
42-
webpack: karmaWebpackConfig
23+
webpack: karmaWebpackConfig,
4324
}))
4425
};

plugins/web/opentelemetry-instrumentation-long-task/package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,32 @@
4848
},
4949
"devDependencies": {
5050
"@babel/core": "7.15.0",
51-
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
5251
"@opentelemetry/api": "^1.0.0",
5352
"@opentelemetry/sdk-trace-base": "^1.3.1",
5453
"@types/jquery": "3.5.6",
5554
"@types/mocha": "7.0.2",
5655
"@types/node": "16.11.21",
5756
"@types/sinon": "10.0.2",
5857
"@types/webpack-env": "1.16.2",
59-
"assert": "2.0.0",
6058
"babel-loader": "8.2.2",
6159
"gts": "3.1.0",
62-
"karma": "6.3.17",
63-
"karma-chrome-launcher": "3.1.1",
60+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
61+
"karma": "6.3.16",
62+
"karma-chrome-launcher": "3.1.0",
6463
"karma-coverage-istanbul-reporter": "3.0.3",
6564
"karma-jquery": "0.2.4",
6665
"karma-mocha": "2.0.1",
67-
"karma-spec-reporter": "0.0.33",
68-
"karma-webpack": "5.0.0",
66+
"karma-spec-reporter": "0.0.32",
67+
"karma-webpack": "4.0.2",
6968
"mocha": "7.2.0",
7069
"nyc": "15.1.0",
71-
"process": "0.11.10",
7270
"rimraf": "3.0.2",
7371
"sinon": "14.0.0",
7472
"ts-loader": "8.3.0",
7573
"ts-mocha": "10.0.0",
7674
"typescript": "4.3.5",
77-
"webpack": "5.72.0",
78-
"webpack-cli": "4.9.2",
75+
"webpack": "4.46.0",
76+
"webpack-cli": "4.7.2",
7977
"webpack-merge": "5.8.0",
8078
"zone.js": "0.11.4"
8179
},

plugins/web/opentelemetry-instrumentation-user-interaction/karma.conf.js

+1-20
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
const webpack = require('webpack');
18-
1917
const karmaWebpackConfig = require('../../../karma.webpack');
2018
const karmaBaseConfig = require('../../../karma.base');
2119

2220
module.exports = (config) => {
23-
{
24-
const plugins = karmaWebpackConfig.plugins = [];
25-
plugins.push(new webpack.ProvidePlugin({
26-
process: 'process/browser',
27-
}));
28-
}
29-
30-
{
31-
const plugins = karmaBaseConfig.plugins = [];
32-
const toAdd = Object.keys(require('./package.json').devDependencies)
33-
.filter((packageName) => packageName.startsWith('karma-'))
34-
.map((packageName) => require(packageName));
35-
plugins.push(
36-
...toAdd
37-
);
38-
}
39-
4021
config.set(Object.assign({}, karmaBaseConfig, {
4122
frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']),
42-
webpack: karmaWebpackConfig
23+
webpack: karmaWebpackConfig,
4324
}))
4425
};

plugins/web/opentelemetry-instrumentation-user-interaction/package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
},
4949
"devDependencies": {
5050
"@babel/core": "7.15.0",
51-
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
5251
"@opentelemetry/api": "^1.0.0",
5352
"@opentelemetry/context-zone-peer-dep": "^1.3.1",
5453
"@opentelemetry/instrumentation-xml-http-request": "^0.32.0",
@@ -58,26 +57,25 @@
5857
"@types/node": "16.11.21",
5958
"@types/sinon": "10.0.2",
6059
"@types/webpack-env": "1.16.2",
61-
"assert": "2.0.0",
6260
"babel-loader": "8.2.2",
6361
"gts": "3.1.0",
64-
"karma": "6.3.17",
65-
"karma-chrome-launcher": "3.1.1",
62+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
63+
"karma": "6.3.16",
64+
"karma-chrome-launcher": "3.1.0",
6665
"karma-coverage-istanbul-reporter": "3.0.3",
6766
"karma-jquery": "0.2.4",
6867
"karma-mocha": "2.0.1",
69-
"karma-spec-reporter": "0.0.33",
70-
"karma-webpack": "5.0.0",
68+
"karma-spec-reporter": "0.0.32",
69+
"karma-webpack": "4.0.2",
7170
"mocha": "7.2.0",
7271
"nyc": "15.1.0",
73-
"process": "0.11.10",
7472
"rimraf": "3.0.2",
7573
"sinon": "14.0.0",
7674
"ts-loader": "8.3.0",
7775
"ts-mocha": "10.0.0",
7876
"typescript": "4.3.5",
79-
"webpack": "5.72.0",
80-
"webpack-cli": "4.9.2",
77+
"webpack": "4.46.0",
78+
"webpack-cli": "4.7.2",
8179
"webpack-merge": "5.8.0",
8280
"zone.js": "0.11.4"
8381
},

0 commit comments

Comments
 (0)