Skip to content

Commit

Permalink
updated dependencies (#277)
Browse files Browse the repository at this point in the history
* updated dependencies
* adding tests
* fixing coverage
* fixing imports
* turning off fast fail
* adding path to fix uri
  • Loading branch information
DaanV2 authored Nov 9, 2024
1 parent 807c7aa commit 47f02a2
Show file tree
Hide file tree
Showing 50 changed files with 437 additions and 199 deletions.
1 change: 1 addition & 0 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
name: 📋 Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config: Config = {
collectCoverage: true,

// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: ["./src", "./test"],
// collectCoverageFrom: ["./src", "./test"],

// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
Expand Down
84 changes: 60 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
},
"homepage": "https://github.com/Blockception/BC-Minecraft-Bedrock-Diagnoser#readme",
"dependencies": {
"bc-minecraft-bedrock-command": "^1.21.2-0",
"bc-minecraft-bedrock-project": "^1.21.3-1",
"bc-minecraft-bedrock-types": "^1.21.1-4",
"bc-minecraft-bedrock-vanilla-data": "^1.21.1-3",
"bc-minecraft-molang": "^1.21.1-2",
"bc-minecraft-project": "^1.21.1-2",
"bc-minecraft-bedrock-command": "^1.21.44-1",
"bc-minecraft-bedrock-project": "^1.21.44-1",
"bc-minecraft-bedrock-types": "^1.21.44-0",
"bc-minecraft-bedrock-vanilla-data": "^1.21.44-1",
"bc-minecraft-molang": "^1.21.44-1",
"bc-minecraft-project": "^1.21.44-0",
"jsonc": "^2.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { DiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity } from "../../../Types/Severity";
import { EntityAnimationMolangCarrier, EventCarrier } from "../../../Types/Interfaces";
import { general_animation_controllers_implementation } from "../../Minecraft/Animation Controllers";
import { MolangDataSetKey } from "bc-minecraft-molang";
import { DiagnosticsBuilder, DiagnosticSeverity, EntityAnimationMolangCarrier, EventCarrier } from "../../../Types";
import { general_animation_controllers_implementation } from "../../Minecraft/Animation Controllers";

/**
*
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Animation/diagnostics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { MolangDataSetKey } from "bc-minecraft-molang";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { EntityAnimationMolangCarrier, EventCarrier } from "../../../Types/Interfaces";
import { DiagnosticsBuilder, DiagnosticSeverity, EntityAnimationMolangCarrier, EventCarrier } from '../../../Types';
import { diagnose_molang_implementation } from "../../Molang/diagnostics";

type User = EntityAnimationMolangCarrier & EventCarrier;
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Animation/entry.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Internal, SMap } from "bc-minecraft-bedrock-project";
import { DiagnosticSeverity } from "../../../../main";
import { DocumentDiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity, DocumentDiagnosticsBuilder } from '../../../Types';
import { Json } from "../../Json/Json";
import { diagnose_molang } from "../../Molang/diagnostics";
import { json_commandsCheck } from "../Mcfunction/commands";
Expand Down
9 changes: 4 additions & 5 deletions src/Lib/Diagnostics/BehaviorPack/Block/diagnose.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { behaviorpack_check_blockstates } from "../BlockState/diagnose";
import { check_definition_value, education_enabled } from "../../Definitions";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { Minecraft } from "bc-minecraft-bedrock-types";
import { Minecraft, Types } from "bc-minecraft-bedrock-types";
import { MinecraftData } from "bc-minecraft-bedrock-vanilla-data";
import { Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { check_definition_value, education_enabled } from "../../Definitions";
import { behaviorpack_check_blockstates } from "../BlockState/diagnose";

/**
*
Expand Down
8 changes: 4 additions & 4 deletions src/Lib/Diagnostics/BehaviorPack/Block/entry.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { behaviorpack_diagnose_block_components } from "./components/diagnose";
import { diagnose_molang } from "../../Molang/diagnostics";
import { DocumentDiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { Internal } from "bc-minecraft-bedrock-project";
import { getUsedComponents } from "bc-minecraft-bedrock-types/lib/minecraft/components";
import { Json } from "../../Json";
import { DiagnosticSeverity, DocumentDiagnosticsBuilder } from "../../../Types";
import { Context } from "../../../utility/components";
import { Json } from "../../Json";
import { diagnose_molang } from "../../Molang/diagnostics";
import { behaviorpack_block_components_dependencies } from "./components/dependencies";
import { behaviorpack_diagnose_block_components } from "./components/diagnose";

/**Diagnoses the given document as an bp block
* @param doc The text document to diagnose
Expand Down
7 changes: 3 additions & 4 deletions src/Lib/Diagnostics/BehaviorPack/Entity/diagnose.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { check_definition_value, education_enabled } from "../../Definitions";
import { Command, ParameterType } from "bc-minecraft-bedrock-command";
import { DiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity } from "../../../Types/Severity";
import { MinecraftData } from "bc-minecraft-bedrock-vanilla-data";
import { Types } from "bc-minecraft-bedrock-types";
import { MinecraftData } from "bc-minecraft-bedrock-vanilla-data";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { check_definition_value, education_enabled } from "../../Definitions";

/**
* Checks if the entities exists in the project or in vanilla, if not then a bug is reported
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Entity/events.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Internal, SMap } from "bc-minecraft-bedrock-project";
import { EntityProperty } from "bc-minecraft-bedrock-project/lib/src/project/behavior-pack/entity";
import { ComponentGroups } from "bc-minecraft-bedrock-types/lib/minecraft/components";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../../main";
import { DocumentDiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity, DiagnosticsBuilder, DocumentDiagnosticsBuilder } from '../../../Types';
import { commandsCheck } from "../Mcfunction";
import { behaviorpack_entity_components_filters } from "./components/filters";
import { diagnose_entity_property_usage } from "./properties";
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Events/diagnose.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity } from "../../../Types/Severity";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";

export function diagnose_events(any: any | undefined, events: string[], diagnoser: DiagnosticsBuilder) {
if (typeof any !== "object") return;
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Functions/Tick/entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DocumentDiagnosticsBuilder } from "../../../../Types";
import { DiagnosticSeverity } from "../../../../Types/Severity";
import { DiagnosticSeverity, DocumentDiagnosticsBuilder } from '../../../../Types';
import { Json } from "../../../Json/Json";

/**Diagnoses the given document as an tick.json
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Manifest/entry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Manifest } from "bc-minecraft-bedrock-project/lib/src/internal/types";
import { Types } from "bc-minecraft-bedrock-types";
import { DiagnosticSeverity } from "../../../../main";
import { DocumentDiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity, DocumentDiagnosticsBuilder } from '../../../Types';
import { Json } from "../../Json/Json";
import { minecraft_manifest_diagnose, minecraft_manifest_required_module } from "../../Minecraft/Manifest";

Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/BehaviorPack/Mcfunction/entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DiagnosticSeverity } from "../../../../main";
import { DocumentDiagnosticsBuilder } from "../../../Types";
import { DiagnosticSeverity, DocumentDiagnosticsBuilder } from "../../../Types";
import { mcfunction_commandsCheck } from "./commands";

/**Diagnoses the given document as an mcfunction
Expand Down
4 changes: 2 additions & 2 deletions src/Lib/Diagnostics/BehaviorPack/Trading/diagnose.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { Types } from "bc-minecraft-bedrock-types";
import { check_definition_value, education_enabled } from "../../Definitions";
import { MinecraftData } from "bc-minecraft-bedrock-vanilla-data";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../../Types";
import { check_definition_value, education_enabled } from "../../Definitions";

export function behaviorpack_trading_diagnose(
value: Types.OffsetWord | string,
Expand Down
4 changes: 1 addition & 3 deletions src/Lib/Diagnostics/BehaviorPack/anim or controller.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { MolangDataSetKey } from "bc-minecraft-molang";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { EntityAnimationMolangCarrier, EventCarrier } from "../../Types/Interfaces";
import { DiagnosticSeverity } from "../../Types/Severity";
import { animation_controller_diagnose_implementation } from "./Animation Controllers/diagnostics";
import { animation_diagnose_implementation } from "./Animation/diagnostics";
import { EntityAnimationMolangCarrier, EventCarrier, DiagnosticsBuilder, DiagnosticSeverity } from '../../Types';

/**
* @param id
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/Definitions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Definition } from "bc-minecraft-project";
import { DiagnosticsBuilder } from "../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../Types/Severity";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../Types";

/**Returns if the project has education enabled
* @param diagnoser The diagnostics builder to add the errors to
Expand Down
6 changes: 2 additions & 4 deletions src/Lib/Diagnostics/General/Boolean.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { General } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";
import { Types } from "bc-minecraft-bedrock-types";
import { General, Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../Types";

export function general_boolean_diagnose(value: Types.OffsetWord, diagnoser: DiagnosticsBuilder): void {
if (General.Boolean.is(value.text)) return;
Expand Down
6 changes: 2 additions & 4 deletions src/Lib/Diagnostics/General/Float.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { General } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";
import { Types } from "bc-minecraft-bedrock-types";
import { General, Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../Types";

export function general_float_diagnose(
value: Types.OffsetWord,
Expand Down
6 changes: 2 additions & 4 deletions src/Lib/Diagnostics/General/Integer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { General } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";
import { Types } from "bc-minecraft-bedrock-types";
import { General, Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../Types";

export function general_integer_diagnose(
value: Types.OffsetWord,
Expand Down
6 changes: 2 additions & 4 deletions src/Lib/Diagnostics/General/String.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types";
import { General } from "bc-minecraft-bedrock-types";
import { Types } from "bc-minecraft-bedrock-types";
import { General, Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder, DiagnosticSeverity } from "../../Types";

export function general_string_diagnose(value: Types.OffsetWord, diagnoser: DiagnosticsBuilder) {
if (General.String.is(value.text)) return;
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/Json/Errors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { OffsetWord } from "bc-minecraft-bedrock-types/lib/types/offset-word";
import { DiagnosticSeverity } from "../../../main";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticsBuilder, DiagnosticSeverity } from '../../Types';

export function Handle_Json_Error(err: any, diagnoser: DiagnosticsBuilder): void {
if (typeof err.message !== "string") {
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/Json/Json.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { jsonc } from "jsonc";
import { DiagnosticsBuilder, DocumentDiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";
import { DiagnosticsBuilder, DiagnosticSeverity, DocumentDiagnosticsBuilder } from '../../Types';
import { Handle_Json_Error } from "./Errors";

export namespace Json {
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/Minecraft/Animation Controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import {
} from "bc-minecraft-bedrock-project";
import { Defined, Molang, MolangDataSetKey } from "bc-minecraft-molang";
import { diagnose_molang_implementation } from "../Molang/diagnostics";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";
import { State } from "bc-minecraft-bedrock-project/lib/src/internal/behavior-pack";
import { Types } from "bc-minecraft-bedrock-types";
import { forEach } from "../../utility/using-defined";
import { DiagnosticsBuilder, DiagnosticSeverity } from '../../Types';

export type animation_controllers =
| Internal.BehaviorPack.AnimationControllers
Expand Down
3 changes: 1 addition & 2 deletions src/Lib/Diagnostics/Minecraft/Animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { BehaviorPack, DataSetConnector, ResourcePack } from "bc-minecraft-bedro
import { Script } from "bc-minecraft-bedrock-project/lib/src/internal/types";
import { Types } from "bc-minecraft-bedrock-types";
import { Vanilla } from "bc-minecraft-bedrock-vanilla-data";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";
import { DiagnosticsBuilder, DiagnosticSeverity } from '../../Types';

// Vanilla animations and controllers that aren't played via the typical means; the controllers aren't under scripts.animate and the animations aren't in controllers. Vanilla player stuff so no point in flagging it
const whitelist = [
Expand Down
7 changes: 2 additions & 5 deletions src/Lib/Diagnostics/Minecraft/Coordinate.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Minecraft } from "bc-minecraft-bedrock-types";
import { Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder } from "../../Types/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../Types/Severity";

import { Minecraft, Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder, DiagnosticSeverity } from '../../Types';
export function minecraft_coordinate_diagnose(value: Types.OffsetWord, diagnoser: DiagnosticsBuilder): boolean {
if (Minecraft.Coordinate.is(value.text)) return true;

Expand Down
Loading

0 comments on commit 47f02a2

Please sign in to comment.