Skip to content

Commit

Permalink
SOF-6631: simplify application version filter and bump application-fl…
Browse files Browse the repository at this point in the history
…avors
  • Loading branch information
pranabdas committed Aug 26, 2023
1 parent 018bda5 commit bb5cb74
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
5 changes: 3 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@exabyte-io/code.js": "2023.8.10-0",
"@exabyte-io/eslint-config": "^2022.11.17-0",
"@exabyte-io/made.js": "2022.6.15-0",
"@exabyte-io/application-flavors.js": "git+https://github.com/Exabyte-io/application-flavors#de2c98f03a68ba740c26c5e4e0ffb1ca639c2deb",
"@exabyte-io/application-flavors.js": "2023.8.26-0",
"chai": "^4.3.4",
"eslint": "7.32.0",
"eslint-config-airbnb": "19.0.2",
Expand Down
3 changes: 1 addition & 2 deletions src/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ export class Application extends NamedDefaultableInMemoryEntity {
const { supportedApplicationVersions } = tree[key];
return (
!supportedApplicationVersions ||
(supportedApplicationVersions &&
supportedApplicationVersions.includes(this.prop("version")))
supportedApplicationVersions.includes(this.prop("version"))
);
})
.map((key) => {
Expand Down
5 changes: 1 addition & 4 deletions src/executable.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ export class Executable extends mix(NamedDefaultableInMemoryEntity).with(Runtime
getFlavorsByApplicationVersion(version) {
const filteredFlavors = this.flavors.filter((flavor) => {
const supportedApplicationVersions = flavor.prop("supportedApplicationVersions");
return (
!supportedApplicationVersions ||
(supportedApplicationVersions && supportedApplicationVersions.includes(version))
);
return !supportedApplicationVersions || supportedApplicationVersions.includes(version);
});

return filteredFlavors;
Expand Down

0 comments on commit bb5cb74

Please sign in to comment.