Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Sep 11, 2023
1 parent a12328b commit e2a170a
Show file tree
Hide file tree
Showing 11 changed files with 1,717 additions and 1,198 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"packages/*"
],
"devDependencies": {
"lerna": "^7.1.1"
"lerna": "^7.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/greenbox-data/lib/familiars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const compressFamiliars = (familiars: RawFamiliar[]) =>
export const expandFamiliars = (s = "") => {
let id = 0;

let result = [] as RawFamiliar[];
const result = [] as RawFamiliar[];

for (const c of s) {
if (c === "*" && result.length > 0) {
Expand Down
11 changes: 7 additions & 4 deletions packages/greenbox-data/lib/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,24 @@ export const compressSkills = (skills: RawSkill[]) =>
export const expandSkills = (s = "") => {
let id = 1;

let result = [] as RawSkill[];
const result = [] as RawSkill[];

for (let i = 0; i < s.length; i++) {
const c = s[i];
switch (c) {
case "(":
case "(": {
// If we see brackets, adjust the last skill level
const end = s.indexOf(")", i);
result[result.length - 1][2] = Number(s.substring(i + 1, end));
i = end;
break;
case ",":
}
case ",": {
// If we see a comma, jump to the next 1k block
id = (Math.floor(id / 1000) + 1) * 1000;
break;
default:
}
default: {
const status = Number(c) as SkillStatus;
// We can just drop any references to skills we do not have permed
// or levelled at this stage
Expand All @@ -239,6 +241,7 @@ export const expandSkills = (s = "") => {
}
id++;
break;
}
}
}

Expand Down
15 changes: 8 additions & 7 deletions packages/greenbox-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
"url": "https://github.com/loathers/greenbox/issues"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"eslint": "^8.21.0",
"eslint-plugin-prettier": "^4.2.1",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"greenbox-prettier-config": "^0.0.0",
"prettier": "^3.0.0",
"typescript": "^5.1.6"
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"prettier": "greenbox-prettier-config",
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/greenbox-prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"url": "git+https://github.com/loathers/greenbox.git"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"prettier": "^3.0.0"
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"prettier": "^3.0.3"
},
"peerDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"prettier": "^3.0.0"
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"prettier": "^3.0.3"
}
}
1 change: 1 addition & 0 deletions packages/greenbox-script/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"ecmaVersion": 2020,
"sourceType": "module"
},
"ignorePatterns": ["dist"],
"plugins": ["@typescript-eslint", "libram"],
"rules": {
"block-scoped-var": "error",
Expand Down
1 change: 1 addition & 0 deletions packages/greenbox-script/kolmafia-polyfill.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
const kolmafia = require("kolmafia");
export let console = { log: kolmafia.print };
export let global = {
Expand Down
31 changes: 16 additions & 15 deletions packages/greenbox-script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@
},
"dependencies": {
"greenbox-data": "^0.0.0",
"kolmafia": "^5.27461.0",
"libram": "^0.8.5"
"kolmafia": "^5.27586.0",
"libram": "^0.8.9"
},
"devDependencies": {
"@babel/core": "^7.18.10",
"@babel/core": "^7.22.17",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
"@babel/preset-env": "^7.18.9",
"@babel/preset-typescript": "^7.18.6",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^20.4.1",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"esbuild": "^0.18.11",
"@babel/preset-env": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"esbuild": "^0.19.2",
"esbuild-plugin-babel": "^0.2.3",
"eslint": "^8.21.0",
"eslint-plugin-libram": "^0.2.13",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-libram": "^0.3.1",
"eslint-plugin-prettier": "^5.0.0",
"greenbox-prettier-config": "^0.0.0",
"prettier": "^3.0.0",
"typescript": "^5.1.6"
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"prettier": "greenbox-prettier-config"
}
6 changes: 3 additions & 3 deletions packages/greenbox-script/src/greenbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
visitUrl,
} from "kolmafia";
import { Kmail } from "libram";
import { getNumber, getBoolean } from "libram/dist/property";
import { getBoolean, getNumber } from "libram/dist/property";

import { getIotMStatus, IotMOptions } from "./iotms";
import { haveItem } from "./utils";
Expand Down Expand Up @@ -82,7 +82,7 @@ function checkSkills() {

function getStatus(skill: Skill) {
// Toggle Optimality is hardcore permanent if the player has any skill level
if (toInt(skill) == 7254 && getNumber(`skillLevel7254`) > 0) {
if (toInt(skill) === 7254 && getNumber(`skillLevel7254`) > 0) {
return SkillStatus.HARDCORE;
}

Expand Down Expand Up @@ -257,7 +257,7 @@ function main(args = ""): void {

printHtml(`Deciding your fate...`);

if (inMultiFight() || handlingChoice() || currentRound() != 0) {
if (inMultiFight() || handlingChoice() || currentRound() !== 0) {
printHtml(
`<b><font color=red>You are in a combat or a choice adventure so your greenboxes will fail. Exiting...</font></b>`,
);
Expand Down
30 changes: 15 additions & 15 deletions packages/greenbox-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@
"format": "prettier --write src/**/*.{ts,tsx} *.{json,ts,html} src/*.ts"
},
"dependencies": {
"@chakra-ui/icons": "^2.0.6",
"@chakra-ui/react": "^2.2.4",
"@chakra-ui/system": "^2.2.4",
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/react": "^2.8.1",
"@chakra-ui/system": "^2.6.1",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
"@reduxjs/toolkit": "^1.8.3",
"color": "^4.2.3",
"comlink": "^4.3.1",
"date-fns": "^2.29.2",
"framer-motion": "^10.12.18",
"framer-motion": "^10.16.4",
"greenbox-data": "^0.0.0",
"he": "^1.2.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.2",
"recharts": "^2.1.13",
"react-redux": "^8.1.2",
"recharts": "^2.8.0",
"redux": "^4.2.0",
"redux-persist": "^6.0.0",
"use-query-params": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.18.10",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/color": "^3.0.3",
"@babel/core": "^7.22.17",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/color": "^3.0.4",
"@types/he": "^1.1.2",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^4.0.2",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.4",
"greenbox-prettier-config": "^0.0.0",
"prettier": "^3.0.0",
"typescript": "^5.1.6",
"vite": "^4.4.2"
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"vite": "^4.4.9"
},
"prettier": "greenbox-prettier-config"
}
Loading

0 comments on commit e2a170a

Please sign in to comment.