Skip to content

Commit

Permalink
feat!: bump action to node20 (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthegedus authored Sep 17, 2023
1 parent 3558a40 commit a2d44a7
Show file tree
Hide file tree
Showing 12 changed files with 655 additions and 631 deletions.
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodejs 16.20.0
lefthook 1.4.1
pnpm 8.6.0
nodejs 20.6.1
lefthook 1.4.11
pnpm 8.7.5
2 changes: 1 addition & 1 deletion install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: asdf install
description: Install your versioned tools with asdf
author: Victor Borja <[email protected]>
runs:
using: node16
using: node20
main: main.js
inputs:
tool_versions:
Expand Down
62 changes: 40 additions & 22 deletions install/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/utils.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/utils.js
var require_utils = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/utils.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/utils.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCommandProperties = exports.toCommandValue = void 0;
Expand Down Expand Up @@ -65,9 +65,9 @@ var require_utils = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/command.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/command.js
var require_command = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/command.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/command.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -485,9 +485,9 @@ var init_esm_node = __esm({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/file-command.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/file-command.js
var require_file_command = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/file-command.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/file-command.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -551,9 +551,9 @@ var require_file_command = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/proxy.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/proxy.js
var require_proxy = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/proxy.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/proxy.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkBypass = exports.getProxyUrl = void 0;
Expand All @@ -570,7 +570,12 @@ var require_proxy = __commonJS({
}
})();
if (proxyVar) {
return new URL(proxyVar);
try {
return new URL(proxyVar);
} catch (_a) {
if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
return new URL(`http://${proxyVar}`);
}
} else {
return void 0;
}
Expand Down Expand Up @@ -852,9 +857,9 @@ var require_tunnel2 = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/index.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/index.js
var require_lib = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/index.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/index.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -1002,6 +1007,19 @@ var require_lib = __commonJS({
}));
});
}
readBodyBuffer() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
const chunks = [];
this.message.on("data", (chunk) => {
chunks.push(chunk);
});
this.message.on("end", () => {
resolve(Buffer.concat(chunks));
});
}));
});
}
};
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
Expand Down Expand Up @@ -1432,9 +1450,9 @@ var require_lib = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/auth.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/auth.js
var require_auth = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/auth.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/auth.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
Expand Down Expand Up @@ -1536,9 +1554,9 @@ var require_auth = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/oidc-utils.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/oidc-utils.js
var require_oidc_utils = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
Expand Down Expand Up @@ -1603,7 +1621,7 @@ var require_oidc_utils = __commonJS({
Error Code : ${error.statusCode}
Error Message: ${error.result.message}`);
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
Expand Down Expand Up @@ -1634,9 +1652,9 @@ var require_oidc_utils = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/summary.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/summary.js
var require_summary = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/summary.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/summary.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
Expand Down Expand Up @@ -1928,9 +1946,9 @@ var require_summary = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/path-utils.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/path-utils.js
var require_path_utils = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/path-utils.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/path-utils.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -1978,9 +1996,9 @@ var require_path_utils = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/core.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/core.js
var require_core = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/core.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/core.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"fmt": "xo --fix ./src/**/*.ts",
"type_check": "tsc",
"lint": "xo ./src/**/*.ts",
"build": "esbuild src/install/main.ts src/plugin-test/main.ts src/plugins-add/main.ts src/setup/main.ts --bundle --outdir=. --target=node16 --platform=node",
"build": "esbuild src/install/main.ts src/plugin-test/main.ts src/plugins-add/main.ts src/setup/main.ts --bundle --outdir=. --target=node20 --platform=node",
"build:check_uncommitted_changes": "bash -c 'if [ $(git status --porcelain | grep --extended-regexp \"src|install|plugin-test|plugins-add\" | wc -l) -gt 0 ]; then printf \"* %s\\n\" \"Detected uncommitted changes after build. See status below:\"; git diff; exit 1; fi'"
},
"engines": {
"node": "=16.20.0",
"pnpm": "=8.6.0"
"node": ">=20",
"pnpm": ">=8"
},
"xo": {
"rules": {
Expand All @@ -25,15 +25,15 @@
}
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.3"
},
"devDependencies": {
"@types/node": "^20.2.5",
"@types/node": "^20.6.2",
"esbuild": "^0.17.19",
"typescript": "^5.1.3",
"typescript": "^5.2.2",
"xo": "^0.54.2"
}
}
}
2 changes: 1 addition & 1 deletion plugin-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test plugin
description: Test your asdf plugin
author: Victor Borja <[email protected]>
runs:
using: node16
using: node20
main: main.js
inputs:
command:
Expand Down
62 changes: 40 additions & 22 deletions plugin-test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/utils.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/utils.js
var require_utils = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/utils.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/utils.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCommandProperties = exports.toCommandValue = void 0;
Expand Down Expand Up @@ -65,9 +65,9 @@ var require_utils = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/command.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/command.js
var require_command = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/command.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/command.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -485,9 +485,9 @@ var init_esm_node = __esm({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/file-command.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/file-command.js
var require_file_command = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/file-command.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/file-command.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -551,9 +551,9 @@ var require_file_command = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/proxy.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/proxy.js
var require_proxy = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/proxy.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/proxy.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkBypass = exports.getProxyUrl = void 0;
Expand All @@ -570,7 +570,12 @@ var require_proxy = __commonJS({
}
})();
if (proxyVar) {
return new URL(proxyVar);
try {
return new URL(proxyVar);
} catch (_a) {
if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
return new URL(`http://${proxyVar}`);
}
} else {
return void 0;
}
Expand Down Expand Up @@ -852,9 +857,9 @@ var require_tunnel2 = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/index.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/index.js
var require_lib = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/index.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/index.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -1002,6 +1007,19 @@ var require_lib = __commonJS({
}));
});
}
readBodyBuffer() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
const chunks = [];
this.message.on("data", (chunk) => {
chunks.push(chunk);
});
this.message.on("end", () => {
resolve(Buffer.concat(chunks));
});
}));
});
}
};
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
Expand Down Expand Up @@ -1432,9 +1450,9 @@ var require_lib = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/auth.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/auth.js
var require_auth = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/http-client/lib/auth.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/http-client/lib/auth.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
Expand Down Expand Up @@ -1536,9 +1554,9 @@ var require_auth = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/oidc-utils.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/oidc-utils.js
var require_oidc_utils = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
Expand Down Expand Up @@ -1603,7 +1621,7 @@ var require_oidc_utils = __commonJS({
Error Code : ${error.statusCode}
Error Message: ${error.result.message}`);
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
Expand Down Expand Up @@ -1634,9 +1652,9 @@ var require_oidc_utils = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/summary.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/summary.js
var require_summary = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/summary.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/summary.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
Expand Down Expand Up @@ -1928,9 +1946,9 @@ var require_summary = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/path-utils.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/path-utils.js
var require_path_utils = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/path-utils.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/path-utils.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down Expand Up @@ -1978,9 +1996,9 @@ var require_path_utils = __commonJS({
}
});

// node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/core.js
// node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/core.js
var require_core = __commonJS({
"node_modules/.pnpm/@[email protected].0/node_modules/@actions/core/lib/core.js"(exports) {
"node_modules/.pnpm/@[email protected].1/node_modules/@actions/core/lib/core.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
Expand Down
2 changes: 1 addition & 1 deletion plugins-add/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Plugins install
description: Install the plugins listed on your .tool-versions file.
author: Victor Borja <[email protected]>
runs:
using: node16
using: node20
main: main.js
inputs:
asdf_branch:
Expand Down
Loading

0 comments on commit a2d44a7

Please sign in to comment.