Commit Graph

215 Commits

Author SHA1 Message Date
Jamie Tanna e773b32431 fix(util/exec): migrate to execa for command execution (#40212)
* fix(util/exec): migrate to `execa` for command execution

As part of a future change, we need to make sure that we have
cross-platform support for specific command executions.

By using `execa`'s functionality on top of `node:child_process`, we can
provide this functionality, as well as retain a consistent API with
internal users.

We need to make a couple of small tweaks to setting the `RawExecOptions`
as we're now bound by `readonly` properties.

As the `stdio` property's type is not exported, we can replace this with
an explicit setting of `stdin`, `stdout` and `stderr`.

This requires a number of test changes to make sure that the `stdin`,
`stdout` and `stderr` are set.

This doesn't migrate any calls under `tools`, as they can remain using
`node:child_process`.

* chore(util/exec): ignore floating promises `.on` calls

Since moving to use `execa`, we now have "floating promises" for the
`.on` method calls.

As we aren't handling them here, we can now mark them as `void` (as an
alternative to ignoring the ESLint rule).
2025-12-30 14:28:18 +00:00
Jamie Tanna 39bfc0975e refactor(util/exec): remove deprecated encoding property (#40199)
This has been deprecated since 2022-07, and is unused as we only ever
use UTF-8.

In `tools/utils/exec.ts` we make sure to specify it explicitly, so we
don't get a Buffer returned.
2025-12-30 09:55:31 +00:00
Michael Kriese 050ac8d23b chore: better code coverage (#39518) 2025-11-25 15:01:54 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
Felipe Santos 3b811438d4 feat(manager/npm): use volta node pin as node version constraint (#38816) 2025-11-09 08:37:52 +00:00
RahulGautamSingh 98eef7e82d fix: skip npm installation if no constraint specified (#38974)
* only install npm if pinned version found

* only extract npm constraint from lockfile-version<3

* remove redundant log

* add test

* revert test removal
2025-11-07 19:03:21 +00:00
RahulGautamSingh ac73347547 test: fix falky test (#38993)
fix test
2025-10-31 19:23:50 +00:00
renovate[bot] b4ed9e65d9 chore(deps): update dependency @vitest/eslint-plugin to v1.3.23 (main) (#38702)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.23

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.16 | 1.3.23 |

* remove now unnecessary exceptions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-31 07:50:48 +00:00
renovate[bot] 1280fe4dc7 chore(deps): update dependency @vitest/eslint-plugin to v1.3.16 (main) (#38502)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.16

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.13 | 1.3.16 |

* fix linting errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-13 09:24:15 +00:00
Mirko Kruschke cb695e3907 feat(npm): support yarn catalogs via yarn-plugin-catalogs (#37293)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-09-22 14:41:46 +00:00
Mirko Kruschke 606a9e6067 refactor(npm): reuse loadPackageJson outside of post-update (#38114) 2025-09-19 10:02:37 +00:00
Rhys Arkins aaa360fae9 fix(pnpm): allow pnpmfile if scripts are allowed (#37750) 2025-08-29 08:34:49 +00:00
Rhys Arkins 266e52813d feat(manager/npm): npmInstallTwice (#37532)
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-08-18 19:40:29 +00:00
Michael Kriese 3211d56e21 refactor(zod): rename schema to match our best practices guide (#37499) 2025-08-14 10:35:03 +00:00
Dave a3616a496a feat: add option skipArtifactsUpdate (#35993)
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-08-11 09:13:56 +00:00
Michael Kriese 14fe4c3811 chore(npm): fix coverage reporting (#37401) 2025-08-08 13:12:04 +00:00
Henry Cai fbdf8dfecc feat(npm): support pnpm v11 environment variables (#36762) 2025-07-04 08:46:11 +00:00
Henry Cai ad8d9188ed fix(npm): set pnpm store location for corepack command (#36336) (#36727)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-07-03 06:43:01 +00:00
Henry Cai f297adadea fix(npm): update pnpm dedupe ignore-scripts flag (#36732) 2025-06-29 06:46:43 +00:00
Eric Boureau 1bef8cc8ef fix: pnpm recursive update for workspace project (#36586) 2025-06-26 07:44:52 +00:00
RahulGautamSingh 9bc87fe7e8 feat(manager/npm): extract constraints from devEngines (#36004) 2025-06-02 15:53:11 +00:00
Lakshmipriya Sivakumar 86bc08581d fix(manager/npm): search for npmrc in the root directory (#36050)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-29 10:38:46 +00:00
Anne Stellingwerf 59de985bb2 fix(managers): quote more manager commands (#36163) 2025-05-27 13:58:40 +00:00
RahulGautamSingh e12252315b feat(manager/npm): use volta pins as constraints (#35869)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-24 09:06:31 +00:00
Michael Kriese bb9faed9c3 fix: properly pass configured env (#35835) 2025-05-09 11:31:00 +00:00
Michael Kriese 8fb6a9c89e fix(npm/pnpm): redirect cache and store dir (#35807) 2025-05-08 11:06:54 +00:00
RahulGautamSingh 49fa1be464 feat(util): getEnv (#35161)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-05-06 18:37:28 +00:00
RahulGautamSingh 80b7cdf1e0 refactor(util): move user env to util folder (#35103) 2025-04-02 10:27:27 +00:00
Trim21 8ce2d49c51 fix: pnpm install flags on non-workspace project (#34720) 2025-03-31 12:10:50 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese 4f60a8b7fe test: mock git globally (#34783) 2025-03-13 15:48:02 +00:00
Johannes Wienke ce2467bd5b fix(npm): include credentials without host type for lock file generation (#34267)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-03-12 11:22:21 +00:00
Michael Kriese 1644d9cb18 test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
Trim21 6e5731b554 test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
Michael Kriese 997c23502e test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +00:00
Michael Kriese e9cbd02865 fix(lockfilemaintenance): ensure isLockFileMaintenance on grouping (#33971) 2025-02-20 12:57:05 +00:00
renovate[bot] 55845508b6 chore(deps): update eslint monorepo to v9 (major) (#33573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-02-20 11:31:13 +00:00
Fotis Papadogeorgopoulos 0f06866080 feat(managers/npm): support pnpm catalogs (#33376)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2025-01-28 10:11:55 +00:00
Rhys Arkins 0c2eaaf8bb feat: sharedVariableName (#33111)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-01-16 15:05:07 +00:00
Sergei Zharinov 4aab6640d7 fix(npm): Don't skip lockfile-only updates (#33497) 2025-01-10 09:53:35 +00:00
renovate[bot] dc6bf16c37 chore(deps): update linters (#32318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-12-20 15:02:34 +00:00
RahulGautamSingh 56f79b9725 fix(npm): update npmrc before executing corepack cmd (#32733) 2024-11-27 08:55:51 +00:00
Rhys Arkins b0a0a714cd chore(npm): log hostRules npmrc logic (#30274)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2024-09-22 08:43:00 +00:00
Sebastian Poxhofer 3681b2a945 chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
renovate[bot] eb8c08079e chore(deps): update typescript-eslint monorepo to v8 (major) (#30750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-08-14 10:33:02 +00:00
Trent Mick 5bdaf47eeb fix(npm): don't break on npm workspace dir with a period (#30483) 2024-07-30 18:24:28 +00:00
Rhys Arkins b05f389c63 feat(npm)!: drop transitiveRemediation option (#27985)
This option only worked for npm <7, which is now EOL.

BREAKING CHANGE: Transitive remediation for npm <7 is no longer supported.
2024-07-25 15:28:16 +02:00
renovate[bot] 1a1e1acc23 chore(deps): update dependency typescript to v5.5.3 (#29906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-07-20 20:38:33 +00:00
Sebastian Poxhofer ca904f74c1 feat(managers/npm): add entries with protocol prefix in temporary .yarnrc.yml file (#30058) 2024-07-20 11:09:51 +00:00
Michael Kriese b357e4d21c fix(npm): don't delete lockfiles early (#28472) 2024-04-18 06:22:03 +00:00