lit-translate icon indicating copy to clipboard operation
lit-translate copied to clipboard

Feature request: Upgrade to lit-html 2.0

Open dflorey opened this issue 3 years ago • 10 comments

...using new Directive class :-)

dflorey avatar Oct 29 '20 13:10 dflorey

@andreasbm - just interested to know if this is somehow in a tentative pipeline, now that lit 2.0 is at release candidate stage ?

Thanks a lot, even if the answer is no!

P.S. I am aware that lit now offers localization (https://lit.dev/docs/libraries/localization/), but I prefer lit-translate approach allowing to handle localization files in JSON.

christophe-g avatar Apr 26 '21 13:04 christophe-g

I'm super excited about the new Directive class! 🌞 I plan on upgrading the library to lit v2 during the next weekend 👍

andreasbm avatar Apr 26 '21 14:04 andreasbm

Oh, that is great - indeed, lit 2 all together is super exciting !

christophe-g avatar Apr 26 '21 14:04 christophe-g

👍 Thank you. Looking forward to the release.

inureyes avatar May 17 '21 02:05 inureyes

I have now released lit-translate with lit 2 as a release candidate 👍 You can install it with npm i lit-translate@next - when lit 2 is officially released I will release this version as well 🌞

andreasbm avatar Aug 01 '21 11:08 andreasbm

Greeat !!! i'm excite for this new version

Mateozmaldonado17 avatar Oct 21 '21 14:10 Mateozmaldonado17

@andreasbm any updates when this will be a stable release? lit 2 is official now

mhmo91 avatar Oct 22 '21 09:10 mhmo91

Hi @andreasbm any change you could do official 2.0.0 release with the lit v2 branch at some point. I'm getting this warning from webpack duplicate detection plugin.

WARNING in lit
  Multiple versions of lit found:
    2.0.0-rc.2 ./~/lit-translate/~/lit
    2.1.2 ./~/lit

Looks like that branch has dep to "latest" lit. But at the time when you did [email protected] i guess that was [email protected].

The package-lock.json also in that branch has the [email protected] reference.

I'm not too familiar with npm publishing but i would recond you reinstall latest lit so package-lock.json gets fixed to 2.x.x when make official 2.0.0 npm release for lit-translate.

Edit: App build looks to work fine. I think the downside of this is the app is loading lit two times. Once for lit translate and once for everything else. So even if not causing issues it bloats the build unnecessarily.

using npm v8 here is relevant part from my apps lock file

    "node_modules/lit-translate": {
      "version": "2.0.0-rc.1",
      "resolved": "https://registry.npmjs.org/lit-translate/-/lit-translate-2.0.0-rc.1.tgz",
      "integrity": "sha512-8r7MK4OuFoUis41RHS4pFxIuCKn8K/nBdhJKdcnCeD+2MEH0Wg2oiaodYxK6cYcyzc0dFGf1+a/32r4Ym7A/cg==",
      "dependencies": {
        "lit": "2.0.0-rc.2"
      }
    },
    "node_modules/lit-translate/node_modules/lit": {
      "version": "2.0.0-rc.2",
      "resolved": "https://registry.npmjs.org/lit/-/lit-2.0.0-rc.2.tgz",
      "integrity": "sha512-BOCuoJR04WaTV8UqTKk09cNcQA10Aq2LCcBOiHuF7TzWH5RNDsbCBP5QM9sLBSotGTXbDug/gFO08jq6TbyEtw==",
      "dependencies": {
        "@lit/reactive-element": "^1.0.0-rc.2",
        "lit-element": "^3.0.0-rc.2",
        "lit-html": "^2.0.0-rc.3"
      }
    },

jonnenauha avatar Feb 02 '22 12:02 jonnenauha

@andreasbm Would you be interested in allowing others to help with the maintenance of this library?

peschee avatar Feb 25 '22 07:02 peschee

Shouldn't this issue be closed? I somehow stumbled over this and thought lit-translate would still be on v1 but then fortunately noticed in the releases section that v2 is already out :-)

nicolasr75 avatar May 20 '22 17:05 nicolasr75