Skip to content

Commit 996f169

Browse files
committed
Merge pull request microsoft#6098 from guybedford/master
Naive implementation for microsoft#6097
2 parents 51fd41b + a805b6d commit 996f169

50 files changed

Lines changed: 84 additions & 84 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6990,7 +6990,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
69906990

69916991
write(text);
69926992
}
6993-
write(`], function(${exportFunctionForFile}) {`);
6993+
write(`], function(${exportFunctionForFile}, __moduleName) {`);
69946994
writeLine();
69956995
increaseIndent();
69966996
const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true, /*ensureUseStrict*/ true);

tests/baselines/reference/aliasesInSystemModule1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module M {
1717

1818

1919
//// [aliasesInSystemModule1.js]
20-
System.register(['foo'], function(exports_1) {
20+
System.register(['foo'], function(exports_1, __moduleName) {
2121
"use strict";
2222
var alias;
2323
var cls, cls2, x, y, z, M;

tests/baselines/reference/aliasesInSystemModule2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module M {
1616
}
1717

1818
//// [aliasesInSystemModule2.js]
19-
System.register(["foo"], function(exports_1) {
19+
System.register(["foo"], function(exports_1, __moduleName) {
2020
"use strict";
2121
var foo_1;
2222
var cls, cls2, x, y, z, M;

tests/baselines/reference/allowSyntheticDefaultImports2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Foo {
1010
}
1111

1212
//// [b.js]
13-
System.register([], function(exports_1) {
13+
System.register([], function(exports_1, __moduleName) {
1414
"use strict";
1515
var Foo;
1616
return {
@@ -26,7 +26,7 @@ System.register([], function(exports_1) {
2626
}
2727
});
2828
//// [a.js]
29-
System.register(["./b"], function(exports_1) {
29+
System.register(["./b"], function(exports_1, __moduleName) {
3030
"use strict";
3131
var b_1;
3232
var x;

tests/baselines/reference/allowSyntheticDefaultImports3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class Foo {
1111

1212

1313
//// [b.js]
14-
System.register([], function(exports_1) {
14+
System.register([], function(exports_1, __moduleName) {
1515
"use strict";
1616
var Foo;
1717
return {
@@ -27,7 +27,7 @@ System.register([], function(exports_1) {
2727
}
2828
});
2929
//// [a.js]
30-
System.register(["./b"], function(exports_1) {
30+
System.register(["./b"], function(exports_1, __moduleName) {
3131
"use strict";
3232
var b_1;
3333
var x;

tests/baselines/reference/allowSyntheticDefaultImports5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export var x = new Foo();
1212

1313

1414
//// [a.js]
15-
System.register(["./b"], function(exports_1) {
15+
System.register(["./b"], function(exports_1, __moduleName) {
1616
"use strict";
1717
var b_1;
1818
var x;

tests/baselines/reference/allowSyntheticDefaultImports6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export var x = new Foo();
1212

1313

1414
//// [a.js]
15-
System.register(["./b"], function(exports_1) {
15+
System.register(["./b"], function(exports_1, __moduleName) {
1616
"use strict";
1717
var b_1;
1818
var x;

tests/baselines/reference/anonymousDefaultExportsSystem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default class {}
77
export default function() {}
88

99
//// [a.js]
10-
System.register([], function(exports_1) {
10+
System.register([], function(exports_1, __moduleName) {
1111
"use strict";
1212
var default_1;
1313
return {
@@ -20,7 +20,7 @@ System.register([], function(exports_1) {
2020
}
2121
});
2222
//// [b.js]
23-
System.register([], function(exports_1) {
23+
System.register([], function(exports_1, __moduleName) {
2424
"use strict";
2525
function default_1() { }
2626
exports_1("default", default_1);

tests/baselines/reference/capturedLetConstInLoop4.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ for (const y = 0; y < 1;) {
144144

145145

146146
//// [capturedLetConstInLoop4.js]
147-
System.register([], function(exports_1) {
147+
System.register([], function(exports_1, __moduleName) {
148148
"use strict";
149149
var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c;
150150
//======let

tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var decorator: ClassDecorator;
1313
export default class {}
1414

1515
//// [a.js]
16-
System.register([], function(exports_1) {
16+
System.register([], function(exports_1, __moduleName) {
1717
"use strict";
1818
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1919
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -35,7 +35,7 @@ System.register([], function(exports_1) {
3535
}
3636
});
3737
//// [b.js]
38-
System.register([], function(exports_1) {
38+
System.register([], function(exports_1, __moduleName) {
3939
"use strict";
4040
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
4141
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

0 commit comments

Comments
 (0)