From ce90eeb4a8b06d173a4cb6046bfe23f11961ce33 Mon Sep 17 00:00:00 2001 From: Nikita Elfimov Date: Wed, 21 Aug 2024 13:37:22 +0300 Subject: [PATCH] chore: sync --- code/code-commit/src/lint/commitlint.ts | 2 +- yarn.lock | 24 +++++++++---------- yarn/plugin-tools/package.json | 18 +++++++------- .../src/hooks/after-all-installed.hook.ts | 6 +++-- .../src/hooks/after-yarn-version-set.hook.ts | 2 +- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/code/code-commit/src/lint/commitlint.ts b/code/code-commit/src/lint/commitlint.ts index 7556a1733..b428d24b2 100644 --- a/code/code-commit/src/lint/commitlint.ts +++ b/code/code-commit/src/lint/commitlint.ts @@ -201,6 +201,6 @@ export async function lint( valid, errors, warnings, - input: buildCommitMesage(parsed), + input: buildCommitMessage(parsed), } } diff --git a/yarn.lock b/yarn.lock index c057eaaab..ef789bab4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1369,15 +1369,15 @@ __metadata: dependencies: "@atls/code-runtime": "workspace:*" "@atls/config-typescript": "workspace:*" - "@types/semver": "npm:^7.5.0" - "@yarnpkg/builder": "npm:^4.1.1" - "@yarnpkg/cli": "npm:^4.2.2" - "@yarnpkg/core": "npm:^4.0.5" - "@yarnpkg/fslib": "npm:^3.1.0" - clipanion: "npm:^4.0.0-rc.3" - deepmerge: "npm:^4.3.1" - husky: "npm:^8.0.3" - semver: "npm:^7.5.3" + "@types/semver": "npm:7.5.8" + "@yarnpkg/builder": "npm:4.1.2" + "@yarnpkg/cli": "npm:4.4.0" + "@yarnpkg/core": "npm:4.1.2" + "@yarnpkg/fslib": "npm:3.1.0" + clipanion: "npm:4.0.0-rc.3" + deepmerge: "npm:4.3.1" + husky: "npm:8.0.3" + semver: "npm:7.6.3" languageName: unknown linkType: soft @@ -4270,7 +4270,7 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:7.5.8, @types/semver@npm:^7.1.0, @types/semver@npm:^7.5.0": +"@types/semver@npm:7.5.8, @types/semver@npm:^7.1.0": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" checksum: 10/3496808818ddb36deabfe4974fd343a78101fa242c4690044ccdc3b95dcf8785b494f5d628f2f47f38a702f8db9c53c67f47d7818f2be1b79f2efb09692e1178 @@ -6851,7 +6851,7 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:*, deepmerge@npm:4.3.1, deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1": +"deepmerge@npm:*, deepmerge@npm:4.3.1, deepmerge@npm:^4.2.2": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 @@ -9080,7 +9080,7 @@ __metadata: languageName: node linkType: hard -"husky@npm:^8.0.3": +"husky@npm:8.0.3": version: 8.0.3 resolution: "husky@npm:8.0.3" bin: diff --git a/yarn/plugin-tools/package.json b/yarn/plugin-tools/package.json index 1dd9b1368..4a33bf59e 100644 --- a/yarn/plugin-tools/package.json +++ b/yarn/plugin-tools/package.json @@ -20,17 +20,17 @@ "dependencies": { "@atls/code-runtime": "workspace:*", "@atls/config-typescript": "workspace:*", - "clipanion": "^4.0.0-rc.3", - "deepmerge": "^4.3.1", - "husky": "^8.0.3", - "semver": "^7.5.3" + "clipanion": "4.0.0-rc.3", + "deepmerge": "4.3.1", + "husky": "8.0.3", + "semver": "7.6.3" }, "devDependencies": { - "@types/semver": "^7.5.0", - "@yarnpkg/builder": "^4.1.1", - "@yarnpkg/cli": "^4.2.2", - "@yarnpkg/core": "^4.0.5", - "@yarnpkg/fslib": "^3.1.0" + "@types/semver": "7.5.8", + "@yarnpkg/builder": "4.1.2", + "@yarnpkg/cli": "4.4.0", + "@yarnpkg/core": "4.1.2", + "@yarnpkg/fslib": "3.1.0" }, "publishConfig": { "access": "public", diff --git a/yarn/plugin-tools/src/hooks/after-all-installed.hook.ts b/yarn/plugin-tools/src/hooks/after-all-installed.hook.ts index a63b2cf11..60816741b 100644 --- a/yarn/plugin-tools/src/hooks/after-all-installed.hook.ts +++ b/yarn/plugin-tools/src/hooks/after-all-installed.hook.ts @@ -60,8 +60,8 @@ const hook = (command: string): string => ${command} ` -const git = (args: Array): SpawnSyncReturns => - spawnSync('git', args, { stdio: 'inherit' }) +const git = (args: Array): SpawnSyncReturns => + spawnSync('git', args, { encoding: 'utf-8' }) const hooksExists = (): boolean => { const { error, output } = git(['config', 'core.hooksPath']) @@ -87,9 +87,11 @@ export const afterAllInstalled = async (project: Project): Promise => { hook('yarn commit message lint'), { mode: 0o755 } ) + await xfs.writeFilePromise(ppath.join(target, 'pre-commit'), hook('yarn commit staged'), { mode: 0o755, }) + await xfs.writeFilePromise( ppath.join(target, 'prepare-commit-msg'), hook('yarn commit message $@'), diff --git a/yarn/plugin-tools/src/hooks/after-yarn-version-set.hook.ts b/yarn/plugin-tools/src/hooks/after-yarn-version-set.hook.ts index 9cf2d683e..688f7d264 100644 --- a/yarn/plugin-tools/src/hooks/after-yarn-version-set.hook.ts +++ b/yarn/plugin-tools/src/hooks/after-yarn-version-set.hook.ts @@ -4,7 +4,7 @@ import type { CommandContext } from '@yarnpkg/core' import { execUtils } from '@yarnpkg/core' export const afterYarnVersionSet = async ( - configuration: Configuration, + _: Configuration, context: CommandContext ): Promise => { await execUtils.pipevp('yarn', ['tools', 'sync'], {