Browse Source

Merge pull request #821 from rollup/gh-813

Failing test for #813
semi-dynamic-namespace-imports
Bogdan Chadkin 9 years ago
committed by GitHub
parent
commit
78f0441189
  1. 1
      src/Bundle.js
  2. 1
      src/Module.js
  3. 3
      test/function/cycles-pathological-3/_config.js
  4. 3
      test/function/cycles-pathological-3/a.js
  5. 3
      test/function/cycles-pathological-3/b.js
  6. 3
      test/function/cycles-pathological-3/c.js
  7. 1
      test/function/cycles-pathological-3/main.js
  8. 2
      test/function/cycles-pathological-3/x.a.js
  9. 2
      test/function/cycles-pathological-3/x.b.js
  10. 2
      test/function/cycles-pathological-3/x.c.js

1
src/Bundle.js

@ -218,7 +218,6 @@ export default class Bundle {
this.moduleById.set( id, module ); this.moduleById.set( id, module );
return this.fetchAllDependencies( module ).then( () => { return this.fetchAllDependencies( module ).then( () => {
module.exportsAll = blank();
keys( module.exports ).forEach( name => { keys( module.exports ).forEach( name => {
module.exportsAll[name] = module.id; module.exportsAll[name] = module.id;
}); });

1
src/Module.js

@ -35,6 +35,7 @@ export default class Module {
// imports and exports, indexed by local name // imports and exports, indexed by local name
this.imports = blank(); this.imports = blank();
this.exports = blank(); this.exports = blank();
this.exportsAll = blank();
this.reexports = blank(); this.reexports = blank();
this.exportAllSources = []; this.exportAllSources = [];

3
test/function/cycles-pathological-3/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'resolves more pathological cyclical dependencies gracefully'
};

3
test/function/cycles-pathological-3/a.js

@ -0,0 +1,3 @@
import * as x from "./x.a.js";
x.b();
x.c();

3
test/function/cycles-pathological-3/b.js

@ -0,0 +1,3 @@
import * as x from "./x.b.js";
export function b() {}

3
test/function/cycles-pathological-3/c.js

@ -0,0 +1,3 @@
import * as x from "./x.c.js";
export function c() {}

1
test/function/cycles-pathological-3/main.js

@ -0,0 +1 @@
import './a.js';

2
test/function/cycles-pathological-3/x.a.js

@ -0,0 +1,2 @@
export * from "./b.js";
export * from "./c.js";

2
test/function/cycles-pathological-3/x.b.js

@ -0,0 +1,2 @@
export * from "./a.js";
export * from "./c.js";

2
test/function/cycles-pathological-3/x.c.js

@ -0,0 +1,2 @@
export * from "./a.js";
export * from "./b.js";
Loading…
Cancel
Save