[FIX] multiple instances of @codemirror/state are loaded #1

Closed
ksenginew wants to merge 1 commit from patch-1 into main
ksenginew commented 2021-10-14 12:55:46 +02:00 (Migrated from github.com)

I couldn't load Codemirror 6 through skypack CDN. It's reported here.

When importing through jsDelivr CDN. it throws error

Uncaught Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.

So I'm updating @codemirror/state version.

Note: Please enable Github dependabot alerts to avoid these errors in future.

I couldn't load Codemirror 6 through skypack CDN. It's reported [here](https://github.com/lezer-parser/javascript/issues/6#issuecomment-943228164). When importing through jsDelivr CDN. it throws error ```js Uncaught Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks. ``` So I'm updating `@codemirror/state` version. Note: Please enable Github dependabot alerts to avoid these errors in future.
marijnh commented 2021-10-14 13:04:06 +02:00 (Migrated from github.com)

"^0.19.0" is already compatible with "0.19.2". This is an issue in skypack, and I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that.

`"^0.19.0"` is already compatible with `"0.19.2"`. This is an issue in skypack, and I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that.
ksenginew commented 2021-10-14 16:34:29 +02:00 (Migrated from github.com)

"^0.19.0" is already compatible with "0.19.2". This is an issue in skypack, and I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that.

This issue is not related to skypack. I had reported it to lezer-parser/javascript. See https://github.com/lezer-parser/javascript/issues/6#issuecomment-943228164

This issue is related to jsDelivr CDN.
Here you are using version 0.19.0, but used 0.19.2 in @codemirror/view.

Then jsDelivr ships both 0.19.0 and 0.19.2 and breaks instanceof checks.

I haven't tested this on node js.

To fix this please upgrade this to 0.19.2 or downgrade state version of @codemirror/view to 0.19.2. As you said

I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that.

Thanks 👍

> `"^0.19.0"` is already compatible with `"0.19.2"`. This is an issue in skypack, and I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that. This issue is not related to skypack. I had reported it to lezer-parser/javascript. See https://github.com/lezer-parser/javascript/issues/6#issuecomment-943228164 This issue is related to [jsDelivr](https://jsdelivr.com) CDN. Here you are using version 0.19.0, but used 0.19.2 in [@codemirror/view](https://github.com/codemirror/view/blob/7d88b9009598aab8bdcf2c135e77bea667040f85/package.json#L30). Then jsDelivr ships both 0.19.0 and 0.19.2 and breaks `instanceof` checks. I haven't tested this on node js. To fix this please upgrade this to 0.19.2 or downgrade state version of `@codemirror/view` to 0.19.2. As you said > I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that. Thanks 👍
ksenginew commented 2021-10-16 12:55:27 +02:00 (Migrated from github.com)

"^0.19.0" is already compatible with "0.19.2". This is an issue in skypack, and I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that.

This issue is not related to skypack. I had reported it to lezer-parser/javascript. See lezer-parser/javascript#6 (comment)

This issue is related to jsDelivr CDN. Here you are using version 0.19.0, but used 0.19.2 in @codemirror/view.

Then jsDelivr ships both 0.19.0 and 0.19.2 and breaks instanceof checks.

I haven't tested this on node js.

To fix this please upgrade this to 0.19.2 or downgrade state version of @codemirror/view to 0.19.2. As you said

I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that.

Thanks 👍

@marijnh ???

> > `"^0.19.0"` is already compatible with `"0.19.2"`. This is an issue in skypack, and I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that. > > This issue is not related to skypack. I had reported it to lezer-parser/javascript. See [lezer-parser/javascript#6 (comment)](https://github.com/lezer-parser/javascript/issues/6#issuecomment-943228164) > > This issue is related to [jsDelivr](https://jsdelivr.com) CDN. Here you are using version 0.19.0, but used 0.19.2 in [@codemirror/view](https://github.com/codemirror/view/blob/7d88b9009598aab8bdcf2c135e77bea667040f85/package.json#L30). > > Then jsDelivr ships both 0.19.0 and 0.19.2 and breaks `instanceof` checks. > > I haven't tested this on node js. > > To fix this please upgrade this to 0.19.2 or downgrade state version of `@codemirror/view` to 0.19.2. As you said > > > I'm not going to keep all intra-package dependencies bumped to the latest patch version to accommodate that. > > Thanks 👍 @marijnh ???
marijnh commented 2021-10-16 13:02:18 +02:00 (Migrated from github.com)

I'm not making this change, as I already indicated.

I'm not making this change, as I already indicated.
ksenginew commented 2021-10-16 13:20:31 +02:00 (Migrated from github.com)

OK, @marijnh then can you downgrade the @codemirror/state version in @codemirror/view.

OK, @marijnh then can you downgrade the `@codemirror/state` version in `@codemirror/view`.
marijnh commented 2021-10-16 13:28:04 +02:00 (Migrated from github.com)

No, that would make no sense, and break things because @codemirror/view depends on features in @codemirror/state 0.19.2

No, that would make no sense, and break things because @codemirror/view depends on features in @codemirror/state 0.19.2
ksenginew commented 2021-10-16 13:32:44 +02:00 (Migrated from github.com)

No, that would make no sense, and break things because @codemirror/view depends on features in @codemirror/state 0.19.2

Is now codemirror is working finely with bundlers. It's not working with CDNs.

> No, that would make no sense, and break things because @codemirror/view depends on features in @codemirror/state 0.19.2 Is now codemirror is working finely with bundlers. It's not working with CDNs.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/basic-setup!1
No description provided.