@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.
- package/dist/continueRelease.js +1 -1
- package/dist/createRelease.d.ts +5 -1
- package/dist/createRelease.js +2 -2
- package/package.json +13 -13
package/dist/continueRelease.js
CHANGED
package/dist/createRelease.d.ts
CHANGED
|
@@ -5,11 +5,15 @@ export interface ConfigurableCreateReleaseOptions {
|
|
|
5
5
|
*/
|
|
6
6
|
owner?: string;
|
|
7
7
|
/**
|
|
8
|
-
* The `.env` file to load to get the
|
|
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;
|
package/dist/createRelease.js
CHANGED
|
@@ -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
|
|
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.
|
|
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.
|
|
26
|
-
"@inquirer/confirm": "^5.1.
|
|
27
|
-
"@inquirer/input": "^4.2.
|
|
28
|
-
"@inquirer/rawlist": "^4.1.
|
|
29
|
-
"@octokit/core": "^7.0.
|
|
30
|
-
"dotenv": "^17.2.
|
|
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": "^
|
|
33
|
+
"@types/node": "^24.9.2",
|
|
34
34
|
"husky": "^9.1.7",
|
|
35
|
-
"lint-staged": "^16.
|
|
35
|
+
"lint-staged": "^16.2.6",
|
|
36
36
|
"prettier": "^3.6.2",
|
|
37
|
-
"tsx": "^4.20.
|
|
38
|
-
"typescript": "^5.
|
|
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": "
|
|
50
|
-
"pnpm": "10.
|
|
49
|
+
"node": "24.11.0",
|
|
50
|
+
"pnpm": "10.20.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"typecheck": "tsc --noEmit",
|