libdragon 11.4.0 → 11.4.2
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/index.js +5 -0
- package/modules/actions/init.js +0 -2
- package/modules/actions/version.js +10 -2
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -30,6 +30,11 @@ const { readProjectInfo, writeProjectInfo } = require('./modules/project-info');
|
|
|
30
30
|
* @typedef {NoUnion<Exclude<Parameters<import('./modules/parameters').Actions[import('./modules/project-info').ActionsNoProject]['fn']>[0], undefined>>} EitherCLIOrLibdragonInfo
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
+
// This is overridden when building for SEA. When running from local or NPM,
|
|
34
|
+
// the package.json version is used by the version action. esbuild will give
|
|
35
|
+
// a warning for this assignment, but it works as expected.
|
|
36
|
+
globalThis.VERSION = "";
|
|
37
|
+
|
|
33
38
|
parseParameters(process.argv)
|
|
34
39
|
.then(readProjectInfo)
|
|
35
40
|
.then((info) => {
|
package/modules/actions/init.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const sea = require('node:sea');
|
|
2
|
+
|
|
2
3
|
const { log } = require('../helpers');
|
|
3
4
|
|
|
4
5
|
const printVersion = async () => {
|
|
5
|
-
|
|
6
|
+
// Version is set during build time. If it is not set, it is set to the
|
|
7
|
+
// package.json version. This is done to avoid bundling the package.json
|
|
8
|
+
// (which would be out of date) with the built one.
|
|
9
|
+
if (!globalThis.VERSION) {
|
|
10
|
+
const { version } = require('../../package.json');
|
|
11
|
+
globalThis.VERSION = version;
|
|
12
|
+
}
|
|
13
|
+
log(`libdragon-cli v${globalThis.VERSION} ${sea.isSea() ? '(sea)' : ''}`);
|
|
6
14
|
};
|
|
7
15
|
|
|
8
16
|
module.exports = /** @type {const} */ ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libdragon",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.2",
|
|
4
4
|
"description": "This is a docker wrapper for libdragon",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
[
|
|
76
76
|
"@semantic-release/exec",
|
|
77
77
|
{
|
|
78
|
+
"verifyReleaseCmd": "echo \"${nextRelease.version}\" >> version.txt",
|
|
78
79
|
"prepareCmd": "npm run bundle ${nextRelease.version}"
|
|
79
80
|
}
|
|
80
81
|
],
|