Skip to content

Conversation

@acao
Copy link
Collaborator

@acao acao commented Aug 19, 2023

this introduces a breaking change!
with this change, you'll be able to provide schema this way:

import { jsonSchema, updateSchema } from 'codemirror-json-schema'
const state = EditorState.create({ 
// no need to pass schema here anymore
extensions: [jsonSchema()] 
})

const view = new EditorView({ state, parent: selector })

updateSchema(view, schema)

I'm going to do one more pass to change the signature of the linter extensions, where they are exported with the needsRefresh logic

@changeset-bot
Copy link

changeset-bot bot commented Aug 19, 2023

🦋 Changeset detected

Latest commit: 4ac83af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
codemirror-json-schema Minor

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

@netlify
Copy link

netlify bot commented Aug 19, 2023

Deploy Preview for codemirror-json-schema ready!

Name Link
🔨 Latest commit 4ac83af
🔍 Latest deploy log https://app.netlify.com/sites/codemirror-json-schema/deploys/654a0fa9a62e3a00083d87f9
😎 Deploy Preview https://deploy-preview-63--codemirror-json-schema.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@imolorhe imolorhe left a comment

Choose a reason for hiding this comment

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

Looking good!

ctx: CompletionContext
): JSONSchema7Definition[] {
const draft = new Draft07(this.schema);
const draft = new Draft07(this.schema!);
Copy link
Collaborator

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,
Copy link
Collaborator

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?

Copy link
Collaborator Author

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!

@acao
Copy link
Collaborator Author

acao commented Oct 21, 2023

@imolorhe this introduces a breaking change for anyone using the "custom" usage approach, so not bad news at all!

@acao acao merged commit a73c517 into main Nov 7, 2023
@acao acao deleted the js-file-import branch November 7, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants