Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0a54d96
chore(deps): bring project up to date (#555)
codymikol Oct 21, 2023
189a8e3
chore: set node version to >= 18 (#556)
codymikol Oct 21, 2023
8956128
chore: upgrade minimatch one major verision (#557)
codymikol Oct 21, 2023
32589e1
chore: upgrade minimatch to 8 (#558)
codymikol Oct 21, 2023
0670955
fix(controller): don't warn if name is default (#559)
codymikol Oct 21, 2023
fca6bce
chore: update minimatch to 9 (#560)
codymikol Oct 21, 2023
3e9fc38
chore: upgrade babel dependencies (#563)
codymikol Oct 21, 2023
671102d
build(deps-dev): bump fsevents from 1.2.4 to 1.2.13 (#561)
dependabot[bot] Oct 21, 2023
d4c2962
build(deps-dev): bump json5 from 0.5.1 to 2.2.3 (#564)
dependabot[bot] Oct 21, 2023
3dcc48f
chore: update standard-version (#565)
codymikol Oct 21, 2023
1b5e440
chore: update webpack-contrib-defaults (#566)
codymikol Oct 21, 2023
7a73af1
chore: remove webpack-contrib-defaults (#568)
codymikol Oct 21, 2023
71e2d3b
chore: remove nsp (#569)
codymikol Oct 21, 2023
38e2764
chore: remove del / del-cli (#570)
codymikol Oct 21, 2023
0a768ba
chore: upgrade karma-mocha (#571)
codymikol Oct 21, 2023
e53f799
chore: npm audit fix (#572)
codymikol Oct 21, 2023
16078dc
chore: update badges (#574)
codymikol Oct 22, 2023
740061b
build(deps): bump yargs-parser and @commitlint/cli (#573)
dependabot[bot] Oct 22, 2023
09d976c
chore: update maintainers (#575)
codymikol Oct 22, 2023
701a082
chore: fix maintainers images being squished (#576)
codymikol Oct 22, 2023
908e03c
Revert "chore: fix maintainers images being squished (#576)" (#577)
codymikol Oct 22, 2023
f2327b1
fix(controller): disallow custom optiomization (#578)
codymikol Oct 22, 2023
645ee59
chore: remove github releaser (#579)
codymikol Oct 22, 2023
2337a82
chore: audit fix (#580)
codymikol Oct 22, 2023
9ade240
update README.md (#581)
MustCodeAl Nov 27, 2023
3252713
build(deps-dev): bump follow-redirects from 1.14.8 to 1.15.4 (#582)
dependabot[bot] Jan 9, 2024
16c7e50
chore(deps): update hotfix dependencies (#583)
codymikol Jan 31, 2024
a8d3b1e
chore(release): 5.0.1 (#585)
alexander-akait Feb 1, 2024
58c75b3
fix(controller): remove breaking change to optimization (#588)
codymikol Feb 13, 2024
865c489
build(deps-dev): bump ip from 1.1.8 to 1.1.9 (#589)
dependabot[bot] Mar 6, 2024
f8cd9a0
build(deps-dev): bump follow-redirects from 1.15.5 to 1.15.6 (#591)
dependabot[bot] May 4, 2024
ee740b9
Fix typo in README.md (#592)
dlarocque May 24, 2024
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
13 changes: 1 addition & 12 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"useBuiltIns": true,
"targets": {
"node": "10"
"node": "18"
},
"exclude": [
"transform-async-to-generator",
Expand All @@ -14,21 +14,10 @@
}
]
],
"plugins": [
[
"@babel/plugin-proposal-object-rest-spread",
{
"useBuiltIns": true
}
]
],
"env": {
"test": {
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

# [5.0.1](https://github.com/webpack-contrib/karma-webpack/compare/v5.0.0...v5.0.1) (2024-02-01)

### Fixes

- security fixes

# [5.0.0](https://github.com/webpack-contrib/karma-webpack/compare/v5.0.0-alpha.6...v5.0.0) (2021-02-02)

No changes, just a new stable release.
Expand Down
44 changes: 16 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![test][test]][test-url]
[![coverage][cover]][cover-url]
[![chat][chat]][chat-url]

<div align="center">
<a href='https://github.com/karma-runner/karma'>
Expand Down Expand Up @@ -98,15 +95,15 @@ const defaultWebpackOptions = {

### How it works

This project is a framework and preprocessor for Karma that combines test files and dependencies into 2 shared bundles and 1 chunk per test file. It relies on webpack to generate the bundles/chunks and to keep it updated during autoWatch=true.
This project is a framework and preprocessor for Karma that combines test files and dependencies into 2 shared bundles and 1 chunk per test file. It relies on webpack to generate the bundles/chunks and to keep it updated during `autoWatch=true`.

The first preproccessor triggers the build of all the bundles/chunks and all following files just return the output of this one build process.

### Webpack typescript support

By default karma-webpack forces *.js files so if you test *.ts files and use webpack to build typescript to javascript it works out of the box.

If you have a different need you can override by settig `webpack.transformPath`
If you have a different need you can override by setting `webpack.transformPath`

```js
// this is the by default applied transformPath
Expand Down Expand Up @@ -146,29 +143,17 @@ webpack: {
}
```

<h2 align="center">Maintainers</h2>
<h2 align="center">Current Maintainers</h2>

<table>
<tbody>
<tr>
<td align="center">
<img width="150" height="150"
src="https://avatars0.githubusercontent.com/u/7922109?v=4&s=150">
<br>
<a href="https://github.com/ryanclark">Ryan Clark</a>
</td>
<td>
<img width="150" height="150"
src="https://avatars.githubusercontent.com/u/13606342?s=460&u=467cf9a106d2bb474cf627ffd4e0eac80d0b4705&v=4">
<br>
<a href="http://codymikol.com">Cody Mikol</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars3.githubusercontent.com/u/2045543?v=4&s=150">
<br>
<a href="https://github.com/AprilArcus">April Arcus</a>
</td>
</tr>
<tbody>
</table>
Expand All @@ -177,9 +162,21 @@ webpack: {

Previous maintainers of the `karma-webpack` plugin that have done such amazing work to get it to where it is today.

<table>
<table class="maintainers">
<tbody>
<tr>
<td align="center">
<img width="150" height="150"
src="https://avatars0.githubusercontent.com/u/7922109?v=4&s=150">
<br>
<a href="https://github.com/ryanclark">Ryan Clark</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars3.githubusercontent.com/u/2045543?v=4&s=150">
<br>
<a href="https://github.com/AprilArcus">April Arcus</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars.githubusercontent.com/u/4650931?v=3&s=150">
Expand Down Expand Up @@ -223,14 +220,5 @@ Previous maintainers of the `karma-webpack` plugin that have done such amazing w
[node]: https://img.shields.io/node/v/karma-webpack.svg
[node-url]: https://nodejs.org

[deps]: https://david-dm.org/webpack-contrib/karma-webpack.svg
[deps-url]: https://david-dm.org/webpack-contrib/karma-webpack

[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
[chat-url]: https://gitter.im/webpack/webpack

[test]: http://img.shields.io/travis/webpack-contrib/karma-webpack.svg
[test-url]: https://travis-ci.org/webpack-contrib/karma-webpack

[cover]: https://codecov.io/gh/webpack-contrib/karma-webpack/branch/master/graph/badge.svg
[cover-url]: https://codecov.io/gh/webpack-contrib/karma-webpack
14 changes: 11 additions & 3 deletions lib/karma-webpack/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@ class KW_Controller {

updateWebpackOptions(newOptions) {
if (newOptions.output && newOptions.output.filename) {
console.warn(
`
if (newOptions.output.filename !== '[name].js') {
console.warn(
`
karma-webpack does not currently support customized filenames via
webpack output.filename, if this is something you need consider opening an issue.
defaulting ${newOptions.output.filename} to [name].js.`.trim()
);
);
}
delete newOptions.output.filename;
}

if (newOptions.optimization) {
console.warn(
'karma-webpack may behave unexpectedly when using customized optimizations.'
);
}

this.webpackOptions = merge(this.webpackOptions, newOptions);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/karma-webpack/preprocessor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');

const glob = require('glob');
const minimatch = require('minimatch');
const { minimatch } = require('minimatch');

const { ensureWebpackFrameworkSet } = require('../karma/validation');
const { hash } = require('../utils/hash');
Expand Down
Loading