-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.js file imports and schema loading as statefield #63
Conversation
🦋 Changeset detectedLatest commit: 4ac83af The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for codemirror-json-schema ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
@@ -681,7 +687,7 @@ export class JSONCompletion { | |||
schema: JSONSchema7, | |||
ctx: CompletionContext | |||
): JSONSchema7Definition[] { | |||
const draft = new Draft07(this.schema); | |||
const draft = new Draft07(this.schema!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always wary of using this ! in the code
import { | ||
JSONValidation, | ||
handleRefresh, | ||
type JSONValidationOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you have to manually update all the imports to use the .js extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is part of adopting the new node module resolution spec!
@imolorhe this introduces a breaking change for anyone using the "custom" usage approach, so not bad news at all! |
this introduces a breaking change!
with this change, you'll be able to provide schema this way:
I'm going to do one more pass to change the signature of the linter extensions, where they are exported with the
needsRefresh
logic