chore(deps): update jest to v29 (major) (#825)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: peaceiris <30958501+peaceiris@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2023-01-17 22:30:07 +09:00 committed by GitHub
parent 2c6daf7153
commit fd54e565f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1862 additions and 6341 deletions

8135
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -67,13 +67,13 @@
"eslint-plugin-jest": "^26.9.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"jest": "^29.3.1",
"jest-circus": "^29.3.1",
"js-yaml": "^4.1.0",
"lint-staged": "^13.1.0",
"prettier": "2.8.3",
"standard-version": "^9.1.1",
"ts-jest": "^26.5.6",
"ts-jest": "^29.0.5",
"typescript": "^4.2.3"
}
}

View File

@ -127,15 +127,19 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
} else {
throw new Error(`Failed to clone remote branch ${inps.PublishBranch}`);
}
} catch (e) {
} catch (error) {
if (error instanceof Error) {
core.info(`[INFO] first deployment, create new branch ${inps.PublishBranch}`);
core.info(`[INFO] ${e.message}`);
core.info(`[INFO] ${error.message}`);
await createDir(destDir);
core.info(`[INFO] chdir ${workDir}`);
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
await copyAssets(publishDir, destDir, inps.ExcludeAssets);
return;
} else {
throw new Error('unexpected error');
}
}
}
@ -201,9 +205,13 @@ export async function commit(allowEmptyCommit: boolean, msg: string): Promise<vo
} else {
await exec.exec('git', ['commit', '-m', `${msg}`]);
}
} catch (e) {
} catch (error) {
if (error instanceof Error) {
core.info('[INFO] skip commit');
core.debug(`[INFO] skip commit ${e.message}`);
core.debug(`[INFO] skip commit ${error.message}`);
} else {
throw new Error('unexpected error');
}
}
}

View File

@ -4,7 +4,11 @@ import * as main from './main';
(async (): Promise<void> => {
try {
await main.run();
} catch (e) {
core.setFailed(`Action failed with "${e.message}"`);
} catch (error) {
if (error instanceof Error) {
core.setFailed(`Action failed with "${error.message}"`);
} else {
throw new Error('unexpected error');
}
}
})();

View File

@ -57,8 +57,12 @@ export async function run(): Promise<void> {
core.startGroup('Setup Git config');
try {
await exec.exec('git', ['remote', 'rm', 'origin']);
} catch (e) {
core.info(`[INFO] ${e.message}`);
} catch (error) {
if (error instanceof Error) {
core.info(`[INFO] ${error.message}`);
} else {
throw new Error('unexpected error');
}
}
await exec.exec('git', ['remote', 'add', 'origin', remoteURL]);
await exec.exec('git', ['add', '--all']);
@ -86,7 +90,11 @@ export async function run(): Promise<void> {
core.info('[INFO] Action successfully completed');
return;
} catch (e) {
throw new Error(e.message);
} catch (error) {
if (error instanceof Error) {
throw new Error(error.message);
} else {
throw new Error('unexpected error');
}
}
}

View File

@ -138,7 +138,11 @@ export async function setTokens(inps: Inputs): Promise<string> {
} else {
throw new Error('not found deploy key or tokens');
}
} catch (e) {
throw new Error(e.message);
} catch (error) {
if (error instanceof Error) {
throw new Error(error.message);
} else {
throw new Error('unexpected error');
}
}
}