MithrilJS / mithril.js

A JavaScript Framework for Building Brilliant Applications
https://mithril.js.org
MIT License
13.99k stars 926 forks source link

Deprecated dependencies `inflight` and `glob` #2900

Open acadiansith opened 1 month ago

acadiansith commented 1 month ago

Mithril.js version: 2.2.2

Browser and OS: No browser, macOS 14.6

Project: N/A

Code

$ npm install mithril --save

Steps to Reproduce

  1. Install mithril
  2. View dependency deprecation warnings

Expected Behavior

I expected mithril to install without any warnings.

Current Behavior

I received the following two deprecation warnings for the dependencies inflight and glob when installing mithril:

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

In particular, inflight has been entirely deprecated by its developer a few months ago, who recommends using something else.

Context

This issue likely does not affect me, as I'm sure mithril will work just fine despite these warnings, but I thought the devs might want to be aware of this as I haven't seen it mentioned here in the issues.

dead-claudia commented 1 month ago

Currently working on it in #2904. Goal is to just remove Glob entirely.

dead-claudia commented 1 month ago

Note that you can safely ignore these errors. They're dev dependencies.

I do have a question: do you have anything like include=dev? I'm confused as to how npm would even try to be installing dev dependencies when you're not running a bare npm install.

acadiansith commented 1 month ago

I'm not an npm pro by any means, but I do not think I have any particular dev mode settings specified. I installed npm via Homebrew just before setting up my Mithril project. I get the deprecation warnings on a completely clean environment:

$ mkdir test
$ cd test
$ npm init
$ np install mithril --save

with the following package.json created by npm init

{
  "name": "test",
  "version": "1.0.0",
  "description": "hello",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "me",
  "license": "ISC",
  "dependencies": {
    "mithril": "^2.2.2"
  }
}