Update SSRC to use validator instead of lodash for non-dev environment #2523
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.
Discussion
Our tests have used lodash for awhile. PR #2520 added a usage outside of tests. When I run a test server that depends on the integration branch, I get a
Error: Cannot find module 'lodash'
error. So, I think we need to move lodash fromdevDependencies
todependencies
.Moving lodash to
dependencies
and updating the test server to depend on this branch fixes the issue.Perhaps interesting: I wasn't able to repro this issue by making the test server depend on a local copy of the firebase-admin-node, presumably because all dependencies end up in
node_modules
so lodash was available.Note: based on review discussion, this change ended up replacing lodash's
isString
withvalidator.isString
.Testing
Unit tested by running
npm test
on this branch.Functionally tested by updating a test server to depend on this branch and observing it was able to start without error.
API Changes
None