Skip to content

Commit

Permalink
Dependencies upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantcornholio committed Jan 7, 2025
1 parent 3dff7b4 commit b038c3b
Show file tree
Hide file tree
Showing 7 changed files with 1,326 additions and 898 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: yarn

- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: yarn

- name: Install Dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ permissions:

jobs:
create-pr:
name: Create a test PR after merge
name: Create a test PR after merge
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# We need a fresh base branch every time,
# so that it doesn't contain the text that we want to merge with the PR.
Expand All @@ -26,11 +26,11 @@ jobs:
timestamp=$(date +%Y-%m-%dT%H-%M)
echo "base_branch=test_base_$timestamp" >> $GITHUB_OUTPUT
echo "head_branch=test_head_$timestamp" >> $GITHUB_OUTPUT
- name: Create a base branch
run: |
git push origin HEAD:${{ steps.generate_branches.outputs.base_branch }}
- name: Create the changes for the PR
run: |
mkdir text
Expand Down
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"main": "dist/index.js",
"engines": {
"node": "^20"
"node": "^22"
},
"scripts": {
"lint": "yarn eslint --quiet '{*,**/*}.{js,ts}' && yarn prettier --check '{*,**/*}.json'",
Expand All @@ -33,17 +33,15 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@eng-automation/js": "^1.0.2",
"@eng-automation/js": "^2.2.0",
"@octokit/graphql-schema": "^14.39.0",
"@polkadot/api": "^10.9.1",
"node-fetch": "^2.6.12"
"@polkadot/api": "^10.9.1"
},
"devDependencies": {
"@eng-automation/js-style": "^2.2.0",
"@eng-automation/js-style": "^3.1.0",
"@octokit/webhooks-types": "^7.2.0",
"@types/jest": "^29.5.4",
"@types/node": "^20",
"@types/node-fetch": "^2",
"@types/node": "^22.10.5",
"@vercel/ncc": "^0.36.1",
"jest": "^29.6.2",
"js-yaml": "^4.1.0",
Expand Down
2 changes: 0 additions & 2 deletions src/parse-RFC.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from "node-fetch";

import { OctokitInstance, RequestResultFailed, RequestState } from "./types";
import { hashProposal, userProcessError } from "./util";

Expand Down
5 changes: 2 additions & 3 deletions src/subsquare.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from "node-fetch";

import { SUBSQUARE_API } from "./constants";

export interface ReferendaObject {
Expand Down Expand Up @@ -41,12 +39,13 @@ export interface ReferendaObject {

export class SubsquareApi {
private readonly url: string;

constructor() {
this.url = SUBSQUARE_API;
}

async fetchReferenda(index: number): Promise<ReferendaObject> {
const request = await fetch(`${this.url}/api/fellowship/referenda/${index}.json`);
return await request.json();
return (await request.json()) as ReferendaObject;
}
}
Loading

0 comments on commit b038c3b

Please sign in to comment.