libdragon 11.4.1 → 11.4.3

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 CHANGED
@@ -222,10 +222,12 @@ npm run libdragon -- update
222
222
 
223
223
  The root `bench` recipe is for building the code in root `src` folder. This is a quick way of testing your libdragon changes or a sample code built around libdragon, and is called the test bench. This recipe together with `examples` and `tests` recipes will build and install libdragon automatically as necessary. Thus, they will always produce a rom image using the libdragon code in the repository via their make dependencies, which is ideal for experimenting with libdragon itself.
224
224
 
225
- There are also vscode launch configurations to quickly build the examples, tests and the bench. If you have the `N64_EMU` environment variable set pointing at your favourite emulator ([ares](https://ares-emu.net/) is highly recommended), the launch configurations ending in `(emu)` will kick your emulator with the selected example/code. You can also just hit F5 to launch the selected configuration.
225
+ There are also vscode launch configurations to quickly build and run the examples, tests and the bench. If you have [ares](https://ares-emu.net/) on your `PATH`, the launch configurations ending in `(emu)` will start it automatically. For the examples configuration, you can navigate to the relevant `.c` file and `Run selected example` will start it most of the time. In some cases, the output ROM name may not match the `.c` file and in those cases, you can select the ROM file instead and it should work.
226
226
 
227
227
  > [!NOTE]
228
- > This repository also uses [ed64](https://github.com/anacierdem/ed64), so you can use the launch configurations without `(emu)` to run the code if you have an everdrive plugged in and your active configuration will just boot up.
228
+ > This repository also uses [UNFLoader](https://github.com/buu342/N64-UNFLoader), so you can use the launch configurations without `(emu)` to run the code if you have a supported flashcart plugged in and have `UNFLoader` executable on your `PATH`.
229
+ >
230
+ > The special `Debug Test Bench (emu)` configuration will start ares with remote debugging for the test bench if you have `gdb-multiarch` executable on your `PATH`. It should automatically break in your `main` function.
229
231
 
230
232
  You can clean everything with the `clean` recipe/task (open the command palette and choose `Run Task -> clean`).
231
233
 
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) => {
@@ -1,5 +1,3 @@
1
- /// <reference path="../../globals.d.ts" />
2
-
3
1
  const fs = require('fs/promises');
4
2
  const _fs = require('fs');
5
3
  const path = require('path');
@@ -1,8 +1,16 @@
1
- const { version } = require('../../package.json');
2
- const { log } = require('../helpers');
1
+ const sea = require('node:sea');
2
+
3
+ const { print } = require('../helpers');
3
4
 
4
5
  const printVersion = async () => {
5
- log(`libdragon-cli v${version}`);
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
+ print(`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.1",
3
+ "version": "11.4.3",
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
  ],