Skip to content

Commit b74b7e3

Browse files
authored
Merge pull request #406 from johnnyreilly/master
Regenerate test data for TypeScript 2.1
2 parents a664bd3 + 47ec74d commit b74b7e3

File tree

30 files changed

+67
-52
lines changed

30 files changed

+67
-52
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ env:
1414
1515
1616
17-
17+
1818
- TYPESCRIPT=typescript@next

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.3.1
4+
5+
- [Rolled back re-exported const enums no longer break emit in watch mode as performance cost was too high](https://github.com/TypeStrong/ts-loader/pull/406) resolves #393
6+
37
## v1.3.0
48

59
- [Introduce meaningful error when importing TypeScript from `node_modules`](https://github.com/TypeStrong/ts-loader/pull/399)

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment:
55
- TYPESCRIPT: [email protected]
66
- TYPESCRIPT: [email protected]
77
- TYPESCRIPT: [email protected]
8-
- TYPESCRIPT: [email protected].1
8+
- TYPESCRIPT: [email protected].4
99
- TYPESCRIPT: typescript@next
1010
install:
1111
- ps: Install-Product node $env:nodejs_version

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ts-loader",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "TypeScript loader for webpack",
55
"main": "index.js",
66
"scripts": {

src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,17 @@ function getEmit(
114114
const allDefinitionFiles = Object.keys(instance.files).filter(fp => definitionFileRegex.test(fp));
115115
allDefinitionFiles.forEach(loader.addDependency.bind(loader));
116116

117+
/* - alternative approach to the below which is more correct but has a heavy performance cost
118+
see https://github.com/TypeStrong/ts-loader/issues/393
119+
with this approach constEnumReExportWatch test will pass; without it, not.
120+
117121
// Additionally make this file dependent on all imported files as well
118122
// as any deeper recursive dependencies
119-
let additionalDependencies = utils.collectAllDependencies(instance.dependencyGraph, filePath);
123+
const additionalDependencies = utils.collectAllDependencies(instance.dependencyGraph, filePath);
124+
*/
125+
126+
// Additionally make this file dependent on all imported files
127+
const additionalDependencies = instance.dependencyGraph[filePath];
120128
if (additionalDependencies) {
121129
additionalDependencies.forEach(loader.addDependency.bind(loader));
122130
}

test/comparison-tests/babel-issue81/expectedOutput-2.1/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"jsx": "react",
34
"target": "es6"
45
}
56
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This test has been disabled as the extra correctness required for it to pass comes at the cost of too much performance loss.
2+
3+
https://github.com/TypeStrong/ts-loader/issues/393

test/comparison-tests/constEnumReExportWatch/_FLAKY_

Whitespace-only changes.

test/comparison-tests/constEnumReExportWatch/expectedOutput-2.1/bundle.transpiled.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
/***/ function(module, exports) {
6464

6565
"use strict";
66+
var BarEnum;
6667
(function (BarEnum) {
6768
BarEnum[BarEnum["Bar"] = 1] = "Bar";
68-
})(exports.BarEnum || (exports.BarEnum = {}));
69-
var BarEnum = exports.BarEnum;
69+
})(BarEnum = exports.BarEnum || (exports.BarEnum = {}));
7070
;
7171

7272

0 commit comments

Comments
 (0)