Skip to content

Commit

Permalink
Fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed May 17, 2023
1 parent f723f97 commit 6bd829a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 deletions.
6 changes: 3 additions & 3 deletions lib/graph/projectGraphBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async function projectGraphBuilder(nodeProvider, workspace) {
}

let {project, extensions} = await ui5Module.getSpecifications();

// Try again this module with an eventual Shim resolution
if (
fromCache &&
Expand All @@ -203,9 +203,9 @@ async function projectGraphBuilder(nodeProvider, workspace) {
shimCollection,
});

({ project, extensions } = await ui5Module.getSpecifications());
({project, extensions} = await ui5Module.getSpecifications());
}

return {
node,
project,
Expand Down
76 changes: 38 additions & 38 deletions test/lib/graph/projectGraphBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,55 +679,55 @@ test("Define external dependency as shims in sub-module", async (t) => {
id: "app",
version: "1.0.0",
path: "/app"
}));
}));

t.context.getDependencies.onCall(0).resolves([
createNode({
id: "lib",
version: "1.0.0",
path: "/lib"
}),
{
id: "external-thirdparty",
version: "1.0.0",
path: "/app/node_modules/external-thirdparty"
},
createNode({
id: "external-thirdparty-shim",
configuration: {
kind: "extension",
type: "project-shim",
shims: {
configurations: {
"external-thirdparty": {
specVersion: "3.0",
type: "module",
metadata: { name: "external-thirdparty" },
resources: {
configuration: {
paths: { "/resources/": "" },
},
t.context.getDependencies.onCall(0).resolves([
createNode({
id: "lib",
version: "1.0.0",
path: "/lib"
}),
{
id: "external-thirdparty",
version: "1.0.0",
path: "/app/node_modules/external-thirdparty"
},
createNode({
id: "external-thirdparty-shim",
configuration: {
kind: "extension",
type: "project-shim",
shims: {
configurations: {
"external-thirdparty": {
specVersion: "3.0",
type: "module",
metadata: {name: "external-thirdparty"},
resources: {
configuration: {
paths: {"/resources/": ""},
},
},
},
},
}
})
]);

t.context.getDependencies.onCall(1).resolves([
},
}
})
]);

t.context.getDependencies.onCall(1).resolves([
createNode({
id: "external-thirdparty",
version: "1.0.0",
path: "/app/node_modules/external-thirdparty",
optional: false
})
]);
})
]);

const graph = await projectGraphBuilder(t.context.provider);

const graph = await projectGraphBuilder(t.context.provider);

t.deepEqual(graph.getDependencies("app"), ["lib"], "'app' depends on 'lib'");
t.deepEqual(graph.getDependencies("lib"), ["external-thirdparty"], "'lib' depends on 'external-thirdparty'");
t.deepEqual(graph.getDependencies("app"), ["lib"], "'app' depends on 'lib'");
t.deepEqual(graph.getDependencies("lib"), ["external-thirdparty"], "'lib' depends on 'external-thirdparty'");
});

test("Extension in dependencies", async (t) => {
Expand Down

0 comments on commit 6bd829a

Please sign in to comment.