パッケージの詳細

yarn-audit-fix

antongolub317.3kMIT10.1.1

The missing yarn audit fix

yarn-audit-fix, yarn audit fix, audit, vulnerability

readme

Yarn audit fix

yarn-audit-fix

CI Maintainability Test Coverage Sonar Known Vulnerabilities Downloads npm (tag)

The missing yarn audit fix

Digest

Problem

  1. yarn audit detects vulnerabilities, but cannot fix them. Authors suggest using Dependabot or Snyk for security patches. Well, it is very inconvenient in some situations, to say the least of it. The discussion: yarn/issues/7075.
  2. yarn audit does not support custom (in-house, internal) registries. Here are the issue & PR which have not yet received the green light.

Solution

Fortunately, there are several workarounds:

  1. Compose npm audit fix with lockfile converter (thanks to Gianfranco P., stackoverflow/60878037). yarn-audit-fix --flow=convert just reproduces these steps with minimal changes. More details: dev.to/yarn-audit-fix-workaround
  2. Fetch yarn/npm audit --json advisories and patch lockfile inners (kudos to G. Kosev, code reference). yarn-audit-fix --flow=patch. Full description: dev.to/yarn-audit-fix-for-yarn-2-berry

Key features

  • Works with Yarn 1 Classic & Yarn v2+ lockfiles (⚠️ experimental)
  • A couple of strategies to fix security issues
  • macOS / Linux / Windows support
  • CLI / JS API
  • TS and flow typings

Getting started

Requirements

Node.js: >=16.0.0

Install

```shell script $ yarn add yarn-audit-fix -D

or even better

npm_config_yes=true npx yarn-audit-fix


### CLI
<pre>
$ yarn-audit-fix [--opts]

<b>Preparing temp assets...</b>
<b>Generating package-lock.json from yarn.lock...</b>
<b>Applying npm audit fix...</b>
<b>invoke</b> npm audit fix --package-lock-only
added 14 packages, removed 195 packages and updated 1245 packages in 4.795s
fixed 3 of 26 vulnerabilities in 1370 scanned packages
  23 vulnerabilities required manual review and could not be updated
<b>Updating yarn.lock from package-lock.json...</b>
<b>invoke</b> yarn import
info found npm package-lock.json, converting to yarn.lock
warning synp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning tslint-config-qiwi > tslint-react@5.0.0: tslint-react is deprecated along with TSLint
warning @qiwi/libdefkit > @types/read-pkg@5.1.0: This is a stub types definition. read-pkg provides its own type definitions, so you do not need this installed.
...
success Saved lockfile.
<b>invoke</b> yarn
[1/4] 🔍  Resolving packages...
success Already up-to-date.
<b>Done</b>
</pre>
| Option                | Description                                                                                                                                                             | Default                                    | with `--flow=convert` only | 
|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|----------------------------|
| `--flow`              | Define how `yarn.lock` is modified. `convert` — to compose `npm audit fix` with two-way lockfile conversion (legacy flow). `patch` — to directly inject audit json data | `patch`                                    |                            |
| `--audit-level`       | Include a vulnerability with a level as defined or higher. Supported values: low, moderate, high, critical                                                              | `low`                                      |                            |
| `--cwd`               | Current working dir                                                                                                                                                     | `process.cwd()`                            |                            |
| `--dry-run`           | Get an idea of what audit fix will do                                                                                                                                   |                                            |                            |
| `--force`             | Have audit fix install semver-major updates to toplevel dependencies, not just semver-compatible ones                                                                   | `false`                                    |                            |
| `--help/-h`           | Print help message                                                                                                                                                      |                                            |                            |
| `--legacy-peer-deps`  | Accept an incorrect (potentially broken) deps resolution                                                                                                                |                                            | ✔                          |
| `--loglevel`          | Set custom [log level](https://docs.npmjs.com/cli/v7/using-npm/config#loglevel)                                                                                         |                                            | ✔                          |
| `--npm-path`          | Switch to project's local **npm** version instead of system default. Or provide a custom path. `system / local / <custom path>`                                         | `system`                                   |                            |
| `--only`              | Set package [update scope](https://docs.npmjs.com/cli/v7/using-npm/config#only): `dev`/`prod`                                                                           |                                            |                            |
| `--package-lock-only` | Run audit fix without modifying `node_modules`. Highly recommended to **enable**.                                                                                       | `true`                                     | ✔                          |
| `--registry`          | Custom registry url                                                                                                                                                     |                                            | ✔                          |
| `--silent`            | Disable log output                                                                                                                                                      | `false`                                    |                            |
| `--symlink`           | Symlink type for `node_modules` ref                                                                                                                                     | `junction` for Windows, `dir` otherwise    |                            |
| `--temp`              | Directory for temporary assets                                                                                                                                          | `<cwd>/node_modules/.cache/yarn-audit-fix` |                            |
| `--verbose`           | Switch log level to verbose/debug                                                                                                                                       | `false`                                    |                            |
| `--exclude`           | Array of glob patterns of packages to exclude from audit                                                                                                                |                                            |                            |
| `--ignore`            | Array of glob patterns of advisory IDs to ignore in the audit report                                                                                                    |                                            |                            |

### ENV
All mentioned above CLI options can be replaced with the corresponding env variables with leading **YAF** prefix. For example:
* `YAF_FORCE` equals `--force`
* `YAF_ONLY=prod``--only=prod`

### JS API
**yarn-audit-fix** is a naive and optimistic workaround, so it exposes all of its inners to give anybody a chance to tweak up and find a better steps combination.
Typedoc: [https://antongolub.github.io/yarn-audit-fix/modules/](https://antongolub.github.io/yarn-audit-fix/modules/)

```ts
import { run, runSync } from 'yarn-audit-fix'

// NOTE actually it's promisified `run.sync`
await run({
   flow: 'patch',
   verbose: true
})

// `runSync` is an alias for `run.sync`
await runSync({
  flow: 'patch',
  verbose: true
})

Build and run custom flows.

import {
   clear,
   exit,
   patchLockfile,
   yarnInstall
} from 'yarn-audit-fix'

export const flow: TFlow = {
  main: [
    [
      'Patching yarn.lock with audit data...',
      patchLockfile,
      (...args) => {console.log('Smth interesting:', ...args)},
      yarnInstall,
    ],
    ['Done'],
  ],
  fallback: [['Failure!', exit]],
}

await run({}, flow)

Migration notes

^10.0.0

v10 bumps the pkg deps and requires NodeJS v14.

^9.0.0

v9 brings experimental Yarn 2+ lockfiles support, so the previous behaviour (when yaf parsing failure may be used to detect them) has been changed.

^8.0.0

From v8 the library does not contain npm dependency, so the system default is used instead. If necessary you can:

  • Install the required npm version and provide a custom path via CLI / ENV / JS API
  • Use a pinch of npx magic: npm_config_yes=true YAF_NPM_PATH=local npx -p yarn-audit-fix -p npm@8 -c yarn-audit-fix

^7.0.0

Following the deps, converted to ESM. So legacy require API has been dropped since v7.0.0. Use the shiny new import instead or try your luck with esm-hook. CLI works as before.

// const {run} = require('yarn-audit-fix') turns into
import {run} from 'yarn-audit-fix'

^6.0.0

Default fix strategy has been changed to direct lockfile patching with yarn audit --json data. To use the previous legacy flow, pass --flow=convert option to CLI.

^4.0.0

--npm-v7 flag is redundant. From v4.0.0 package's own version of npm is used by default. But you're still able to invoke system default with --npm-path=system or define any custom --npm-path=/another/npm/bin.

Troubleshooting

DoS vulnerability for colors 1.4.x

If you have installed yaf between 7...11 of Jan 2022 and ran it with --flow=convert option, you might see an endless garbage loop in stdout. The problem was caused by the transitive dep: yarn-audit-fix → synp → colors@^1.4.0. Reasons and details: issues/218, snykvuln/2331906.
How to fix? There are 3 ways:

  • Update yarn-audit-fix to >=9.0.5
  • Pin colors version in your lockfile to 1.4.0
  • Reinstall yarn-audit-fix. It looks like npm has already removed the vulnerable versions of colors from the registry, 2022-01-11.

yarn-audit-fix version x.x.x is out of date

npm_config_yes=true npx yarn-audit-fix --audit-level=moderate
Runtime digest
yarn-audit-fix version 4.3.6 is out of date. Install the latest 6.0.0 for better results

npx caches previously loaded packages, so you need one of:

  1. Define version to load: npm yarn-audit-fix@6.0.0
  2. Reset npx cache. For Mac/Linux: rm -rf ~/.npm/_npx

yarn-audit-fix command not found

After installation, the package may not be found. This is probably an issue with $PATH finding node_modules/.bin contents or smth like that (npm/issues/957). A bit annoying, but it's easy to handle in several ways.

  • You're able to run the cmd through yarn: yarn yarn-audit-fix.
  • Simply invoke node_modules/.bin/yarn-audit-fix script.

enoent: no such file or directory

In some cases npm audit fix makes node_modules to become inconsistent. This is expected. yarn and npm organize the directory space slightly differently.

npm WARN rm not removing /Users/antongolub/projects/queuefy/node_modules/.cache/yarn-audit-fix/node_modules/npm/node_modules/.bin/node-gyp as it wasn't installed by /Users/antongolub/projects/queuefy/node_modules/.cache/yarn-audit-fix/node_modules/npm/node_modules/node-gyp
npm WARN rm not removing /Users/antongolub/projects/queuefy/node_modules/.cache/yarn-audit-fix/node_modules/npm/node_modules/.bin/uuid as it wasn't installed by /Users/antongolub/projects/queuefy/node_modules/.cache/yarn-audit-fix/node_modules/npm/node_modules/uuid
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/antongolub/projects/queuefy/node_modules/.cache/yarn-audit-fix/node_modules/@qiwi/libdefkit/node_modules/flowgen/lib/cli/index.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/antongolub/projects/queuefy/node_modules/.cache/yarn-audit-fix/node_modules/@qiwi/libdefkit/node_modules/flowgen/lib/cli/index.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR!     /Users/antongolub/.npm/_logs/2020-08-23T07_09_26_924Z-debug.log
{
  status: 254,
  signal: null,
  output: [ null, null, null ]

Let's try this workaround:

  1. Restore the original node_modules state. yarn --force or rm-rf node_modules && yarn.
  2. Apply npx yarn-audit-fix --package-lock-only. The last param should instruct npm not to modify node_modules contents.

--force did not force the update

The problem only concerns repositories with workspaces (monorepos). npm audit fix --force throws 1 status code and suggests running npm audit fix --force. This quite ironic behaviour is exactly what npm (arborist) does now.

$$ yarn-audit-fix --force          
 Preparing temp assets...
 Generating package-lock.json from yarn.lock...
 Applying npm audit fix...
 invoke /home/qwelias/.nvm/versions/node/v12.18.1/lib/node_modules/yarn-audit-fix/node_modules/.bin/npm audit fix --package-lock-only --force --prefix=/home/qwelias/prj/stuff/test-yarn-audit-fix/node_modules/.cache/yarn-audit-fix
 npm WARN using --force Recommended protections disabled.
 npm WARN audit Updating lodash to 4.17.20,which is outside your stated dependency range.
 npm WARN audit Manual fix required in linked project at ./packages/bar for lodash@<=4.17.18.
 npm WARN audit 'cd ./packages/bar' and run 'npm audit' for details.
 npm WARN audit Manual fix required in linked project at ./packages/foo for lodash@<=4.17.18.
 npm WARN audit 'cd ./packages/foo' and run 'npm audit' for details.

 up to date, audited 7 packages in 2s

 # npm audit report

 lodash  <=4.17.18
 Severity: high
 Prototype Pollution - https://npmjs.com/advisories/782
 Prototype Pollution - https://npmjs.com/advisories/1065
 fix available via `npm audit fix --force`
 Will install lodash@4.17.20, which is outside the stated dependency range
 packages/bar/node_modules/lodash
 packages/foo/node_modules/lodash

 1 high severity vulnerability

 To address all issues, run:
   npm audit fix --force
 {
   status: 1,
   signal: null,
   output: [ null, null, null ],
   pid: 176019,
   stdout: null,
   stderr: null
 }

So you need, as the message says, to manually change the dependency versions. npm@7 is still in beta, perhaps this logic will be changed later. In some cases npm@6 works better, so if you have such a version installed on your system, you may try:

npx yarn-audit-fix --npm-path=system --flow=convert

You may also try to cast the optimistic flags combo

npx yarn-audit-fix --package-lock-only=false --force --legacy-peer-deps --flow=convert

Unfortunately, even this invocation may return something like:

# npm audit report

hosted-git-info  <3.0.8
Severity: moderate
Regular Expression Deinal of Service - https://npmjs.com/advisories/1677
No fix available
node_modules/normalize-package-data/node_modules/hosted-git-info
  normalize-package-data  2.0.0 - 2.5.0
  Depends on vulnerable versions of hosted-git-info
  node_modules/normalize-package-data
    meow  3.4.0 - 9.0.0
    Depends on vulnerable versions of normalize-package-data
    Depends on vulnerable versions of read-pkg-up

No fix available just means that no fix available. If you still doubt the correctness of the output, you can check it by hand.

npm i --package-lock-only
npm audit fix --package-lock-only --force

Same response for alternative patching flow:

npm_config_yes=true npx yarn-audit-fix --audit-level=moderate --flow=patch
Patching yarn.lock with audit data...
invoke yarn audit --json --level moderate
Can't find patched version that satisfies postcss@^7.0.0 in >=8.2.10
Can't find patched version that satisfies postcss@^7.0.1 in >=8.2.10
Can't find patched version that satisfies postcss@^7.0.27 in >=8.2.10
Can't find patched version that satisfies ws@^7.2.3 in >=6.2.2 <7.0.0 || >=7.4.6
Upgraded deps: <none>
invoke yarn --update-checksums

Not everything can be repaired, alack.

Cannot install package despite being on correct node version

yarn-audit-fix is compatible with any NodeJS version which supports ESM, but the nested packages can define their own engine requirements.

pkg-dir@7.0.0: The engine "node" is incompatible with this module. Expected version ">=14.16". Got "14.15.1"

The recommended way is to update the runtime version. As a temporary workaround, you can simply pass --ignore-engines flag.

yarn add yarn-audit-fix -D --ignore-engines

Response Code: 400 (Bad Request)

In some cases yarn npm audit fails because the yarn.lock file contains a transitive dependency in unreadable format:

  'example-dependency': 'npm:example-dependency@1.0.0'

This will results in:

invoke yarn npm audit --all --json --recursive
➤ YN0035: Bad Request
➤ YN0035:   Response Code: 400 (Bad Request)
➤ YN0035:   Request Method: POST
➤ YN0035:   Request URL: https://registry.yarnpkg.com/-/npm/v1/security/audits/quick

https://github.com/yarnpkg/berry/issues/4117

A workaround is available using the exclude option:

  1. Update project yarn to >=3.3.0 (lower version doesn't support this parameter for yarn npm audit).
  2. Apply npx yarn-audit-fix --exclude example-dependency. This will cause yarn to ignore example-dependency while creating the audit report.

Contributing

Feel free to open any issues: bugs, feature requests or other questions. You're always welcome to suggest a PR. Just fork this repo, write some code, add some tests and push your changes. Any feedback is appreciated.

License

MIT

更新履歴

10.1.1 (2024-11-29)

Fixes & improvements

  • fix: up deps to fix cross-spawn vuln (faafdeb)

10.1.0 (2024-10-26)

Features

  • feat: use "exclude" and "ignore" CLI options when running yarn npm audit command (015a4b9)
  • feat: support multi-value CLI options (2664c66)

10.0.9 (2024-08-21)

Fixes & improvements

  • fix(deps): update dependency commander to v12 (3fe23a1)

10.0.8 (2024-08-06)

Fixes & improvements

  • fix: apply object key sort to npm view deps output (#336) (106229b)
  • fix: set shell true to handle sec fix for windows (#335) (6a29f1c)

10.0.7 (2023-11-23)

Fixes & improvements

  • fix(deps): update dependency commander to v11 (1cd29fa)

10.0.6 (2023-11-22)

Fixes & improvements

  • refactor: use os.temp() instead of find-cache-dir (85776a0)
  • fix: rm find-up and pkg-dir from deps to bring back nodejs 16 support (5ac29c1)

10.0.5 (2023-11-16)

Fixes & improvements

  • fix(deps): update dependency find-up to v7 (284fb63)

10.0.4 (2023-11-04)

Fixes & improvements

  • fix(deps): update dependency pkg-dir to v8 (9b5feac)

10.0.3 (2023-11-02)

Fixes & improvements

10.0.2 (2023-11-02)

Fixes & improvements

  • docs: mention presentation at HolyJS 2022 (b1641f0)

10.0.1 (2023-08-25)

Fixes & improvements

  • fix(deps): update dependency find-cache-dir to v5 (0c7a0eb)

10.0.0 (2023-08-05)

Fixes & improvements

  • perf: deps revision (5ec15c0)
  • perf: improve exceptions logging on empty stderr (ea3e501)

BREAKING CHANGES

  • following the deps, require Node.js v14 (5ec15c0)

9.3.12 (2023-06-16)

Bug Fixes

  • rollback commander, fix some sonar issues (f1a9893)

9.3.11 (2023-06-16)

Bug Fixes

  • deps: update dependency commander to v11 (2e8aa88)

9.3.10 (2023-03-21)

Bug Fixes

9.3.9 (2023-02-21)

9.3.6 (2022-09-22)

Performance Improvements

9.3.5 (2022-08-11)

9.3.4 (2022-08-11)

Performance Improvements

9.3.3 (2022-07-27)

Performance Improvements

9.3.2 (2022-06-20)

Performance Improvements

9.3.1 (2022-04-25)

Performance Improvements

  • update tslib, update jest (0a96659)

9.3.0 (2022-04-21)

Features

9.2.4 (2022-04-15)

Bug Fixes

  • fix gh-pages publishing (1179475)

9.2.3 (2022-04-15)

Performance Improvements

9.2.2 (2022-04-03)

9.2.1 (2022-03-20)

Performance Improvements

9.2.0 (2022-03-14)

Features

  • print version via -v and --version flags (fc2fe73)

9.1.3 (2022-03-14)

Performance Improvements

9.1.2 (2022-02-20)

Performance Improvements

9.1.1 (2022-02-20)

Performance Improvements

9.1.0 (2022-02-20)

Features

  • improve logging for cp.spawn errors (b6ef812)

9.0.11 (2022-02-11)

Bug Fixes

  • re-add flow-typings, update deps (f8efc83)

9.0.10 (2022-01-29)

Bug Fixes

  • deps: update dependency commander to v9 (a943204)

9.0.9 (2022-01-24)

Bug Fixes

  • deps: update dependency globby to v13 (b991173)

9.0.8 (2022-01-20)

9.0.7 (2022-01-18)

Bug Fixes

  • update deps, fix some vuls (9f0b743)

9.0.6 (2022-01-11)

9.0.5 (2022-01-10)

9.0.4 (2021-12-15)

Bug Fixes

  • do not require node_modules (yarn pnp) (e3d333a)

9.0.3 (2021-12-13)

Bug Fixes

  • raise an error if v2 audit report fails (b04900b)

9.0.2 (2021-12-13)

Bug Fixes

  • add a symlink for .yarn assets (7898410)

9.0.1 (2021-12-13)

9.0.0 (2021-12-11)

BREAKING CHANGES

  • `enabled experimental Yarn 2+ lockfiles support

9.0.0 (2021-12-11)

Documentation

  • readme: mention v9 changes (6c0ae5c)

Features

  • provide experimental lockfile v2 (yarn berry) support (0243562)
  • use yarn2 if exists as audit provider (0f1537b)

BREAKING CHANGES

  • readme: enabled experimental Yarn 2+ lockfiles support

8.0.1 (2021-12-02)

8.0.0 (2021-12-02)

Bug Fixes

  • fix npm-path cli default option value (2c58a9b)

Features

BREAKING CHANGES

  • dropped npm dependency

7.2.3 (2021-11-27)

7.2.2 (2021-11-18)

Bug Fixes

  • deps: update dependency npm to v8.1.4 (c9644a0)

7.2.1 (2021-11-14)

7.2.0 (2021-11-05)

Bug Fixes

  • deps: update npm to v8.1.3 (d087c41)
  • use cwd on temp assets generation (ae2f7f4)

Features

  • verify package structure (93b254a)

7.1.5 (2021-11-01)

Bug Fixes

  • lockfile: override internal strip-ansi/ansi-regex to v5.0.1 (2b62278), closes #199
  • update synp to v1.9.8 (fe13f4c)

7.1.4 (2021-10-28)

Bug Fixes

  • deps: update dependency npm to v8.1.2 (2c3ea93)

7.1.3 (2021-10-23)

Bug Fixes

7.1.2 (2021-10-15)

Bug Fixes

  • deps: update dependency npm to v9.0.0 (c685ade)

7.1.1 (2021-10-12)

Bug Fixes

  • deps: update dependency typescript to v4.4.4 (#195) (3a4d217)

7.1.0 (2021-10-11)

Bug Fixes

  • deps: update dependency npm to v8 (6a07aa2)
  • deps: update npm to v8.0.0 (b54cc7a)

Features

7.0.8 (2021-10-04)

Bug Fixes

  • deps: update dependency npm to v7.24.2 (2c5728b)

7.0.7 (2021-10-02)

7.0.6 (2021-10-02)

Performance Improvements

  • update pkg-dir to v6.0.0 (3b54abb)

7.0.5 (2021-09-28)

Bug Fixes

  • deps: update dependency npm to v7.24.1 (28cd8c0)

7.0.4 (2021-09-17)

Bug Fixes

  • deps: update dependency npm to v7.24.0 (af0d80f)

7.0.3 (2021-09-13)

7.0.2 (2021-09-10)

Bug Fixes

  • package: add missed prod dep find-up (6fa6d8f), closes #179

7.0.1 (2021-09-09)

Bug Fixes

  • deps: update dependency npm to v7.23.0 (961db82)

7.0.0 (2021-09-08)

Features

BREAKING CHANGES

  • require Node.js ^12.20.0 || ^14.13.1 || >=16.0.0

6.4.4 (2021-09-02)

Bug Fixes

  • deps: update dependency npm to v7.22.0 (41d96bb)

6.4.3 (2021-08-27)

Bug Fixes

  • deps: update dependency npm to v7.21.1 (5bdd62a)

6.4.2 (2021-08-19)

Bug Fixes

  • deps: update dependency npm to v7.21.0 (17ac930)

6.4.1 (2021-08-12)

Bug Fixes

  • deps: update dependency npm to v7.20.6 (466d90c)

6.4.0 (2021-08-11)

Features

6.3.11 (2021-08-05)

Bug Fixes

  • deps: update dependency npm to v7.20.5 (20139ae)

6.3.10 (2021-08-05)

Bug Fixes

  • deps: update dependency npm to v7.20.4 (fc22980)

6.3.9 (2021-08-05)

Bug Fixes

  • deps: update dependency npm to v7.20.3 (51efa05)

6.3.8 (2021-07-27)

Bug Fixes

  • deps: update dependency npm to v7.20.2 (0a4bbb8)

6.3.7 (2021-07-22)

Bug Fixes

  • deps: update dependency npm to v7.20.1 (7c3d340)

6.3.6 (2021-07-15)

Bug Fixes

  • deps: update dependency npm to v7.20.0 (32782c6)

6.3.5 (2021-07-01)

Bug Fixes

  • deps: update dependency npm to v7.19.1 (874c4bb)

6.3.4 (2021-06-25)

Bug Fixes

  • deps: update dependency commander to v8 (9089a71)

6.3.3 (2021-06-24)

Bug Fixes

  • deps: update dependency npm to v7.19.0 (a8d93f9)

6.3.2 (2021-06-17)

Bug Fixes

  • deps: update dependency npm to v7.18.1 (ca918be)

6.3.1 (2021-06-12)

6.3.0 (2021-06-12)

Bug Fixes

  • avoid ERR_UNHANDLED_REJECTION for CLI (a397a7a)

Features

  • handle --dry-run option in --flow=patch mode (8fc5db6)

6.2.3 (2021-06-10)

Bug Fixes

  • deps: update dependency npm to v7.17.0 (051d19c)

6.2.2 (2021-06-07)

Bug Fixes

  • apply yarn install step to cwd not tmp (61bd639)

6.2.1 (2021-06-06)

Bug Fixes

6.2.0 (2021-06-06)

Features

  • force option for patch flow (0bfc6bc)
  • runner: provide custom flows execution (bf8be9c)

6.1.0 (2021-06-06)

Bug Fixes

  • set patch flow as default for getFlow helper (517b71b)

Features

6.0.0 (2021-06-06)

Bug Fixes

Features

  • add lockfile patching flow (b01dd0d)
  • add npm-yarn flag mapping (a6f942b)
  • set patch flow as default (ed22952)

BREAKING CHANGES

  • yaf uses yarn audit json data by default, see --flow option notes for details

5.0.5 (2021-06-03)

Bug Fixes

  • deps: update dependency npm to v7.16.0 (5410407)

5.0.4 (2021-06-01)

Bug Fixes

  • deps: update dependency npm to v7.15.1 (1077fdb)

5.0.3 (2021-05-27)

Bug Fixes

  • deps: update dependency npm to v7.15.0 (a3f32bc)

5.0.2 (2021-05-25)

Performance Improvements

5.0.1 (2021-05-20)

Bug Fixes

  • deps: update dependency npm to v7.14.0 (0244d5f)

5.0.0 (2021-05-16)

chore

BREAKING CHANGES

  • 'junction' is default symlink type for Windows, use --symlink flag to override

4.3.6 (2021-05-14)

Bug Fixes

  • handle symlink CLI option (ef225ca)

4.3.5 (2021-05-13)

Bug Fixes

  • deps: update dependency npm to v7.13.0 (f30d2be)

4.3.4 (2021-05-10)

Bug Fixes

  • deps: update dependency npm to v7.12.1 (7a8a7e7)

4.3.3 (2021-05-08)

Bug Fixes

  • deps: update npm to v7.12.0 (d8d0eb5)

4.3.2 (2021-05-04)

4.3.1 (2021-05-03)

Bug Fixes

  • deps: update dependency fs-extra to v10 (96cb87a)

4.3.0 (2021-05-01)

Bug Fixes

  • deps: update dependency npm to v7.11.2 (b794cb5)

Features

4.2.4 (2021-04-24)

Bug Fixes

  • deps: update dependency npm to v7.11.1 (7c40684)

4.2.3 (2021-04-23)

Bug Fixes

4.2.2 (2021-04-23)

Bug Fixes

  • deps: update dependency npm to v7.11.0 (65cc1d5)

4.2.1 (2021-04-15)

Bug Fixes

  • deps: update dependency npm to v7.10.0 (8732f1d)

4.2.0 (2021-04-11)

Features

4.1.9 (2021-04-08)

Bug Fixes

  • deps: update dependency npm to v7.9.0 (509ca55)

4.1.8 (2021-04-08)

4.1.7 (2021-04-01)

Bug Fixes

  • deps: update dependency npm to v7.8.0 (3f1cb9c)

4.1.6 (2021-04-01)

Bug Fixes

  • fix older version detection (81bbce8), closes #96

Performance Improvements

4.1.5 (2021-03-30)

Bug Fixes

  • deps: update dependency npm to v7.7.6 (5258e82)

4.1.4 (2021-03-26)

Bug Fixes

4.1.3 (2021-03-26)

Bug Fixes

  • deps: update dependency npm to v7.7.5 (5495c19)

4.1.2 (2021-03-25)

Bug Fixes

  • deps: rollback npm to 7.7.3 (04b0f63)

4.1.1 (2021-03-25)

Performance Improvements

4.1.0 (2021-03-24)

Features

  • warn if yaf is out of date (6ac2bd1), closes #82

4.0.0 (2021-03-24)

Bug Fixes

  • cli: fix env options resolution (2adb481)
  • rm duplicated cli options (481ce14)

Features

  • add cli guard (7eb3034)
  • provide env directives (6a61668)
  • use npm v7 by default, introduce npm-path flag (7b723d1)

BREAKING CHANGES

  • unsupported flag raises an error. See v3 to v4 migration guide in README.md
  • --npm-v7 directive is no longer supported. Follow v3 to v4 migration guide in README.md

3.3.3 (2021-03-22)

Bug Fixes

  • deps: up deps, fix vuls (8fe3bbf)

3.3.2 (2021-03-14)

Performance Improvements

  • deps: update npm to v7.6.3 (cdb5bae)

3.3.1 (2021-03-03)

Performance Improvements

  • package: up npm to v7.6.0 (49e3851)

3.3.0 (2021-02-21)

Features

  • replace bash-glob with globby (do not require bash to be installed) (c2999ee)
  • use separate temp dir for each exec context (7f24b51), closes #45

3.2.16 (2021-02-13)

Performance Improvements

3.2.15 (2021-02-10)

Performance Improvements

3.2.14 (2021-02-06)

Performance Improvements

  • package: up deps, fix vuls (dd62654)

3.2.13 (2020-12-08)

Performance Improvements

  • package: up deps, fix known vuls (972d883)

3.2.12 (2020-10-30)

Bug Fixes

  • package: up deps, fix vuls (067b03c)

3.2.11 (2020-10-17)

Bug Fixes

3.2.10 (2020-10-16)

Bug Fixes

  • deps: update dependency npm to v7.0.1 (57317f2)

3.2.9 (2020-10-13)

Bug Fixes

  • deps: update dependency npm to v7.0.0 (124a1ce)

3.2.8 (2020-10-10)

Bug Fixes

  • deps: update dependency npm to v7.0.0-rc.4 (294716a)

3.2.7 (2020-10-07)

Bug Fixes

  • deps: update dependency npm to v7.0.0-rc.3 (c23fc56)

3.2.6 (2020-10-03)

Bug Fixes

  • deps: update dependency npm to v7.0.0-rc.2 (5ae4cf4)

3.2.5 (2020-10-02)

Bug Fixes

  • deps: update dependency npm to v7.0.0-rc.1 (4a16e51)

3.2.4 (2020-10-01)

Bug Fixes

3.2.3 (2020-09-30)

Bug Fixes

  • check bash to be installed (required by bash-glob) (#47) (278cef8)

3.2.2 (2020-09-29)

Bug Fixes

  • deps: update dependency npm to v7.0.0-beta.13 (#46) (f794c49)

3.2.1 (2020-09-27)

Bug Fixes

  • up synp, fix consistency issues (5cc1e15)

3.2.0 (2020-09-26)

Features

  • provide temp dir customization (d3eda24), closes #42

3.1.0 (2020-09-26)

Features

  • handle .npmrc .yarnrc if exist (55340c3), closes #34
  • handle registry flag (71d9ba1), closes #34
  • let --npm-v7 flag be applied to regular repos (2e648fd)

3.0.4 (2020-09-22)

Bug Fixes

  • deps: update dependency npm to v7.0.0-beta.12 (0cc556c)

3.0.3 (2020-09-17)

Performance Improvements

3.0.2 (2020-09-16)

Bug Fixes

  • deps: update dependency npm to v7.0.0-beta.11 (761b3f1)

3.0.1 (2020-09-12)

Bug Fixes

3.0.0 (2020-09-12)

Bug Fixes

  • fix npm resolving when launched through npx (e1339e2), closes #32

Features

BREAKING CHANGES

  • --inherit-npm flag was replaced with --npm-v7

2.3.0 (2020-09-12)

Features

2.2.4 (2020-09-08)

Performance Improvements

  • deps: up npm to 7.0.0-beta.10 (84ff0a8)

2.2.3 (2020-09-04)

Performance Improvements

2.2.2 (2020-09-02)

Performance Improvements

2.2.1 (2020-09-01)

Bug Fixes

2.2.0 (2020-08-27)

Features

  • enable package-lock-only by default (d927735), closes #23

2.1.1 (2020-08-25)

Performance Improvements

2.1.0 (2020-08-22)

Features

  • introduce --inherit-npm flag (b54ded4)

2.0.5 (2020-08-22)

Performance Improvements

  • rm npm bins before semrel start, tech release (3ce0106)

2.0.4 (2020-08-22)

Bug Fixes

  • fix workspaces detection (f766f5d)

2.0.3 (2020-08-22)

Performance Improvements

2.0.1 (2020-08-22)

Performance Improvements

2.0.0 (2020-08-22)

Bug Fixes

  • adapt yarn cmd invocation to win runtime (d02d69f)
  • fix checksums (d2a280d)

Features

  • cli: let --package-lock-only be configurable (c457a18)
  • provide workspaces deps update (a64fc95), closes #16
  • support custom workspace paths (96bde5d)

Performance Improvements

BREAKING CHANGES

  • --package-lock-only is disabled by default

1.6.1 (2020-08-17)

Performance Improvements

1.6.0 (2020-08-10)

Bug Fixes

  • discard flags after -- break (4ee89e0)
  • cli: handle silent flag at the top level promise (08534ed)

Features

  • cli: add symlink type customization (bfb2747), closes #13
  • cli: pass optional flags to npm/yarn invocations (cd2efab), closes #12
  • cli: provide silent flag support (2a646bc)

1.5.1 (2020-08-07)

Bug Fixes

  • readme: update usage example (8d25680)
  • print invoke cmd before its output (dfe82fb)

1.5.0 (2020-08-07)

Features

  • highlight steps in the output for better readability (7abff28)

1.4.1 (2020-08-06)

Bug Fixes

  • exit with non-zero if anything fails (#11) (3e7eb93), closes #10

1.4.0 (2020-08-03)

Features

  • add async handlers support (71eab4e)
  • perform most operations on temporary entities (213b4f5), closes #6

1.3.0 (2020-07-13)

Features

  • print invocation details to stdout (f92b18a)

1.2.2 (2020-07-10)

Bug Fixes

1.2.1 (2020-07-09)

Bug Fixes

  • raplace yarm import to synp converter to handle workspaces issue (c921179)

1.2.0 (2020-07-09)

Features

  • use yarn import for package-lock converting (e9fccd8)

1.1.1 (2020-07-09)

Bug Fixes

  • fix synp source arg, apply audit fix to lockfile only (#1) (c2bd0fc)

1.1.0 (2020-07-08)

Features

  • replace npm i with synp convertion (7272a9c)

1.0.0 (2020-07-08)

Bug Fixes

Features