Support non node environment validation#24
Merged
Conversation
added 5 commits
March 5, 2026 16:21
Split validation into schema, file checks, and Node-only file gathering. The default export is unchanged for Node consumers. Add a ./validatesubpath that takes (descriptor, fileList) so browser consumers can run full validation without Node APIs. - @adobe/reactor-validator/schema (schema validation only) - @adobe/reactor-validator/files (file validation with caller-provided file list).
…onsumers, be a little more restrictive with the viewBasePath.
…st case. 3.0.0-beta.5
markhicken
reviewed
Mar 6, 2026
| return result; | ||
| }; | ||
|
|
||
| module.exports = gatherFilesInNodeEnvironment; |
Member
There was a problem hiding this comment.
web-manifest.test.js and edge-manifest.test.js do cover this code, but there are no direct tests verifying:
- Recursive directory traversal
- Handling of symlinks, empty directories, or special characters in filenames
- Path separator output on different OS
Maybe consider if we need unit tests for these cases.
Member
Author
There was a problem hiding this comment.
I think the changes as-is don't necessitate testing these today given they weren't tested explicitly before these changes.
| var schemas = { | ||
| web: require('@adobe/reactor-turbine-schemas/schemas/extension-package-web.json'), | ||
| edge: require('@adobe/reactor-turbine-schemas/schemas/extension-package-edge.json'), | ||
| mobile: require('@adobe/reactor-turbine-schemas/schemas/extension-package-mobile.json') |
Member
There was a problem hiding this comment.
Web and edge have test fixtures and tests, but I don't think mobile is used, right?
Member
Author
There was a problem hiding this comment.
I wouldn't say mobile isn't used, there's a mobile schema to validate against.
markhicken
approved these changes
Mar 19, 2026
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.
Description
Changes to allow validator to still be the "source of truth for validation" but can be used in a web context.
Related Issue
https://jira.corp.adobe.com/browse/PDCL-14485
Motivation and Context
This was a node-only project and wouldn't work due to it's inherent step of gathering files from the file system.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: