Skip to content

Commit 0e983d1

Browse files
authored
Fix: Enable bun support in release-it (#68)
1 parent cfeb8d1 commit 0e983d1

File tree

5 files changed

+63
-978
lines changed

5 files changed

+63
-978
lines changed

bun.lockb

7.51 KB
Binary file not shown.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"type": "git",
1212
"url": "git+https://github.com/margelo/react-native-quick-sqlite.git"
1313
},
14+
"author": "Marc Rousavy <[email protected]> (https://github.com/mrousavy)",
15+
"license": "MIT",
16+
"bugs": {
17+
"url": "https://github.com/margelo/react-native-quick-sqlite/issues"
18+
},
19+
"homepage": "https://github.com/margelo/react-native-quick-sqlite#readme",
1420
"scripts": {
1521
"package": "bun --cwd package",
1622
"example": "bun --cwd example",
@@ -22,12 +28,6 @@
2228
"release": "release-it",
2329
"clean": "rm -rf **/tsconfig.tsbuildinfo node_modules package/node_module package/lib"
2430
},
25-
"author": "Marc Rousavy <[email protected]> (https://github.com/mrousavy)",
26-
"license": "MIT",
27-
"bugs": {
28-
"url": "https://github.com/margelo/react-native-quick-sqlite/issues"
29-
},
30-
"homepage": "https://github.com/margelo/react-native-quick-sqlite#readme",
3131
"dependencies": {
3232
"patch-package": "^8.0.0"
3333
},
@@ -44,7 +44,7 @@
4444
"eslint": "8.57.0",
4545
"eslint-plugin-prettier": "^5.2.1",
4646
"prettier": "^3.3.3",
47-
"release-it": "^17.6.0",
47+
"release-it": "^17.10.0",
4848
"typescript-eslint": "^8.6.0"
4949
},
5050
"release-it": {

package/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@
7676
},
7777
"release-it": {
7878
"npm": {
79-
"publish": true
79+
"publish": true,
80+
"publishPackageManager": "bun"
8081
},
81-
"git": false,
82-
"github": {
83-
"release": false
84-
}
82+
"git": false
8583
}
8684
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
diff --git a/node_modules/release-it/config/release-it.json b/node_modules/release-it/config/release-it.json
2+
index 47d147d..b4e1794 100644
3+
--- a/node_modules/release-it/config/release-it.json
4+
+++ b/node_modules/release-it/config/release-it.json
5+
@@ -20,13 +20,16 @@
6+
"tagAnnotation": "Release ${version}",
7+
"tagArgs": [],
8+
"push": true,
9+
- "pushArgs": ["--follow-tags"],
10+
+ "pushArgs": [
11+
+ "--follow-tags"
12+
+ ],
13+
"pushRepo": ""
14+
},
15+
"npm": {
16+
"publish": true,
17+
"publishPath": ".",
18+
"publishArgs": [],
19+
+ "publishPackageManager": "npm",
20+
"tag": null,
21+
"otp": null,
22+
"ignoreVersion": false,
23+
diff --git a/node_modules/release-it/lib/plugin/npm/npm.js b/node_modules/release-it/lib/plugin/npm/npm.js
24+
index 0e7caa3..9501aa1 100644
25+
--- a/node_modules/release-it/lib/plugin/npm/npm.js
26+
+++ b/node_modules/release-it/lib/plugin/npm/npm.js
27+
@@ -251,8 +251,10 @@ class npm extends Plugin {
28+
this.log.warn('Skip publish: package is private.');
29+
return false;
30+
}
31+
+
32+
+ const publishPackageManager = this.options.publishPackageManager || 'npm';
33+
const args = [publishPath, `--tag ${tag}`, otpArg, dryRunArg, registryArg, ...fixArgs(publishArgs)].filter(Boolean);
34+
- return this.exec(`npm publish ${args.join(' ')}`, { options })
35+
+ return this.exec(`${publishPackageManager} publish ${args.join(' ')}`, { options })
36+
.then(() => {
37+
this.setContext({ isReleased: true });
38+
})
39+
diff --git a/node_modules/release-it/schema/npm.json b/node_modules/release-it/schema/npm.json
40+
index 8b6e7fb..f70dc5f 100644
41+
--- a/node_modules/release-it/schema/npm.json
42+
+++ b/node_modules/release-it/schema/npm.json
43+
@@ -21,6 +21,10 @@
44+
},
45+
"default": []
46+
},
47+
+ "publishPackageManager": {
48+
+ "type": "string",
49+
+ "default": "npm"
50+
+ },
51+
"tag": {
52+
"type": "string",
53+
"default": null

0 commit comments

Comments
 (0)