No external change.
PiperOrigin-RevId: 213630661
diff --git a/internal/karma/karma.conf.js b/internal/karma/karma.conf.js
index 03832f1..d60c009 100644
--- a/internal/karma/karma.conf.js
+++ b/internal/karma/karma.conf.js
@@ -64,50 +64,18 @@
browsers.push(process.env['DISPLAY'] ? 'Chrome': 'ChromeHeadless');
}
-// On Windows, runfiles will not be in the runfiles folder but inteaad
-// there is a MANIFEST file which maps the runfiles for the test
-// to their location on disk. Bazel provides a RUNFILE_MANIFEST_FILE environment
-// variable which is set the location of the MANIFEST file during test execution.
-// If a MANIFEST file is found, we remap the test files to their
-// location on disk using the MANIFEST file.
-let manifest = null;
-if (process.env.RUNFILE_MANIFEST_FILE && fs.existsSync(process.env.RUNFILE_MANIFEST_FILE)) {
- // MANIFEST file contains the one runfile mapping per line seperated
- // a space. For example:
- // rxjs/operators.js /private/var/tmp/.../external/rxjs/operators.js
- // The file is parsed here into a map of for easy lookup
- manifest = {};
- for (l of fs.readFileSync(process.env.RUNFILE_MANIFEST_FILE, 'utf8').split('\n')) {
- const m = l.split(' ');
- manifest[m[0]] = m[1];
- }
-}
-
-function resolveRunfiles(manifest, runfiles) {
- if (manifest) {
- runfiles = runfiles.map(f => {
- const manifestFile = manifest[f];
- if (!manifestFile) {
- throw new Error(`File not found in MANIFEST: ${f}`);
- }
- return manifestFile;
- });
- }
- return runfiles;
-}
-
-const files = resolveRunfiles(manifest, [
+const files = [
TMPL_bootstrap_files
TMPL_user_files
-]);
+].map(f => require.resolve(f));
// static files are added to the files array but
// configured to not be included so karma-concat-js does
// not included them in the bundle
-resolveRunfiles(manifest, [
+[
TMPL_static_files
-]).forEach(f => {
- files.push({ pattern: f, included: false });
+].forEach(f => {
+ files.push({ pattern: require.resolve(f), included: false });
});
var requireConfigContent = `
diff --git a/package.bzl b/package.bzl
index 693356a..294116f 100644
--- a/package.bzl
+++ b/package.bzl
@@ -24,7 +24,7 @@
# It will be automatically synced via the npm "version" script
# that is run when running `npm version` during the release
# process. See `Releasing` section in README.md.
-VERSION = "0.16.2"
+VERSION = "0.17.0"
def rules_typescript_dependencies():
"""
diff --git a/package.json b/package.json
index 61f7ad5..f6cdd86 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@bazel/typescript",
"description": "Build TypeScript with Bazel",
- "version": "0.16.2",
+ "version": "0.17.0",
"keywords": [
"typescript",
"bazel"