Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Dec 3, 2024
1 parent 759ea0c commit a4aa3e9
Show file tree
Hide file tree
Showing 11 changed files with 436 additions and 474 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-coins-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@icebreakers/monorepo": patch
---

fix: sonar issue
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ FROM base AS builder
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run -r build
RUN pnpm deploy --filter=@icebreakers/foo --prod /prod/foo
RUN pnpm deploy --filter=@icebreakers/bar --prod /prod/bar
RUN pnpm run -r build \
&& pnpm deploy --filter=@icebreakers/foo --prod /prod/foo \
&& pnpm deploy --filter=@icebreakers/bar --prod /prod/bar

FROM base AS foo
COPY --from=builder /prod/foo /prod/foo
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const app = new Hono()

const Layout: FC = (props) => {
return (
<html>
<html lang="en">
<body>{props.children}</body>
</html>
)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
"@types/micromatch": "^4.0.9",
"@types/node": "^22.10.1",
"@types/set-value": "^4.0.3",
"@vitest/coverage-v8": "~2.1.6",
"@vitest/coverage-v8": "~2.1.8",
"ci-info": "^4.1.0",
"cross-env": "^7.0.3",
"defu": "^6.1.4",
"eslint": "^9.15.0",
"eslint": "^9.16.0",
"execa": "^9.4.1",
"fs-extra": "^11.2.0",
"get-value": "^3.0.1",
Expand All @@ -75,7 +75,7 @@
"turbo": "^2.3.3",
"typescript": "^5.7.2",
"unbuild": "^2.0.0",
"vitest": "~2.1.6",
"vitest": "~2.1.8",
"yaml": "^2.6.1"
},
"publishConfig": {
Expand Down
7 changes: 1 addition & 6 deletions packages/bar/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
export function bar() {
return 'foo'
}
// import __cjs_url__ from 'url';
// import __cjs_path__ from 'path';
// import __cjs_mod__ from 'module';
// const __filename = __cjs_url__.fileURLToPath(import.meta.url);
// const __dirname = __cjs_path__.dirname(__filename);
// const require = __cjs_mod__.createRequire(import.meta.url);

export function getDirname() {
return __dirname
}
Expand Down
7 changes: 1 addition & 6 deletions packages/foo/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
export function foo() {
return 'bar'
}
// import __cjs_url__ from 'url';
// import __cjs_path__ from 'path';
// import __cjs_mod__ from 'module';
// const __filename = __cjs_url__.fileURLToPath(import.meta.url);
// const __dirname = __cjs_path__.dirname(__filename);
// const require = __cjs_mod__.createRequire(import.meta.url);

export function getDirname() {
return __dirname
}
2 changes: 1 addition & 1 deletion packages/monorepo/src/monorepo/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import gitUrlParse from 'git-url-parse'
import { simpleGit } from 'simple-git'

export class GitClient {
private client: SimpleGit
private readonly client: SimpleGit
#config: ConfigValues | undefined
constructor(options: Partial<SimpleGitOptions> = {}) {
this.client = simpleGit(options)
Expand Down
5 changes: 4 additions & 1 deletion packages/monorepo/src/monorepo/setReadme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ async function getRows(ctx: Context) {
rows.push('## Projects\n')
for (const project of projects) {
const p = path.relative(cwd, project.rootDirRealPath)
p && rows.push(`- [${project.manifest.name}](${p}) ${project.manifest.description ? `- ${project.manifest.description}` : ''}`)
if (p) {
const description = project.manifest.description ? `- ${project.manifest.description}` : ''
rows.push(`- [${project.manifest.name}](${p}) ${description}`)
}
}
// ## Documentation
// ## Communication
Expand Down
20 changes: 8 additions & 12 deletions packages/monorepo/src/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ export function setPkgJson(sourcePkgJson: PackageJson, targetPkgJson: PackageJso
if (x[0] === pkgName) {
set(targetPkgJson, `devDependencies.${x[0].replaceAll('.', '\\.')}`, `^${pkgVersion}`, { preservePaths: false })
}
else {
if (!isWorkspace(targetDevDeps[x[0]])) {
set(targetPkgJson, `devDependencies.${x[0].replaceAll('.', '\\.')}`, x[1], { preservePaths: false })
}
else if (!isWorkspace(targetDevDeps[x[0]])) {
set(targetPkgJson, `devDependencies.${x[0].replaceAll('.', '\\.')}`, x[1], { preservePaths: false })
}
})
for (const [k, v] of scriptsEntries) {
Expand Down Expand Up @@ -145,14 +143,12 @@ export async function upgradeMonorepo(opts: CliOpts) {
logger.success(targetPath)
}
}
else {
if (await overwriteOrCopy()) {
await fs.copy(
file.path,
targetPath,
)
logger.success(targetPath)
}
else if (await overwriteOrCopy()) {
await fs.copy(
file.path,
targetPath,
)
logger.success(targetPath)
}
}
})
Expand Down
7 changes: 1 addition & 6 deletions packages/monorepo/test/fixtures/demo/case0/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
export function bar() {
return 'foo'
}
// import __cjs_url__ from 'url';
// import __cjs_path__ from 'path';
// import __cjs_mod__ from 'module';
// const __filename = __cjs_url__.fileURLToPath(import.meta.url);
// const __dirname = __cjs_path__.dirname(__filename);
// const require = __cjs_mod__.createRequire(import.meta.url);

export function getDirname() {
return __dirname
}
Expand Down
Loading

0 comments on commit a4aa3e9

Please sign in to comment.