Antoine du Hamel
eb63873c6c
fix: fallback to `shasum` when `integrity` is not defined ( #542 )
...
Some npm registries do not define an `integrity` field, in which case
we can try using the `shasum` field instead.
2024-07-21 16:38:30 +02:00
Kristoffer K.
85e556a1a9
test: migrate to vitest ( #349 )
2024-07-16 23:31:15 +02:00
github-actions[bot]
3e3b04619c
feat: update package manager versions ( #492 )
2024-07-12 12:59:07 +00:00
Antoine du Hamel
db6fae50cf
fix: replace npm registry domain in tarball URL ( #502 )
2024-07-12 10:43:09 +02:00
Antoine du Hamel
7b8e33ac01
chore(tests): do not use outdated `fs.rmdir` API ( #487 )
2024-05-31 10:15:34 +00:00
github-actions[bot]
e1abb83241
feat: update package manager versions ( #481 )
2024-05-31 10:14:53 +00:00
github-actions[bot]
985895bccb
feat: update package manager versions ( #469 )
2024-05-10 08:21:32 +00:00
Leonardo Rocha
f15ebc289e
feat: add support for `COREPACK_INTEGRITY_KEYS=0` ( #470 )
2024-05-10 10:05:26 +02:00
Alex Kessock
6efa349882
fix: COREPACK_NPM_REGISTRY should allow for username/password auth ( #466 )
2024-04-24 17:13:00 +02:00
Kristoffer K
0f9b748640
fix!: call `executePackageManagerRequest` directly ( #430 )
...
* fix!: call `executePackageManagerRequest` directly
* Apply suggestions from code review
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* test: update assertions
---------
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-04-20 19:33:05 +02:00
github-actions[bot]
56816c2b7e
feat: update package manager versions ( #462 )
2024-04-19 07:57:43 +00:00
stduhpf
e033b5f36c
chore(tests): handle windows path formatting more gracefully ( #460 )
2024-04-16 16:07:23 +02:00
Antoine du Hamel
32a93ea4f5
fix: add path to `package.json` in error message ( #456 )
2024-04-15 18:17:33 +00:00
github-actions[bot]
1423190564
feat: update package manager versions ( #425 )
2024-04-13 14:16:04 +00:00
Jakob Ackermann
c449adc818
feat: separate read and write operations on lastKnownGood.json ( #446 )
...
Also skip overwriting `lastKnownGood.json` with same content.
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-04-13 11:38:56 +00:00
Antoine du Hamel
e561dd00bb
feat: verify integrity signature when downloading from npm registry ( #432 )
...
When the user has not provided any hash (so when running `corepack up`/`corepack use …`), and the package manager is downloaded from the npm registry, we can verify the signature.
BREAKING CHANGE: attempting to download a version from the npm registry (or a mirror) that was published using the now deprecated PGP signature without providing a hash will trigger an error. Users can disable the signature verification using a environment variable.
2024-04-12 22:49:11 +00:00
Gavin King
2d63536413
fix: Incorrect authorization prefix for basic auth, and undocumented env var ( #454 )
...
Co-authored-by: Gavin King <gavin.king@cgi.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-04-12 23:28:11 +02:00
Antoine du Hamel
73d9a1e2d2
fix: correctly set `Dispatcher` prototype for `ProxyAgent` ( #451 )
...
In an attempt to bundle only a subset of Undici code, we forgot to take
some side-effect into account.
2024-04-12 23:27:26 +02:00
zhyupe
467216281e
fix: hash check when downloading Yarn Berry from npm ( #439 )
...
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Maël Nison <nison.mael@gmail.com>
2024-04-01 14:27:26 +02:00
Antoine du Hamel
14b8a01abb
chore: fix tests on custom registry ( #445 )
2024-04-01 11:46:16 +02:00
Antoine du Hamel
d2677538cd
fix: re-add support for custom registries with auth ( #397 )
2024-03-27 19:23:43 +01:00
Antoine du Hamel
082fabf8b1
fix: download fewer metadata from npm registry ( #436 )
2024-03-26 15:08:33 +01:00
github-actions[bot]
e8edba771b
feat: update package manager versions ( #415 )
2024-03-08 08:48:16 +00: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
zhyupe
47be27c9db
fix: improve support for `COREPACK_NPM_REGISTRY` with Yarn Berry ( #396 )
2024-02-27 10:55:04 +01:00
Kristoffer K
967e2666b5
test: store nocks in a sqlite database ( #374 )
...
* test: store nocks in a sqlite3 database
* chore: remove nock files
* refactor: reuse statement
* Update tests/recordRequests.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* refactor: only create statements when needed
* refactor: move nocks db up one level
* fix: close db on exit
---------
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-02-24 00:59:12 +01:00
Kristoffer K
451dcf8229
test: clear all `COREPACK_*` environment variables ( #392 )
...
Co-authored-by: Maël Nison <nison.mael@gmail.com>
2024-02-21 20:29:52 +00:00
Maël Nison
00506b2a15
fix: group the download prompt together ( #391 )
2024-02-21 21:24:13 +01:00
github-actions[bot]
1423312a0e
feat: update package manager versions ( #362 )
2024-02-21 04:11:13 +00:00
Antoine du Hamel
9834f5790a
fix: do not hard fail if Corepack home folder cannot be created ( #382 )
2024-02-21 04:15:14 +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
12f1c31a0d
chore(tests): use separate envs for each tests ( #371 )
2024-02-12 22:33:51 +00:00
Kristoffer K
fe6a3072f6
feat!: use `fetch` ( #365 )
...
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-02-11 23:52:38 +01:00
Kristoffer K
65880cafed
fix: remove unsafe remove of install folder ( #372 )
...
* fix: remove unsafe remove of install folder
* test: update to use folderUtils
* perf: skip `existsSync` check
2024-02-11 21:13:45 +01:00
Antoine du Hamel
b9eea589b4
chore(tests): add test that validates download warning is shown ( #370 )
2024-01-30 23:46:38 +00:00
Antoine du Hamel
a56c13bd0b
feat: bump Known Good Release when downloading new version ( #364 )
2024-01-30 22:51:09 +00:00
Antoine du Hamel
4eb1fd92fb
chore(tests): increase timeout to get more green on Windows CI ( #366 )
...
For some reason this test times out quite frequently on Windows CI.
Hopefully if we give it more time to succeed, and we won't need to
restart Windows CI as often.
2024-01-30 18:55:55 +01:00
github-actions[bot]
cc3ada73bc
feat: update package manager versions ( #348 )
2024-01-13 01:04:10 +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
github-actions[bot]
cfcc28047a
feat: update package manager versions ( #330 )
2023-12-29 23:48:14 +01:00
Maël Nison
9bee415081
feat: add support for rangeless commands ( #338 )
...
This diff makes it possible to run the CLI commands without an explicit range, in which case we use an implicit `*`, e.g.: `corepack install -g yarn`.
2023-12-29 13:00:38 +01:00
guibwl
6df5063b14
feat: add support for HTTP redirect ( #341 )
...
Corepack will now follow the `Location` header when receiving a 30x HTTP status code. This should allow Corepack to work with proxies that redirect to a different URL.
2023-12-29 12:15:57 +01:00
github-actions[bot]
450cd332d0
feat: update package manager versions ( #325 )
2023-11-05 10:29:19 +00:00
github-actions[bot]
0bd2577bb4
feat: update package manager versions ( #318 )
2023-10-20 08:29:28 +00:00
Kristoffer K
2533d12887
test: check that a semver version is required ( #312 )
2023-10-09 00:33:54 +02:00
github-actions[bot]
503e135878
feat: update package manager versions ( #297 )
2023-10-08 07:14:49 +00:00
Steven
cc33de0a5a
chore: update test to handle case when env var is set ( #304 )
...
* chore: update test to handle case when env var is set
- Fixes https://github.com/nodejs/corepack/issues/303
* revert
* delete env vars in setupTests.js
* remove newline
2023-09-04 17:09:55 +02:00
github-actions[bot]
be9c286846
feat: update package manager versions ( #292 )
2023-08-28 22:28:49 +00: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