Skip to content

Commit

Permalink
* fix #592, auto-tagged component were not shown as staged in bit sta…
Browse files Browse the repository at this point in the history
…tus (#601)
  • Loading branch information
davidfirst authored Jan 11, 2018
1 parent 0066b4f commit 2daaec7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions e2e/commands/import.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,12 @@ describe('bit import', function () {
expect(commitOutput).to.have.string('utils/is-string');
});
it('should use the updated dependencies and print the results from the latest versions', () => {
helper.exportAllComponents();

helper.reInitLocalScope();
helper.addRemoteScope();
helper.importComponent('utils/is-string');

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');
Expand Down
3 changes: 1 addition & 2 deletions src/bit-id/bit-id.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/** @flow */
import path from 'path';
import decamelize from 'decamelize';
import R from 'ramda';
import Version from '../version';
import { InvalidBitId, InvalidIdChunk } from './exceptions';
import { LATEST_BIT_VERSION, VERSION_DELIMITER, NO_PLUGIN_TYPE } from '../constants';
import { isValidIdChunk, isValidScopeName } from '../utils';
import R from 'ramda';
import logger from '../logger/logger';

export type BitIdProps = {
scope?: string,
Expand Down
8 changes: 4 additions & 4 deletions src/consumer/consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,9 @@ export default class Consumer {
moveExistingComponent(bitMap: BitMap, component: Component, oldPath: string, newPath: string) {
if (fs.existsSync(newPath)) {
throw new Error(
`could not move the component ${
component.id
} from ${oldPath} to ${newPath} as the destination path already exists`
`could not move the component ${component.id} from ${oldPath} to ${
newPath
} as the destination path already exists`
);
}
const componentMap = bitMap.getComponent(component.id);
Expand Down Expand Up @@ -746,7 +746,7 @@ export default class Consumer {
async getComponentStatusById(id: BitId): Promise<ComponentStatus> {
const getStatus = async () => {
const status: ComponentStatus = {};
const componentFromModel = await this.scope.sources.get(id);
const componentFromModel: ModelComponent = await this.scope.sources.get(id);
let componentFromFileSystem;
try {
componentFromFileSystem = await this.loadComponent(BitId.parse(id.toStringWithoutVersion()));
Expand Down
1 change: 1 addition & 0 deletions src/scope/repositories/sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export default class SourceRepository {
date: Date.now().toString()
};
component.addVersion(version, releaseType);
component.local = true;
return this.put({ component, objects: [version] });
}

Expand Down

0 comments on commit 2daaec7

Please sign in to comment.