@mlaursen/release-script 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import confirm from "@inquirer/confirm";
2
2
  export async function continueRelease() {
3
- const confirmed = confirm({ message: "Continue the release?" });
3
+ const confirmed = await confirm({ message: "Continue the release?" });
4
4
  if (!confirmed) {
5
5
  process.exit(1);
6
6
  }
@@ -5,11 +5,15 @@ export interface ConfigurableCreateReleaseOptions {
5
5
  */
6
6
  owner?: string;
7
7
  /**
8
- * The `.env` file to load to get the `GITHUB_TOKEN` environment variable.
8
+ * The `.env` file to load to get the {@link tokenName} environment variable.
9
9
  *
10
10
  * @defaultValue `".env.local"`
11
11
  */
12
12
  envPath?: string;
13
+ /**
14
+ * @defaultValue `"GITHUB_RELEASE_TOKEN"`
15
+ */
16
+ tokenName?: string;
13
17
  }
14
18
  export interface CreateReleaseOptions extends ConfigurableCreateReleaseOptions {
15
19
  body: string;
@@ -2,9 +2,9 @@ import confirm from "@inquirer/confirm";
2
2
  import { Octokit } from "@octokit/core";
3
3
  import dotenv from "dotenv";
4
4
  export async function createRelease(options) {
5
- const { body, override, owner = "mlaursen", repo, prerelease, envPath = ".env.local", tagName, } = options;
5
+ const { body, override, owner = "mlaursen", repo, prerelease, envPath = ".env.local", tagName, tokenName = "GITHUB_RELEASE_TOKEN", } = options;
6
6
  dotenv.config({ path: envPath, override, quiet: true });
7
- const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
7
+ const octokit = new Octokit({ auth: process.env[tokenName] });
8
8
  try {
9
9
  const response = await octokit.request("POST /repos/{owner}/{repo}/releases", {
10
10
  owner,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mlaursen/release-script",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "description": "The release script I normally use for packages I publish to npm",
6
6
  "repository": "https://github.com/mlaursen/release-script.git",
7
7
  "author": "Mikkel Laursen <mlaursen03@gmail.com>",
@@ -22,20 +22,20 @@
22
22
  "npm"
23
23
  ],
24
24
  "dependencies": {
25
- "@changesets/cli": "^2.29.5",
26
- "@inquirer/confirm": "^5.1.14",
27
- "@inquirer/input": "^4.2.1",
28
- "@inquirer/rawlist": "^4.1.5",
29
- "@octokit/core": "^7.0.3",
30
- "dotenv": "^17.2.1"
25
+ "@changesets/cli": "^2.29.7",
26
+ "@inquirer/confirm": "^5.1.19",
27
+ "@inquirer/input": "^4.2.5",
28
+ "@inquirer/rawlist": "^4.1.9",
29
+ "@octokit/core": "^7.0.6",
30
+ "dotenv": "^17.2.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/node": "^22.15.29",
33
+ "@types/node": "^24.9.2",
34
34
  "husky": "^9.1.7",
35
- "lint-staged": "^16.1.2",
35
+ "lint-staged": "^16.2.6",
36
36
  "prettier": "^3.6.2",
37
- "tsx": "^4.20.3",
38
- "typescript": "^5.8.3"
37
+ "tsx": "^4.20.6",
38
+ "typescript": "^5.9.3"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -46,8 +46,8 @@
46
46
  ]
47
47
  },
48
48
  "volta": {
49
- "node": "22.17.1",
50
- "pnpm": "10.13.1"
49
+ "node": "24.11.0",
50
+ "pnpm": "10.20.0"
51
51
  },
52
52
  "scripts": {
53
53
  "typecheck": "tsc --noEmit",