Skip to content

Commit d9534d8

Browse files
committed
chore: tweak release script
1 parent f4c7401 commit d9534d8

File tree

6 files changed

+30
-40
lines changed

6 files changed

+30
-40
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
"pretty-quick": "^3.1.2",
3737
"semver": "7.3.5",
3838
"stream-to-array": "2.3.0",
39-
"ts-node": "10.5.0",
39+
"ts-node": "10.8.2",
4040
"turbo": "1.3.1",
41+
"type-fest": "2.16.0",
4142
"typescript": "^4.5.2"
4243
},
4344
"engines": {

pnpm-lock.yaml

Lines changed: 22 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/release/analyze.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import type {
77
import { debug, pkgJson, execSync } from "./utils"
88
import semver from "semver"
99
import parseCommit from "@commitlint/parse"
10-
// @ts-ignore
1110
import gitLog from "git-log-parser"
12-
// @ts-ignore
1311
import streamToArray from "stream-to-array"
1412

1513
export async function analyze(options: {
@@ -18,14 +16,12 @@ export async function analyze(options: {
1816
BREAKING_COMMIT_MSG: string
1917
RELEASE_COMMIT_MSG: string
2018
RELEASE_COMMIT_TYPES: string[]
21-
SKIP_RELEASE_MSG: string
2219
}): Promise<PackageToRelease[]> {
2320
const {
2421
packages,
2522
BREAKING_COMMIT_MSG,
2623
RELEASE_COMMIT_MSG,
2724
RELEASE_COMMIT_TYPES,
28-
SKIP_RELEASE_MSG,
2925
} = options
3026

3127
const packageFolders = Object.values(options.packages)
@@ -69,12 +65,7 @@ export async function analyze(options: {
6965
)
7066

7167
const lastCommit = commitsSinceLatestTag[0]
72-
if (lastCommit?.parsed.raw.includes(SKIP_RELEASE_MSG)) {
73-
console.log(
74-
`Last commit contained ${SKIP_RELEASE_MSG}, skipping release...`
75-
)
76-
return []
77-
}
68+
7869
if (lastCommit?.parsed.raw === RELEASE_COMMIT_MSG) {
7970
debug("Already released...")
8071
return []

scripts/release/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ export const config = {
1717
"@next-auth/typeorm-legacy-adapter": "packages/adapter-typeorm-legacy",
1818
},
1919
rootDir: process.cwd(),
20-
RELEASE_COMMIT_MSG: "chore(release): bump version",
2120
BREAKING_COMMIT_MSG: "BREAKING CHANGE:",
22-
SKIP_RELEASE_MSG: "[skip release]",
21+
RELEASE_COMMIT_MSG: "chore(release): bump package version(s) [skip ci]",
2322
RELEASE_COMMIT_TYPES: ["feat", "fix"],
2423
dryRun:
2524
!process.env.CI ||

scripts/release/publish.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { createHash } from "crypto"
21
import type { Commit, PackageToRelease } from "./types"
32

43
import { debug, pkgJson, execSync } from "./utils"

scripts/release/tsconfig.json

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2018",
4-
"module": "commonjs",
3+
"target": "ESNext",
4+
"module": "NodeNext",
55
"esModuleInterop": true,
6-
"forceConsistentCasingInFileNames": true,
7-
"strict": true,
8-
"noImplicitAny": true,
96
"skipLibCheck": true,
10-
"checkJs": true,
11-
"resolveJsonModule": true
7+
"skipDefaultLibCheck": true
128
},
139
"ts-node": {
14-
"transpileOnly": true,
15-
"files": true,
16-
"compilerOptions": {
17-
"sourceMap": true,
18-
"inlineSources": true
19-
}
10+
"swc": true
2011
}
2112
}

0 commit comments

Comments
 (0)