@minecraft/core-build-tasks 5.3.2 → 5.5.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/CHANGELOG.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@minecraft/core-build-tasks",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 04 Sep 2025 23:11:37 GMT",
5
+ "date": "Mon, 29 Sep 2025 17:42:07 GMT",
6
+ "version": "5.5.0",
7
+ "tag": "@minecraft/core-build-tasks_v5.5.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "zachary.campbell@skyboxlabs.com",
12
+ "package": "@minecraft/core-build-tasks",
13
+ "commit": "a3a4494c22624aa8b334dd0b664a535fdb421827",
14
+ "comment": "Add Bedrock GDK paths to core-build-tasks"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 10 Sep 2025 20:47:56 GMT",
21
+ "version": "5.4.0",
22
+ "tag": "@minecraft/core-build-tasks_v5.4.0",
23
+ "comments": {
24
+ "minor": [
25
+ {
26
+ "author": "keyyard8888@gmail.com",
27
+ "package": "@minecraft/core-build-tasks",
28
+ "commit": "70f1d4de332cc4477f02729a42c28b13b13fd64b",
29
+ "comment": "added sizeCheck as a flag"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Thu, 04 Sep 2025 23:12:17 GMT",
6
36
  "version": "5.3.2",
7
37
  "tag": "@minecraft/core-build-tasks_v5.3.2",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @minecraft/core-build-tasks
2
2
 
3
- <!-- This log was last generated on Thu, 04 Sep 2025 23:11:37 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Mon, 29 Sep 2025 17:42:07 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 5.5.0
8
+
9
+ Mon, 29 Sep 2025 17:42:07 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Add Bedrock GDK paths to core-build-tasks (zachary.campbell@skyboxlabs.com)
14
+
15
+ ## 5.4.0
16
+
17
+ Wed, 10 Sep 2025 20:47:56 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - added sizeCheck as a flag (keyyard8888@gmail.com)
22
+
7
23
  ## 5.3.2
8
24
 
9
- Thu, 04 Sep 2025 23:11:37 GMT
25
+ Thu, 04 Sep 2025 23:12:17 GMT
10
26
 
11
27
  ### Patches
12
28
 
package/lib/index.js CHANGED
@@ -53576,6 +53576,8 @@ var require_lib4 = __commonJS({
53576
53576
 
53577
53577
  // src/platforms/MinecraftProduct.ts
53578
53578
  var MinecraftProduct = /* @__PURE__ */ ((MinecraftProduct2) => {
53579
+ MinecraftProduct2["BedrockGDK"] = "BedrockGDK";
53580
+ MinecraftProduct2["PreviewGDK"] = "PreviewGDK";
53579
53581
  MinecraftProduct2["Bedrock"] = "BedrockUWP";
53580
53582
  MinecraftProduct2["Preview"] = "PreviewUWP";
53581
53583
  MinecraftProduct2["Custom"] = "Custom";
@@ -53734,6 +53736,10 @@ function getOrThrowFromProcess(key, messageOverride) {
53734
53736
 
53735
53737
  // src/tasks/cleanCollateral.ts
53736
53738
  var STANDARD_CLEAN_PATHS = [
53739
+ "APPDATA/Minecraft Bedrock/Users/Shared/games/com.mojang/development_behavior_packs/PROJECT_NAME",
53740
+ "APPDATA/Minecraft Bedrock/Users/Shared/games/com.mojang/development_resource_packs/PROJECT_NAME",
53741
+ "APPDATA/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_behavior_packs/PROJECT_NAME",
53742
+ "APPDATA/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_resource_packs/PROJECT_NAME",
53737
53743
  "LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME",
53738
53744
  "LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_resource_packs/PROJECT_NAME",
53739
53745
  "LOCALAPPDATA/Packages/Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME",
@@ -53779,8 +53785,9 @@ import path5 from "path";
53779
53785
  // src/tasks/helpers/copyFiles.ts
53780
53786
  var import_node_core_library = __toESM(require_lib2());
53781
53787
  import path3 from "path";
53782
- function copyFiles(originPaths, outputPath) {
53783
- let destinationPath = path3.resolve(outputPath);
53788
+ function copyFiles(originPaths, outputPath, skipIfPossible = true) {
53789
+ const destinationPath = path3.resolve(outputPath);
53790
+ const MTIME_TOLERANCE_MS = 1e3;
53784
53791
  for (const originPath of originPaths) {
53785
53792
  const inputPath = path3.resolve(originPath);
53786
53793
  const pathStats = import_node_core_library.FileSystem.getLinkStatistics(inputPath);
@@ -53788,12 +53795,42 @@ function copyFiles(originPaths, outputPath) {
53788
53795
  console.log(`Copying folder ${inputPath} to ${destinationPath}`);
53789
53796
  } else {
53790
53797
  const filename = path3.parse(inputPath).base;
53791
- destinationPath = path3.resolve(destinationPath, filename);
53792
- console.log(`Copying file ${inputPath} to ${destinationPath}`);
53798
+ const fileDestinationPath = path3.resolve(destinationPath, filename);
53799
+ let shouldCopy = true;
53800
+ if (skipIfPossible) {
53801
+ try {
53802
+ const destFileStats = import_node_core_library.FileSystem.getStatistics(fileDestinationPath);
53803
+ if (destFileStats.size !== pathStats.size) {
53804
+ shouldCopy = true;
53805
+ } else {
53806
+ const srcMtime = pathStats.mtimeMs ?? pathStats.mtime.getTime();
53807
+ const destMtime = destFileStats.mtimeMs ?? destFileStats.mtime.getTime();
53808
+ if (Math.abs(srcMtime - destMtime) > MTIME_TOLERANCE_MS) {
53809
+ shouldCopy = true;
53810
+ } else {
53811
+ shouldCopy = false;
53812
+ }
53813
+ }
53814
+ } catch {
53815
+ shouldCopy = true;
53816
+ }
53817
+ }
53818
+ if (!shouldCopy) {
53819
+ console.log(`Skipping copy for ${inputPath}; no change detected`);
53820
+ continue;
53821
+ }
53822
+ console.log(`Copying file ${inputPath} to ${fileDestinationPath}`);
53823
+ import_node_core_library.FileSystem.copyFiles({
53824
+ sourcePath: inputPath,
53825
+ destinationPath: fileDestinationPath,
53826
+ preserveTimestamps: true
53827
+ });
53828
+ continue;
53793
53829
  }
53794
53830
  import_node_core_library.FileSystem.copyFiles({
53795
53831
  sourcePath: inputPath,
53796
- destinationPath
53832
+ destinationPath,
53833
+ preserveTimestamps: true
53797
53834
  });
53798
53835
  }
53799
53836
  }
@@ -53802,8 +53839,11 @@ function copyFiles(originPaths, outputPath) {
53802
53839
  import path4, { resolve as resolve2 } from "path";
53803
53840
  function getGameDeploymentRootPaths() {
53804
53841
  const localAppDataPath = process.env["LOCALAPPDATA"];
53842
+ const appDataPath = process.env["APPDATA"];
53805
53843
  const customDeploymentPath = process.env["CUSTOM_DEPLOYMENT_PATH"];
53806
53844
  return {
53845
+ BedrockGDK: appDataPath ? resolve2(appDataPath, "Minecraft Bedrock/Users/Shared/games/com.mojang/") : void 0,
53846
+ PreviewGDK: appDataPath ? resolve2(appDataPath, "Minecraft Bedrock Preview/Users/Shared/games/com.mojang/") : void 0,
53807
53847
  BedrockUWP: localAppDataPath ? resolve2(localAppDataPath, "Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/") : void 0,
53808
53848
  PreviewUWP: localAppDataPath ? resolve2(
53809
53849
  localAppDataPath,
@@ -2,6 +2,8 @@
2
2
  * Non-exhaustive list of product variants used to deploy files to the correct location.
3
3
  */
4
4
  export declare enum MinecraftProduct {
5
+ BedrockGDK = "BedrockGDK",
6
+ PreviewGDK = "PreviewGDK",
5
7
  Bedrock = "BedrockUWP",
6
8
  Preview = "PreviewUWP",
7
9
  Custom = "Custom"
@@ -1 +1 @@
1
- export declare function copyFiles(originPaths: string[], outputPath: string): void;
1
+ export declare function copyFiles(originPaths: string[], outputPath: string, skipIfPossible?: boolean): void;
package/lib-cjs/index.js CHANGED
@@ -53603,6 +53603,8 @@ module.exports = __toCommonJS(index_exports);
53603
53603
 
53604
53604
  // src/platforms/MinecraftProduct.ts
53605
53605
  var MinecraftProduct = /* @__PURE__ */ ((MinecraftProduct2) => {
53606
+ MinecraftProduct2["BedrockGDK"] = "BedrockGDK";
53607
+ MinecraftProduct2["PreviewGDK"] = "PreviewGDK";
53606
53608
  MinecraftProduct2["Bedrock"] = "BedrockUWP";
53607
53609
  MinecraftProduct2["Preview"] = "PreviewUWP";
53608
53610
  MinecraftProduct2["Custom"] = "Custom";
@@ -53761,6 +53763,10 @@ function getOrThrowFromProcess(key, messageOverride) {
53761
53763
 
53762
53764
  // src/tasks/cleanCollateral.ts
53763
53765
  var STANDARD_CLEAN_PATHS = [
53766
+ "APPDATA/Minecraft Bedrock/Users/Shared/games/com.mojang/development_behavior_packs/PROJECT_NAME",
53767
+ "APPDATA/Minecraft Bedrock/Users/Shared/games/com.mojang/development_resource_packs/PROJECT_NAME",
53768
+ "APPDATA/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_behavior_packs/PROJECT_NAME",
53769
+ "APPDATA/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_resource_packs/PROJECT_NAME",
53764
53770
  "LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME",
53765
53771
  "LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_resource_packs/PROJECT_NAME",
53766
53772
  "LOCALAPPDATA/Packages/Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME",
@@ -53806,8 +53812,9 @@ var import_path5 = __toESM(require("path"));
53806
53812
  // src/tasks/helpers/copyFiles.ts
53807
53813
  var import_node_core_library = __toESM(require_lib2());
53808
53814
  var import_path3 = __toESM(require("path"));
53809
- function copyFiles(originPaths, outputPath) {
53810
- let destinationPath = import_path3.default.resolve(outputPath);
53815
+ function copyFiles(originPaths, outputPath, skipIfPossible = true) {
53816
+ const destinationPath = import_path3.default.resolve(outputPath);
53817
+ const MTIME_TOLERANCE_MS = 1e3;
53811
53818
  for (const originPath of originPaths) {
53812
53819
  const inputPath = import_path3.default.resolve(originPath);
53813
53820
  const pathStats = import_node_core_library.FileSystem.getLinkStatistics(inputPath);
@@ -53815,12 +53822,42 @@ function copyFiles(originPaths, outputPath) {
53815
53822
  console.log(`Copying folder ${inputPath} to ${destinationPath}`);
53816
53823
  } else {
53817
53824
  const filename = import_path3.default.parse(inputPath).base;
53818
- destinationPath = import_path3.default.resolve(destinationPath, filename);
53819
- console.log(`Copying file ${inputPath} to ${destinationPath}`);
53825
+ const fileDestinationPath = import_path3.default.resolve(destinationPath, filename);
53826
+ let shouldCopy = true;
53827
+ if (skipIfPossible) {
53828
+ try {
53829
+ const destFileStats = import_node_core_library.FileSystem.getStatistics(fileDestinationPath);
53830
+ if (destFileStats.size !== pathStats.size) {
53831
+ shouldCopy = true;
53832
+ } else {
53833
+ const srcMtime = pathStats.mtimeMs ?? pathStats.mtime.getTime();
53834
+ const destMtime = destFileStats.mtimeMs ?? destFileStats.mtime.getTime();
53835
+ if (Math.abs(srcMtime - destMtime) > MTIME_TOLERANCE_MS) {
53836
+ shouldCopy = true;
53837
+ } else {
53838
+ shouldCopy = false;
53839
+ }
53840
+ }
53841
+ } catch {
53842
+ shouldCopy = true;
53843
+ }
53844
+ }
53845
+ if (!shouldCopy) {
53846
+ console.log(`Skipping copy for ${inputPath}; no change detected`);
53847
+ continue;
53848
+ }
53849
+ console.log(`Copying file ${inputPath} to ${fileDestinationPath}`);
53850
+ import_node_core_library.FileSystem.copyFiles({
53851
+ sourcePath: inputPath,
53852
+ destinationPath: fileDestinationPath,
53853
+ preserveTimestamps: true
53854
+ });
53855
+ continue;
53820
53856
  }
53821
53857
  import_node_core_library.FileSystem.copyFiles({
53822
53858
  sourcePath: inputPath,
53823
- destinationPath
53859
+ destinationPath,
53860
+ preserveTimestamps: true
53824
53861
  });
53825
53862
  }
53826
53863
  }
@@ -53829,8 +53866,11 @@ function copyFiles(originPaths, outputPath) {
53829
53866
  var import_path4 = __toESM(require("path"));
53830
53867
  function getGameDeploymentRootPaths() {
53831
53868
  const localAppDataPath = process.env["LOCALAPPDATA"];
53869
+ const appDataPath = process.env["APPDATA"];
53832
53870
  const customDeploymentPath = process.env["CUSTOM_DEPLOYMENT_PATH"];
53833
53871
  return {
53872
+ BedrockGDK: appDataPath ? (0, import_path4.resolve)(appDataPath, "Minecraft Bedrock/Users/Shared/games/com.mojang/") : void 0,
53873
+ PreviewGDK: appDataPath ? (0, import_path4.resolve)(appDataPath, "Minecraft Bedrock Preview/Users/Shared/games/com.mojang/") : void 0,
53834
53874
  BedrockUWP: localAppDataPath ? (0, import_path4.resolve)(localAppDataPath, "Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/") : void 0,
53835
53875
  PreviewUWP: localAppDataPath ? (0, import_path4.resolve)(
53836
53876
  localAppDataPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/core-build-tasks",
3
- "version": "5.3.2",
3
+ "version": "5.5.0",
4
4
  "description": "Common build tasks used for minecraft-scripting-libraries",
5
5
  "exports": {
6
6
  "types": "./lib/index.d.ts",