Skip to content

Commit

Permalink
feat: update webpack outside of examples (open-telemetry#963)
Browse files Browse the repository at this point in the history
* feat: update webpack outside of examples

* chore: replace istanbul-instrumenter-loader with @jsdevtools/coverage-istanbul-loader

Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
  • Loading branch information
rauno56 and vmarchaud committed Apr 12, 2022
1 parent f32ee41 commit 18e8efa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
21 changes: 20 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Copyright 2020, OpenTelemetry Authors
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,10 +14,29 @@
* limitations under the License.
*/

const webpack = require('webpack');

const karmaWebpackConfig = require('../../karma.webpack');
const karmaBaseConfig = require('../../karma.base');

module.exports = (config) => {
{
const plugins = karmaWebpackConfig.plugins = [];
plugins.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));
}

{
const plugins = karmaBaseConfig.plugins = [];
const toAdd = Object.keys(require('./package.json').devDependencies)
.filter((packageName) => packageName.startsWith('karma-'))
.map((packageName) => require(packageName));
plugins.push(
...toAdd
);
}

config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig
}))
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,28 @@
"@opentelemetry/api": "^1.0.2"
},
"devDependencies": {
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@opentelemetry/api": "1.0.2",
"@types/mocha": "8.2.3",
"@types/node": "16.11.21",
"@types/webpack-env": "1.16.2",
"assert": "2.0.0",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma": "6.3.17",
"karma-chrome-launcher": "3.1.1",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "5.0.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"process": "0.11.10",
"rimraf": "3.0.2",
"ts-loader": "8.3.0",
"ts-mocha": "8.0.0",
"typescript": "4.3.5",
"webpack": "4.46.0"
"webpack": "5.72.0",
"webpack-cli": "4.9.2"
},
"dependencies": {
"@opentelemetry/core": "^1.0.0"
Expand Down

0 comments on commit 18e8efa

Please sign in to comment.