Skip to content

Update peer dependency to support karma 6 #427

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

Merged
merged 3 commits into from
Feb 6, 2021
Merged
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
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Install via `npm`:

```
```bash
npm install --save-dev karma-typescript
```

Expand Down Expand Up @@ -72,7 +72,6 @@ Support us with a monthly donation and help us continue our activities. [[Become
<a href="https://opencollective.com/karma-typescript/backer/28/website" target="_blank"><img src="https://opencollective.com/karma-typescript/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/karma-typescript/backer/29/website" target="_blank"><img src="https://opencollective.com/karma-typescript/backer/29/avatar.svg"></a>


## Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/karma-typescript#sponsor)]
Expand Down Expand Up @@ -108,5 +107,4 @@ Become a sponsor and get your logo on our README on Github with a link to your s
<a href="https://opencollective.com/karma-typescript/sponsor/28/website" target="_blank"><img src="https://opencollective.com/karma-typescript/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/karma-typescript/sponsor/29/website" target="_blank"><img src="https://opencollective.com/karma-typescript/sponsor/29/avatar.svg"></a>


© 2016-2020 Erik Barke, Monounity
© 2016-2021 Erik Barke, Monounity
2 changes: 1 addition & 1 deletion examples/angular2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/node": "^13.9.1",
"core-js": "^3.6.4",
"jasmine-core": "^3.5.0",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^3.1.1",
"karma-typescript": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/angularjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"angular": "^1.8.0",
"angular-mocks": "^1.6.4",
"jasmine-core": "^3.3.0",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^2.0.1",
"karma-typescript": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"express": "^4.13.3",
"@types/jasmine": "^2.5.35",
"jasmine-core": "^2.4.1",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/expect.js": "^0.3.29",
"@types/mocha": "^5.2.5",
"expect.js": "^0.3.1",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-mocha": "^1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-1.6.2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@types/jasmine": "^3.4.0",
"jasmine-core": "^3.4.0",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-1.8.10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@types/jasmine": "^3.4.0",
"jasmine-core": "^3.4.0",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@types/jasmine": "^3.4.0",
"jasmine-core": "^3.3.0",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/karma-typescript-angular2-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@angular/core": "^10.0.9",
"@types/karma": "^5.0.0",
"@types/karma": "^6.1.0",
"@types/lodash": "^4.14.159",
"@types/node": "^14.0.27",
"@types/sinon": "^9.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"log4js": "^6.3.0"
},
"devDependencies": {
"@types/karma": "^5.0.0",
"@types/karma": "^6.1.0",
"@types/lodash": "^4.14.159",
"@types/node": "^14.0.27",
"@types/sinon": "^9.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/karma-typescript-es6-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"devDependencies": {
"@types/babel__core": "^7.1.9",
"@types/karma": "^5.0.0",
"@types/karma": "^6.1.0",
"@types/lodash": "^4.14.159",
"@types/node": "^14.0.27",
"@types/sinon": "^9.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/karma-typescript-es6-transform/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const configure = (options?: babel.TransformOptions) : kt.Transform => {

try {
context.source = babel.transform(context.source, options).code;
context.js.ast = acorn.parse(context.source, { sourceType: "module" });
context.js.ast = acorn.parse(context.source, { sourceType: "module", ecmaVersion: "latest" });
return callback(undefined, true);
}
catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion packages/karma-typescript-postcss-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"log4js": "^6.3.0"
},
"devDependencies": {
"@types/karma": "^5.0.0",
"@types/karma": "^6.1.0",
"@types/lodash": "^4.14.159",
"@types/node": "^14.0.27",
"@types/sinon": "^9.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/karma-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The easiest way is to keep `karma-typescript` as a devDependency in `package.jso
```json
{
"devDependencies": {
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-typescript": "5.2.0"
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/karma-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"@types/istanbul-lib-report": "^3.0.0",
"@types/istanbul-lib-source-maps": "^4.0.0",
"@types/istanbul-reports": "^3.0.0",
"@types/karma": "^5.0.0",
"@types/karma": "^6.1.0",
"@types/lodash": "^4.14.159",
"@types/minimatch": "^3.0.3",
"@types/mock-require": "^2.0.0",
Expand All @@ -157,7 +157,7 @@
"typescript": "latest"
},
"peerDependencies": {
"karma": "1 || 2 || 3 || 4 || 5",
"karma": "1 || 2 || 3 || 4 || 5 || 6",
"typescript": "1 || 2 || 3 || 4"
}
}
5 changes: 4 additions & 1 deletion packages/karma-typescript/src/bundler/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export class Validator {
if (this.config.bundlerOptions.validateSyntax) {

try {
acorn.parse(bundle);
acorn.parse(bundle, {
// defaults to TS "latest" version
ecmaVersion: "latest"
});
}
catch (error) {

Expand Down
2 changes: 1 addition & 1 deletion tests/integration-latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/jasmine": "^2.5.37",
"date-fns": "^2.16.1",
"jasmine-core": "^2.6.0",
"karma": "^5.0.0",
"karma": "^6.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
Expand Down