Skip to content

Commit a4aa3e9

Browse files
committed
chore: bump version
1 parent 759ea0c commit a4aa3e9

File tree

11 files changed

+436
-474
lines changed

11 files changed

+436
-474
lines changed

.changeset/moody-coins-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@icebreakers/monorepo": patch
3+
---
4+
5+
fix: sonar issue

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ FROM base AS builder
77
COPY . /usr/src/app
88
WORKDIR /usr/src/app
99
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
10-
RUN pnpm run -r build
11-
RUN pnpm deploy --filter=@icebreakers/foo --prod /prod/foo
12-
RUN pnpm deploy --filter=@icebreakers/bar --prod /prod/bar
10+
RUN pnpm run -r build \
11+
&& pnpm deploy --filter=@icebreakers/foo --prod /prod/foo \
12+
&& pnpm deploy --filter=@icebreakers/bar --prod /prod/bar
1313

1414
FROM base AS foo
1515
COPY --from=builder /prod/foo /prod/foo

apps/server/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const app = new Hono()
55

66
const Layout: FC = (props) => {
77
return (
8-
<html>
8+
<html lang="en">
99
<body>{props.children}</body>
1010
</html>
1111
)

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
"@types/micromatch": "^4.0.9",
5252
"@types/node": "^22.10.1",
5353
"@types/set-value": "^4.0.3",
54-
"@vitest/coverage-v8": "~2.1.6",
54+
"@vitest/coverage-v8": "~2.1.8",
5555
"ci-info": "^4.1.0",
5656
"cross-env": "^7.0.3",
5757
"defu": "^6.1.4",
58-
"eslint": "^9.15.0",
58+
"eslint": "^9.16.0",
5959
"execa": "^9.4.1",
6060
"fs-extra": "^11.2.0",
6161
"get-value": "^3.0.1",
@@ -75,7 +75,7 @@
7575
"turbo": "^2.3.3",
7676
"typescript": "^5.7.2",
7777
"unbuild": "^2.0.0",
78-
"vitest": "~2.1.6",
78+
"vitest": "~2.1.8",
7979
"yaml": "^2.6.1"
8080
},
8181
"publishConfig": {

packages/bar/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
export function bar() {
22
return 'foo'
33
}
4-
// import __cjs_url__ from 'url';
5-
// import __cjs_path__ from 'path';
6-
// import __cjs_mod__ from 'module';
7-
// const __filename = __cjs_url__.fileURLToPath(import.meta.url);
8-
// const __dirname = __cjs_path__.dirname(__filename);
9-
// const require = __cjs_mod__.createRequire(import.meta.url);
4+
105
export function getDirname() {
116
return __dirname
127
}

packages/foo/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
export function foo() {
22
return 'bar'
33
}
4-
// import __cjs_url__ from 'url';
5-
// import __cjs_path__ from 'path';
6-
// import __cjs_mod__ from 'module';
7-
// const __filename = __cjs_url__.fileURLToPath(import.meta.url);
8-
// const __dirname = __cjs_path__.dirname(__filename);
9-
// const require = __cjs_mod__.createRequire(import.meta.url);
4+
105
export function getDirname() {
116
return __dirname
127
}

packages/monorepo/src/monorepo/git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import gitUrlParse from 'git-url-parse'
44
import { simpleGit } from 'simple-git'
55

66
export class GitClient {
7-
private client: SimpleGit
7+
private readonly client: SimpleGit
88
#config: ConfigValues | undefined
99
constructor(options: Partial<SimpleGitOptions> = {}) {
1010
this.client = simpleGit(options)

packages/monorepo/src/monorepo/setReadme.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ async function getRows(ctx: Context) {
1313
rows.push('## Projects\n')
1414
for (const project of projects) {
1515
const p = path.relative(cwd, project.rootDirRealPath)
16-
p && rows.push(`- [${project.manifest.name}](${p}) ${project.manifest.description ? `- ${project.manifest.description}` : ''}`)
16+
if (p) {
17+
const description = project.manifest.description ? `- ${project.manifest.description}` : ''
18+
rows.push(`- [${project.manifest.name}](${p}) ${description}`)
19+
}
1720
}
1821
// ## Documentation
1922
// ## Communication

packages/monorepo/src/upgrade.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ export function setPkgJson(sourcePkgJson: PackageJson, targetPkgJson: PackageJso
5252
if (x[0] === pkgName) {
5353
set(targetPkgJson, `devDependencies.${x[0].replaceAll('.', '\\.')}`, `^${pkgVersion}`, { preservePaths: false })
5454
}
55-
else {
56-
if (!isWorkspace(targetDevDeps[x[0]])) {
57-
set(targetPkgJson, `devDependencies.${x[0].replaceAll('.', '\\.')}`, x[1], { preservePaths: false })
58-
}
55+
else if (!isWorkspace(targetDevDeps[x[0]])) {
56+
set(targetPkgJson, `devDependencies.${x[0].replaceAll('.', '\\.')}`, x[1], { preservePaths: false })
5957
}
6058
})
6159
for (const [k, v] of scriptsEntries) {
@@ -145,14 +143,12 @@ export async function upgradeMonorepo(opts: CliOpts) {
145143
logger.success(targetPath)
146144
}
147145
}
148-
else {
149-
if (await overwriteOrCopy()) {
150-
await fs.copy(
151-
file.path,
152-
targetPath,
153-
)
154-
logger.success(targetPath)
155-
}
146+
else if (await overwriteOrCopy()) {
147+
await fs.copy(
148+
file.path,
149+
targetPath,
150+
)
151+
logger.success(targetPath)
156152
}
157153
}
158154
})

packages/monorepo/test/fixtures/demo/case0/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
export function bar() {
22
return 'foo'
33
}
4-
// import __cjs_url__ from 'url';
5-
// import __cjs_path__ from 'path';
6-
// import __cjs_mod__ from 'module';
7-
// const __filename = __cjs_url__.fileURLToPath(import.meta.url);
8-
// const __dirname = __cjs_path__.dirname(__filename);
9-
// const require = __cjs_mod__.createRequire(import.meta.url);
4+
105
export function getDirname() {
116
return __dirname
127
}

0 commit comments

Comments
 (0)