diff --git a/.gitattributes b/.gitattributes index 6fe78884f..fd34e8ce5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,4 +2,7 @@ build/** -linguist-generated=false lib/build/** linguist-generated=false lib/** linguist-vendored=false -lib/** linguist-generated=false \ No newline at end of file +lib/** linguist-generated=false +src/build/** linguist-generated=false +src/** linguist-vendored=false +src/** linguist-generated=false \ No newline at end of file diff --git a/test/lib/build/ProjectBuilder.ts b/test/lib/build/ProjectBuilder.ts index 33ad1cde3..85eb7308a 100644 --- a/test/lib/build/ProjectBuilder.ts +++ b/test/lib/build/ProjectBuilder.ts @@ -3,7 +3,7 @@ import sinonGlobal from "sinon"; import path from "node:path"; import esmock from "esmock"; import {setLogLevel} from "@ui5/logger"; -import OutputStyleEnum from "../../../lib/build/helpers/ProjectBuilderOutputStyle.js"; +import OutputStyleEnum from "../../../src/build/helpers/ProjectBuilderOutputStyle.js"; function noop() {} @@ -72,7 +72,7 @@ test.beforeEach(async (t) => { }), }; - t.context.ProjectBuilder = await esmock("../../../lib/build/ProjectBuilder.js"); + t.context.ProjectBuilder = await esmock("../../../src/build/ProjectBuilder.js"); }); test.afterEach.always((t) => { @@ -272,7 +272,7 @@ test.serial("build: Multiple projects", async (t) => { t.is(moduleName, "ProjectBuilder", "BuildLogger created with expected moduleName"); return buildLoggerMock; } - const ProjectBuilder = await esmock("../../../lib/build/ProjectBuilder.js", { + const ProjectBuilder = await esmock("../../../src/build/ProjectBuilder.js", { "@ui5/logger/internal/loggers/Build": CreateBuildLoggerMock, }); @@ -440,8 +440,8 @@ test.serial("_getProjectFilter with dependencyIncludes", async (t) => { includedDependencies: ["project.b", "project.c"], excludedDependencies: ["project.d", "project.e", "project.a"], }); - const ProjectBuilder = await esmock("../../../lib/build/ProjectBuilder.js", { - "../../../lib/build/helpers/composeProjectList.js": composeProjectListStub, + const ProjectBuilder = await esmock("../../../src/build/ProjectBuilder.js", { + "../../../src/build/helpers/composeProjectList.js": composeProjectListStub, }); const builder = new ProjectBuilder({graph, taskRepository}); @@ -471,8 +471,8 @@ test.serial("_getProjectFilter with explicit include/exclude", async (t) => { includedDependencies: ["project.b", "project.c"], excludedDependencies: ["project.d", "project.e", "project.a"], }); - const ProjectBuilder = await esmock("../../../lib/build/ProjectBuilder.js", { - "../../../lib/build/helpers/composeProjectList.js": composeProjectListStub, + const ProjectBuilder = await esmock("../../../src/build/ProjectBuilder.js", { + "../../../src/build/helpers/composeProjectList.js": composeProjectListStub, }); const builder = new ProjectBuilder({graph, taskRepository}); @@ -573,8 +573,8 @@ test.serial("_writeResults: Create build manifest", async (t) => { const createBuildManifestStub = sinon.stub().returns({build: "manifest"}); const createResourceStub = sinon.stub().returns("build manifest resource"); - const ProjectBuilder = await esmock.p("../../../lib/build/ProjectBuilder.js", { - "../../../lib/build/helpers/createBuildManifest.js": createBuildManifestStub, + const ProjectBuilder = await esmock.p("../../../src/build/ProjectBuilder.js", { + "../../../src/build/helpers/createBuildManifest.js": createBuildManifestStub, "@ui5/fs/resourceFactory": { createResource: createResourceStub, }, @@ -766,7 +766,7 @@ test("instantiate new logger for every ProjectBuilder", async (t) => { const {graph, taskRepository, sinon} = t.context; const createBuildLoggerMockSpy = sinon.spy(CreateBuildLoggerMock); - const ProjectBuilder = await esmock("../../../lib/build/ProjectBuilder.js", { + const ProjectBuilder = await esmock("../../../src/build/ProjectBuilder.js", { "@ui5/logger/internal/loggers/Build": createBuildLoggerMockSpy, }); diff --git a/test/lib/build/TaskRunner.ts b/test/lib/build/TaskRunner.ts index d5fffc637..c8b284dbd 100644 --- a/test/lib/build/TaskRunner.ts +++ b/test/lib/build/TaskRunner.ts @@ -123,7 +123,7 @@ test.beforeEach(async (t) => { .returns("reader collection"), }; - t.context.TaskRunner = await esmock("../../../lib/build/TaskRunner.js", { + t.context.TaskRunner = await esmock("../../../src/build/TaskRunner.js", { "@ui5/logger": t.context.logger, "@ui5/fs/resourceFactory": t.context.resourceFactory, }); diff --git a/test/lib/build/definitions/application.ts b/test/lib/build/definitions/application.ts index ae7810cfb..e7274ba17 100644 --- a/test/lib/build/definitions/application.ts +++ b/test/lib/build/definitions/application.ts @@ -1,6 +1,6 @@ import test from "ava"; import sinon from "sinon"; -import application from "../../../../lib/build/definitions/application.js"; +import application from "../../../../src/build/definitions/application.js"; function emptyarray() { return []; diff --git a/test/lib/build/definitions/library.ts b/test/lib/build/definitions/library.ts index 300add15a..774e590e3 100644 --- a/test/lib/build/definitions/library.ts +++ b/test/lib/build/definitions/library.ts @@ -1,6 +1,6 @@ import test from "ava"; import sinon from "sinon"; -import library from "../../../../lib/build/definitions/library.js"; +import library from "../../../../src/build/definitions/library.js"; function emptyarray() { return []; diff --git a/test/lib/build/definitions/module.ts b/test/lib/build/definitions/module.ts index 0a74ff702..64cab01b7 100644 --- a/test/lib/build/definitions/module.ts +++ b/test/lib/build/definitions/module.ts @@ -1,5 +1,5 @@ import test from "ava"; -import moduleDefinition from "../../../../lib/build/definitions/module.js"; +import moduleDefinition from "../../../../src/build/definitions/module.js"; test("Standard build", (t) => { const tasks = moduleDefinition({}); diff --git a/test/lib/build/definitions/themeLibrary.ts b/test/lib/build/definitions/themeLibrary.ts index de3c70a60..2e06ce6f6 100644 --- a/test/lib/build/definitions/themeLibrary.ts +++ b/test/lib/build/definitions/themeLibrary.ts @@ -1,6 +1,6 @@ import test from "ava"; import sinon from "sinon"; -import themeLibrary from "../../../../lib/build/definitions/themeLibrary.js"; +import themeLibrary from "../../../../src/build/definitions/themeLibrary.js"; function emptyarray() { return []; diff --git a/test/lib/build/definitions/utils.ts b/test/lib/build/definitions/utils.ts index df199466c..8a2e04658 100644 --- a/test/lib/build/definitions/utils.ts +++ b/test/lib/build/definitions/utils.ts @@ -1,5 +1,5 @@ import test from "ava"; -import {enhancePatternWithExcludes} from "../../../../lib/build/definitions/_utils.js"; +import {enhancePatternWithExcludes} from "../../../../src/build/definitions/_utils.js"; test("enhancePatternWithExcludes", (t) => { const patterns = ["/default/pattern", "!/other/pattern"]; diff --git a/test/lib/build/helpers/BuildContext.ts b/test/lib/build/helpers/BuildContext.ts index 31cff7ffe..32ec09406 100644 --- a/test/lib/build/helpers/BuildContext.ts +++ b/test/lib/build/helpers/BuildContext.ts @@ -1,12 +1,12 @@ import test from "ava"; import sinon from "sinon"; -import OutputStyleEnum from "../../../../lib/build/helpers/ProjectBuilderOutputStyle.js"; +import OutputStyleEnum from "../../../../src/build/helpers/ProjectBuilderOutputStyle.js"; test.afterEach.always((t) => { sinon.restore(); }); -import BuildContext from "../../../../lib/build/helpers/BuildContext.js"; +import BuildContext from "../../../../src/build/helpers/BuildContext.js"; test("Missing parameters", (t) => { const error1 = t.throws(() => { diff --git a/test/lib/build/helpers/ProjectBuildContext.ts b/test/lib/build/helpers/ProjectBuildContext.ts index eac3ec18a..820f909e4 100644 --- a/test/lib/build/helpers/ProjectBuildContext.ts +++ b/test/lib/build/helpers/ProjectBuildContext.ts @@ -12,7 +12,7 @@ test.afterEach.always((t) => { sinon.restore(); }); -import ProjectBuildContext from "../../../../lib/build/helpers/ProjectBuildContext.js"; +import ProjectBuildContext from "../../../../src/build/helpers/ProjectBuildContext.js"; test("Missing parameters", (t) => { t.throws(() => { @@ -140,7 +140,7 @@ test.serial("getResourceTagCollection", async (t) => { } } - const ProjectBuildContext = await esmock("../../../../lib/build/helpers/ProjectBuildContext.js", { + const ProjectBuildContext = await esmock("../../../../src/build/helpers/ProjectBuildContext.js", { "@ui5/fs/internal/ResourceTagCollection": DummyResourceTagCollection, }); const projectBuildContext = new ProjectBuildContext({ @@ -336,8 +336,8 @@ test.serial("getTaskRunner", async (t) => { }, "TaskRunner created with expected constructor arguments"); } } - const ProjectBuildContext = await esmock("../../../../lib/build/helpers/ProjectBuildContext.js", { - "../../../../lib/build/TaskRunner.js": TaskRunnerMock, + const ProjectBuildContext = await esmock("../../../../src/build/helpers/ProjectBuildContext.js", { + "../../../../src/build/TaskRunner.js": TaskRunnerMock, }); const projectBuildContext = new ProjectBuildContext({ @@ -377,9 +377,9 @@ test.serial("createProjectContext", async (t) => { t.is(_taskRunner, taskRunner); } } - const BuildContext = await esmock("../../../../lib/build/helpers/BuildContext.js", { - "../../../../lib/build/helpers/ProjectBuildContext.js": ProjectContextMock, - "../../../../lib/build/TaskRunner.js": { + const BuildContext = await esmock("../../../../src/build/helpers/BuildContext.js", { + "../../../../src/build/helpers/ProjectBuildContext.js": ProjectContextMock, + "../../../../src/build/TaskRunner.js": { create: sinon.stub().resolves(taskRunner), }, }); diff --git a/test/lib/build/helpers/TaskUtil.ts b/test/lib/build/helpers/TaskUtil.ts index 5e7a93c90..570748dd7 100644 --- a/test/lib/build/helpers/TaskUtil.ts +++ b/test/lib/build/helpers/TaskUtil.ts @@ -1,7 +1,7 @@ import test from "ava"; import sinon from "sinon"; -import TaskUtil from "../../../../lib/build/helpers/TaskUtil.js"; -import SpecificationVersion from "../../../../lib/specifications/SpecificationVersion.js"; +import TaskUtil from "../../../../src/build/helpers/TaskUtil.js"; +import SpecificationVersion from "../../../../src/specifications/SpecificationVersion.js"; test.afterEach.always((t) => { sinon.restore(); diff --git a/test/lib/build/helpers/composeProjectList.ts b/test/lib/build/helpers/composeProjectList.ts index fe46c6a58..8f863e681 100644 --- a/test/lib/build/helpers/composeProjectList.ts +++ b/test/lib/build/helpers/composeProjectList.ts @@ -2,7 +2,7 @@ import test from "ava"; import sinon from "sinon"; import esmock from "esmock"; import path from "node:path"; -import {graphFromObject} from "../../../../lib/graph/graph.js"; +import {graphFromObject} from "../../../../src/graph/graph.js"; const __dirname = import.meta.dirname; @@ -16,7 +16,7 @@ test.beforeEach(async (t) => { t.context.log = { warn: sinon.stub(), }; - t.context.composeProjectList = await esmock("../../../../lib/build/helpers/composeProjectList", { + t.context.composeProjectList = await esmock("../../../../src/build/helpers/composeProjectList", { "@ui5/logger": { getLogger: sinon.stub().withArgs("build:helpers:composeProjectList").returns(t.context.log), }, diff --git a/test/lib/build/helpers/composeTaskList.ts b/test/lib/build/helpers/composeTaskList.ts index 5343bb395..6dd24101c 100644 --- a/test/lib/build/helpers/composeTaskList.ts +++ b/test/lib/build/helpers/composeTaskList.ts @@ -8,7 +8,7 @@ test.beforeEach(async (t) => { }; const getLoggerStub = sinon.stub().withArgs("build:helpers:composeTaskList").returns(t.context.log); - t.context.composeTaskList = await esmock("../../../../lib/build/helpers/composeTaskList.js", { + t.context.composeTaskList = await esmock("../../../../src/build/helpers/composeTaskList.js", { "@ui5/logger": { getLogger: getLoggerStub, }, diff --git a/test/lib/build/helpers/createBuildManifest.integration.ts b/test/lib/build/helpers/createBuildManifest.integration.ts index fd66e7b78..f808f26d1 100644 --- a/test/lib/build/helpers/createBuildManifest.integration.ts +++ b/test/lib/build/helpers/createBuildManifest.integration.ts @@ -1,8 +1,8 @@ import test from "ava"; import path from "node:path"; -import createBuildManifest from "../../../../lib/build/helpers/createBuildManifest.js"; -import Module from "../../../../lib/graph/Module.js"; -import Specification from "../../../../lib/specifications/Specification.js"; +import createBuildManifest from "../../../../src/build/helpers/createBuildManifest.js"; +import Module from "../../../../src/graph/Module.js"; +import Specification from "../../../../src/specifications/Specification.js"; const __dirname = import.meta.dirname; diff --git a/test/lib/build/helpers/createBuildManifest.ts b/test/lib/build/helpers/createBuildManifest.ts index 24b6aa0f2..7b008bb06 100644 --- a/test/lib/build/helpers/createBuildManifest.ts +++ b/test/lib/build/helpers/createBuildManifest.ts @@ -1,8 +1,8 @@ import test from "ava"; import path from "node:path"; import semver from "semver"; -import createBuildManifest from "../../../../lib/build/helpers/createBuildManifest.js"; -import Specification from "../../../../lib/specifications/Specification.js"; +import createBuildManifest from "../../../../src/build/helpers/createBuildManifest.js"; +import Specification from "../../../../src/specifications/Specification.js"; const __dirname = import.meta.dirname; diff --git a/test/lib/config/Configuration.ts b/test/lib/config/Configuration.ts index 91092da34..3448ce471 100644 --- a/test/lib/config/Configuration.ts +++ b/test/lib/config/Configuration.ts @@ -9,7 +9,7 @@ test.beforeEach(async (t) => { t.context.promisifyStub = sinon.stub(); t.context.resolveStub = sinon.stub().callsFake((path) => path); t.context.joinStub = sinon.stub().callsFake((...args) => args.join("/")); - t.context.Configuration = await esmock.p("../../../lib/config/Configuration.js", { + t.context.Configuration = await esmock.p("../../../src/config/Configuration.js", { "node:path": { resolve: t.context.resolveStub, join: t.context.joinStub, diff --git a/test/lib/graph/Module.ts b/test/lib/graph/Module.ts index b0f63b7ce..caf2939f1 100644 --- a/test/lib/graph/Module.ts +++ b/test/lib/graph/Module.ts @@ -1,7 +1,7 @@ import test from "ava"; import sinon from "sinon"; import path from "node:path"; -import Module from "../../../lib/graph/Module.js"; +import Module from "../../../src/graph/Module.js"; const __dirname = import.meta.dirname; diff --git a/test/lib/graph/ProjectGraph.ts b/test/lib/graph/ProjectGraph.ts index 6cabf35f2..3a19f64f9 100644 --- a/test/lib/graph/ProjectGraph.ts +++ b/test/lib/graph/ProjectGraph.ts @@ -2,7 +2,7 @@ import path from "node:path"; import test from "ava"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import Specification from "../../../lib/specifications/Specification.js"; +import Specification from "../../../src/specifications/Specification.js"; const __dirname = import.meta.dirname; @@ -74,7 +74,7 @@ test.beforeEach(async (t) => { isLevelEnabled: () => true, }; - t.context.ProjectGraph = await esmock.p("../../../lib/graph/ProjectGraph.js", { + t.context.ProjectGraph = await esmock.p("../../../src/graph/ProjectGraph.js", { "@ui5/logger": { getLogger: sinon.stub().withArgs("graph:ProjectGraph").returns(t.context.log), }, diff --git a/test/lib/graph/ShimCollection.ts b/test/lib/graph/ShimCollection.ts index 127b88e51..d0a0cce66 100644 --- a/test/lib/graph/ShimCollection.ts +++ b/test/lib/graph/ShimCollection.ts @@ -1,5 +1,5 @@ import test from "ava"; -import ShimCollection from "../../../lib/graph/ShimCollection.js"; +import ShimCollection from "../../../src/graph/ShimCollection.js"; test("Add shims", (t) => { const collection = new ShimCollection(); diff --git a/test/lib/graph/Workspace.ts b/test/lib/graph/Workspace.ts index 1ba076fec..a863d668b 100644 --- a/test/lib/graph/Workspace.ts +++ b/test/lib/graph/Workspace.ts @@ -2,7 +2,7 @@ import path from "node:path"; import test from "ava"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import Module from "../../../lib/graph/Module.js"; +import Module from "../../../src/graph/Module.js"; const __dirname = import.meta.dirname; const libraryD = path.join(__dirname, "..", "..", "fixtures", "library.d"); @@ -35,7 +35,7 @@ test.beforeEach(async (t) => { isLevelEnabled: () => true, }; - t.context.Workspace = await esmock("../../../lib/graph/Workspace.js", { + t.context.Workspace = await esmock("../../../src/graph/Workspace.js", { "@ui5/logger": { getLogger: sinon.stub().withArgs("graph:Workspace").returns(t.context.log), }, diff --git a/test/lib/graph/graph.integration.ts b/test/lib/graph/graph.integration.ts index 46408a747..f97fb7d12 100644 --- a/test/lib/graph/graph.integration.ts +++ b/test/lib/graph/graph.integration.ts @@ -2,8 +2,8 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import Workspace from "../../../lib/graph/Workspace.js"; -import CacheMode from "../../../lib/ui5Framework/maven/CacheMode.js"; +import Workspace from "../../../src/graph/Workspace.js"; +import CacheMode from "../../../src/ui5Framework/maven/CacheMode.js"; const __dirname = import.meta.dirname; const fixturesPath = path.join(__dirname, "..", "..", "fixtures"); @@ -23,10 +23,10 @@ test.beforeEach(async (t) => { t.context.projectGraphBuilderStub = sinon.stub().resolves("graph"); t.context.enrichProjectGraphStub = sinon.stub(); - t.context.graph = await esmock.p("../../../lib/graph/graph.js", { - "../../../lib/graph/providers/NodePackageDependencies.js": t.context.MockNpmProvider, - "../../../lib/graph/projectGraphBuilder.js": t.context.projectGraphBuilderStub, - "../../../lib/graph/helpers/ui5Framework.js": { + t.context.graph = await esmock.p("../../../src/graph/graph.js", { + "../../../src/graph/providers/NodePackageDependencies.js": t.context.MockNpmProvider, + "../../../src/graph/projectGraphBuilder.js": t.context.projectGraphBuilderStub, + "../../../src/graph/helpers/ui5Framework.js": { enrichProjectGraph: t.context.enrichProjectGraphStub, }, }); diff --git a/test/lib/graph/graph.ts b/test/lib/graph/graph.ts index 098ca56d4..2df86e08f 100644 --- a/test/lib/graph/graph.ts +++ b/test/lib/graph/graph.ts @@ -2,7 +2,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import CacheMode from "../../../lib/ui5Framework/maven/CacheMode.js"; +import CacheMode from "../../../src/ui5Framework/maven/CacheMode.js"; const __dirname = import.meta.dirname; const fixturesPath = path.join(__dirname, "..", "..", "fixtures"); @@ -30,12 +30,12 @@ test.beforeEach(async (t) => { t.context.projectGraphBuilderStub = sinon.stub().resolves("graph"); t.context.enrichProjectGraphStub = sinon.stub(); - t.context.graph = await esmock.p("../../../lib/graph/graph.js", { - "../../../lib/graph/providers/NodePackageDependencies.js": t.context.MockNpmProvider, - "../../../lib/graph/providers/DependencyTree.js": t.context.DummyDependencyTreeProvider, - "../../../lib/graph/helpers/createWorkspace.js": t.context.createWorkspaceStub, - "../../../lib/graph/projectGraphBuilder.js": t.context.projectGraphBuilderStub, - "../../../lib/graph/helpers/ui5Framework.js": { + t.context.graph = await esmock.p("../../../src/graph/graph.js", { + "../../../src/graph/providers/NodePackageDependencies.js": t.context.MockNpmProvider, + "../../../src/graph/providers/DependencyTree.js": t.context.DummyDependencyTreeProvider, + "../../../src/graph/helpers/createWorkspace.js": t.context.createWorkspaceStub, + "../../../src/graph/projectGraphBuilder.js": t.context.projectGraphBuilderStub, + "../../../src/graph/helpers/ui5Framework.js": { enrichProjectGraph: t.context.enrichProjectGraphStub, }, }); diff --git a/test/lib/graph/graphFromObject.ts b/test/lib/graph/graphFromObject.ts index ef85accf1..6f06f3530 100644 --- a/test/lib/graph/graphFromObject.ts +++ b/test/lib/graph/graphFromObject.ts @@ -2,7 +2,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import ValidationError from "../../../lib/validation/ValidationError.js"; +import ValidationError from "../../../src/validation/ValidationError.js"; const __dirname = import.meta.dirname; @@ -31,8 +31,8 @@ test.beforeEach(async (t) => { isLevelEnabled: () => true, }; - t.context.graph = await esmock.p("../../../lib/graph/graph.js", { - "../../../lib/graph/projectGraphBuilder": await esmock("../../../lib/graph/projectGraphBuilder.js", { + t.context.graph = await esmock.p("../../../src/graph/graph.js", { + "../../../src/graph/projectGraphBuilder": await esmock("../../../src/graph/projectGraphBuilder.js", { "@ui5/logger": { getLogger: sinon.stub().withArgs("graph:projectGraphBuilder").returns(t.context.log), }, diff --git a/test/lib/graph/graphFromPackageDependencies.ts b/test/lib/graph/graphFromPackageDependencies.ts index 365b0489c..3be4e5b27 100644 --- a/test/lib/graph/graphFromPackageDependencies.ts +++ b/test/lib/graph/graphFromPackageDependencies.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; -import {graphFromPackageDependencies} from "../../../lib/graph/graph.js"; +import {graphFromPackageDependencies} from "../../../src/graph/graph.js"; const __dirname = import.meta.dirname; diff --git a/test/lib/graph/graphFromStaticFile.ts b/test/lib/graph/graphFromStaticFile.ts index cf977c011..395b90bef 100644 --- a/test/lib/graph/graphFromStaticFile.ts +++ b/test/lib/graph/graphFromStaticFile.ts @@ -2,7 +2,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; -import {graphFromStaticFile} from "../../../lib/graph/graph.js"; +import {graphFromStaticFile} from "../../../src/graph/graph.js"; const __dirname = import.meta.dirname; diff --git a/test/lib/graph/helpers/createWorkspace.ts b/test/lib/graph/helpers/createWorkspace.ts index b5770f5ea..89d0b57dd 100644 --- a/test/lib/graph/helpers/createWorkspace.ts +++ b/test/lib/graph/helpers/createWorkspace.ts @@ -18,8 +18,8 @@ test.beforeEach(async (t) => { } t.context.MockWorkspace = MockWorkspace; - t.context.createWorkspace = await esmock("../../../../lib/graph/helpers/createWorkspace", { - "../../../../lib/graph/Workspace.js": t.context.MockWorkspace, + t.context.createWorkspace = await esmock("../../../../src/graph/helpers/createWorkspace", { + "../../../../src/graph/Workspace.js": t.context.MockWorkspace, }); }); diff --git a/test/lib/graph/helpers/ui5Framework.integration.ts b/test/lib/graph/helpers/ui5Framework.integration.ts index 87706dae4..ae8e23913 100644 --- a/test/lib/graph/helpers/ui5Framework.integration.ts +++ b/test/lib/graph/helpers/ui5Framework.integration.ts @@ -2,7 +2,7 @@ import test from "ava"; import sinonGlobal from "sinon"; import esmock from "esmock"; import path from "node:path"; -import DependencyTreeProvider from "../../../../lib/graph/providers/DependencyTree.js"; +import DependencyTreeProvider from "../../../../src/graph/providers/DependencyTree.js"; const __dirname = import.meta.dirname; @@ -47,7 +47,7 @@ test.beforeEach(async (t) => { proxy: "", }); - t.context.Registry = await esmock.p("../../../../lib/ui5Framework/npm/Registry.js", { + t.context.Registry = await esmock.p("../../../../src/ui5Framework/npm/Registry.js", { "@ui5/logger": ui5Logger, "pacote": t.context.pacote, "@npmcli/config": { @@ -55,9 +55,9 @@ test.beforeEach(async (t) => { }, }); - const AbstractInstaller = await esmock.p("../../../../lib/ui5Framework/AbstractInstaller.js", { + const AbstractInstaller = await esmock.p("../../../../src/ui5Framework/AbstractInstaller.js", { "@ui5/logger": ui5Logger, - "../../../../lib/utils/fs.js": { + "../../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, "lockfile": { @@ -66,45 +66,45 @@ test.beforeEach(async (t) => { }, }); - t.context.Installer = await esmock.p("../../../../lib/ui5Framework/npm/Installer.js", { + t.context.Installer = await esmock.p("../../../../src/ui5Framework/npm/Installer.js", { "@ui5/logger": ui5Logger, "graceful-fs": { rename: sinon.stub().yieldsAsync(), }, - "../../../../lib/utils/fs.js": { + "../../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, - "../../../../lib/ui5Framework/npm/Registry.js": t.context.Registry, - "../../../../lib/ui5Framework/AbstractInstaller.js": AbstractInstaller, + "../../../../src/ui5Framework/npm/Registry.js": t.context.Registry, + "../../../../src/ui5Framework/AbstractInstaller.js": AbstractInstaller, }); - t.context.AbstractResolver = await esmock.p("../../../../lib/ui5Framework/AbstractResolver.js", { + t.context.AbstractResolver = await esmock.p("../../../../src/ui5Framework/AbstractResolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "homedir")), }, }); - t.context.Openui5Resolver = await esmock.p("../../../../lib/ui5Framework/Openui5Resolver.js", { + t.context.Openui5Resolver = await esmock.p("../../../../src/ui5Framework/Openui5Resolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "homedir")), }, - "../../../../lib/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, - "../../../../lib/ui5Framework/npm/Installer.js": t.context.Installer, + "../../../../src/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, + "../../../../src/ui5Framework/npm/Installer.js": t.context.Installer, }); - t.context.Sapui5Resolver = await esmock.p("../../../../lib/ui5Framework/Sapui5Resolver.js", { + t.context.Sapui5Resolver = await esmock.p("../../../../src/ui5Framework/Sapui5Resolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "homedir")), }, - "../../../../lib/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, - "../../../../lib/ui5Framework/npm/Installer.js": t.context.Installer, + "../../../../src/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, + "../../../../src/ui5Framework/npm/Installer.js": t.context.Installer, }); - t.context.Application = await esmock.p("../../../../lib/specifications/types/Application.js"); - t.context.Library = await esmock.p("../../../../lib/specifications/types/Library.js"); + t.context.Application = await esmock.p("../../../../src/specifications/types/Application.js"); + t.context.Library = await esmock.p("../../../../src/specifications/types/Library.js"); // Stub specification internal checks since none of the projects actually exist on disk sinon.stub(t.context.Application.prototype, "_configureAndValidatePaths").resolves(); @@ -112,35 +112,35 @@ test.beforeEach(async (t) => { sinon.stub(t.context.Application.prototype, "_parseConfiguration").resolves(); sinon.stub(t.context.Library.prototype, "_parseConfiguration").resolves(); - t.context.Specification = await esmock.p("../../../../lib/specifications/Specification.js", { + t.context.Specification = await esmock.p("../../../../src/specifications/Specification.js", { "@ui5/logger": ui5Logger, - "../../../../lib/specifications/types/Application.js": t.context.Application, - "../../../../lib/specifications/types/Library.js": t.context.Library, + "../../../../src/specifications/types/Application.js": t.context.Application, + "../../../../src/specifications/types/Library.js": t.context.Library, }); - t.context.Module = await esmock.p("../../../../lib/graph/Module.js", { + t.context.Module = await esmock.p("../../../../src/graph/Module.js", { "@ui5/logger": ui5Logger, - "../../../../lib/specifications/Specification.js": t.context.Specification, + "../../../../src/specifications/Specification.js": t.context.Specification, }); // Stub os homedir to prevent the actual ~/.ui5rc from being used in tests - t.context.Configuration = await esmock.p("../../../../lib/config/Configuration.js", { + t.context.Configuration = await esmock.p("../../../../src/config/Configuration.js", { "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "homedir")), }, }); - t.context.ui5Framework = await esmock.p("../../../../lib/graph/helpers/ui5Framework.js", { + t.context.ui5Framework = await esmock.p("../../../../src/graph/helpers/ui5Framework.js", { "@ui5/logger": ui5Logger, - "../../../../lib/graph/Module.js": t.context.Module, - "../../../../lib/ui5Framework/Openui5Resolver.js": t.context.Openui5Resolver, - "../../../../lib/ui5Framework/Sapui5Resolver.js": t.context.Sapui5Resolver, - "../../../../lib/config/Configuration.js": t.context.Configuration, + "../../../../src/graph/Module.js": t.context.Module, + "../../../../src/ui5Framework/Openui5Resolver.js": t.context.Openui5Resolver, + "../../../../src/ui5Framework/Sapui5Resolver.js": t.context.Sapui5Resolver, + "../../../../src/config/Configuration.js": t.context.Configuration, }); - t.context.projectGraphBuilder = await esmock.p("../../../../lib/graph/projectGraphBuilder.js", { + t.context.projectGraphBuilder = await esmock.p("../../../../src/graph/projectGraphBuilder.js", { "@ui5/logger": ui5Logger, - "../../../../lib/graph/Module.js": t.context.Module, + "../../../../src/graph/Module.js": t.context.Module, }); }); diff --git a/test/lib/graph/helpers/ui5Framework.ts b/test/lib/graph/helpers/ui5Framework.ts index bf2a163ac..8d75bd1ac 100644 --- a/test/lib/graph/helpers/ui5Framework.ts +++ b/test/lib/graph/helpers/ui5Framework.ts @@ -2,10 +2,10 @@ import path from "node:path"; import test from "ava"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import DependencyTreeProvider from "../../../../lib/graph/providers/DependencyTree.js"; -import projectGraphBuilder from "../../../../lib/graph/projectGraphBuilder.js"; -import Specification from "../../../../lib/specifications/Specification.js"; -import CacheMode from "../../../../lib/ui5Framework/maven/CacheMode.js"; +import DependencyTreeProvider from "../../../../src/graph/providers/DependencyTree.js"; +import projectGraphBuilder from "../../../../src/graph/projectGraphBuilder.js"; +import Specification from "../../../../src/specifications/Specification.js"; +import CacheMode from "../../../../src/ui5Framework/maven/CacheMode.js"; const __dirname = import.meta.dirname; @@ -62,11 +62,11 @@ test.beforeEach(async (t) => { }), }; - t.context.ui5Framework = await esmock.p("../../../../lib/graph/helpers/ui5Framework.js", { + t.context.ui5Framework = await esmock.p("../../../../src/graph/helpers/ui5Framework.js", { "@ui5/logger": ui5Logger, - "../../../../lib/ui5Framework/Sapui5Resolver.js": t.context.Sapui5ResolverStub, - "../../../../lib/ui5Framework/Sapui5MavenSnapshotResolver.js": t.context.Sapui5MavenSnapshotResolverStub, - "../../../../lib/config/Configuration.js": t.context.ConfigurationStub, + "../../../../src/ui5Framework/Sapui5Resolver.js": t.context.Sapui5ResolverStub, + "../../../../src/ui5Framework/Sapui5MavenSnapshotResolver.js": t.context.Sapui5MavenSnapshotResolverStub, + "../../../../src/config/Configuration.js": t.context.ConfigurationStub, }); t.context.utils = t.context.ui5Framework._utils; }); diff --git a/test/lib/graph/projectGraphBuilder.ts b/test/lib/graph/projectGraphBuilder.ts index a58782c05..01005b010 100644 --- a/test/lib/graph/projectGraphBuilder.ts +++ b/test/lib/graph/projectGraphBuilder.ts @@ -2,7 +2,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; import esmock from "esmock"; -import projectGraphBuilder from "../../../lib/graph/projectGraphBuilder.js"; +import projectGraphBuilder from "../../../src/graph/projectGraphBuilder.js"; const __dirname = import.meta.dirname; @@ -117,7 +117,7 @@ test.serial("Correct warnings logged", async (t) => { const {sinon, getRootNode, getDependencies, provider} = t.context; const logWarnStub = sinon.stub(); - const projectGraphBuilder = await esmock("../../../lib/graph/projectGraphBuilder.js", { + const projectGraphBuilder = await esmock("../../../src/graph/projectGraphBuilder.js", { "@ui5/logger": { getLogger: sinon.stub() .withArgs("graph:projectGraphBuilder").returns({ @@ -167,7 +167,7 @@ test.serial("No warnings logged", async (t) => { const {sinon, getRootNode, getDependencies} = t.context; const logWarnStub = sinon.stub(); - const projectGraphBuilder = await esmock("../../../lib/graph/projectGraphBuilder.js", { + const projectGraphBuilder = await esmock("../../../src/graph/projectGraphBuilder.js", { "@ui5/logger": { getLogger: sinon.stub() .withArgs("graph:projectGraphBuilder").returns({ diff --git a/test/lib/graph/providers/NodePackageDependencies.integration.ts b/test/lib/graph/providers/NodePackageDependencies.integration.ts index 40ab1245b..a9383ad53 100644 --- a/test/lib/graph/providers/NodePackageDependencies.integration.ts +++ b/test/lib/graph/providers/NodePackageDependencies.integration.ts @@ -16,8 +16,8 @@ const errApplicationAPath = path.join(__dirname, "..", "..", "..", "fixtures", " const cycleDepsBasePath = path.join(__dirname, "..", "..", "..", "fixtures", "cyclic-deps", "node_modules"); const libraryDOverridePath = path.join(__dirname, "..", "..", "..", "fixtures", "library.d-adtl-deps"); -import projectGraphBuilder from "../../../../lib/graph/projectGraphBuilder.js"; -import NodePackageDependenciesProvider from "../../../../lib/graph/providers/NodePackageDependencies.js"; +import projectGraphBuilder from "../../../../src/graph/projectGraphBuilder.js"; +import NodePackageDependenciesProvider from "../../../../src/graph/providers/NodePackageDependencies.js"; test.beforeEach((t) => { t.context.sinon = sinonGlobal.createSandbox(); diff --git a/test/lib/graph/providers/NodePackageDependencies.ts b/test/lib/graph/providers/NodePackageDependencies.ts index e6fc1b39a..5355dda57 100644 --- a/test/lib/graph/providers/NodePackageDependencies.ts +++ b/test/lib/graph/providers/NodePackageDependencies.ts @@ -7,7 +7,7 @@ test.beforeEach(async (t) => { t.context.readPackageUp = sinon.stub(); - t.context.NodePackageDependencies = await esmock("../../../../lib/graph/providers/NodePackageDependencies.js", { + t.context.NodePackageDependencies = await esmock("../../../../src/graph/providers/NodePackageDependencies.js", { "read-package-up": { readPackageUp: t.context.readPackageUp, }, diff --git a/test/lib/specifications/ComponentProject.ts b/test/lib/specifications/ComponentProject.ts index 9f45513a4..27b1d8206 100644 --- a/test/lib/specifications/ComponentProject.ts +++ b/test/lib/specifications/ComponentProject.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import sinon from "sinon"; -import Specification from "../../../lib/specifications/Specification.js"; +import Specification from "../../../src/specifications/Specification.js"; function clone(o) { return JSON.parse(JSON.stringify(o)); diff --git a/test/lib/specifications/Project.ts b/test/lib/specifications/Project.ts index 110e364b8..d8c6f79d9 100644 --- a/test/lib/specifications/Project.ts +++ b/test/lib/specifications/Project.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import chalk from "chalk"; -import Specification from "../../../lib/specifications/Specification.js"; +import Specification from "../../../src/specifications/Specification.js"; function clone(obj) { return JSON.parse(JSON.stringify(obj)); diff --git a/test/lib/specifications/Specification.ts b/test/lib/specifications/Specification.ts index 6fa2b6787..d60b7c133 100644 --- a/test/lib/specifications/Specification.ts +++ b/test/lib/specifications/Specification.ts @@ -2,14 +2,14 @@ import test from "ava"; import esmock from "esmock"; import path from "node:path"; import sinon from "sinon"; -import Specification from "../../../lib/specifications/Specification.js"; -import Application from "../../../lib/specifications/types/Application.js"; -import Library from "../../../lib/specifications/types/Library.js"; -import ThemeLibrary from "../../../lib/specifications/types/ThemeLibrary.js"; -import Module from "../../../lib/specifications/types/Module.js"; -import Task from "../../../lib/specifications/extensions/Task.js"; -import ProjectShim from "../../../lib/specifications/extensions/ProjectShim.js"; -import ServerMiddleware from "../../../lib/specifications/extensions/ServerMiddleware.js"; +import Specification from "../../../src/specifications/Specification.js"; +import Application from "../../../src/specifications/types/Application.js"; +import Library from "../../../src/specifications/types/Library.js"; +import ThemeLibrary from "../../../src/specifications/types/ThemeLibrary.js"; +import Module from "../../../src/specifications/types/Module.js"; +import Task from "../../../src/specifications/extensions/Task.js"; +import ProjectShim from "../../../src/specifications/extensions/ProjectShim.js"; +import ServerMiddleware from "../../../src/specifications/extensions/ServerMiddleware.js"; const __dirname = import.meta.dirname; @@ -379,7 +379,7 @@ test("getRootReader: Default parameters", async (t) => { // Therefore we just come up with our own subclass that can be instantiated right away: const createReaderStub = sinon.stub(); - const Specification = await esmock("../../../lib/specifications/Specification.js", { + const Specification = await esmock("../../../src/specifications/Specification.js", { "@ui5/fs/resourceFactory": { createReader: createReaderStub, }, @@ -400,7 +400,7 @@ test("getRootReader: Default parameters", async (t) => { test("getRootReader: Custom parameters", async (t) => { const createReaderStub = sinon.stub(); - const Specification = await esmock("../../../lib/specifications/Specification.js", { + const Specification = await esmock("../../../src/specifications/Specification.js", { "@ui5/fs/resourceFactory": { createReader: createReaderStub, }, diff --git a/test/lib/specifications/SpecificationVersion.ts b/test/lib/specifications/SpecificationVersion.ts index 2bd93810a..a28cf81e6 100644 --- a/test/lib/specifications/SpecificationVersion.ts +++ b/test/lib/specifications/SpecificationVersion.ts @@ -1,7 +1,7 @@ import test from "ava"; import sinonGlobal from "sinon"; -import SpecificationVersion from "../../../lib/specifications/SpecificationVersion.js"; -import {__localFunctions__} from "../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../src/specifications/SpecificationVersion.js"; +import {__localFunctions__} from "../../../src/specifications/SpecificationVersion.js"; const unsupportedSpecVersionText = (specVersion) => `Unsupported Specification Version ${specVersion} defined. Your UI5 CLI installation might be outdated. ` + diff --git a/test/lib/specifications/extensions/ProjectShim.ts b/test/lib/specifications/extensions/ProjectShim.ts index f221fb336..f592fee28 100644 --- a/test/lib/specifications/extensions/ProjectShim.ts +++ b/test/lib/specifications/extensions/ProjectShim.ts @@ -1,8 +1,8 @@ import test from "ava"; import path from "node:path"; import sinon from "sinon"; -import Specification from "../../../../lib/specifications/Specification.js"; -import ProjectShim from "../../../../lib/specifications/extensions/ProjectShim.js"; +import Specification from "../../../../src/specifications/Specification.js"; +import ProjectShim from "../../../../src/specifications/extensions/ProjectShim.js"; function clone(obj) { return JSON.parse(JSON.stringify(obj)); diff --git a/test/lib/specifications/extensions/ServerMiddleware.ts b/test/lib/specifications/extensions/ServerMiddleware.ts index da782ad07..da7c048c3 100644 --- a/test/lib/specifications/extensions/ServerMiddleware.ts +++ b/test/lib/specifications/extensions/ServerMiddleware.ts @@ -1,8 +1,8 @@ import test from "ava"; import path from "node:path"; import sinon from "sinon"; -import Specification from "../../../../lib/specifications/Specification.js"; -import ServerMiddleware from "../../../../lib/specifications/extensions/ServerMiddleware.js"; +import Specification from "../../../../src/specifications/Specification.js"; +import ServerMiddleware from "../../../../src/specifications/extensions/ServerMiddleware.js"; function clone(obj) { return JSON.parse(JSON.stringify(obj)); diff --git a/test/lib/specifications/extensions/Task.ts b/test/lib/specifications/extensions/Task.ts index 96040afaa..9b8c42429 100644 --- a/test/lib/specifications/extensions/Task.ts +++ b/test/lib/specifications/extensions/Task.ts @@ -1,8 +1,8 @@ import test from "ava"; import path from "node:path"; import sinon from "sinon"; -import Specification from "../../../../lib/specifications/Specification.js"; -import Task from "../../../../lib/specifications/extensions/Task.js"; +import Specification from "../../../../src/specifications/Specification.js"; +import Task from "../../../../src/specifications/extensions/Task.js"; function clone(obj) { return JSON.parse(JSON.stringify(obj)); diff --git a/test/lib/specifications/types/Application.ts b/test/lib/specifications/types/Application.ts index dbc62c70f..1b618c99c 100644 --- a/test/lib/specifications/types/Application.ts +++ b/test/lib/specifications/types/Application.ts @@ -2,8 +2,8 @@ import test from "ava"; import path from "node:path"; import {createResource} from "@ui5/fs/resourceFactory"; import sinonGlobal from "sinon"; -import Specification from "../../../../lib/specifications/Specification.js"; -import Application from "../../../../lib/specifications/types/Application.js"; +import Specification from "../../../../src/specifications/Specification.js"; +import Application from "../../../../src/specifications/types/Application.js"; const __dirname = import.meta.dirname; const applicationAPath = path.join(__dirname, "..", "..", "..", "fixtures", "application.a"); diff --git a/test/lib/specifications/types/Library.ts b/test/lib/specifications/types/Library.ts index 88db4c6ed..1086e6652 100644 --- a/test/lib/specifications/types/Library.ts +++ b/test/lib/specifications/types/Library.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; -import Library from "../../../../lib/specifications/types/Library.js"; +import Library from "../../../../src/specifications/types/Library.js"; const __dirname = import.meta.dirname; const libraryDPath = path.join(__dirname, "..", "..", "..", "fixtures", "library.d"); diff --git a/test/lib/specifications/types/Module.ts b/test/lib/specifications/types/Module.ts index 825d98a66..6c5c5022c 100644 --- a/test/lib/specifications/types/Module.ts +++ b/test/lib/specifications/types/Module.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; -import Specification from "../../../../lib/specifications/Specification.js"; +import Specification from "../../../../src/specifications/Specification.js"; const __dirname = import.meta.dirname; const moduleAPath = path.join(__dirname, "..", "..", "..", "fixtures", "module.a"); @@ -38,7 +38,7 @@ test.afterEach.always((t) => { test("Correct class", async (t) => { const {projectInput} = t.context; - const {default: Module} = await import("../../../../lib/specifications/types/Module.js"); + const {default: Module} = await import("../../../../src/specifications/types/Module.js"); const project = await Specification.create(projectInput); t.true(project instanceof Module, `Is an instance of the Module class`); }); diff --git a/test/lib/specifications/types/ThemeLibrary.ts b/test/lib/specifications/types/ThemeLibrary.ts index bda573162..242121131 100644 --- a/test/lib/specifications/types/ThemeLibrary.ts +++ b/test/lib/specifications/types/ThemeLibrary.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import sinonGlobal from "sinon"; -import Specification from "../../../../lib/specifications/Specification.js"; +import Specification from "../../../../src/specifications/Specification.js"; const __dirname = import.meta.dirname; const themeLibraryEPath = path.join(__dirname, "..", "..", "..", "fixtures", "theme.library.e"); @@ -30,7 +30,7 @@ test.afterEach.always((t) => { test("Correct class", async (t) => { const {projectInput} = t.context; - const {default: ThemeLibrary} = await import("../../../../lib/specifications/types/ThemeLibrary.js"); + const {default: ThemeLibrary} = await import("../../../../src/specifications/types/ThemeLibrary.js"); const project = await Specification.create(projectInput); t.true(project instanceof ThemeLibrary, `Is an instance of the ThemeLibrary class`); }); diff --git a/test/lib/ui5framework/AbstractInstaller.ts b/test/lib/ui5framework/AbstractInstaller.ts index 43d060d91..1934abfe1 100644 --- a/test/lib/ui5framework/AbstractInstaller.ts +++ b/test/lib/ui5framework/AbstractInstaller.ts @@ -1,5 +1,5 @@ import test from "ava"; -import AbstractInstaller from "../../../lib/ui5Framework/AbstractInstaller.js"; +import AbstractInstaller from "../../../src/ui5Framework/AbstractInstaller.js"; test("AbstractInstaller: constructor throws an error", (t) => { t.throws(() => { diff --git a/test/lib/ui5framework/AbstractResolver.ts b/test/lib/ui5framework/AbstractResolver.ts index 5be592071..2d16f6fbc 100644 --- a/test/lib/ui5framework/AbstractResolver.ts +++ b/test/lib/ui5framework/AbstractResolver.ts @@ -6,7 +6,7 @@ import esmock from "esmock"; test.beforeEach(async (t) => { t.context.osHomeDirStub = sinon.stub().callsFake(() => os.homedir()); - t.context.AbstractResolver = await esmock.p("../../../lib/ui5Framework/AbstractResolver.js", { + t.context.AbstractResolver = await esmock.p("../../../src/ui5Framework/AbstractResolver.js", { "node:os": { homedir: t.context.osHomeDirStub, }, diff --git a/test/lib/ui5framework/Openui5Resolver.integration.ts b/test/lib/ui5framework/Openui5Resolver.integration.ts index 1100fa0a8..20aa8640a 100644 --- a/test/lib/ui5framework/Openui5Resolver.integration.ts +++ b/test/lib/ui5framework/Openui5Resolver.integration.ts @@ -38,7 +38,7 @@ test.beforeEach(async (t) => { }, }); - t.context.Registry = await esmock.p("../../../lib/ui5Framework/npm/Registry.js", { + t.context.Registry = await esmock.p("../../../src/ui5Framework/npm/Registry.js", { "@ui5/logger": ui5Logger, "pacote": t.context.pacote, "@npmcli/config": { @@ -46,9 +46,9 @@ test.beforeEach(async (t) => { }, }); - const AbstractInstaller = await esmock.p("../../../lib/ui5Framework/AbstractInstaller.js", { + const AbstractInstaller = await esmock.p("../../../src/ui5Framework/AbstractInstaller.js", { "@ui5/logger": ui5Logger, - "../../../lib/utils/fs.js": { + "../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, "lockfile": { @@ -57,32 +57,32 @@ test.beforeEach(async (t) => { }, }); - t.context.Installer = await esmock.p("../../../lib/ui5Framework/npm/Installer.js", { + t.context.Installer = await esmock.p("../../../src/ui5Framework/npm/Installer.js", { "@ui5/logger": ui5Logger, "graceful-fs": { rename: sinon.stub().yieldsAsync(), }, - "../../../lib/utils/fs.js": { + "../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, - "../../../lib/ui5Framework/npm/Registry.js": t.context.Registry, - "../../../lib/ui5Framework/AbstractInstaller.js": AbstractInstaller, + "../../../src/ui5Framework/npm/Registry.js": t.context.Registry, + "../../../src/ui5Framework/AbstractInstaller.js": AbstractInstaller, }); - t.context.AbstractResolver = await esmock.p("../../../lib/ui5Framework/AbstractResolver.js", { + t.context.AbstractResolver = await esmock.p("../../../src/ui5Framework/AbstractResolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "datadir")), }, }); - t.context.Openui5Resolver = await esmock.p("../../../lib/ui5Framework/Openui5Resolver.js", { + t.context.Openui5Resolver = await esmock.p("../../../src/ui5Framework/Openui5Resolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "datadir")), }, - "../../../lib/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, - "../../../lib/ui5Framework/npm/Installer.js": t.context.Installer, + "../../../src/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, + "../../../src/ui5Framework/npm/Installer.js": t.context.Installer, }); }); diff --git a/test/lib/ui5framework/Openui5Resolver.ts b/test/lib/ui5framework/Openui5Resolver.ts index 04036eb95..1e3e65cdd 100644 --- a/test/lib/ui5framework/Openui5Resolver.ts +++ b/test/lib/ui5framework/Openui5Resolver.ts @@ -19,8 +19,8 @@ test.beforeEach(async (t) => { }; }); - t.context.Openui5Resolver = await esmock("../../../lib/ui5Framework/Openui5Resolver.js", { - "../../../lib/ui5Framework/npm/Installer": t.context.InstallerStub, + t.context.Openui5Resolver = await esmock("../../../src/ui5Framework/Openui5Resolver.js", { + "../../../src/ui5Framework/npm/Installer": t.context.InstallerStub, }); }); diff --git a/test/lib/ui5framework/Sapui5MavenSnapshotResolver.integration.ts b/test/lib/ui5framework/Sapui5MavenSnapshotResolver.integration.ts index 167d677ac..1c188027c 100644 --- a/test/lib/ui5framework/Sapui5MavenSnapshotResolver.integration.ts +++ b/test/lib/ui5framework/Sapui5MavenSnapshotResolver.integration.ts @@ -38,15 +38,15 @@ test.beforeEach(async (t) => { createWriteStream: sinon.stub(), }; - t.context.Registry = await esmock.p("../../../lib/ui5Framework/maven/Registry.js", { + t.context.Registry = await esmock.p("../../../src/ui5Framework/maven/Registry.js", { "@ui5/logger": ui5Logger, "graceful-fs": t.context.gracefulFs, "make-fetch-happen": t.context.makeFetchHappen, }); - const AbstractInstaller = await esmock.p("../../../lib/ui5Framework/AbstractInstaller.js", { + const AbstractInstaller = await esmock.p("../../../src/ui5Framework/AbstractInstaller.js", { "@ui5/logger": ui5Logger, - "../../../lib/utils/fs.js": { + "../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, "lockfile": { @@ -55,30 +55,30 @@ test.beforeEach(async (t) => { }, }); - t.context.Installer = await esmock.p("../../../lib/ui5Framework/maven/Installer.js", { + t.context.Installer = await esmock.p("../../../src/ui5Framework/maven/Installer.js", { "@ui5/logger": ui5Logger, "graceful-fs": t.context.gracefulFs, - "../../../lib/utils/fs.js": { + "../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, - "../../../lib/ui5Framework/maven/Registry.js": t.context.Registry, - "../../../lib/ui5Framework/AbstractInstaller.js": AbstractInstaller, + "../../../src/ui5Framework/maven/Registry.js": t.context.Registry, + "../../../src/ui5Framework/AbstractInstaller.js": AbstractInstaller, }); - t.context.AbstractResolver = await esmock.p("../../../lib/ui5Framework/AbstractResolver.js", { + t.context.AbstractResolver = await esmock.p("../../../src/ui5Framework/AbstractResolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "homedir")), }, }); - t.context.Sapui5MavenSnapshotResolver = await esmock.p("../../../lib/ui5Framework/Sapui5MavenSnapshotResolver.js", { + t.context.Sapui5MavenSnapshotResolver = await esmock.p("../../../src/ui5Framework/Sapui5MavenSnapshotResolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "homedir")), }, - "../../../lib/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, - "../../../lib/ui5Framework/maven/Installer.js": t.context.Installer, + "../../../src/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, + "../../../src/ui5Framework/maven/Installer.js": t.context.Installer, }); }); diff --git a/test/lib/ui5framework/Sapui5MavenSnapshotResolver.ts b/test/lib/ui5framework/Sapui5MavenSnapshotResolver.ts index 0e036e5a9..82d407cd9 100644 --- a/test/lib/ui5framework/Sapui5MavenSnapshotResolver.ts +++ b/test/lib/ui5framework/Sapui5MavenSnapshotResolver.ts @@ -25,13 +25,13 @@ test.beforeEach(async (t) => { t.context.loggerWarn = sinon.stub(); t.context.loggerInfo = sinon.stub(); - t.context.Configuration = await esmock.p("../../../lib/config/Configuration.js", {}); + t.context.Configuration = await esmock.p("../../../src/config/Configuration.js", {}); t.context.configFromFile = sinon.stub(t.context.Configuration, "fromFile") .resolves(new t.context.Configuration({})); t.context.configToFile = sinon.stub(t.context.Configuration, "toFile").resolves(); - t.context.Sapui5MavenSnapshotResolver = await esmock.p("../../../lib/ui5Framework/Sapui5MavenSnapshotResolver.js", { - "../../../lib/ui5Framework/maven/Installer": t.context.InstallerStub, + t.context.Sapui5MavenSnapshotResolver = await esmock.p("../../../src/ui5Framework/Sapui5MavenSnapshotResolver.js", { + "../../../src/ui5Framework/maven/Installer": t.context.InstallerStub, "yesno": t.context.yesnoStub, "node:util": { promisify: t.context.promisifyStub, @@ -43,7 +43,7 @@ test.beforeEach(async (t) => { info: t.context.loggerInfo, }), }, - "../../../lib/config/Configuration": t.context.Configuration, + "../../../src/config/Configuration": t.context.Configuration, }); t.context.originalIsTty = process.stdout.isTTY; diff --git a/test/lib/ui5framework/Sapui5Resolver.integration.ts b/test/lib/ui5framework/Sapui5Resolver.integration.ts index b1b8c883c..956dc680d 100644 --- a/test/lib/ui5framework/Sapui5Resolver.integration.ts +++ b/test/lib/ui5framework/Sapui5Resolver.integration.ts @@ -38,7 +38,7 @@ test.beforeEach(async (t) => { }, }); - t.context.Registry = await esmock.p("../../../lib/ui5Framework/npm/Registry.js", { + t.context.Registry = await esmock.p("../../../src/ui5Framework/npm/Registry.js", { "@ui5/logger": ui5Logger, "pacote": t.context.pacote, "@npmcli/config": { @@ -46,9 +46,9 @@ test.beforeEach(async (t) => { }, }); - const AbstractInstaller = await esmock.p("../../../lib/ui5Framework/AbstractInstaller.js", { + const AbstractInstaller = await esmock.p("../../../src/ui5Framework/AbstractInstaller.js", { "@ui5/logger": ui5Logger, - "../../../lib/utils/fs.js": { + "../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, "lockfile": { @@ -57,32 +57,32 @@ test.beforeEach(async (t) => { }, }); - t.context.Installer = await esmock.p("../../../lib/ui5Framework/npm/Installer.js", { + t.context.Installer = await esmock.p("../../../src/ui5Framework/npm/Installer.js", { "@ui5/logger": ui5Logger, "graceful-fs": { rename: sinon.stub().yieldsAsync(), }, - "../../../lib/utils/fs.js": { + "../../../src/utils/fs.js": { mkdirp: sinon.stub().resolves(), }, - "../../../lib/ui5Framework/npm/Registry.js": t.context.Registry, - "../../../lib/ui5Framework/AbstractInstaller.js": AbstractInstaller, + "../../../src/ui5Framework/npm/Registry.js": t.context.Registry, + "../../../src/ui5Framework/AbstractInstaller.js": AbstractInstaller, }); - t.context.AbstractResolver = await esmock.p("../../../lib/ui5Framework/AbstractResolver.js", { + t.context.AbstractResolver = await esmock.p("../../../src/ui5Framework/AbstractResolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "datadir")), }, }); - t.context.Sapui5Resolver = await esmock.p("../../../lib/ui5Framework/Sapui5Resolver.js", { + t.context.Sapui5Resolver = await esmock.p("../../../src/ui5Framework/Sapui5Resolver.js", { "@ui5/logger": ui5Logger, "node:os": { homedir: sinon.stub().returns(path.join(fakeBaseDir, "datadir")), }, - "../../../lib/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, - "../../../lib/ui5Framework/npm/Installer.js": t.context.Installer, + "../../../src/ui5Framework/AbstractResolver.js": t.context.AbstractResolver, + "../../../src/ui5Framework/npm/Installer.js": t.context.Installer, }); }); diff --git a/test/lib/ui5framework/Sapui5Resolver.ts b/test/lib/ui5framework/Sapui5Resolver.ts index aeb149c9c..dbbccd9e3 100644 --- a/test/lib/ui5framework/Sapui5Resolver.ts +++ b/test/lib/ui5framework/Sapui5Resolver.ts @@ -3,7 +3,7 @@ import sinon from "sinon"; import esmock from "esmock"; import path from "node:path"; import os from "node:os"; -import Openui5Resolver from "../../../lib/ui5Framework/Openui5Resolver.js"; +import Openui5Resolver from "../../../src/ui5Framework/Openui5Resolver.js"; test.beforeEach(async (t) => { t.context.InstallerStub = sinon.stub(); @@ -22,8 +22,8 @@ test.beforeEach(async (t) => { }; }); - t.context.Sapui5Resolver = await esmock("../../../lib/ui5Framework/Sapui5Resolver.js", { - "../../../lib/ui5Framework/npm/Installer": t.context.InstallerStub, + t.context.Sapui5Resolver = await esmock("../../../src/ui5Framework/Sapui5Resolver.js", { + "../../../src/ui5Framework/npm/Installer": t.context.InstallerStub, }); }); diff --git a/test/lib/ui5framework/maven/Installer.ts b/test/lib/ui5framework/maven/Installer.ts index dfef20f84..266e67658 100644 --- a/test/lib/ui5framework/maven/Installer.ts +++ b/test/lib/ui5framework/maven/Installer.ts @@ -37,8 +37,8 @@ test.beforeEach(async (t) => { requestArtifact: t.context.registryRequestArtifactStub, }); - t.context.AbstractInstaller = await esmock.p("../../../../lib/ui5Framework/AbstractInstaller.js", { - "../../../../lib/utils/fs.js": { + t.context.AbstractInstaller = await esmock.p("../../../../src/ui5Framework/AbstractInstaller.js", { + "../../../../src/utils/fs.js": { mkdirp: t.context.mkdirpStub, }, "lockfile": { @@ -47,10 +47,10 @@ test.beforeEach(async (t) => { }, }); - t.context.Installer = await esmock.p("../../../../lib/ui5Framework/maven/Installer.js", { - "../../../../lib/ui5Framework/maven/Registry.js": t.context.RegistryConstructorStub, - "../../../../lib/ui5Framework/AbstractInstaller.js": t.context.AbstractInstaller, - "../../../../lib/utils/fs.js": { + t.context.Installer = await esmock.p("../../../../src/ui5Framework/maven/Installer.js", { + "../../../../src/ui5Framework/maven/Registry.js": t.context.RegistryConstructorStub, + "../../../../src/ui5Framework/AbstractInstaller.js": t.context.AbstractInstaller, + "../../../../src/utils/fs.js": { mkdirp: t.context.mkdirpStub, }, "node:util": { diff --git a/test/lib/ui5framework/maven/Registry.ts b/test/lib/ui5framework/maven/Registry.ts index 2453dcacb..ec58f709a 100644 --- a/test/lib/ui5framework/maven/Registry.ts +++ b/test/lib/ui5framework/maven/Registry.ts @@ -16,7 +16,7 @@ test.beforeEach(async (t) => { t.context.fsCreateWriteStreamStub = sinon.stub().resolves(); - t.context.Registry = await esmock.p("../../../../lib/ui5Framework/maven/Registry.js", { + t.context.Registry = await esmock.p("../../../../src/ui5Framework/maven/Registry.js", { "make-fetch-happen": t.context.fetchStub, "node:stream/promises": { pipeline: t.context.streamPipelineStub, diff --git a/test/lib/ui5framework/npm/Installer.ts b/test/lib/ui5framework/npm/Installer.ts index e7f8c659b..0459884c8 100644 --- a/test/lib/ui5framework/npm/Installer.ts +++ b/test/lib/ui5framework/npm/Installer.ts @@ -14,8 +14,8 @@ test.beforeEach(async (t) => { t.context.renameStub = sinon.stub().yieldsAsync(); t.context.statStub = sinon.stub().yieldsAsync(); - t.context.AbstractResolver = await esmock.p("../../../../lib/ui5Framework/AbstractInstaller.js", { - "../../../../lib/utils/fs.js": { + t.context.AbstractResolver = await esmock.p("../../../../src/ui5Framework/AbstractInstaller.js", { + "../../../../src/utils/fs.js": { mkdirp: t.context.mkdirpStub, }, "rimraf": { @@ -26,9 +26,9 @@ test.beforeEach(async (t) => { unlock: t.context.unlockStub, }, }); - t.context.Installer = await esmock.p("../../../../lib/ui5Framework/npm/Installer.js", { - "../../../../lib/ui5Framework/AbstractInstaller.js": t.context.AbstractResolver, - "../../../../lib/utils/fs.js": { + t.context.Installer = await esmock.p("../../../../src/ui5Framework/npm/Installer.js", { + "../../../../src/ui5Framework/AbstractInstaller.js": t.context.AbstractResolver, + "../../../../src/utils/fs.js": { mkdirp: t.context.mkdirpStub, }, "rimraf": { diff --git a/test/lib/ui5framework/npm/Registry.ts b/test/lib/ui5framework/npm/Registry.ts index f282753df..8f0ea4034 100644 --- a/test/lib/ui5framework/npm/Registry.ts +++ b/test/lib/ui5framework/npm/Registry.ts @@ -29,7 +29,7 @@ test.beforeEach(async (t) => { t.context.npmConfigConstructor = sinon.stub(); t.context.npmConfigFlat = sinon.stub(Config.prototype, "flat"); - t.context.Registry = await esmock.p("../../../../lib/ui5Framework/npm/Registry.js", { + t.context.Registry = await esmock.p("../../../../src/ui5Framework/npm/Registry.js", { "pacote": { default: t.context.pacote, }, diff --git a/test/lib/utils/fs.ts b/test/lib/utils/fs.ts index 322beff2f..f64741dc1 100644 --- a/test/lib/utils/fs.ts +++ b/test/lib/utils/fs.ts @@ -1,7 +1,7 @@ import test from "ava"; import path from "node:path"; import {stat} from "node:fs/promises"; -import {mkdirp} from "../../../lib/utils/fs.js"; +import {mkdirp} from "../../../src/utils/fs.js"; const __dirname = import.meta.dirname; diff --git a/test/lib/validation/ValidationError.ts b/test/lib/validation/ValidationError.ts index 1307ed689..5ed870c7f 100644 --- a/test/lib/validation/ValidationError.ts +++ b/test/lib/validation/ValidationError.ts @@ -1,7 +1,7 @@ import test from "ava"; import sinon from "sinon"; import chalk from "chalk"; -import ValidationError from "../../../lib/validation/ValidationError.js"; +import ValidationError from "../../../src/validation/ValidationError.js"; test.afterEach.always((t) => { sinon.restore(); diff --git a/test/lib/validation/schema/__helper__/builder-bundleOptions.ts b/test/lib/validation/schema/__helper__/builder-bundleOptions.ts index d9a3e54ad..6971bec7f 100644 --- a/test/lib/validation/schema/__helper__/builder-bundleOptions.ts +++ b/test/lib/validation/schema/__helper__/builder-bundleOptions.ts @@ -1,4 +1,4 @@ -import SpecificationVersion from "../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../src/specifications/SpecificationVersion.js"; /** * Common test functionality for builder/bundles/bundleOptions section in config diff --git a/test/lib/validation/schema/__helper__/customConfiguration.ts b/test/lib/validation/schema/__helper__/customConfiguration.ts index 45753022c..e02d5c7ef 100644 --- a/test/lib/validation/schema/__helper__/customConfiguration.ts +++ b/test/lib/validation/schema/__helper__/customConfiguration.ts @@ -1,4 +1,4 @@ -import SpecificationVersion from "../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../src/specifications/SpecificationVersion.js"; /** * Common test functionality for customConfiguration section in config diff --git a/test/lib/validation/schema/__helper__/extension.ts b/test/lib/validation/schema/__helper__/extension.ts index 6174e0756..10c482102 100644 --- a/test/lib/validation/schema/__helper__/extension.ts +++ b/test/lib/validation/schema/__helper__/extension.ts @@ -1,4 +1,4 @@ -import SpecificationVersion from "../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../src/specifications/SpecificationVersion.js"; import customConfiguration from "./customConfiguration.js"; /** diff --git a/test/lib/validation/schema/__helper__/framework.ts b/test/lib/validation/schema/__helper__/framework.ts index 5eb0f7540..17a465168 100644 --- a/test/lib/validation/schema/__helper__/framework.ts +++ b/test/lib/validation/schema/__helper__/framework.ts @@ -1,4 +1,4 @@ -import SpecificationVersion from "../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../src/specifications/SpecificationVersion.js"; /** * Common test functionality for framework section in config diff --git a/test/lib/validation/schema/__helper__/project.ts b/test/lib/validation/schema/__helper__/project.ts index c0675547a..ea1ef69e7 100644 --- a/test/lib/validation/schema/__helper__/project.ts +++ b/test/lib/validation/schema/__helper__/project.ts @@ -1,4 +1,4 @@ -import SpecificationVersion from "../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../src/specifications/SpecificationVersion.js"; import framework from "./framework.js"; import customConfiguration from "./customConfiguration.js"; import bundleOptions from "./builder-bundleOptions.js"; diff --git a/test/lib/validation/schema/specVersion/kind/extension.ts b/test/lib/validation/schema/specVersion/kind/extension.ts index 360dd2bda..709f1b72e 100644 --- a/test/lib/validation/schema/specVersion/kind/extension.ts +++ b/test/lib/validation/schema/specVersion/kind/extension.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../src/validation/ValidationError.js"; async function assertValidation(t, config, expectedErrors = undefined) { const validation = t.context.validator.validate({config, project: {id: "my-project"}}); diff --git a/test/lib/validation/schema/specVersion/kind/extension/project-shim.ts b/test/lib/validation/schema/specVersion/kind/extension/project-shim.ts index fdd3249aa..d1212eb7f 100644 --- a/test/lib/validation/schema/specVersion/kind/extension/project-shim.ts +++ b/test/lib/validation/schema/specVersion/kind/extension/project-shim.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import extension from "../../../__helper__/extension.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/specVersion/kind/extension/server-middleware.ts b/test/lib/validation/schema/specVersion/kind/extension/server-middleware.ts index 6eb428994..828ced4ee 100644 --- a/test/lib/validation/schema/specVersion/kind/extension/server-middleware.ts +++ b/test/lib/validation/schema/specVersion/kind/extension/server-middleware.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import extension from "../../../__helper__/extension.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/specVersion/kind/extension/task.ts b/test/lib/validation/schema/specVersion/kind/extension/task.ts index 379680730..e3e5a1029 100644 --- a/test/lib/validation/schema/specVersion/kind/extension/task.ts +++ b/test/lib/validation/schema/specVersion/kind/extension/task.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import extension from "../../../__helper__/extension.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/specVersion/kind/project.ts b/test/lib/validation/schema/specVersion/kind/project.ts index 1b353a07b..c683746bd 100644 --- a/test/lib/validation/schema/specVersion/kind/project.ts +++ b/test/lib/validation/schema/specVersion/kind/project.ts @@ -2,8 +2,8 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; import AjvCoverage from "../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../src/validation/ValidationError.js"; async function assertValidation(t, config, expectedErrors = undefined) { const validation = t.context.validator.validate({config, project: {id: "my-project"}}); diff --git a/test/lib/validation/schema/specVersion/kind/project/application.ts b/test/lib/validation/schema/specVersion/kind/project/application.ts index 9320f7169..a03c42ca4 100644 --- a/test/lib/validation/schema/specVersion/kind/project/application.ts +++ b/test/lib/validation/schema/specVersion/kind/project/application.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import project from "../../../__helper__/project.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/specVersion/kind/project/library.ts b/test/lib/validation/schema/specVersion/kind/project/library.ts index e1e321204..0cfb6785a 100644 --- a/test/lib/validation/schema/specVersion/kind/project/library.ts +++ b/test/lib/validation/schema/specVersion/kind/project/library.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import project from "../../../__helper__/project.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/specVersion/kind/project/module.ts b/test/lib/validation/schema/specVersion/kind/project/module.ts index d901d059a..12848a484 100644 --- a/test/lib/validation/schema/specVersion/kind/project/module.ts +++ b/test/lib/validation/schema/specVersion/kind/project/module.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import project from "../../../__helper__/project.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/specVersion/kind/project/theme-library.ts b/test/lib/validation/schema/specVersion/kind/project/theme-library.ts index f1e82e651..05504e375 100644 --- a/test/lib/validation/schema/specVersion/kind/project/theme-library.ts +++ b/test/lib/validation/schema/specVersion/kind/project/theme-library.ts @@ -1,10 +1,10 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; -import SpecificationVersion from "../../../../../../../lib/specifications/SpecificationVersion.js"; +import SpecificationVersion from "../../../../../../../src/specifications/SpecificationVersion.js"; import AjvCoverage from "../../../../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../../../../lib/validation/validator.js"; -import ValidationError from "../../../../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../../../../src/validation/validator.js"; +import ValidationError from "../../../../../../../src/validation/ValidationError.js"; import project from "../../../__helper__/project.js"; async function assertValidation(t, config, expectedErrors = undefined) { diff --git a/test/lib/validation/schema/ui5-workspace.ts b/test/lib/validation/schema/ui5-workspace.ts index 8c38c2fca..7d5d29bc7 100644 --- a/test/lib/validation/schema/ui5-workspace.ts +++ b/test/lib/validation/schema/ui5-workspace.ts @@ -2,8 +2,8 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; import AjvCoverage from "../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../lib/validation/validator.js"; -import ValidationError from "../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../src/validation/validator.js"; +import ValidationError from "../../../../src/validation/ValidationError.js"; async function assertValidation(t, config, expectedErrors = undefined) { const validation = t.context.validator.validate({ diff --git a/test/lib/validation/schema/ui5.ts b/test/lib/validation/schema/ui5.ts index 2404d84b2..1667066e0 100644 --- a/test/lib/validation/schema/ui5.ts +++ b/test/lib/validation/schema/ui5.ts @@ -2,8 +2,8 @@ import test from "ava"; import Ajv from "ajv"; import ajvErrors from "ajv-errors"; import AjvCoverage from "../../../utils/AjvCoverage.js"; -import {_Validator as Validator} from "../../../../lib/validation/validator.js"; -import ValidationError from "../../../../lib/validation/ValidationError.js"; +import {_Validator as Validator} from "../../../../src/validation/validator.js"; +import ValidationError from "../../../../src/validation/ValidationError.js"; async function assertValidation(t, config, expectedErrors = undefined) { const validation = t.context.validator.validate({config, project: {id: "my-project"}}); diff --git a/test/lib/validation/validator.ts b/test/lib/validation/validator.ts index 7bd54629e..ee17ee7ba 100644 --- a/test/lib/validation/validator.ts +++ b/test/lib/validation/validator.ts @@ -8,7 +8,7 @@ test.beforeEach(async (t) => { const Ajv = t.context.Ajv = sinon.stub(); const ajvErrors = t.context.ajvErrors = sinon.stub(); - t.context.validatorModule = await esmock.p("../../../lib/validation/validator.js", { + t.context.validatorModule = await esmock.p("../../../src/validation/validator.js", { "ajv": Ajv, "ajv-errors": ajvErrors, }); @@ -56,7 +56,7 @@ test("validateWorkspace function calls Validator#validate method without project }); test("validateWorkspace throw an Error", async (t) => { - const {validateWorkspace} = await esmock("../../../lib/validation/validator.js"); + const {validateWorkspace} = await esmock("../../../src/validation/validator.js"); const config = {config: true}; const yaml = {yaml: true};