This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Move to npm run test in vscode launch config#1013
Merged
joshgummersall merged 2 commits intomainfrom Oct 12, 2020
Merged
Conversation
chrimc62
suggested changes
Oct 12, 2020
chrimc62
left a comment
There was a problem hiding this comment.
The non-test launch projects still fail.
joshgummersall
commented
Oct 12, 2020
| import * as xp from 'xml2js' | ||
| import Validator from 'ajv' | ||
| import glob from 'globby' | ||
| import Ajv = require('ajv'); |
Contributor
Author
There was a problem hiding this comment.
This is discussed here: ajv-validator/ajv#1230
It looks like upgrading to v7 would give us better ES import support, but it's not a trivial upgrade so I'm moving back to require for this (and globby which appears to have a similar problem).
AJV v7 beta has better support for ES style import but is not a trivial upgrade to make. This commit also upgrades `tslib` across all packages to maintain consistency with latest typescript version.
0a4ee6c to
c0b9a20
Compare
joshgummersall
commented
Oct 12, 2020
| this.validator.addSchema(fullSchema, schemaPath) | ||
| validator = this.validator.getSchema(schemaPath) as ajv.ValidateFunction | ||
| validator = this.validator.getSchema(schemaPath) | ||
| if (!validator) { |
Contributor
Author
There was a problem hiding this comment.
This adds a bit of safety rather than relying on casting to implicitly remove the potential for an undefined result.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes issues with package resolution.