Repository navigation
feat(project): Offer configPath property to workspace configs (workspace/1.1)
#1643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
maxreichmann
wants to merge
25
commits into
main
Choose a base branch
from
offer-configPath-to-workspace-yaml
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
748a107
feat: Offer configPath property to workspace configs
maxreichmann 7f53690
feat(project): Add logic for configPath parameter
maxreichmann 2f9a8c3
docs: Adjust Workspace.md page with configPath property
maxreichmann 9ab5e33
refactor: Improve error handling when `path` is absolute
maxreichmann a6f5663
refactor: Adjust workspace config to fix tests
maxreichmann 4c46daa
test(project): Adjust resolutions path to absolute
maxreichmann e7f52af
refactor: Remove "else" block in schema
maxreichmann 451f07c
refactor: Fix AJV strict mode warnings
maxreichmann 6a0a620
docs: Remove "v5.0.0+" and only keep "v4.1.0+"
maxreichmann 20032ce
docs: Apply @d3xter666 suggestion
maxreichmann 305e97a
refactor: Add temp test matrix (DELETE LATER)
maxreichmann d1127e2
test(project): Fix schema tests
maxreichmann e1226fa
test: Add scenario for configPath in collections
maxreichmann 34ed513
test(project): Add first test case for collection scenarios
maxreichmann 2ad81ce
test(project): Add test cases
maxreichmann a284769
test: Add important case isolating "last one wins" logic from current…
maxreichmann 0d4d55c
test: Add test matrix for "specific one wins" logic
maxreichmann f8d3951
test: Add concept markdown for logic "specific one wins + error on du…
maxreichmann 70f87d9
refactor: Add error handling for duplicate assignments
maxreichmann a61ed6d
test(project): Fix stale tests
maxreichmann 2497d79
refactor: Only throw double resolutions if same absolute path
maxreichmann 592a917
test(project): Fix windows paths
maxreichmann 2957791
test(project): Cleanup
maxreichmann 6e7dcd2
docs: Fix path resolution
maxreichmann b171887
test: Fix path for error message
maxreichmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ject/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/library.c/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "library.c", | ||
| "version": "1.0.0", | ||
| "description": "Simple SAPUI5 based library" | ||
| } |
17 changes: 17 additions & 0 deletions
17
...fixtures/collection.c.noCustomConfigForLibA/collection.a/library.c/src/library/a/.library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
|
||
| <name>library.a</name> | ||
| <vendor>SAP SE</vendor> | ||
| <copyright>Some fancy copyright ${currentYear}</copyright> | ||
| <version>${version}</version> | ||
|
|
||
| <documentation>Library A</documentation> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <libraryName>library.d</libraryName> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| </library> |
5 changes: 5 additions & 0 deletions
5
...ixtures/collection.c.noCustomConfigForLibA/collection.a/library.c/ui5-another-custom.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.c.another.custom |
5 changes: 5 additions & 0 deletions
5
...t/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/library.c/ui5-custom.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.c.custom |
5 changes: 5 additions & 0 deletions
5
.../project/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/library.c/ui5.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.c |
5 changes: 5 additions & 0 deletions
5
...ject/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/library.d/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "library.d", | ||
| "version": "1.0.0", | ||
| "description": "Simple SAPUI5 based library" | ||
| } |
17 changes: 17 additions & 0 deletions
17
...fixtures/collection.c.noCustomConfigForLibA/collection.a/library.d/src/library/b/.library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
|
||
| <name>library.b</name> | ||
| <vendor>SAP SE</vendor> | ||
| <copyright>Some fancy copyright ${currentYear}</copyright> | ||
| <version>${version}</version> | ||
|
|
||
| <documentation>Library B</documentation> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <libraryName>library.d</libraryName> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| </library> |
5 changes: 5 additions & 0 deletions
5
...ixtures/collection.c.noCustomConfigForLibA/collection.a/library.d/ui5-another-custom.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.d.another.custom |
5 changes: 5 additions & 0 deletions
5
...t/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/library.d/ui5-custom.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.d.custom |
5 changes: 5 additions & 0 deletions
5
.../project/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/library.d/ui5.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.d |
9 changes: 9 additions & 0 deletions
9
packages/project/test/fixtures/collection.c.noCustomConfigForLibA/collection.a/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "name": "collection", | ||
| "version": "1.0.0", | ||
| "description": "Simple Collection", | ||
| "workspaces": [ | ||
| "library.c", | ||
| "library.d" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
packages/project/test/fixtures/collection.c.noCustomConfigForLibA/library.a/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "library.a", | ||
| "version": "1.0.0", | ||
| "description": "Simple SAPUI5 based library" | ||
| } |
17 changes: 17 additions & 0 deletions
17
...project/test/fixtures/collection.c.noCustomConfigForLibA/library.a/src/library/a/.library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
|
||
| <name>library.a</name> | ||
| <vendor>SAP SE</vendor> | ||
| <copyright>Some fancy copyright ${currentYear}</copyright> | ||
| <version>${version}</version> | ||
|
|
||
| <documentation>Library A</documentation> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <libraryName>library.d</libraryName> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| </library> |
5 changes: 5 additions & 0 deletions
5
...roject/test/fixtures/collection.c.noCustomConfigForLibA/library.a/ui5-another-custom.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.a.another.custom |
5 changes: 5 additions & 0 deletions
5
packages/project/test/fixtures/collection.c.noCustomConfigForLibA/library.a/ui5.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.a |
5 changes: 5 additions & 0 deletions
5
packages/project/test/fixtures/collection.c.noCustomConfigForLibA/library.b/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "library.b", | ||
| "version": "1.0.0", | ||
| "description": "Simple SAPUI5 based library" | ||
| } |
17 changes: 17 additions & 0 deletions
17
...project/test/fixtures/collection.c.noCustomConfigForLibA/library.b/src/library/b/.library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
|
||
| <name>library.b</name> | ||
| <vendor>SAP SE</vendor> | ||
| <copyright>Some fancy copyright ${currentYear}</copyright> | ||
| <version>${version}</version> | ||
|
|
||
| <documentation>Library B</documentation> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <libraryName>library.d</libraryName> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| </library> |
5 changes: 5 additions & 0 deletions
5
...roject/test/fixtures/collection.c.noCustomConfigForLibA/library.b/ui5-another-custom.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| specVersion: "2.3" | ||
| type: library | ||
| metadata: | ||
| name: library.b.another.custom |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This modification leads to a bit strange behaviour that I'm not sure whtether is expected or not.
Here it is:
If you checkout the
openui5-sample-appand use aui5-worspaces.yamlin there to point to the openui5 monorepo locally and insideui5-worspaces.yamlthere is thisconfigPathproperty with a customui5.yaml(it might have different name i.e.ui5-deployment.yaml) configuration, the solution will loop through all of the subpackages within openui5 monorepo and if such a custom file is missing somewhere, the build/serve will fail.This means, that an external consumer will provide a path to a custom configuration in
openui5repo, expecting this custom configuration to be present everywhere.A workaround I see is to point individually to every repo.