Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Comments

Move to npm run test in vscode launch config#1013

Merged
joshgummersall merged 2 commits intomainfrom
joshgummersall/fix-vscode-launch-json
Oct 12, 2020
Merged

Move to npm run test in vscode launch config#1013
joshgummersall merged 2 commits intomainfrom
joshgummersall/fix-vscode-launch-json

Conversation

@joshgummersall
Copy link
Contributor

Fixes issues with package resolution.

Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-test launch projects still fail.

import * as xp from 'xml2js'
import Validator from 'ajv'
import glob from 'globby'
import Ajv = require('ajv');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

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.
@joshgummersall joshgummersall force-pushed the joshgummersall/fix-vscode-launch-json branch from 0a4ee6c to c0b9a20 Compare October 12, 2020 20:26
this.validator.addSchema(fullSchema, schemaPath)
validator = this.validator.getSchema(schemaPath) as ajv.ValidateFunction
validator = this.validator.getSchema(schemaPath)
if (!validator) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a bit of safety rather than relying on casting to implicitly remove the potential for an undefined result.

@joshgummersall joshgummersall merged commit bf8d2db into main Oct 12, 2020
@joshgummersall joshgummersall deleted the joshgummersall/fix-vscode-launch-json branch October 12, 2020 20:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants