Skip to content

Commit

Permalink
Merge branch 'main' into actions/tools-update-config.json
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Oct 6, 2023
2 parents 0684c6c + 6d39928 commit eacb989
Show file tree
Hide file tree
Showing 6 changed files with 598 additions and 587 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
fail-fast: false
matrix:
node:
- 16
- 18
- 20
platform:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-nock-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
# Let's use the oldest version supported to be sure the V8
# serialization is compatible with all supported versions.
node-version: 16.x
node-version: 18.x

- name: Get the Yarn cache directory path
id: yarn-cache-dir-path
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"url": "https://github.com/nodejs/corepack.git"
},
"engines": {
"node": ">=16.20.0"
"node": ">=18.17.1"
},
"exports": {
"./package.json": "./package.json"
},
"license": "MIT",
"packageManager": "[email protected].44+sha224.6526204ca38ed0105e81ba52d83dc0c7b8ee63600a13dc332914fde0",
"packageManager": "[email protected].50+sha256.6663791fa05e15176880da500c334caf1699541f834302e6df085d20ef06069d",
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
Expand Down Expand Up @@ -52,7 +52,7 @@
},
"scripts": {
"build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts",
"build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node16.20.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'",
"build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'",
"corepack": "ts-node ./sources/_cli.ts",
"lint": "eslint .",
"prepack": "yarn build",
Expand Down
12 changes: 12 additions & 0 deletions tests/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ switch (process.env.NOCK_ENV || ``) {
case `record`:
case `replay`:
beforeEach(() => {
// To ensure we test the default behavior, we must remove these env vars
// in case the local machine already set these values.
delete process.env.COREPACK_DEFAULT_TO_LATEST;
delete process.env.COREPACK_ENABLE_NETWORK;
delete process.env.COREPACK_ENABLE_PROJECT_SPEC;
delete process.env.COREPACK_ENABLE_STRICT;
delete process.env.COREPACK_HOME;
delete process.env.COREPACK_NPM_REGISTRY;
delete process.env.COREPACK_NPM_TOKEN;
delete process.env.COREPACK_NPM_USERNAME;
delete process.env.FORCE_COLOR;

process.env.RUN_CLI_ID = 0;
process.env.NOCK_FILE_NAME = crypto
.createHash(`md5`)
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"moduleResolution": "node",
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2021"],
"lib": ["ES2023"],
"module": "commonjs",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2021"
"target": "ES2022"
},
"ts-node": {
"transpileOnly": true
Expand Down
Loading

0 comments on commit eacb989

Please sign in to comment.