Skip to content

Commit

Permalink
chore(eval): remove superpowers (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 authored Jul 22, 2024
1 parent d42af7b commit b12cd87
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- name: Installling dependencies
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- name: Installling dependencies
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.9.0-bookworm
FROM node:22.5.1-bookworm

WORKDIR /app

Expand Down
15 changes: 8 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"qrcode": "^1.5.3",
"sanitize-html": "^2.13.0",
"telegraf": "^4.16.3",
"tempura": "^0.4.0"
"tempura": "^0.4.1"
},
"devDependencies": {
"@teknologi-umum/eslint-config-base": "^0.0.11",
Expand Down
14 changes: 6 additions & 8 deletions src/services/eval/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { safeEval } from "./parser.js";
import {
resolveCryptoCurrencies,
resolveCurrencyRates,
resolveStocks
} from "./superpowers.js";
import { getCommandArgs } from "#utils/command.js";
import { logger } from "#utils/logger/logtail.js";

Expand All @@ -16,9 +11,12 @@ async function evalCommand(context) {
const source = getCommandArgs("eval", context);

const output = await safeEval(source, [
resolveCurrencyRates,
resolveStocks,
resolveCryptoCurrencies
// XXX(reinaldy): Since we're saving cost by reducing the number of VPS we own,
// we're disabling these features. They're making a HTTP call to one of our
// internal API, which is not available in the current setup.
// resolveCurrencyRates,
// resolveStocks,
// resolveCryptoCurrencies
]);

await context.replyWithMarkdown(`
Expand Down

0 comments on commit b12cd87

Please sign in to comment.