better support for import collision checking - todo: check exports for collisions
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
import foo from "foo";
|
||||
import {default as foo} from "foo";
|
||||
import {default as foo2} from "foo";
|
||||
|
||||
@@ -7,5 +7,5 @@ define(["exports", "foo"], function (exports, _foo) {
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
});
|
||||
var foo2 = _interopRequire(_foo);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {bar} from "foo";
|
||||
import {bar, baz} from "foo";
|
||||
import {bar as baz} from "foo";
|
||||
import {bar as baz, xyz} from "foo";
|
||||
import {bar2, baz} from "foo";
|
||||
import {bar as baz2} from "foo";
|
||||
import {bar as baz3, xyz} from "foo";
|
||||
|
||||
@@ -2,9 +2,9 @@ define(["exports", "foo"], function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.bar;
|
||||
var bar2 = _foo.bar2;
|
||||
var baz = _foo.baz;
|
||||
var baz = _foo.bar;
|
||||
var baz = _foo.bar;
|
||||
var baz2 = _foo.bar;
|
||||
var baz3 = _foo.bar;
|
||||
var xyz = _foo.xyz;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,11 +2,11 @@ import "foo";
|
||||
import "foo-bar";
|
||||
import "./directory/foo-bar";
|
||||
import foo from "foo";
|
||||
import * as foo from "foo";
|
||||
import * as foo2 from "foo";
|
||||
import {bar} from "foo";
|
||||
import {foo as bar} from "foo";
|
||||
import {foo as bar2} from "foo";
|
||||
|
||||
export {test};
|
||||
export var test = 5;
|
||||
export var test2 = 5;
|
||||
|
||||
export default test;
|
||||
|
||||
@@ -7,11 +7,11 @@ define(["exports", "module", "foo", "foo-bar", "./directory/foo-bar"], function
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _foo;
|
||||
var foo2 = _foo;
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.foo;
|
||||
var bar2 = _foo.foo;
|
||||
exports.test = test;
|
||||
var test = exports.test = 5;
|
||||
var test2 = exports.test2 = 5;
|
||||
|
||||
module.exports = test;
|
||||
});
|
||||
|
||||
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-4/actual.js
vendored
Normal file
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-4/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import * as foo from "foo";
|
||||
foo = 1;
|
||||
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-4/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-4/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Illegal assignment of module import"
|
||||
}
|
||||
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-5/actual.js
vendored
Normal file
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-5/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import * as foo from "foo";
|
||||
var foo;
|
||||
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-5/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-5/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Illegal assignment of module import"
|
||||
}
|
||||
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-6/actual.js
vendored
Normal file
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-6/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { foo as bar } from "foo";
|
||||
var bar;
|
||||
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-6/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-6/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Illegal assignment of module import"
|
||||
}
|
||||
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-7/actual.js
vendored
Normal file
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-7/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { foo as bar } from "foo";
|
||||
bar = 1;
|
||||
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-7/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-7/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Illegal assignment of module import"
|
||||
}
|
||||
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-8/actual.js
vendored
Normal file
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-8/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { foo } from "foo";
|
||||
import { foo } from "bar";
|
||||
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-8/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-8/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Illegal assignment of module import"
|
||||
}
|
||||
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-9/actual.js
vendored
Normal file
2
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-9/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { foo as bar } from "foo";
|
||||
import { foo as bar } from "bar";
|
||||
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-9/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-modules-common/disallow-import-remapping-9/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Illegal assignment of module import"
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
import foo from "foo";
|
||||
import {default as foo} from "foo";
|
||||
import {default as foo2} from "foo";
|
||||
|
||||
@@ -6,4 +6,4 @@ var _interopRequire = function (obj) {
|
||||
|
||||
var foo = _interopRequire(require("foo"));
|
||||
|
||||
var foo = _interopRequire(require("foo"));
|
||||
var foo2 = _interopRequire(require("foo"));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {bar} from "foo";
|
||||
import {bar, baz} from "foo";
|
||||
import {bar as baz} from "foo";
|
||||
import {bar as baz, xyz} from "foo";
|
||||
import {bar2, baz} from "foo";
|
||||
import {bar as baz2} from "foo";
|
||||
import {bar as baz3, xyz} from "foo";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
var bar = require("foo").bar;
|
||||
var bar = require("foo").bar;
|
||||
var bar2 = require("foo").bar2;
|
||||
var baz = require("foo").baz;
|
||||
var baz = require("foo").bar;
|
||||
var baz = require("foo").bar;
|
||||
var baz2 = require("foo").bar;
|
||||
var baz3 = require("foo").bar;
|
||||
var xyz = require("foo").xyz;
|
||||
|
||||
@@ -2,9 +2,9 @@ import "foo";
|
||||
import "foo-bar";
|
||||
import "./directory/foo-bar";
|
||||
import foo from "foo";
|
||||
import * as foo from "foo";
|
||||
import * as foo2 from "foo";
|
||||
import {bar} from "foo";
|
||||
import {foo as bar} from "foo";
|
||||
import {foo as bar2} from "foo";
|
||||
|
||||
export {test};
|
||||
export var test = 5;
|
||||
|
||||
@@ -18,9 +18,9 @@ require("./directory/foo-bar");
|
||||
|
||||
var foo = _interopRequire(require("foo"));
|
||||
|
||||
var foo = _interopRequireWildcard(require("foo"));
|
||||
var foo2 = _interopRequireWildcard(require("foo"));
|
||||
|
||||
var bar = require("foo").bar;
|
||||
var bar = require("foo").foo;
|
||||
var bar2 = require("foo").foo;
|
||||
exports.test = test;
|
||||
var test = exports.test = 5;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
import foo from "foo";
|
||||
import {default as foo} from "foo";
|
||||
import {default as foo2} from "foo";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {bar} from "foo";
|
||||
import {bar, baz} from "foo";
|
||||
import {bar as baz} from "foo";
|
||||
import {bar as baz, xyz} from "foo";
|
||||
import {bar2, baz} from "foo";
|
||||
import {bar as baz2} from "foo";
|
||||
import {bar as baz3, xyz} from "foo";
|
||||
|
||||
@@ -2,11 +2,11 @@ import "foo";
|
||||
import "foo-bar";
|
||||
import "./directory/foo-bar";
|
||||
import foo from "foo";
|
||||
import * as foo from "foo";
|
||||
import * as foo2 from "foo";
|
||||
import {bar} from "foo";
|
||||
import {foo as bar} from "foo";
|
||||
import {foo as bar2} from "foo";
|
||||
|
||||
export {test};
|
||||
export var test = 5;
|
||||
export var test2 = 5;
|
||||
|
||||
export default test;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
var test = 5;
|
||||
var test2 = 5;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
import foo from "foo";
|
||||
import {default as foo} from "foo";
|
||||
import {default as foo2} from "foo";
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var foo, foo;
|
||||
var foo, foo2;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
foo = _foo["default"];
|
||||
foo = _foo["default"];
|
||||
foo2 = _foo["default"];
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {bar} from "foo";
|
||||
import {bar, baz} from "foo";
|
||||
import {bar as baz} from "foo";
|
||||
import {bar as baz, xyz} from "foo";
|
||||
import {bar2, baz} from "foo";
|
||||
import {bar as baz2} from "foo";
|
||||
import {bar as baz3, xyz} from "foo";
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var bar, bar, baz, baz, baz, xyz;
|
||||
var bar, bar2, baz, baz2, baz3, xyz;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
bar = _foo.bar;
|
||||
bar = _foo.bar;
|
||||
bar2 = _foo.bar2;
|
||||
baz = _foo.baz;
|
||||
baz = _foo.bar;
|
||||
baz = _foo.bar;
|
||||
baz2 = _foo.bar;
|
||||
baz3 = _foo.bar;
|
||||
xyz = _foo.xyz;
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,11 +2,11 @@ import "foo";
|
||||
import "foo-bar";
|
||||
import "./directory/foo-bar";
|
||||
import foo from "foo";
|
||||
import * as foo from "foo";
|
||||
import * as foo2 from "foo";
|
||||
import {bar} from "foo";
|
||||
import {foo as bar} from "foo";
|
||||
import {foo as bar2} from "foo";
|
||||
|
||||
export {test};
|
||||
export var test = 5;
|
||||
export var test2 = 5;
|
||||
|
||||
export default test;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var foo, foo, bar, bar, test;
|
||||
var foo, foo2, bar, bar2, test2;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
foo = _foo["default"];
|
||||
foo = _foo;
|
||||
foo2 = _foo;
|
||||
bar = _foo.bar;
|
||||
bar = _foo.foo;
|
||||
bar2 = _foo.foo;
|
||||
}, function (_fooBar) {}, function (_directoryFooBar) {}],
|
||||
execute: function () {
|
||||
_export("test", test);
|
||||
|
||||
test = _export("test", 5);
|
||||
test2 = _export("test2", 5);
|
||||
_export("default", test);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
import foo from "foo";
|
||||
import {default as foo} from "foo";
|
||||
import {default as foo2} from "foo";
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
});
|
||||
var foo2 = _interopRequire(_foo);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {bar} from "foo";
|
||||
import {bar, baz} from "foo";
|
||||
import {bar as baz} from "foo";
|
||||
import {bar as baz, xyz} from "foo";
|
||||
import {bar2, baz} from "foo";
|
||||
import {bar as baz2} from "foo";
|
||||
import {bar as baz3, xyz} from "foo";
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
"use strict";
|
||||
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.bar;
|
||||
var bar2 = _foo.bar2;
|
||||
var baz = _foo.baz;
|
||||
var baz = _foo.bar;
|
||||
var baz = _foo.bar;
|
||||
var baz2 = _foo.bar;
|
||||
var baz3 = _foo.bar;
|
||||
var xyz = _foo.xyz;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,11 +2,11 @@ import "foo";
|
||||
import "foo-bar";
|
||||
import "./directory/foo-bar";
|
||||
import foo from "foo";
|
||||
import * as foo from "foo";
|
||||
import * as foo2 from "foo";
|
||||
import {bar} from "foo";
|
||||
import {foo as bar} from "foo";
|
||||
import {foo as bar2} from "foo";
|
||||
|
||||
export {test};
|
||||
export var test = 5;
|
||||
export var test2 = 5;
|
||||
|
||||
export default test;
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _foo;
|
||||
var foo2 = _foo;
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.foo;
|
||||
var bar2 = _foo.foo;
|
||||
exports.test = test;
|
||||
var test = exports.test = 5;
|
||||
var test2 = exports.test2 = 5;
|
||||
|
||||
module.exports = test;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user