Questions tagged [npm]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
63 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
1answer
91 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 ...
4
votes
1answer
338 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), ...
2
votes
3answers
242 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
0answers
25 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
1answer
140 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
2answers
240 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
1answer
128 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
2answers
201 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 ...
1
vote
1answer
1k 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
1answer
78 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 ...
11
votes
1answer
1k 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
2answers
162 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
1answer
55 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
1answer
224 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
1answer
169 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 ...
2
votes
2answers
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
1answer
33 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
3answers
178 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 ...
8
votes
2answers
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 ...