please-release-please 0.0.0-stage → 0.0.0
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/README.md +6 -2
- package/bin/prp.js +48 -0
- package/package.json +33 -3
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# prp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Check out the [documentation](https://github.com/seokju-na/prp).
|
|
4
|
+
|
|
5
|
+
## License
|
|
6
|
+
|
|
7
|
+
MIT License
|
package/bin/prp.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('node:child_process');
|
|
5
|
+
const os = require('node:os');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
|
|
8
|
+
const { version } = require('../package.json');
|
|
9
|
+
|
|
10
|
+
function binaryPath() {
|
|
11
|
+
if (process.env.PRP_BINARY) {
|
|
12
|
+
return process.env.PRP_BINARY;
|
|
13
|
+
}
|
|
14
|
+
const platform = `prp-${process.platform}-${process.arch}`;
|
|
15
|
+
let manifestPath;
|
|
16
|
+
try {
|
|
17
|
+
manifestPath = require.resolve(`${platform}/package.json`);
|
|
18
|
+
} catch {
|
|
19
|
+
throw new Error(
|
|
20
|
+
`${platform} is not installed. prp has no binary for this platform, or optional dependencies were skipped during install.`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
const manifest = require(manifestPath);
|
|
24
|
+
if (manifest.version !== version) {
|
|
25
|
+
throw new Error(`${platform}@${manifest.version} does not match prp@${version}; reinstall prp.`);
|
|
26
|
+
}
|
|
27
|
+
const executable = process.platform === 'win32' ? 'prp.exe' : 'prp';
|
|
28
|
+
return path.join(path.dirname(manifestPath), 'bin', executable);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let binary;
|
|
32
|
+
try {
|
|
33
|
+
binary = binaryPath();
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error(`prp: ${error.message}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
40
|
+
if (result.error) {
|
|
41
|
+
console.error(`prp: failed to run ${binary}: ${result.error.message}`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
if (result.signal) {
|
|
45
|
+
process.kill(process.pid, result.signal);
|
|
46
|
+
process.exit(128 + (os.constants.signals[result.signal] ?? 0));
|
|
47
|
+
}
|
|
48
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "please-release-please",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Please release please: versions, changelogs and publishing for monorepos",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/seokju-na/prp",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/seokju-na/prp"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Seokju Na",
|
|
13
|
+
"email": "seokju.me@gmail.com"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"prp": "bin/prp.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"bin"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=22"
|
|
23
|
+
},
|
|
24
|
+
"optionalDependencies": {
|
|
25
|
+
"please-release-please-darwin-arm64": "0.1.0",
|
|
26
|
+
"please-release-please-darwin-x64": "0.1.0",
|
|
27
|
+
"please-release-please-linux-arm64": "0.1.0",
|
|
28
|
+
"please-release-please-linux-x64": "0.1.0",
|
|
29
|
+
"please-release-please-win32-arm64": "0.1.0",
|
|
30
|
+
"please-release-please-win32-x64": "0.1.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "^26",
|
|
34
|
+
"typescript": "7.0.2"
|
|
35
|
+
}
|
|
6
36
|
}
|