DanKaplanSES
DanKaplanSES
KPCKevin Powell - Community
Created by DanKaplanSES on 6/16/2024 in #back-end
Is there a way to pick which build of a dependency to use?
No description
5 replies
KPCKevin Powell - Community
Created by DanKaplanSES on 1/27/2024 in #back-end
How do I publish a public lib locally without adding a `run` script just for me?
Here's the context: I've built my own public library. I'm also building an app that uses this library. I may need to modify the library to fit the app's use case, and until the dust settles on that effort, I do not want to npm publish the library while I iterate on this use case. When lib is modified, I'd like to publish locally so my app can get the latest code. The only way I know how to do that is to add a npm run build-and-publish-locally-because-i-am-iterating-on-app to lib's package.json. That feels wrong: lib is open source, intended to be used by strangers, and I don't want to accidentally publish that script if I need to fix an unexpected, unrelated lib bug. Is there a better approach to this problem? I don't think I'm the first person to create my own library for my own app. How do most handle this?
5 replies
KPCKevin Powell - Community
Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
For those that know Java, I'm basically asking if slf4j exists in node. For those that don't know Java, I'm building a library that needs to output logs to: 1. Give me enough information to troubleshoot issues when apps use it. 2. Give users enough information to troubleshoot when they use it. I don't want to always print these logs. Logging should be configurable by the user. I don't want to write my own logging library to achieve this. Is there a node.js logging package that can be configured externally? PS: I've looked at node.js logger top 10 lists, and I didn't see any that touted this as a feature.
48 replies
KPCKevin Powell - Community
Created by DanKaplanSES on 12/12/2023 in #back-end
Is there a way to reinitialize jQuery?
I'm trying to get some help on this stackoverflow question I wrote: https://stackoverflow.com/questions/77602661/is-there-a-way-to-reinitialize-jquery To summarize: I'm using JSDOM to load my webapp and my webapp uses jQuery. JQuery holds onto references of the current global window/window.document (this is an oversimplification and full details are in the question) once jquery is initialized. This prevents me from running tests that use different HTML and that is highly restrictive. I'm looking for a way to reinitialize jQuery in my test code so that I can use a different document per test. Is there a way to do this without modifying my production code that already import jQuery from 'jquery's? PS: Is this question more suitable for #front-end ? IMO, it's kind of both.
3 replies