Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 02 16:30

    depfu[bot] on update

    (compare)

  • Dec 02 16:30
    depfu[bot] closed #841
  • Dec 02 16:30
    depfu[bot] commented #841
  • Dec 02 16:30
    depfu[bot] labeled #842
  • Dec 02 16:30
    depfu[bot] opened #842
  • Dec 02 15:27

    depfu[bot] on update

    Update jest to version 27.4.3 (compare)

  • Dec 01 15:25

    depfu[bot] on update

    (compare)

  • Dec 01 15:25
    depfu[bot] closed #832
  • Dec 01 15:25
    depfu[bot] commented #832
  • Dec 01 15:25
    depfu[bot] labeled #841
  • Dec 01 15:25
    depfu[bot] opened #841
  • Dec 01 14:23

    depfu[bot] on update

    Update jest to version 27.4.2 (compare)

  • Nov 28 21:31
    depfu[bot] synchronize #822
  • Nov 28 21:31

    depfu[bot] on update

    Update offline-github-changelog… (compare)

  • Nov 28 20:24
    depfu[bot] edited #822
  • Nov 28 20:22

    depfu[bot] on update

    (compare)

  • Nov 28 20:20
    papandreou closed #840
  • Nov 28 20:20

    papandreou on master

    Update prettier to version 2.5.0 Merge pull request #840 from un… (compare)

  • Nov 28 05:41
    shicks commented #525
  • Nov 26 21:35
    depfu[bot] labeled #840
Sune Simonsen
@sunesimonsen
But all parts but the view and the components can be used with preact or react
You don’t need to use the component library.
They are not tied together
The component library needs the store and the view
Gustav Nikolaj
@gustavnikolaj
I'll have to give it a spin soon. I know I've been saying so for a while, but it's been a while since I have been at a computer outside work :D
I get it - it makes sense. It's only in that because it's easier to keep it part of the same mono-repo when you play around with it :)
@sunesimonsen what's the stability status of https://github.com/sunesimonsen/stylewars ? Is it used anywhere in production yet?
Sune Simonsen
@sunesimonsen
stylewars isn’t used in production yet, but it is insanely simple and well tested so I don’t think it would cause you problems.
It would be nice to have a babel plugin to optimize the css inside the bundles
I question your statement about not wanting a state management library for you component library. First of all you do get a weak state management library from react. But I think it opens a lot of possibilities to have a state management as the core of the platform, it changes the way you can interact with everything.
But I'm not expecting you to jump on this, it is not ready yet and I know it is a lot of drastic ideas.
Sune Simonsen
@sunesimonsen

That dynamic-import-variable approach seems to be roughly equivalent to what webpack supports. What I need is probably best explained with glob syntax: src/**/*.story.js

You can't do that in plain ES6, you need to produce a valid URL.

Some of the benefits of having the store would be to have a drawer component expose show and hide actions as an example. Then you can just dispatch them from somewhere else. You don't need to prop drill or connect anything.
Peter Müller
@Munter
Any recommendations for an LRU cache that is backed by redis? I can't find a single one in my npm searches that adheres to the LRU interface and has enough usage that I want to bet my production server on it
Andreas Lind
@papandreou
The easiest way to accomplish that is to configure redis itself with the allkeys-lru or volatile-lru eviction strategy and maxmemory.
Then you can use any redis client (I recommend ioredis).
Peter Müller
@Munter
Sounds good. I'll try that.
Andreas Lind
@papandreou
Peter Müller
@Munter
image.png
I love making performance improvements :)
That's the addition of a cache layer in front of Prismic for our website
Andreas Lind
@papandreou
:heart_eyes_cat:
Gustav Nikolaj
@gustavnikolaj
Hi guys :) Thought I'd break the silence here before we get to the two full calendar months of no action on the channel... What S3 client should one use on node.js these days? I haven't had much luck with the official one, but all the other popular ones I find seem to be abandoned and broken on recent node versions :)
Sune Simonsen
@sunesimonsen
I think Zendesk is using the official @aws-sdk/client-s3, but I also remember it to be pretty bad.
Gustav Nikolaj
@gustavnikolaj
The newer one (the scoped package named one) is much better than the old one (package name aws-sdk). Unfortunately that newer one doesn't seem to work with our non-aws s3 implementation from our storage vendor :(
The old one is like 60 megabytes of actual javascript code, and it adds 5 seconds of startup time to my server when run on my development machine :D
Sune Simonsen
@sunesimonsen
haha :joy:
There goes the micro service :sweat:
If there is even such a thing.
Andreas Lind
@papandreou
I think it depends on whether you're planning to use advanced features such as pre-signed POST urls, request signing etc.
Gustav Nikolaj
@gustavnikolaj
I need to have multipart uploads, and that's pretty much it :) It's just for uploading a heapdump once in a while
Peter Müller
@Munter
Don't dump Heap ;)
Gustav Nikolaj
@gustavnikolaj
10hi :)
Andreas Lind
@papandreou
:smirk_cat:
Then a super minimal client should be fine, maybe just an HTTP client :)
Gustav Nikolaj
@gustavnikolaj
I found this alternative client, from another s3 compatible storage vendor, which seems to work fine :) https://www.npmjs.com/package/minio
@papandreou yeah, I was considering doing that, but the files are big enough that I'm going to need to split them into multiple requests, so it's a bit more involved than just using an http agent :)
Andreas Lind
@papandreou
Are they really too big to be streamed?
IDK if the HTTP-based api supports PUT with Content-Range
Gustav Nikolaj
@gustavnikolaj

The largest object that can be uploaded in a single PUT is 5 gigabytes. For objects larger than 100 megabytes, customers should consider using the Multipart Upload capability.
https://aws.amazon.com/s3/faqs/

We have average memory consumption of a couple hundred of megabytes, but it will typically be used to debug containers nearing the memory limit. So I'd expect sizes in the interval from ~200 MB to 4 GB. Should be enough with a single PUT then

All the docs I've read so far only mentioned the recommendation of > 100 megs
But it's internal network traffic all of it, so it should be alright :)
Andreas Lind
@papandreou
Watch out for all the PII, private keys etc. that such a heap snapshot might contain :)
Gustav Nikolaj
@gustavnikolaj
Thanks. That's good advice. It's definitely not something you want to be too liberal about
Gustav Nikolaj
@gustavnikolaj
How do you prove, in an objective way, that a node.js server is doing something blocking? :D
Gustav Nikolaj
@gustavnikolaj
My best idea so far is to graph the amount of processes running, and the throughput/requests per sec, and then see if we ever have a higher throughput than the number of processes
Sune Simonsen
@sunesimonsen
@Munter @alexjeffburke do you know a good way to add typescript definitions a dynamic library but where I want to expose types for the public API.
Is type annotations in comments an option?
Peter Müller
@Munter
@sunesimonsen I remember a couple of people on twitter talking about being able to write js with jsdoc, and having typescript types extracted from that. The problem is that jsdoc is pretty limited when it comes to generics, if you might want to use those. And when I tried this approach in the very early days of that tooling, the output wasn't super useful
You don't want to write .d.ts files by hand?