@notask/unity-cli-tools 1.0.3 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.4](https://github.com/NoTaskStudios/unity-cli-tools/compare/1.0.3...1.0.4) (2025-04-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Hub:** get changeset for editor version installation ([ab4d9ad](https://github.com/NoTaskStudios/unity-cli-tools/commit/ab4d9adaeb3909bf44de5bdbbdde5e9c3ced297f))
7
+
1
8
  ## [1.0.3](https://github.com/NoTaskStudios/unity-cli-tools/compare/1.0.2...1.0.3) (2025-04-28)
2
9
 
3
10
 
@@ -8,6 +8,7 @@ const os_1 = __importDefault(require("os"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const unity_js_1 = require("./types/unity.js");
10
10
  const commandExecutor_js_1 = require("./utils/commandExecutor.js");
11
+ const unity_changeset_1 = require("unity-changeset");
11
12
  class UnityHub {
12
13
  static CONFIG_PATHS = {
13
14
  win32: {
@@ -150,12 +151,12 @@ class UnityHub {
150
151
  throw error;
151
152
  }
152
153
  }
153
- static async addEditor(version, changeset, modules = [], architecture = unity_js_1.EditorArchitecture.x86_64) {
154
+ static async addEditor(version, modules = [], architecture = unity_js_1.EditorArchitecture.x86_64) {
154
155
  try {
155
- console.debug(`Installing Unity ${version} ${(changeset ?? "") ? `(changeset: ${changeset})` : ""}`);
156
+ const data = await (0, unity_changeset_1.getUnityChangeset)(version);
156
157
  const args = ["install", "-v", version];
157
- if (changeset) {
158
- args.push("--changeset", changeset);
158
+ if (data) {
159
+ args.push("--changeset", data.changeset);
159
160
  }
160
161
  if (modules.length > 0) {
161
162
  args.push("--module");
@@ -11,7 +11,7 @@ declare class UnityHub {
11
11
  static setInstallPath(path: string): Promise<void>;
12
12
  static getUnityInstallations(filter?: string): Promise<UnityInstallations>;
13
13
  static addModule(editorVersion: string, modules: ModuleId[], childModules?: boolean): Promise<void>;
14
- static addEditor(version: string, changeset?: string, modules?: ModuleId[], architecture?: EditorArchitecture): Promise<void>;
14
+ static addEditor(version: string, modules?: ModuleId[], architecture?: EditorArchitecture): Promise<void>;
15
15
  static getProjects(): Promise<{
16
16
  name: string;
17
17
  path: string;
@@ -3,6 +3,7 @@ import os from "os";
3
3
  import path from "path";
4
4
  import { EditorArchitecture, UnityEditorLanguages, UnityModules, } from "./types/unity.js";
5
5
  import { executeCommand } from "./utils/commandExecutor.js";
6
+ import { getUnityChangeset } from "unity-changeset";
6
7
  class UnityHub {
7
8
  static CONFIG_PATHS = {
8
9
  win32: {
@@ -145,12 +146,12 @@ class UnityHub {
145
146
  throw error;
146
147
  }
147
148
  }
148
- static async addEditor(version, changeset, modules = [], architecture = EditorArchitecture.x86_64) {
149
+ static async addEditor(version, modules = [], architecture = EditorArchitecture.x86_64) {
149
150
  try {
150
- console.debug(`Installing Unity ${version} ${(changeset ?? "") ? `(changeset: ${changeset})` : ""}`);
151
+ const data = await getUnityChangeset(version);
151
152
  const args = ["install", "-v", version];
152
- if (changeset) {
153
- args.push("--changeset", changeset);
153
+ if (data) {
154
+ args.push("--changeset", data.changeset);
154
155
  }
155
156
  if (modules.length > 0) {
156
157
  args.push("--module");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notask/unity-cli-tools",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -44,7 +44,8 @@
44
44
  "description": "A tools for Unity command line development.",
45
45
  "dependencies": {
46
46
  "execa": "^9.5.2",
47
- "fs-extra": "^11.3.0"
47
+ "fs-extra": "^11.3.0",
48
+ "unity-changeset": "2.5.0"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@eslint/js": "9.24.0",