Commit Graph

37 Commits

Author SHA1 Message Date
Antoine du Hamel b456268851
feat: add limited support for `devEngines` (#643) 2025-02-28 20:06:33 +01:00
Antoine du Hamel 4be72f6941
fix(use): do not throw on invalid `packageManager` (#663) 2025-02-28 19:20:09 +01:00
Mike McCready 351d86c202
fix: replace explicit with specify as verb (#665) 2025-02-26 12:25:46 +01:00
chlorine d732259faf
doc: update directories to directory in corepack --help (#565) 2024-09-29 08:12:08 +00:00
Wojciech Maj 67463b2a3b
chore(deps): bump tar from 6.x to 7.x, selectively import required functions (#533)
Changes from 06e5872189 made it possible to update tar from 6.x to 7.x and use new `package.json` exports that are included in 7.x, allowing us to further reduce our bundle size.
2024-07-18 13:53:41 +02:00
Wojciech Maj f0734e6e80
feat: parallelize linking, unlinking and installing (#524) 2024-07-12 12:42:41 +00:00
Wojciech Maj e7ad533d43
fix: selectively import required semver functions (#511)
By selectively importing only the functions and classes we use, we avoid bundling in the entire semver package, and shave a few kB off from the Corepack bundle.
2024-07-12 10:47:18 +02:00
Frieder Bluemle 09528a8ea8
chore: fix typos and add `.idea` to `.gitignore` (#482) 2024-05-17 06:20:17 +00:00
Steven a05aec69ff
chore: remove unused imports (#431)
These imports were unused so I removed them
2024-03-16 17:21:20 +01:00
Maël Nison 8b6c6d4b2b
feat: Pins the package manager as it's used for the first time (#413)
* feat: Pins the package manager as it's used for the first time

* Adds a warning when auto-pinning the package manager version

* Updates wording
2024-03-03 13:50:18 +01:00
Antoine du Hamel 4a8ce6d42f
feat: add support for URL in `"packageManager"` (#359) 2024-02-20 09:11:52 +01:00
Antoine du Hamel d9c70b91f6
feat!: remove `--all` flag (#351)
Force users to opt-in into the package managers they want to support.
As more and more package managers are added to Corepack, it's more and
more unlikely that our users will be interested in _all_ the package
managers Corepack supports, and it is unreasonable to expect Corepack
maintainers would be able to perform security audits.
2024-02-17 01:35:11 +01:00
Antoine du Hamel f442366c1c
feat: add `corepack cache` command (#363) 2024-02-12 23:40:32 +00:00
Antoine du Hamel 2950a8a30b
fix(use): create `package.json` when calling `corepack use` on empty dir (#350)
Co-authored-by: Maël Nison <nison.mael@gmail.com>
2024-01-12 18:52:39 +01:00
Maël Nison fe3e5cd86c
Refactoring of the CLI interface (#291)
* Refactoring of the CLI interface

* Updates the Nock snapshots

* Regenerates the Nock files on Node 16

* Update README.md

* Adds --cache-only to corepack install -g

* Fixes hash generation
2023-08-28 22:01:48 +02:00
Antoine du Hamel 863e0e0a50
chore(deps): upgrade all npm dependencies (#266) 2023-05-19 09:37:31 +00:00
Kristoffer K 15ceb832a3
build: migrate to esbuild (#229) 2023-01-08 15:19:08 +01:00
Kristoffer K 82a6715702
chore: fix linting (#223)
* chore: fix linting

* chore: lint
2023-01-04 13:15:07 +01:00
Gamadril 7b5f2f9fcb
fix: recreate cache folder if necessary (#200)
Fixes: https://github.com/nodejs/corepack/issues/198
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-10-28 04:53:10 +02:00
Shalvah 42e53d5eda
Fix typo: `corepath` -> `corepack` (#191) 2022-09-29 05:33:40 +02:00
Antoine du Hamel 29da06c515
feat: add support for tags and ranges in `prepare` command (#136)
Fixes: https://github.com/nodejs/corepack/issues/72
2022-07-08 19:18:47 +02:00
Kyle Herock da3ed402d0
Fixes `corepack prepare` when no additional arguments are passed (#99)
* chore: update sdks

This fixes ZipFS paths in VSCode 1.66

* fix: `prepare` should infer the project packageManager version when no spec is passed
2022-05-15 10:42:46 +02:00
Antoine du Hamel 6c736c3950
chore: update dependencies, remove unused ones (#100)
* chore: update dependencies, remove unused ones

* fix types

* Updates snapshots

* Fixes prepack

* try with Node.js 16.x

* Update more packages

* Upgrade to Jest 28

* Bump other packages

* Bump other packages

* Use Node.js 14.19.2

* Revert "try with Node.js 16.x"

This reverts commit 45aa8a3a96.
This reverts commit 4a275f68b6.

* Use specific Node.js version

* trying something

* Pin exact Node.js version number

* Bump Jest to 28.1.0

* dist-upgrade

* Don't pin Node.js version when it's not necessary

* Update more dependencies

* Update more dependencies

* Revert "Pin exact Node.js version number"

This reverts commit dd72a68061.

Co-authored-by: Maël Nison <nison.mael@gmail.com>
2022-05-15 10:35:13 +02:00
Paul Soporan 5ff6e82028
perf: load binaries in the same process (#97) 2022-04-08 00:07:29 +02:00
Maël Nison 1026fe1b48
Fixes help (#81) 2022-01-19 17:38:02 +01:00
Maël Nison 7a034df587
Fixes symlink creation when install path has symlinks (#41) 2021-07-27 13:55:30 +02:00
Maël Nison b77ed59321
Set of tweaks (#38)
* Inlines tar rather than move it as a separate vendor

* Updates network queries
2021-07-05 12:05:32 +02:00
Maël Nison ee2d45de0d
Modernize the dependencies (#36)
* Upgrade dependencies

* Uses a more recent Yarn version as jumper

* Linting

* Fixes Nock recordings

* Replaces git tags by urls

* Updates nock records
2021-05-31 14:35:56 +02:00
Maël Nison 4714eeb7ff
Prevents npm from being accidentally set (#24)
* Prevents npm from being accidentally set

* Updates a test
2020-10-08 21:53:53 +02:00
Maël Nison fa627ba513
Turns `--cache-only` into `--output` (#23)
* Inverses the workflow

* Adds support for multiple package managers per archive

* Updates the readme

* Fixes --all check
2020-10-08 20:23:12 +02:00
Maël Nison 0d6262057c Makes the enable shims point to the dist entries, not the shims 2020-10-07 17:46:17 +02:00
Maël Nison 6f8c086b99
Windows CI (#21)
* Update ci.yml

* Implements ls-remote without spawning the git binary

* Implements enable/disable for Windows

* Triggers CI

* Mocks HTTP calls

* Fixes the shell on Windows

* Increases the timeout, thanks Windows
2020-10-03 21:18:23 +02:00
Maël Nison 1a3db689dc
Implements enable / disable (#11)
* Implements enable / disable

* Adds tests

* Debugs GH-only crash

* Fixes CI by running the build beforehand

* Fixes build
2020-09-30 00:23:24 +02:00
Kristoffer K b56df30796
fix: avoid symlinks to work on Windows (#13) 2020-09-30 00:02:59 +02:00
Maël Nison 9809b8f856 Refactors pmm -> corepack 2020-09-27 00:51:52 +02:00
Maël Nison 8c494c6cae Adds tests 2020-09-08 14:26:09 +02:00
Maël Nison fe40284501 Implements pack 2020-09-08 14:05:04 +02:00