Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Oct 18, 2024
1 parent fc3d458 commit 5eec255
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 110 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
"@types/git-url-parse": "^9.0.3",
"@types/klaw": "^3.0.6",
"@types/lint-staged": "^13.3.0",
"@types/lodash": "^4.17.10",
"@types/lodash": "^4.17.11",
"@types/lodash-es": "^4.17.12",
"@types/micromatch": "^4.0.9",
"@types/node": "^22.7.5",
"@types/node": "^22.7.6",
"@types/set-value": "^4.0.3",
"@vitest/coverage-v8": "~2.1.3",
"ci-info": "^4.0.0",
"cross-env": "^7.0.3",
"defu": "^6.1.4",
"eslint": "^9.12.0",
"execa": "^9.4.0",
"execa": "^9.4.1",
"fs-extra": "^11.2.0",
"get-value": "^3.0.1",
"husky": "^9.1.6",
Expand All @@ -69,7 +69,7 @@
"pkg-types": "^1.2.1",
"rimraf": "^6.0.1",
"set-value": "^4.1.0",
"tslib": "^2.7.0",
"tslib": "^2.8.0",
"tsup": "^8.3.0",
"tsx": "^4.19.1",
"turbo": "^2.1.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
"commander": "^12.1.0",
"comment-json": "^4.2.5",
"consola": "^3.2.3",
"execa": "^9.4.0",
"execa": "^9.4.1",
"fs-extra": "^11.2.0",
"git-url-parse": "^15.0.0",
"klaw": "^4.1.0",
"p-queue": "^8.0.1",
"pathe": "^1.1.2",
"picocolors": "^1.1.0",
"picocolors": "^1.1.1",
"simple-git": "^3.27.0"
}
}
4 changes: 4 additions & 0 deletions packages/monorepo/src/monorepo/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ export async function createContext(cwd: string) {
const git = new GitClient()
const workspaceFilepath = path.resolve(cwd, 'pnpm-workspace.yaml')
const projects = await getWorkspacePackages(cwd)
const gitUrl = await git.getGitUrl()
const gitUser = await git.getUser()
return {
cwd,
git,
gitUrl,
gitUser,
workspaceFilepath,
projects,
}
Expand Down
5 changes: 2 additions & 3 deletions packages/monorepo/src/monorepo/setPkgJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import path from 'pathe'
import set from 'set-value'

export default async function (ctx: Context) {
const { git, projects, cwd, workspaceFilepath } = ctx
const gitUrl = await git.getGitUrl()
const gitUser = await git.getUser()
const { gitUrl, gitUser, projects, cwd, workspaceFilepath } = ctx

if (gitUrl && await fs.exists(workspaceFilepath)) {
for (const project of projects) {
const pkgJson = project.manifest
Expand Down
2 changes: 2 additions & 0 deletions packages/monorepo/src/monorepo/sync.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import os from 'node:os'
import { execa } from 'execa'
import PQueue from 'p-queue'
import path from 'pathe'
import pc from 'picocolors'
import { logger } from '../logger'
import { getWorkspacePackages } from './workspace'

export async function syncNpmMirror(cwd: string) {
const packages = await getWorkspacePackages(cwd)
logger.info(`[当前工作区Repo]:\n${packages.map(x => `- ${pc.green(x.manifest.name)} : ${path.relative(cwd, x.rootDir)}`).join('\n')}\n`)
const set = new Set(packages.map(x => x.manifest.name))
logger.info(`[即将同步的包]:\n${Array.from(set).map(x => `- ${pc.green(x)}`).join('\n')}\n`)
const concurrency = Math.max(os.cpus().length, 1)
Expand Down
Loading

0 comments on commit 5eec255

Please sign in to comment.