Skip to content

Commit

Permalink
Merge pull request #318 from JarvusInnovations/develop
Browse files Browse the repository at this point in the history
Release: v0.41.10
  • Loading branch information
themightychris authored Jul 16, 2023
2 parents abf56e4 + a2648f1 commit dca229a
Show file tree
Hide file tree
Showing 6 changed files with 526 additions and 528 deletions.
74 changes: 24 additions & 50 deletions github-actions/projector/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion github-actions/projector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"habitat-action": "^1.0.1"
"habitat-action": "^1.0.2"
}
}
4 changes: 4 additions & 0 deletions lib/Branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ class Branch extends Configurable {
}
}
continue;
} else if (!(afterLens in lenses)) {
throw new Error(`lens "${name}" defines after="${afterLens}", but it was not found in [${Object.keys(lenses)}]`);
}

edges.push([lenses[afterLens], lens]);
Expand All @@ -352,6 +354,8 @@ class Branch extends Configurable {
}
}
continue;
} else if (!(beforeLens in lenses)) {
throw new Error(`lens "${name}" defines before="${beforeLens}", but it was not found in [${Object.keys(lenses)}]`);
}

edges.push([lens, lenses[beforeLens]]);
Expand Down
4 changes: 4 additions & 0 deletions lib/Lens.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ class Lens extends Configurable {
const { input } = await this.getCachedConfig();
const root = input.root == '.' ? inputRoot : await inputRoot.getSubtree(input.root);

if (!root) {
throw new Error(`Could not resolve path "${input.root}" within input tree ${await inputRoot.getHash()}`);
}

// merge input root into tree with any filters applied
const tree = this.workspace.getRepo().createTree();
await tree.merge(root, {
Expand Down
10 changes: 10 additions & 0 deletions lib/TreeObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ class TreeObject {
Object.seal(this);
}

toString() {
let str = this.hash;

if (this.dirty) {
str += '(+pending changes)'
}

return str;
}

async getHash () {
if (!this.dirty) {
return this.hash;
Expand Down
Loading

0 comments on commit dca229a

Please sign in to comment.