Skip to content

Commit 24cb908

Browse files
authored
Bump @actions/io to v1.1.3 (#1225)
* Backfill changelog and bump actions/io * Fill in PR for action/io upgrade * Licensed updates * Compile JS
1 parent 27135e3 commit 24cb908

File tree

5 files changed

+46
-64
lines changed

5 files changed

+46
-64
lines changed

.licenses/npm/@actions/io.dep.yml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## v3.4.0
4+
- [Upgrade codeql actions to v2](https://github.com/actions/checkout/pull/1209)
5+
- [Upgrade dependencies](https://github.com/actions/checkout/pull/1210)
6+
- [Upgrade @actions/io](https://github.com/actions/checkout/pull/1225)
7+
8+
## v3.3.0
9+
- [Implement branch list using callbacks from exec function](https://github.com/actions/checkout/pull/1045)
10+
- [Add in explicit reference to private checkout options](https://github.com/actions/checkout/pull/1050)
11+
- [Fix comment typos (that got added in #770)](https://github.com/actions/checkout/pull/1057)
12+
13+
## v3.2.0
14+
- [Add GitHub Action to perform release](https://github.com/actions/checkout/pull/942)
15+
- [Fix status badge](https://github.com/actions/checkout/pull/967)
16+
- [Replace datadog/squid with ubuntu/squid Docker image](https://github.com/actions/checkout/pull/1002)
17+
- [Wrap pipeline commands for submoduleForeach in quotes](https://github.com/actions/checkout/pull/964)
18+
- [Update @actions/io to 1.1.2](https://github.com/actions/checkout/pull/1029)
19+
- [Upgrading version to 3.2.0](https://github.com/actions/checkout/pull/1039)
20+
321
## v3.1.0
422
- [Use @actions/core `saveState` and `getState`](https://github.com/actions/checkout/pull/939)
523
- [Add `github-server-url` input](https://github.com/actions/checkout/pull/922)

dist/index.js

+19-55
Original file line numberDiff line numberDiff line change
@@ -6552,11 +6552,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
65526552
};
65536553
var _a;
65546554
Object.defineProperty(exports, "__esModule", ({ value: true }));
6555-
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
6555+
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
65566556
const fs = __importStar(__nccwpck_require__(7147));
65576557
const path = __importStar(__nccwpck_require__(1017));
6558-
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
6558+
_a = fs.promises
6559+
// export const {open} = 'fs'
6560+
, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
6561+
// export const {open} = 'fs'
65596562
exports.IS_WINDOWS = process.platform === 'win32';
6563+
// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
6564+
exports.UV_FS_O_EXLOCK = 0x10000000;
6565+
exports.READONLY = fs.constants.O_RDONLY;
65606566
function exists(fsPath) {
65616567
return __awaiter(this, void 0, void 0, function* () {
65626568
try {
@@ -6737,12 +6743,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
67376743
Object.defineProperty(exports, "__esModule", ({ value: true }));
67386744
exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
67396745
const assert_1 = __nccwpck_require__(9491);
6740-
const childProcess = __importStar(__nccwpck_require__(2081));
67416746
const path = __importStar(__nccwpck_require__(1017));
6742-
const util_1 = __nccwpck_require__(3837);
67436747
const ioUtil = __importStar(__nccwpck_require__(1962));
6744-
const exec = util_1.promisify(childProcess.exec);
6745-
const execFile = util_1.promisify(childProcess.execFile);
67466748
/**
67476749
* Copies a file or folder.
67486750
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
@@ -6823,61 +6825,23 @@ exports.mv = mv;
68236825
function rmRF(inputPath) {
68246826
return __awaiter(this, void 0, void 0, function* () {
68256827
if (ioUtil.IS_WINDOWS) {
6826-
// Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
6827-
// program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
68286828
// Check for invalid characters
68296829
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
68306830
if (/[*"<>|]/.test(inputPath)) {
68316831
throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
68326832
}
6833-
try {
6834-
const cmdPath = ioUtil.getCmdPath();
6835-
if (yield ioUtil.isDirectory(inputPath, true)) {
6836-
yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
6837-
env: { inputPath }
6838-
});
6839-
}
6840-
else {
6841-
yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
6842-
env: { inputPath }
6843-
});
6844-
}
6845-
}
6846-
catch (err) {
6847-
// if you try to delete a file that doesn't exist, desired result is achieved
6848-
// other errors are valid
6849-
if (err.code !== 'ENOENT')
6850-
throw err;
6851-
}
6852-
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
6853-
try {
6854-
yield ioUtil.unlink(inputPath);
6855-
}
6856-
catch (err) {
6857-
// if you try to delete a file that doesn't exist, desired result is achieved
6858-
// other errors are valid
6859-
if (err.code !== 'ENOENT')
6860-
throw err;
6861-
}
68626833
}
6863-
else {
6864-
let isDir = false;
6865-
try {
6866-
isDir = yield ioUtil.isDirectory(inputPath);
6867-
}
6868-
catch (err) {
6869-
// if you try to delete a file that doesn't exist, desired result is achieved
6870-
// other errors are valid
6871-
if (err.code !== 'ENOENT')
6872-
throw err;
6873-
return;
6874-
}
6875-
if (isDir) {
6876-
yield execFile(`rm`, [`-rf`, `${inputPath}`]);
6877-
}
6878-
else {
6879-
yield ioUtil.unlink(inputPath);
6880-
}
6834+
try {
6835+
// note if path does not exist, error is silent
6836+
yield ioUtil.rm(inputPath, {
6837+
force: true,
6838+
maxRetries: 3,
6839+
recursive: true,
6840+
retryDelay: 300
6841+
});
6842+
}
6843+
catch (err) {
6844+
throw new Error(`File was unable to be removed ${err}`);
68816845
}
68826846
});
68836847
}

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@actions/core": "^1.10.0",
3232
"@actions/exec": "^1.0.1",
3333
"@actions/github": "^2.2.0",
34-
"@actions/io": "^1.1.2",
34+
"@actions/io": "^1.1.3",
3535
"@actions/tool-cache": "^1.1.2",
3636
"uuid": "^3.3.3"
3737
},

0 commit comments

Comments
 (0)