Skip to content

Commit

Permalink
fix(concatjs): update karma to 6.3.2 and fix bazelbuild#2093
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsoulanille committed Apr 13, 2021
1 parent be184c2 commit 9296e43
Show file tree
Hide file tree
Showing 4 changed files with 278 additions and 379 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
"jest": "~25.3.0",
"jest-cli": "~25.3.0",
"jest-websocket-mock": "~2.0.2",
"karma": "~4.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-firefox-launcher": "1.1.0",
"karma-jasmine": "2.0.1",
"karma": "~6.3.2",
"karma-chrome-launcher": "3.1.0",
"karma-firefox-launcher": "2.1.0",
"karma-jasmine": "4.0.1",
"karma-requirejs": "1.1.0",
"karma-sourcemap-loader": "0.3.7",
"karma-sourcemap-loader": "0.3.8",
"lit-element": "^2.2.1",
"minimist": "^1.2.3",
"mock-socket": "~9.0.3",
Expand Down
5 changes: 4 additions & 1 deletion packages/concatjs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ ts_project(
"types": ["node"],
},
},
deps = ["@npm//@types/node"],
deps = [
"@npm//@types/node",
"@npm//karma",
],
)

js_library(
Expand Down
10 changes: 3 additions & 7 deletions packages/concatjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
import * as crypto from 'crypto';
import * as fs from 'fs';
import * as File from 'karma/lib/file';
import * as path from 'path';
import * as process from 'process';
import {createInterface} from 'readline';
Expand All @@ -29,13 +30,8 @@ function initConcatJs(logger, emitter, basePath, hostname, port) {
path.join(process.env['TEST_TMPDIR'], crypto.randomBytes(6).readUIntLE(0, 6).toString(36));

emitter.on('file_list_modified', files => {
const bundleFile = {
path: '/concatjs_bundle.js',
contentPath: tmpFile,
isUrl: false,
content: '',
encodings: {},
} as any;
const bundleFile = new File('/concatjs_bundle.js') as any;
bundleFile.contentPath = tmpFile;
// Preserve all non-JS that were there in the included list.
const included = files.included.filter(f => path.extname(f.originalPath) !== '.js');
const bundledFiles =
Expand Down

0 comments on commit 9296e43

Please sign in to comment.