dy / spect

Observable selectors in DOM
https://dy.github.io/spect
MIT License
77 stars 8 forks source link

spect@24 breaks integration tests with subscribable-things #263

Closed chrisguttandin closed 2 years ago

chrisguttandin commented 2 years ago

Hi @dy,

I just noticed that upgrading spect to v24 breaks the integration tests of subscribable-things. I tried to find any documentation on what I need to update/change to make it work again but I couldn't find any.

Could you please let me know what I need to do?

dy commented 2 years ago

Hi Chris! Sure, sorry for bothering. Just replace spect/v with value-ref and spect/h with hyperf.

import $ from 'spect'
import h from 'hyperf'
import v from 'value-ref'

I'll add update guide.

Also check out templize - it allows streaming observable/reactive values to html template parts.

chrisguttandin commented 2 years ago

Thanks for your help and the quick reply. I made an attempt to update the dependencies here: https://github.com/chrisguttandin/subscribable-things/commit/98da621d6661c5e1d46f5f1942cda74c75642e07

Unfortunately I must be doing something wrong. It doesn't even build. :-(

dy commented 2 years ago

Right, it must be something to do with the way deps are included here

import htm from '../node_modules/htm/dist/htm.mjs'
import sube, { observable } from '../node_modules/sube/sube.js'
import swap from '../node_modules/swapdom/swap-inflate.js'
import { prop as attr } from '../node_modules/element-props/element-props.js'

You can include as import h from 'hyperf/hyperf.js' as workaround, I have to find out a way to import deps then.

dy commented 2 years ago

Ok, updated deps usage via import-maps. Just bump hyperf to 1.1.2. Thanks for the report!

chrisguttandin commented 2 years ago

Thanks a lot, Dmitry.