# Changelog
## [9.0.0](https://github.com/npm/cli/compare/v8.19.2...v9.0.0) (2022-10-19)
### ⚠️ BREAKING CHANGES
* `npm` is now compatible with the following semver range for node: `^14.17.0 || ^16.13.0 || >=18.0.0`
* `npm` will no longer attempt to modify ownership of files it creates
* the presence of auth related settings that are not scoped to a specific registry found in a config file is no longer supported and will throw errors
* `login`, `adduser`, and `auth-type` changes
- legacy auth types `sso`, `saml` & `legacy` have been consolidated into `"legacy"`
- `auth-type` defaults to `"web"`
- `login` and `adduser` are now separate commands that send different data to
the registry.
- `auth-type` config values `web` and `legacy` only try
their respective methods, npm no longer tries them all and waits to see
which one doesn't fail.
* `npm pack` now follows a strict order of operations when applying ignore rules. If a `files` array is present in the `package.json`, then rules in `.gitignore` and `.npmignore` files from the root will be ignored.
* links generated from git urls will now use `HEAD` instead of `master` as the default ref
* `timing` and `loglevel` changes
- `timing` has been removed as a value for `--loglevel`
- `--timing` will show timing information regardless of
`--loglevel`, except when `--silent`
* `--timing` file changes:
- When run with the `--timing` flag, `npm` now writes timing data to a
file alongside the debug log data, respecting the `logs-dir` option and
falling back to `<CACHE>/_logs/` dir, instead of directly inside the
cache directory.
- The timing file data is no longer newline delimited JSON, and instead
each run will create a uniquely named `<ID>-timing.json` file, with the
`<ID>` portion being the same as the debug log.
- Finally, the data inside the file now has three top level keys,
`metadata`, `timers`, and `unfinishedTimers` instead of everything being
a top level key.
* `npm` now outputs some json errors on stdout. Previously `npm` would output all json formatted errors on stderr, making it difficult to parse as the stderr stream usually has logs already written to it. In the future, `npm` will differentiate between errors and crashes. Errors, such as `E404` and `ERESOLVE`, will be handled and will continue to be output on stdout. In the case of a crash, `npm` will log the error as usual but will not attempt to display it as json, even in `--json` mode. Moving a case from the category of an error to a crash will not be considered a breaking change. For more information see npm/rfcs#482.
* deprecate boolean install flags in favor of `--install-strategy`
* deprecate `--global-style`, `--global` now sets `--install-strategy=shallow`
* deprecate `--legacy-bundling`, now sets `--install-strategy=nested`
* `npm config set` will no longer accept deprecated or invalid config options
* `install-links` config defaults to `"true"`
* `node-version` config has been removed
* `npm-version` config has been removed
* `npm access` subcommands have been renamed
* `npm birthday` has been removed
* `npm set-script` has been removed
* `npm bin` has been removed (use `npx` or `npm exec` to execute binaries)
### Features
* [`a09e19d`](https://github.com/npm/cli/commit/a09e19d88f046e54e8d75343883635a1bd056310) [#5696](https://github.com/npm/cli/pull/5696) introduce the `npm config fix` command (@nlf)
* [`d2963c6`](https://github.com/npm/cli/commit/d2963c67b992b9b3b9dd32f6f41cbbe4bcc580c8) explicitly validate config within the cli (@nlf)
* [`a5fec08`](https://github.com/npm/cli/commit/a5fec08348add7e75fa2498e6a9efe608b20aa8b) rewrite: docs generation (@lukekarrys)
* [`9609e9e`](https://github.com/npm/cli/commit/9609e9eed87c735f0319ac0af265f4d406cbf800) [#5605](https://github.com/npm/cli/pull/5605) use v3 lockfiles by default (@fritzy)
* [`3ae796d`](https://github.com/npm/cli/commit/3ae796d937bd36a5b1b9fd6e9e8473b4f2ddc32d) implement new `npm-packlist` behavior (@lukekarrys)
* [`e64d69a`](https://github.com/npm/cli/commit/e64d69aedecc0943425605b3a6dc68aec3ad93aa) [#5581](https://github.com/npm/cli/pull/5581) write eresolve error files to the logs directory (@lukekarrys)
* [`3445da0`](https://github.com/npm/cli/commit/3445da0138f9eed9d73d2b3f5f451fcc1fa2e3fe) timings are now written alongside debug log files (@lukekarrys)
* [`66ed584`](https://github.com/npm/cli/commit/66ed58454418dd69c4cd8196ad8499e73f7e46e1) [#5551](https://github.com/npm/cli/pull/5551) default `auth-type` to `"web"` (@wraithgar)
* [`6ee5b32`](https://github.com/npm/cli/commit/6ee5b320d2eab58c18d50b861b3cfabe7f24124a) query: display `queryContext` in results (@nlf)
* [`314311c`](https://github.com/npm/cli/commit/314311c61b8f341715c168199d52976ee3237077) [#5550](https://github.com/npm/cli/pull/5550) separate `login`/`adduser` & remove unnecessary auth types (@wraithgar)
* [`9c32c6c`](https://github.com/npm/cli/commit/9c32c6c8d6fc5bdfd6af685731fe26920d7e5446) rewrite: `npm access` (@wraithgar)
* [`854521b`](https://github.com/npm/cli/commit/854521baa49ef88ff9586ec2cc5f1fbaee7fa364) rewrite: `libnpmaccess` (@wraithgar)
* [`e95017a`](https://github.com/npm/cli/commit/e95017a07b041cbb3293e659dad853f76462c108) [#5485](https://github.com/npm/cli/pull/5485) feat(workspaces): update supported node engines in `package.json` (@lukekarrys)
* [`de2d33f`](https://github.com/npm/cli/commit/de2d33f3ed42e187803bdd31db4f7a12f08f353c) add `--install-strategy=hoisted|nested|shallow`, deprecate `--global-style`, `--legacy-bundling` (#5709) (@fritzy)
* [`49bbb2f`](https://github.com/npm/cli/commit/49bbb2fb9d56e02d94da652befaa3d445283090b) [#5455](https://github.com/npm/cli/pull/5455) remove `npm birthday` (@wraithgar)
* [`926f0ad`](https://github.com/npm/cli/commit/926f0adbd71949c905932a241a245b78c85ef643) [#5456](https://github.com/npm/cli/pull/5456) remove `npm set-script` (@wraithgar)
* [`2a8c2fc`](https://github.com/npm/cli/commit/2a8c2fcd124ce7d4b23a6c26552d097c6501ac74) [#5458](https://github.com/npm/cli/pull/5458) default `install-links` to `"true"` (@wraithgar)
* [`2e92800`](https://github.com/npm/cli/commit/2e9280072f9852466fa0944d3a0fdb0c8af156a9) [#5459](https://github.com/npm/cli/pull/5459) remove `npm bin` (@wraithgar)
* [`457d388`](https://github.com/npm/cli/commit/457d388c9a70b4bc6c2421f576c79fb7524ff259) [#5475](https://github.com/npm/cli/pull/5475) update supported node engines in package.json (@wraithgar)
* [`46d038f`](https://github.com/npm/cli/commit/46d038f1b3bcee416f324490e9fe3ef9d86254f4) [#5716](https://github.com/npm/cli/pull/5716) output json formatted errors on `stdout` (@lukekarrys)
* [`0a69db4`](https://github.com/npm/cli/commit/0a69db44672ac1b6cf8aa3c129844e4214806f81) [#5719](https://github.com/npm/cli/pull/5719) refuse to set deprecated/invalid config (@wraithgar)
* [`6e4961f`](https://github.com/npm/cli/commit/6e4961f914f77c4004c68dc87c6f8d7c703ecbdf) separate configs for `--timing` and `--loglevel` (@lukekarrys)
* [`6a27a7b`](https://github.com/npm/cli/commit/6a27a7b07128d444735b76597431fcac633fcba6) [#5712](https://github.com/npm/cli/pull/5712) deprecated `key`, `cert` config options and updated registry scoped auth docs (@fritzy)
### Bug Fixes
* [`c3d7549`](https://github.com/npm/cli/commit/c3d75499cfd4e3601c6ca31621b2f693af466c4d) add tag to publish log message (@wraithgar)
* [`a35c784`](https://github.com/npm/cli/commit/a35c784f8c25dce05b4173edd6c3f8e7913d7b50) [#5691](https://github.com/npm/cli/pull/5691) config: remove `node-version` and `npm-version` (@wraithgar)
* [`e4e8ae2`](https://github.com/npm/cli/commit/e4e8ae20aef9e27e57282e87e8757d5b364abb39) libnpmpack: obey `foregroundScripts` (@winterqt)
* [`07fabc9`](https://github.com/npm/cli/commit/07fabc93007495f0926f4dd24b4350c07d92887d) [#5633](https://github.com/npm/cli/pull/5633) `npm link` should override `--install-links` (@fritzy)
* [`02fcbb6`](https://github.com/npm/cli/commit/02fcbb67e6b7cf78cd6dc996570b0ba58132de22) [#5634](https://github.com/npm/cli/pull/5634) ensure `Arborist` constructor gets passed around everywhere for `pacote` (@nlf)
* [`0d90a01`](https://github.com/npm/cli/commit/0d90a011fff411c878ba4b44582f14ef7dbdceb1) [#5480](https://github.com/npm/cli/pull/5480) audit: add a condition to allow third-party registries returning E400 (@juanheyns, Juan Heyns)
* [`41481f8`](https://github.com/npm/cli/commit/41481f8bc1de0fb92a2d6aab3d4a43292d1a1db7) [#5475](https://github.com/npm/cli/pull/5475) attempt more graceful failure in older node versions (@wraithgar)
* [`fc82298`](https://github.com/npm/cli/commit/fc8229824fedcd6ba79608b854e97e30d54958f4) [#5295](https://github.com/npm/cli/pull/5295) `npm hook ls` duplicates hook name prefixes (@gennadiygashev)
* [`3f1fcf0`](https://github.com/npm/cli/commit/3f1fcf054276f7f65e6a78c4d5bc460e7f962e49) account for new `npm-package-arg` behavior (@wraithgar)
* [`353b5bb`](https://github.com/npm/cli/commit/353b5bb92c3f7899526536b597252b44aa8a712d) [#5710](https://github.com/npm/cli/pull/5710) remove `chownr` and `mkdirp-infer-owner` (@nlf)
### Documentation
* [`285b39f`](https://github.com/npm/cli/commit/285b39f8d6915823fb424cca7161a0b445b86bd3) [#5324](https://github.com/npm/cli/pull/5324) add documentation for expanded `:semver` selector (@nlf)
* [`fd0eebe`](https://github.com/npm/cli/commit/fd0eebe4c2b55dd69972aff7de1b4db14ea6799a) update registry docs header (@hughlilly)
* [`542efdb`](https://github.com/npm/cli/commit/542efdb0a31f663cd899bc6d2ddad8fa88c20bc8) update `folders` page for modern npm (@shalvah)
* [`f37caad`](https://github.com/npm/cli/commit/f37caad9e92c50ae949014f6bee6375d9299fb39) [#5606](https://github.com/npm/cli/pull/5606) accurately describe `install-links` effect on relative paths (@lukekarrys)
* [`130bc9f`](https://github.com/npm/cli/commit/130bc9fb31fcff956765493a9e3cec668867c30e) [#5626](https://github.com/npm/cli/pull/5626) remove circular reference (#5626) (@giovanniPepi)
* [`f0e7584`](https://github.com/npm/cli/commit/f0e758494698d9dd8a58d07bf71c87608c36869e) [#5601](https://github.com/npm/cli/pull/5601) update docs/logging for new `--access` default (@wraithgar)
* [`2d756cb`](https://github.com/npm/cli/commit/2d756cbb05125dcb769f2ca4c1687e42568d5882) [#5527](https://github.com/npm/cli/pull/5527) add instruction to query objects with `npm view` (@moonith)
* [`8743366`](https://github.com/npm/cli/commit/874336699681ac37857167b2438fac19c059511c) [#5519](https://github.com/npm/cli/pull/5519) add hash to "tag" config link (@mrienstra, @lukekarrys)
* [`5645c51`](https://github.com/npm/cli/commit/5645c51410a730c4b9c6831cf81ab22efbe8c0ce) [#5521](https://github.com/npm/cli/pull/5521) link mentions of config parameters (@mrienstra)
* [`19762b4`](https://github.com/npm/cli/commit/19762b4ac4b10741ff53ddd315be1fd23d9b1e28) [#5529](https://github.com/npm/cli/pull/5529) modify misleading doc about bins (@Hafizur046)
* [`19762b4`](https://github.com/npm/cli/commit/19762b4ac4b10741ff53ddd315be1fd23d9b1e28) [#5529](https://github.com/npm/cli/pull/5529) modify misleading doc about package.json:bin (@Hafizur046)
* [`8402fd8`](https://github.com/npm/cli/commit/8402fd8780c5e0461850da882dca024f7df1a681) [#5547](https://github.com/npm/cli/pull/5547) add `:outdated` pseudo selector to docs (@nlf)
### Dependencies
[`df77a1f`](https://github.com/npm/cli/commit/8402fd8780c5e0461850da882dca024f7df1a681) [#5707](https://github.com/npm/cli/pull/5707#issuecomment-1283770746) Update Major Versions of Dependencies
#### Updated:
- `@npmcli/config@6.0.1`
- `@npmcli/disparity-colors@3.0.0`
- `@npmcli/git@4.0.1`
- `@npmcli/installed-package-contents@2.0.0`
- `@npmcli/map-workspaces@3.0.0`
- `@npmcli/metavuln-calculator@5.0.0`
- `@npmcli/move-file@3.0.0`
- `@npmcli/node-gyp@3.0.0`
- `@npmcli/package-json@3.0.0`
- `@npmcli/promise-spawn@4.0.0`
- `@npmcli/query@3.0.0`
- `@npmcli/run-script@5.0.0`
- `bin-links@4.0.1`
- `cacache@17.0.1`
- `ignore-walk@6.0.0`
- `init-package-json@4.0.1`
- `json-parse-even-better-errors@3.0.0`
- `make-fetch-happen@11.0.1`
- `normalize-package-data@5.0.0`
- `npm-audit-report@4.0.0`
- `npm-install-checks@6.0.0`
- `npm-packlist@7.0.1`
- `npm-pick-manifest@8.0.1`
- `npm-profile@7.0.1`
- `npm-registry-fetch@14.0.2`
- `npmlog@7.0.0`
- `pacote@15.0.1`
- `parse-conflict-json@3.0.0`
- `proc-log@3.0.0`
- `read-package-json-fast@3.0.1`
- `read-package-json@6.0.0`
- `ssri@10.0.0`
- `treeverse@3.0.0`
- `validate-npm-package-name@5.0.0`
- `write-file-atomic@5.0.0`
#### Removed:
- `@npmcli/fs`