[FEATURE] Introduce Readers "Filter" and "Transformer"#331
Merged
RandomByte merged 15 commits intonextfrom Jan 13, 2022
Merged
Conversation
2022096 to
b7a6080
Compare
2 tasks
b7a6080 to
93d5d24
Compare
93d5d24 to
a7403e4
Compare
a7403e4 to
b3993d8
Compare
RandomByte
added a commit
to SAP/ui5-builder
that referenced
this pull request
Dec 2, 2021
KlattG
suggested changes
Dec 6, 2021
Co-authored-by: KlattG <57760635+KlattG@users.noreply.github.com>
KlattG
previously approved these changes
Dec 6, 2021
matz3
requested changes
Dec 6, 2021
lib/AbstractReader.js
Outdated
| } | ||
|
|
||
| filter(callback) { | ||
| const ReaderFilter = require("./ReaderFilter"); |
Member
There was a problem hiding this comment.
Note: Cyclic dependency
This shouldn't cause any issues but we might also just use the "ReaderFilter" directly within ui5-builder.
This should make resource clone operations cheaper since the content doesn't need to be read and cloned immediately
Member
Author
|
@KlattG I think there's no further review necessary from your side. Thanks |
No major benefits since streams need to be drained into a buffer anyways. This reverts commit ecd7bd6.
… of instance We don't need more information anyways
matz3
reviewed
Dec 23, 2021
matz3
reviewed
Dec 23, 2021
Member
Author
|
@KlattG could you please have a look at the JSDoc in the following three files? Thanks!
|
KlattG
reviewed
Jan 10, 2022
KlattG
left a comment
There was a problem hiding this comment.
Not sure what the 'T' in Lines 80 & 96 of AbstractReader refers to, I expected some sort of description there.
lib/readers/Filter.js
Outdated
| * @public | ||
| * @callback module:@ui5/fs.readers.Filter~callback | ||
| * @param {module:@ui5/fs.Resource} resource Resource to test | ||
| * @returns {boolean} Return <code>true</code> to keep the resource, or <code>false</code> to disregard it |
There was a problem hiding this comment.
Suggested change
| * @returns {boolean} Return <code>true</code> to keep the resource, or <code>false</code> to disregard it | |
| * @returns {boolean} Whether to keep the resource |
lib/AbstractReader.js
Outdated
| * @public | ||
| * @param {module:@ui5/fs.readers.Filter~callback} callback | ||
| * Filter function. Will be called for every resource passed through this reader. | ||
| * @returns {module:@ui5/fs.reader.Transformer} T |
lib/AbstractReader.js
Outdated
| * @public | ||
| * @param {module:@ui5/fs.readers.Transformer~callback} callback | ||
| * Callback to check and eventually transform any resource passed through the reader | ||
| * @returns {module:@ui5/fs.reader.Transformer} T |
matz3
approved these changes
Jan 13, 2022
RandomByte
added a commit
to SAP/ui5-builder
that referenced
this pull request
Jan 14, 2022
d3xter666
pushed a commit
to UI5/cli
that referenced
this pull request
Sep 25, 2025
d3xter666
pushed a commit
to UI5/cli
that referenced
this pull request
Sep 26, 2025
d3xter666
pushed a commit
to UI5/cli
that referenced
this pull request
Sep 26, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TODOs