From 6bd829ab9c54f3921f162d20d23a267aa5f0b540 Mon Sep 17 00:00:00 2001 From: Yavor Ivanov Date: Wed, 17 May 2023 15:53:34 +0300 Subject: [PATCH] Fix eslint issues --- lib/graph/projectGraphBuilder.js | 6 +-- test/lib/graph/projectGraphBuilder.js | 76 +++++++++++++-------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/lib/graph/projectGraphBuilder.js b/lib/graph/projectGraphBuilder.js index dd8b04736..d1418c04c 100644 --- a/lib/graph/projectGraphBuilder.js +++ b/lib/graph/projectGraphBuilder.js @@ -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 && @@ -203,9 +203,9 @@ async function projectGraphBuilder(nodeProvider, workspace) { shimCollection, }); - ({ project, extensions } = await ui5Module.getSpecifications()); + ({project, extensions} = await ui5Module.getSpecifications()); } - + return { node, project, diff --git a/test/lib/graph/projectGraphBuilder.js b/test/lib/graph/projectGraphBuilder.js index a2298e7d5..940a0f3d9 100644 --- a/test/lib/graph/projectGraphBuilder.js +++ b/test/lib/graph/projectGraphBuilder.js @@ -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) => {