-
Notifications
You must be signed in to change notification settings - Fork 936
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve #517, when a nested dependency is imported directly, re-link …
…all its dependents
- Loading branch information
1 parent
f59def9
commit 9c95b08
Showing
8 changed files
with
112 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1448,8 +1448,7 @@ describe('bit import', function () { | |
}); | ||
}); | ||
|
||
// @todo: fix this case. currently it does change it in the bit.map, but the link on the filesystem still direct to the .dependency dir | ||
describe.skip('import component is-type as a dependency of is-string and then import is-type directly', () => { | ||
describe('import component is-type as a dependency of is-string and then import is-type directly', () => { | ||
let localConsumerFiles; | ||
before(() => { | ||
helper.setNewLocalAndRemoteScopes(); | ||
|
@@ -1478,10 +1477,13 @@ describe('bit import', function () { | |
expect(bitMap[`${helper.remoteScope}/utils/[email protected]`].origin).to.equal('IMPORTED'); | ||
}); | ||
it('should not break the is-string component', () => { | ||
const isTypeFixtureV2 = "module.exports = function isType() { return 'got is-type v2'; };"; | ||
helper.createComponent(path.join('components', 'utils', 'is-type'), 'is-type.js', isTypeFixtureV2); | ||
|
||
const appJsFixture = "const isString = require('./components/utils/is-string'); console.log(isString());"; | ||
fs.outputFileSync(path.join(helper.localScopePath, 'app.js'), appJsFixture); | ||
const result = helper.runCmd('node app.js'); | ||
expect(result.trim()).to.equal('got is-type and got is-string'); | ||
expect(result.trim()).to.equal('got is-type v2 and got is-string'); | ||
}); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters