Questions tagged [npm]
The npm tag has no usage guidance.
26
questions
1
vote
1
answer
393
views
What are the benefits of keeping npm packages up-to-date? [closed]
The company I work for is maintaining and developing a web application that uses many Node.js packages. A lot of these packages are really outdated. I can intuitively understand that it is good to ...
0
votes
3
answers
158
views
Best ways to deal with unexpected bugs in already published npm packages
I'm working on an npm package, and I'm kind of new to this. I published version 0.1.0, but when I did, I saw that there was a bug that broke the entire package. I do not think that it is right to make ...
1
vote
0
answers
28
views
Peer dependencies vs. (re-)exporting dependencies in abstract hierarchy (framework)
Say I have a module storage-abstract, which contains abstract logic (framework) for storing key/values. I also have some (arbitrarily many) implementations of this abstraction, each in a separate ...
2
votes
3
answers
549
views
How do you reduce security risks when using NPM packages in commercial Web development?
This is a question for software engineers who are tasked with managing the development cycle for a Web application using NPM packages for deployment on a customer's Intranet or the Internet.
This is ...
-3
votes
1
answer
39
views
Publishing packages for personal and commercial use [closed]
I have a pretty high level question for you and am looking for some different experiences and input. Does anyone publish their own private or public packages for their own personal convenience?
...
2
votes
3
answers
123
views
Should a process be responsible for scheduling itself?
I need to create a very small service which will programmatically make a database insertion once a day. As our stack primarily uses Node.js, we’re going to write a JS script responsible just for ...
0
votes
1
answer
266
views
How do you work with closing pools/connections?
I wanted to know when you are done processing some query or transaction do you usually close a connection only? do you close the pool? or do you close both? Does it even matter which one you close? ...
-2
votes
1
answer
102
views
How to warn devs after installing or updating npm packages? [closed]
I want to warn devs in my team to rebuild the docker containers after installing or updating npm packages.
This is because whenever we edit packages in the environment the only way we've found to test ...
7
votes
1
answer
732
views
Should published npm packages target ES5 syntax?
A bit of background:
I've been using Webpack with babel-loader for a while and overall the experience has been hugely positive.
Yesterday, I published an npm package of my own (to a private registry), ...
3
votes
3
answers
682
views
How is a reproducible build guaranteed with version ranges in NPM?
I know with NPM caret, tilde and some logical operators can be used to specify version ranges. This post explains a bit on how this works.
The problem now is I find it hard to reconcile the use of ...
1
vote
0
answers
28
views
How to increase scalability the method that output each file while switching multiple many conditions?
I have a common style (common.scss) and a text direction (RTL, LTR) option file (option-document-direction-rtl.scss, option-document-direction-ltr.scss). And by switching the reading of these files, ...
0
votes
1
answer
275
views
Change semver versioning after dropping node eninge versions
I doubt about to which semver version I should update my public NPM package. I didn't change any code, but I had to drop some node engine versions due to a dependency package which had a major update ...
2
votes
2
answers
247
views
What pattern lets each of multiple "voters" decide on a central status?
Imagine there's a boolean status variable that is either running or stopped.
This variable is running by default and comes together with a deactivator function.
When a client calls the deactivator ...
1
vote
1
answer
148
views
How to organize work with a few projects with shared codebase?
We develop two projects (and more in future) with JS, Vue.js, using npm, and we store each project in its own git-repository.
We want to place common components (buttons, page-parts and page ...
3
votes
2
answers
523
views
Adding library as dependency only to use one function
Few months ago I started working in a team that develops software using Node.js. Quite often we encounter the problem that has been already solved by someone else and the solution is already available ...
0
votes
1
answer
2k
views
Correct way to serve file that's in node_modules
Say I have this structure:
project/
node_modules/
xxx/
asset.js
index.html
app.js
and in app.js I have:
const express = require('express');
const app = express();...
2
votes
1
answer
95
views
continuous deployment of web application built with multiple packages
Our react web application is broken down to multiple components. Some of these components are part of the same git mono repo and some live in a different repo.
Now, to implement a bug fix we have to ...
15
votes
2
answers
2k
views
Managing private NPM packages and CI/CD
At work, we have an application that is run directly on dev machines, but deployed in Docker swarms (a QA swarm and production swarm). The code and CI/CD pipelines are all in GitLab CE.
It uses ...
1
vote
2
answers
184
views
How to declare the need of polyfills publishing jquery plugin (and specially for webpack users)?
I've created jquery plugin that is using modern browser's (Node/Element) features.
I'm going to publish plugin as npm package. My wish is not to include polyfills code into jquery plugin, bud declare ...
1
vote
1
answer
105
views
Should I put docker commands in my package.json?
I'm currently working on getting a good workflow going on, from development to a kubernetes deployment on cloud platform.
I'm pretty comfortable with various docker commands, but rewriting long ...
4
votes
1
answer
506
views
Publishing versions out of order
Does npm allow you to publish earlier versions of a package? The only documentation I could find was on npm’s site:
[npm-publish] Fails if the package name and version combination already exists in ...
2
votes
1
answer
230
views
Automatically update and test npm dependencies
I would like to automate the following sequence of events;
A new version of Angular is released on Github
'Something' triggers causing all our angular applications to update their npm dependencies ...
3
votes
2
answers
2k
views
What's a good way to deprecate your NPM modules?
One of my NPM modules is, frankly, pretty lame, hasn't been worked on in years, has no watchers, no stars, and only ~50 downloads per month. I'm going to abandon it, and eventually delete it so it ...
1
vote
1
answer
34
views
NPM downloadable package with only high level brand styles [closed]
I've been tasked to create an NPM package that our Frontend teams can make use of that has styling for the companys UI elements:
Layout Grid unit proportions, gutters and spacing.
Typography ...
2
votes
3
answers
215
views
Store Nuget\NPM packages in VCS with source or not?
Is it good practice to store Nuget or NPM (or other) packages in the source control with the source, or to keep them in some other place?
My gut says they belong with the source, however a package ...
9
votes
2
answers
2k
views
A good Node.js workflow for keeping packages up-to-date?
I've recently started developing a project in Node.js. Of course, right now the packages I'm using are pretty up-to-date as I'm starting afresh and using the latest version, but there's a pretty high ...