Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ls-engines

ljharb53.2kMIT0.9.3

Determine if your dependency graph's stated "engines" criteria is met.

engines, npm, node, node_modules

readme

ls-engines Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Determine if your dependency graph's stated "engines" criteria is met.

Example

> ls-engines
`package.json` found; building ideal tree from package.json...

Valid node version range: ^14 || ^13 || ^12 || ^11 || ^10 || ^9 || ^8 || ^7 || ^6 || ^5 || ^4 || ^0.12 || ^0.11 || ^0.10 || ^0.9 || ^0.8

Currently available, most recent, valid node major versions: v14.2, v13.14, v12.16.3, v11.15, v10.20.1, v9.11.2, v8.17, v7.10.1, v6.17.1, v5.12, v4.9.1, v0.12.18, v0.11.16, v0.10.48, v0.9.12, v0.8.28

Current node version, v13.7.0, is valid!

ls-engines takes a --mode option, which defaults to "auto", but can also be "actual", "virtual", or "ideal". ”actual“ reads from node_modules; ”virtual“ reads from a lockfile; “ideal” reads from package.json.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Generated by auto-changelog.

v0.9.3 - 2024-07-31

Commits

  • [Tests] update snapshots a323066
  • [Fix] add missing DEBUG output 8bfc69b
  • [Dev Deps] update aud, object-inspect 32df121
  • [Dev Deps] update aud f23f739
  • [Deps] update get-dep-tree c1a1fab
  • [Fix] allow --current to be explicitly passed a2ba4ba
  • [meta] fix engines declaration 96493ec
  • [Deps] update semver 819e33e

v0.9.2 - 2024-06-16

Commits

  • [Tests] update fixtures 91847d4
  • [Tests] update fixtures 603dc39
  • [Deps] update @npmcli/arborist, array.prototype.some, object.fromentries, object.values, semver, table; switch from array.prototype.group to object.groupby 56f571f
  • [Tests] update snapshots 08daaae
  • [New] add process.env.DEBUG output d604fb6
  • [Dev Deps] update aud, npmignore, tape b3c5f3a
  • [Deps] update array.prototype.tosorted, get-json a7f14a3
  • [Deps] update array.prototype.tosorted, semver ef62c4f
  • [Tests] update tape ce1f74f
  • [Dev Deps] update @ljharb/eslint-config f43fe8a
  • [Tests] skip moderate CVEs 7007576

v0.9.1 - 2023-11-15

Commits

  • [Refactor] extract getGraphEntries a2d6348
  • [Refactor] getGraphEntries: sort output by package name and node version, for determinism 74690d8
  • [Refactor] extract getGraphValids, validVersionsForEngines f6d807e
  • [Refactor] extract getAllVersions 0d0d327
  • [Refactor] some code cleanup ac05eaf
  • [Robustness] getGraphEntries: avoid builtin prototype methods 24f4201
  • [Refactor] use arborist querySelectorAll instead of filtering inventory dc77370
  • [Tests] update fixtures; depd was removed in https://github.com/node-modules/agentkeepalive/pull/114 e5c1783
  • [Deps] update @npmcli/arborist, object.fromentries, object.values, pacote, promise.allsettled, semver, yargs baf84ac
  • [Dev Deps] update @ljharb/eslint-config, aud, tape 71295f2
  • [Refactor] remove unneccesary promise creation when the graph is empty dbc0dde

v0.9.0 - 2023-01-26

Commits

  • [Breaking] default peer to true b3f0334
  • [Refactor] use array.prototype.group bc47c26
  • [eslint] use optional chaining 6922820

v0.8.1 - 2023-01-25

Commits

  • [Fix] sort and dedupe "conflicting dependencies" table e0062e1
  • [Fix] prune, because get-dep-tree isn’t consistently doing it for some reason 1586dbd
  • [Dev Deps] update @ljharb/eslint-config, aud, tape caf240e
  • [Deps] update arborist, get-dep-tree 1908a6b

v0.8.0 - 2022-12-19

Commits

  • [Breaking] drop node 12, update @npmcli/arborist, pacote 6e00358
  • [Tests] update mocks d4c1985
  • [Deps] update @npmcli/arborist, object.fromentries, object.values, pacote, promise.allsettled, table, yargs 1f9c675
  • [Deps] update @npmcli/arborist, get-dep-tree, pacote, semver, yargs 5e93f21
  • [actions] update rebase action dd459a9
  • [Dev Deps] update aud, tape 64fcce4

v0.7.0 - 2022-05-25

Commits

  • [Breaking] output current versions, and computed valid versions, in a table 7336438
  • [Refactor] hard-wrap version lists for readability 50e2d90
  • [Breaking] use >= x instead of "every ^major since x" 87be7c5
  • [Fix] make error output more accurate a069534
  • [New] add hidden engines option 9f3bc8c
  • [Refactor] prepare for multiple engines fec1d47
  • [Breaking] tighten up engines.node; update @npmcli/arborist, @npmcli/run-script, object.fromentries, pacote, promise.allsettled, yargs 803722e
  • [Breaking] get-node-versions: don’t bother with node < 0.4 5f15ebc

v0.6.7 - 2022-05-25

Commits

  • [Tests] actually wire up mocked node versions 3909a65
  • [Tests] fix test bug and actually run all tests 7feb745
  • [Refactor] extract checkEngines 3783795
  • [meta] gitignore npmignore 5113cdc
  • [Tests] make file ops async; hopefully improve test perf 2a48297
  • Revert "[Fix] peg dependency versions due to breaking change in @npmcli/run-script" 1371733
  • [Fix] peg dependency versions due to breaking change in @npmcli/run-script 317e754
  • [Deps] update pacote, yargs 14745f4
  • [Tests] update mocks 171d981
  • [Dependencies] update yargs 4e3b5d2
  • [meta] npmignore test mocks 102fcc4

v0.6.6 - 2022-05-11

Commits

  • [Tests] mock out network requests 5db4055
  • [Refactor] extract checkCurrent d944205
  • [Refactor] extract getLatestMajors 7f94a43
  • [meta] use npmignore to autogenerate an npmignore file deb785c
  • [Deps] update @npmcli/arborist, get-dep-tree, semver, yargs e2dca87
  • [Dev Deps] update @ljharb/eslint-config, tape afefe4b
  • [Deps] update @npmcli/arborist, pacote 8bacc8a

v0.6.5 - 2022-02-10

Fixed

  • [New] show conflicting dependencies #15

Commits

  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape 5846bb4
  • [Deps] update @npmcli/arborist, get-dep-tree, pacote c6e7780

v0.6.4 - 2022-01-16

v0.6.3 - 2022-01-09

Commits

v0.6.2 - 2022-01-08

Commits

  • [Refactor] use lockfile-info cdc8978
  • [actions] reuse common workflows 35ff2de
  • [Refactor] extract getTree to get-dep-tree ce8df4e
  • [Refactor] use colors instead of chalk 43ee3d7
  • [Refactor] use yargs middleware 23717ff
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape ce0053a
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape e6b0051
  • [Dev Deps] update eslint f1d0fbd
  • [Tests] update fixtures 189a56f
  • [Deps] update @npmcli/arborist, table, yargs 0512361
  • [Deps] update @npmcli/arborist, table 7c2caee
  • [Refactor] use the native Promise.allSettled e0c5471
  • [meta] widen engines.node to include > 17 e98705d
  • [Deps] update arborist, table fc0dbb0
  • [Deps] update @npmcli/arborist, yargs 4583633
  • [meta] add package.json to "exports" 977093b

v0.6.1 - 2021-10-21

Commits

  • [New] add node 17 support 9ad8820
  • [Fix] --current is conceptually incompatible with --dev b31c5cf
  • [Fix] prune twice since the first one didn’t take 10ce9a8
  • [Deps] update @npmcli/arborist 2004507

v0.6.0 - 2021-10-16

Commits

  • [Breaking] update @npmcli/arborist, pacote; drop node v15, v14.15, and v14.14 5038746
  • [Dev Deps] update safe-publish-latest 4ec3f67

v0.5.1 - 2021-10-16

Commits

  • [Fix] properly handle the graph and the root being identical c0d5356
  • [readme] add github actions/codecov badges; update URLs 7aaff98
  • [Deps] update @npmcli/arborist, chalk, pacote, promise.allsettled, table, yargs 3732e1c
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog, safe-publish-latest, tape d7c7caf
  • [Tests] add name to lockfiles 1914813
  • [Refactor] getTree: remove unused condition a473170
  • [actions] update codecov uploader 7158bd6
  • [Fix] getTree: null out node.root instead of node.parent b91f667

v0.5.0 - 2021-05-16

Commits

  • [Tests] update lockfiles to version 2 bcfb818
  • [New] add --peer, and ignore peerDeps by default 45af3c7
  • [Tests] add missing lockfile d20d3e7
  • [Tests] add peer-subset-root fixture 3ccd227
  • [Fix] properly denote root/graph subset/superset scenarios efaf119
  • [Refactor] tweak how dev/prod flags are implemented 05510da
  • [Breaking] update yargs; drop non-ESM node; require npm 7 872f413
  • [Deps] update @npmcli/arborist, table 116e5b9
  • [Deps] update @npmcli/arborist, table 6a868e1
  • [Dev Deps] update eslint, @ljharb/eslint-config de9b2fc

v0.4.2 - 2021-05-01

Commits

  • [Tests] update fixtures with node 16 release 7ba62a9
  • [actions] use node/install instead of node/run; use codecov action 3eb8675
  • [Fix] save changes when a new node major comes out 519aec9
  • [Deps] update @npmcli/arborist, chalk, pacote, semver, table 9c3d896
  • [Tests] ensure lockfile output is agnostic to npm < 7 and >= 7 256f258
  • [Dev Deps] update aud, eslint, tape 41ee72e
  • [meta] add safe-publish-latest; use prepublishOnly script for npm 7+ bae44d4

v0.4.1 - 2021-02-19

Commits

  • [Tests] update salita to avoid breaking changes 5001208
  • [Tests] migrate tests to Github Actions a72676e
  • [Tests] run nyc on all tests; use tape runner 0f308a6
  • [Deps] update @npmcli/arborist, pacote, promise.allsettled, semver, table, yargs d2285cf
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape 0432338
  • [Tests] filter out node experimental warnings 6e18a2a
  • [Tests] add GREP filter 2971ddb
  • [readme] fix repo URLs; remove travis badge bb6a0ba
  • [Deps] update @npmcli/arborist eff06be
  • [Deps] update @npmcli/arborist 0e5c2ad
  • [actions] update "Allow Edits" workflow 19ffc20
  • [meta] do not publish github action workflow files 86b5902

v0.4.0 - 2020-10-23

Commits

  • [Tests] add node 15 to snapshots af11fed
  • [actions] add "Allow Edits" workflow 36fa631
  • [meta] create FUNDING.yml b7fca88
  • [Breaking] [Deps] update @npmcli/arborist, yargs bd3fd61
  • [Dev Deps] update eslint 8187d7d
  • [actions] switch Automatic Rebase workflow to pull_request_target event 7c55428

v0.3.5 - 2020-09-30

Commits

  • [Deps] update @npmcli/arborist, pacote, table, yargs e505157
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog 4a6a702

v0.3.4 - 2020-07-13

Fixed

  • [Fix] getNodeVersions: use HTTPS instead of HTTP #21

Commits

  • [Tests] update fixtures to include latest node versions dc162ce
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape 7e63120
  • [Deps] update @npmcli/arborist, chalk, pacote, semver, yargs a9edf0d
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog, tape; add aud 9566ee8
  • [Deps] update arborist, chalk, yargs 8776b51
  • [Deps] update @npmcli/arborist, pacote, semver fb24d15
  • [Deps] update @npmcli/arborist, yargs b614e56
  • [Dev Deps] update auto-changelog, tape 4a33650
  • [meta] only run aud on prod deps 27ff448

v0.3.3 - 2020-02-25

Commits

  • [New] improve “current node version” output 3514176
  • [Tests] update snapshots without explicitly listing node version numbers, so new node releases do not fail tests 3ef994e
  • [Fix] fix message; “engines" is not actually set to "*" 66a93bc
  • [Fix] virtual: when getting the pacote manifest, include the version string 5a85b9b
  • [Tests] further reduce DOS-y behavior by serializing tests 2a0b456
  • [Refactor] make getLatestMajors b64b6e2
  • [Refactor] move prune logic into getTree b9bc293
  • [Refactor] improve “subset” logic; surface errors better e0b586d
  • [Tests] exit codes can be bitwise-ORed together c89e341
  • [Refactor] reveal errors more clearly in the final output rejecteds step caae8dd
  • [Tests] make tests less DOS-y with hitting the npm servers; skip fund and audit npm install steps a1781a2
  • [Refactor] make allVersions construct, by engine 60ae032
  • [Tests] lint bin files too c4ab430
  • [Deps] update arborist, pacote 218d07a
  • [Tests] filter with FIXTURE env var c08358f
  • [Deps] update arborist, pacote e846b2d
  • [Deps] update semver e3cf5ff
  • [Deps] update @npmcli/arborist to latest 16ca3d5

v0.3.2 - 2020-02-08

Commits

  • [Tests] add more tests, more fixtures; run in explicit --dev and --production mode also. 5687f44
  • Tests f969506
  • [Tests] update snapshots with latest node releases fdd6b3e
  • [Fix] "virtual" only works properly with lockfileVersion >= 2 7b432ce
  • [Refactor] avoid using fs.promises ae1095c
  • [Deps] update to the latest version of @npmcli/arborist, pacote a9e095f

v0.3.1 - 2020-02-01

Fixed

  • [Fix] actually read package‘s engines field #4

Commits

  • [Refactor] clean up eslint warnings 7e551d0
  • [readme] fix Travis CI badge 243faab
  • [Deps] update semver ebf72bf

v0.3.0 - 2020-01-31

Commits

  • [Breaking] ignore dev deps by default; add --dev and --production 19d6843

v0.2.1 - 2020-01-31

Commits

  • [Fix] get all latest majors when engines is “*” 8e8fe5b
  • [Fix] add case where what the graph allows is a subset of what the root allows aecfb5c
  • [Refactor] extract exit code constants 712f3fc
  • [Fix] in “virtual” mode, arborist does not return the actual package.json data 90d4d62
  • [Refactor] stylize package.json and node_modules consistently 78a87dc

v0.2.0 - 2020-01-30

Fixed

  • [Breaking] validate root “engines” against graphs’ #2

Commits

  • [Refactor] modularize some things 4e5f311
  • [New] add --save option, to persist ”engines” changes to package.json 467e280
  • Update README.md 16f74f6

v0.1.0 - 2020-01-30

Commits