benfred / fmin

Unconstrained function minimization in Javascript
BSD 3-Clause "New" or "Revised" License
355 stars 61 forks source link

Can you release the latest version of fmin? #13

Closed connono closed 1 week ago

connono commented 2 years ago

I found that fmin had been modified in 2018 without a new release. Can you release the latest version of fmin?

SukkaW commented 10 months ago

@benfred Just a friendly ping on this.

The latest version of fmin on npm (which is 0.0.2) declares rollup, jshint, tape and so on as devDependencies. Though the fmin has already corrected this on GitHub, but the fixes were never published to the npm.

lloydjatkinson commented 2 months ago

I hope #16 is a prompt to deploy these changes

exoego commented 1 month ago

The latest version of fmin on npm (which is 0.0.2) declares rollup, jshint, tape and so on as devDependencies. Though the fmin has already corrected this on GitHub, but the fixes were never published to the npm.

Yes, it is very helpful if new version with https://github.com/benfred/fmin/commit/8974eb211dce463036de581fa6f3cae7925a5a52 get published

exoego commented 1 month ago

My workaround to exclude fmin's accidentally-included dependencies

Yarn

  1. Add resolutions to package.json:
  "resolutions": {
    "fmin/rollup": "npm:empty-npm-package@1.0.0",
    "fmin/json2module": "npm:empty-npm-package@1.0.0",
    "fmin/tape": "npm:empty-npm-package@1.0.0",
    "fmin/uglify-js": "npm:empty-npm-package@1.0.0"
  },
  1. Then, run yarn add fmin.

NPM

  1. Add overrides to package.json:
  "overrides": {
    "fmin": {
      "rollup": "npm:empty-npm-package@1.0.0",
      "json2module": "npm:empty-npm-package@1.0.0",
      "tape": "npm:empty-npm-package@1.0.0",
      "uglify-js": "npm:empty-npm-package@1.0.0"
    }
  },
  1. Then, run npm install fmin (with -D if needed).

PNPM < 9.12

  1. Add pnpm.overrides to the root package.json:
    "pnpm": {
    "overrides": {
      "fmin>json2module": "npm:empty-npm-package@1.0.0",
      "fmin>rollup": "npm:empty-npm-package@1.0.0",
      "fmin>tape": "npm:empty-npm-package@1.0.0",
      "fmin>uglify-js": "npm:empty-npm-package@1.0.0"
    }
    }
  2. Then, run pnpm install

PNPM >= 9.12

  1. Add
    "pnpm": {
    "overrides": {
      "fmin>json2module": "-",
      "fmin>rollup": "-",
      "fmin>tape": "-",
      "fmin>uglify-js": "-"
    }
    }
  2. Then, run pnpm install
benfred commented 1 week ago

pushed out latest changes to https://www.npmjs.com/package/fmin - let me know if this resolves

SukkaW commented 1 week ago

@benfred Can confirm 0.0.4 includes the latest commits. Thanks!