Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf!: call executePackageManagerRequest directly #2

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
2507e9b
feat: update package manager versions (#249)
github-actions[bot] Apr 7, 2023
f539ae2
chore(main): release 0.17.2 (#254)
github-actions[bot] Apr 7, 2023
aa3cbdb
fix(doc): add a note about troubleshooting network errors (#259)
SpencerKaiser Apr 29, 2023
25fa623
chore: report URL on `fetchUrlStream` error message (#261)
tisonkun Apr 29, 2023
df89e38
refactor: separate library and cli entry point (#250)
merceyz May 19, 2023
d5ef940
chore(docs): document how to use aliases instead of jumper binaries (…
aduh95 May 19, 2023
c94c400
chore(ci): add prebuilt executable to GitHub release (#243)
aduh95 May 19, 2023
74f679d
chore: update supported Node.js versions (#258)
aduh95 May 19, 2023
863e0e0
chore(deps): upgrade all npm dependencies (#266)
aduh95 May 19, 2023
7b61ff6
feat: update package manager versions (#256)
github-actions[bot] May 19, 2023
7e364ad
chore(ci): add whole package archive to GH release (#267)
aduh95 May 19, 2023
091352a
chore(main): release 0.18.0 (#262)
github-actions[bot] May 19, 2023
3211804
doc: update DNS troubleshooting section to mention IPv6 (#263)
SpencerKaiser May 19, 2023
17d1f3d
fix: don't override `process.exitCode` (#268)
merceyz May 23, 2023
2f3678c
fix: disable `v8-compile-cache` when using `npm@>=9.7.0` (#276)
merceyz Jun 13, 2023
5345774
feat: update package manager versions (#272)
github-actions[bot] Jun 13, 2023
5956d95
chore(main): release 0.18.1 (#269)
github-actions[bot] Jun 13, 2023
be2489c
feat: support ESM (#270)
merceyz Jun 13, 2023
4188f2b
feat: update package manager versions (#280)
github-actions[bot] Jun 24, 2023
db9b7e6
chore(main): release 0.19.0 (#278)
github-actions[bot] Jun 24, 2023
6090fe7
build(deps-dev): bump semver from 7.5.1 to 7.5.2 (#281)
dependabot[bot] Jul 13, 2023
98338b3
chore: update dev dependency proxy-agent to 6.2.2 (#283)
Trott Jul 14, 2023
8593425
build(deps): bump word-wrap from 1.2.3 to 1.2.4 (#287)
dependabot[bot] Jul 19, 2023
b340844
chore: remove `vm2` from dev dependencies (#284)
aduh95 Jul 20, 2023
b8a4a52
feat: update package manager versions (#282)
github-actions[bot] Jul 28, 2023
fe3e5cd
Refactoring of the CLI interface (#291)
arcanis Aug 28, 2023
be9c286
feat: update package manager versions (#292)
github-actions[bot] Aug 28, 2023
2bf76c9
chore(main): release 0.20.0 (#289)
github-actions[bot] Aug 29, 2023
cc33de0
chore: update test to handle case when env var is set (#304)
styfle Sep 4, 2023
c085753
chore: update Yarn (#308)
merceyz Sep 11, 2023
787e24d
chore: update supported Node.js versions (#309)
aduh95 Sep 15, 2023
6d39928
chore(ci): update the version of Node.js used to update Nock files (#…
aduh95 Oct 6, 2023
503e135
feat: update package manager versions (#297)
github-actions[bot] Oct 8, 2023
adf2e7a
chore(main): release 0.21.0 (#310)
github-actions[bot] Oct 8, 2023
2533d12
test: check that a semver version is required (#312)
merceyz Oct 8, 2023
92f8e71
feat: allow fallback to application/json for custom registries (#314)
stramel Oct 19, 2023
0bd2577
feat: update package manager versions (#318)
github-actions[bot] Oct 20, 2023
bd5fcb5
build(deps): bump @babel/traverse from 7.21.5 to 7.23.2 (#319)
dependabot[bot] Oct 20, 2023
9583583
chore: bump npm dependencies (#321)
aduh95 Oct 20, 2023
2b5f6b7
chore: upgrade outdated dependencies (#322)
aduh95 Oct 21, 2023
0e89bfa
chore(main): release 0.22.0 (#320)
github-actions[bot] Oct 21, 2023
450cd33
feat: update package manager versions (#325)
github-actions[bot] Nov 5, 2023
b7aa576
chore(main): release 0.23.0 (#327)
github-actions[bot] Nov 5, 2023
e8ae337
Switches Yarn to the "aliases" field (#340)
arcanis Dec 20, 2023
6df5063
feat: add support for HTTP redirect (#341)
guibwl Dec 29, 2023
adcd989
chore(ci): test on Node.js 21.x (#344)
aduh95 Dec 29, 2023
0717c6a
feat(yarn): fallback to npm when `COREPACK_NPM_REGISTRY` is set (#339)
arcanis Dec 29, 2023
9bee415
feat: add support for rangeless commands (#338)
arcanis Dec 29, 2023
518bed8
fix: clarify `EACCES` errors (#343)
Medhansh404 Dec 29, 2023
addf455
chore: bump dev dependencies (#346)
aduh95 Dec 29, 2023
cfcc280
feat: update package manager versions (#330)
github-actions[bot] Dec 29, 2023
9bdd296
chore(main): release 0.24.0 (#345)
github-actions[bot] Dec 29, 2023
2950a8a
fix(use): create `package.json` when calling `corepack use` on empty …
aduh95 Jan 12, 2024
cc3ada7
feat: update package manager versions (#348)
github-actions[bot] Jan 13, 2024
a3f271c
chore(main): release 0.24.1 (#353)
github-actions[bot] Jan 13, 2024
4eb1fd9
chore(tests): increase timeout to get more green on Windows CI (#366)
aduh95 Jan 30, 2024
c2a6e4f
chore(ci): bump actions and add dependabot config (#367)
aduh95 Jan 30, 2024
6b8d87f
feat!: prompt user before downloading software (#360)
aduh95 Jan 30, 2024
a56c13b
feat: bump Known Good Release when downloading new version (#364)
aduh95 Jan 30, 2024
b9eea58
chore(tests): add test that validates download warning is shown (#370)
aduh95 Jan 30, 2024
54e9510
feat!: remove old install folder migration (#373)
merceyz Feb 9, 2024
65880ca
fix: remove unsafe remove of install folder (#372)
merceyz Feb 11, 2024
fe6a307
feat!: use `fetch` (#365)
merceyz Feb 11, 2024
12f1c31
chore(tests): use separate envs for each tests (#371)
aduh95 Feb 12, 2024
f442366
feat: add `corepack cache` command (#363)
aduh95 Feb 12, 2024
9a1cb38
chore!: remove Node.js 19.x from the range of supported versions (#375)
aduh95 Feb 16, 2024
9066ea7
build(deps-dev): bump undici from 6.4.0 to 6.6.1 (#376)
dependabot[bot] Feb 16, 2024
d9c70b9
feat!: remove `--all` flag (#351)
aduh95 Feb 17, 2024
4a8ce6d
feat: add support for URL in `"packageManager"` (#359)
aduh95 Feb 20, 2024
6168938
chore(main): release 0.25.0 (#369)
github-actions[bot] Feb 20, 2024
f2185fe
fix: use valid semver range for `engines.node` (#378)
merceyz Feb 20, 2024
49ad334
chore(main): release 0.25.1 (#381)
github-actions[bot] Feb 20, 2024
9834f57
fix: do not hard fail if Corepack home folder cannot be created (#382)
aduh95 Feb 21, 2024
09e33c0
build(deps): bump ip from 2.0.0 to 2.0.1 (#385)
dependabot[bot] Feb 21, 2024
1423312
feat: update package manager versions (#362)
github-actions[bot] Feb 21, 2024
31a1c5f
chore: remove Dockerfile (#389)
aduh95 Feb 21, 2024
6aab5fc
chore: bump yarn version (#388)
aduh95 Feb 21, 2024
bc137a0
fix: do not show download prompt when downloading JSON (#383)
aduh95 Feb 21, 2024
476b7dc
chore(main): release 0.25.2 (#387)
github-actions[bot] Feb 21, 2024
00506b2
fix: group the download prompt together (#391)
arcanis Feb 21, 2024
451dcf8
test: clear all `COREPACK_*` environment variables (#392)
merceyz Feb 21, 2024
967e266
test: store nocks in a sqlite database (#374)
merceyz Feb 23, 2024
295a1cd
fix: Windows malicious file analysis waiting problem (#398)
ngnlTeto Feb 27, 2024
835308c
Removes the DESIGN document (#403)
arcanis Feb 27, 2024
88d504c
doc: add note clarifying how to add new package managers (#408)
arcanis Feb 27, 2024
47be27c
fix: improve support for `COREPACK_NPM_REGISTRY` with Yarn Berry (#396)
zhyupe Feb 27, 2024
a3ea1dd
chore(build): upgrade TypeScript (#409)
arcanis Feb 27, 2024
8b6c6d4
feat: Pins the package manager as it's used for the first time (#413)
arcanis Mar 3, 2024
3958d26
Update config.json (#410)
arcanis Mar 3, 2024
b7ec137
fix: ignore `EROFS` errors (#421)
aduh95 Mar 8, 2024
e8edba7
feat: update package manager versions (#415)
github-actions[bot] Mar 8, 2024
a3e3e97
chore(main): release 0.26.0 (#393)
github-actions[bot] Mar 8, 2024
5b95746
chore: remove unused `Cancellation` error
merceyz Mar 15, 2024
daa3a08
perf!: call `executePackageManagerRequest` directly
merceyz Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .eslintrc.js
Expand Up @@ -2,4 +2,11 @@ module.exports = {
extends: [
`@yarnpkg`,
],
rules: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'no-restricted-globals': [`error`, {
name: `fetch`,
message: `Use fetch from sources/httpUtils.ts`,
}],
},
};
10 changes: 10 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,10 @@
# Basic set up for three package managers

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*

Expand All @@ -26,7 +26,7 @@ jobs:
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
Expand All @@ -46,9 +46,9 @@ jobs:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 20
- 21
platform:
- ubuntu-latest
- macos-latest
Expand All @@ -58,10 +58,10 @@ jobs:
runs-on: ${{matrix.platform}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Use Node.js ${{matrix.node}}.x"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}.x

Expand All @@ -70,7 +70,7 @@ jobs:
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/publish.yml
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
Expand All @@ -25,9 +26,9 @@ jobs:
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*

Expand All @@ -36,7 +37,7 @@ jobs:
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
Expand All @@ -49,3 +50,9 @@ jobs:
corepack yarn npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- run: corepack yarn pack --out corepack.tgz
- name: Add Corepack package archive to GitHub release
run: gh release upload ${{ needs.release-please.outputs.release_tag }} corepack.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/sync.yml
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*

Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/update-nock-files.yml
Expand Up @@ -16,23 +16,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ inputs.pr_id }}/head

- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# Let's use the oldest version supported to be sure the V8
# serialization is compatible with all supported versions.
node-version: 14.x
node-version: lts/*

- name: Get the Yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
Expand All @@ -43,21 +41,21 @@ jobs:
- run: corepack yarn build # We need the stubs to run the tests

- name: Remove old Nock files to avoid conflicts
run: rm -r tests/nock
run: rm tests/nocks.db

- run: corepack yarn test
env:
NOCK_ENV: record

- name: Check if anything has changed
id: contains-changes
run: echo "result=$(git --no-pager diff --quiet -- tests/nock || echo "yes")" >> $GITHUB_OUTPUT
run: echo "result=$(git --no-pager diff --quiet -- tests/nocks.db || echo "yes")" >> $GITHUB_OUTPUT
shell: bash

- name: Commit changes
if: ${{ steps.contains-changes.outputs.result == 'yes' }}
run: |
git add tests/nock/
git add tests/nocks.db
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git commit -m "update Nock files"
Expand All @@ -72,10 +70,10 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload `tests/nock` in case of failure
uses: actions/upload-artifact@v3
- name: Upload `tests/nocks.db` in case of failure
uses: actions/upload-artifact@v4
if: ${{ failure() && steps.contains-changes.outputs.result == 'yes' }}
with:
name: nock
path: |
tests/nock
tests/nocks.db
2 changes: 1 addition & 1 deletion .vscode/settings.json
Expand Up @@ -7,6 +7,6 @@
"eslint.nodePath": ".yarn/sdks",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
28 changes: 0 additions & 28 deletions .yarn/patches/vm2-npm-3.9.9-03fd1f4dc5.patch

This file was deleted.

4 changes: 2 additions & 2 deletions .yarn/sdks/eslint/bin/eslint.js
@@ -1,13 +1,13 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
Expand Down
4 changes: 2 additions & 2 deletions .yarn/sdks/eslint/lib/api.js
@@ -1,13 +1,13 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
Expand Down
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
12 changes: 10 additions & 2 deletions .yarn/sdks/eslint/package.json
@@ -1,6 +1,14 @@
{
"name": "eslint",
"version": "7.10.0-sdk",
"version": "8.56.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
4 changes: 2 additions & 2 deletions .yarn/sdks/typescript/bin/tsc
@@ -1,13 +1,13 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
Expand Down
4 changes: 2 additions & 2 deletions .yarn/sdks/typescript/bin/tsserver
@@ -1,13 +1,13 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
Expand Down
4 changes: 2 additions & 2 deletions .yarn/sdks/typescript/lib/tsc.js
@@ -1,13 +1,13 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
Expand Down