Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use typescript #194

Merged
merged 46 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1419dba
migrate classes to separate typescript files
SgtPooki Feb 25, 2022
57cb66f
fixed all typescript errors
SgtPooki Feb 25, 2022
cd0b7eb
add aegir
SgtPooki Feb 25, 2022
4ccc62a
compile new app.js: npx tsc
SgtPooki Feb 25, 2022
fd64ef5
add vscode config
SgtPooki Feb 25, 2022
4688773
move app.js to dist/
SgtPooki Feb 25, 2022
c49eb1d
chore: improve dev setup
SgtPooki Feb 26, 2022
61842b3
chore: fix with aegir lint -f
SgtPooki Feb 26, 2022
6bf69a7
chore: replace all tab characters
SgtPooki Feb 26, 2022
f486974
chore: fix majority of lint errors
SgtPooki Feb 26, 2022
34b7535
chore: clean up comments & fix docs
SgtPooki Mar 1, 2022
a2d345d
run check-aegir-project
SgtPooki Mar 1, 2022
9ecee0f
remove docker publish action
SgtPooki Mar 1, 2022
ece6462
use dist folder
SgtPooki Mar 2, 2022
411c775
publish github pages on push to master branch
SgtPooki Mar 2, 2022
409ac6c
deploy to gh-pages on merge to master
SgtPooki Mar 2, 2022
891ebda
remove release job
SgtPooki Mar 2, 2022
f6ff34e
temporarily disable running test scripts
SgtPooki Mar 2, 2022
243c752
clock icon no longer blocks flag icon
SgtPooki Mar 2, 2022
d794ff6
create npm start script
SgtPooki Mar 2, 2022
8881a49
minor refactor, misc improvements; dep updates
SgtPooki Mar 2, 2022
b27ea08
fix a few UI issues
SgtPooki Mar 2, 2022
e19945f
Merge pull request #2 from SgtPooki/feature/ts-migration
SgtPooki Mar 2, 2022
532df3a
Bump typescript from 4.5.5 to 4.6.2
dependabot[bot] Mar 2, 2022
090bd60
Merge pull request #3 from SgtPooki/dependabot/npm_and_yarn/typescrip…
SgtPooki Mar 2, 2022
1f76ab8
feat: use jsipfs to publish to ipfs
SgtPooki Mar 3, 2022
95afe34
chore: fix package.json 'main' and 'files'
SgtPooki Mar 3, 2022
10d64da
fix: correct aegir settings & type failures
SgtPooki Mar 3, 2022
6ab561c
use gh-pages
SgtPooki Mar 4, 2022
f1292a1
fix: Cors onerror clears Tag
SgtPooki Mar 4, 2022
c274ee7
revert ipfs client and ipfs-geoip versions
SgtPooki Mar 5, 2022
158495b
CORS results update correctly
SgtPooki Mar 5, 2022
8b79912
All checks are async
SgtPooki Mar 5, 2022
0c04308
Online icon displays globe on success
SgtPooki Mar 5, 2022
d40850c
minor touchup
SgtPooki Mar 5, 2022
3209b76
commit serialized version of site before changes
SgtPooki Mar 5, 2022
d7b0597
serialize changes after update
SgtPooki Mar 5, 2022
d19fdb9
fix origin checks
SgtPooki Mar 5, 2022
a1a414a
#/# tested correctly updates
SgtPooki Mar 5, 2022
c36fd57
runaway fixes...
SgtPooki Mar 5, 2022
1ff2826
Merge 'origin/master'
lidel Mar 7, 2022
79a2321
Update package.json
SgtPooki Mar 7, 2022
1b70c71
Update .github/workflows/js-test-and-release.yml
SgtPooki Mar 7, 2022
89ebb41
Update .github/workflows/build-and-publish-github-pages.yml
SgtPooki Mar 7, 2022
902eb82
use versioned rate-limter pkg
SgtPooki Mar 7, 2022
4f852f0
comment out test github actions
SgtPooki Mar 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"ipfs",
"plugin:compat/recommended"
],
"env": {
"browser": true,
"node": false
}
}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
50 changes: 50 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
# This reduces the friction associated with updating with our workflows.

on: [ pull_request ]
name: Automerge

jobs:
automerge-check:
if: github.event.pull_request.user.login == 'web3-bot'
runs-on: ubuntu-latest
outputs:
status: ${{ steps.should-automerge.outputs.status }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check if we should automerge
id: should-automerge
run: |
for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do
committer=$(git show --format=$'%ce' -s $commit)
echo "Committer: $committer"
if [[ "$committer" != "web3-bot@users.noreply.github.com" ]]; then
echo "Commit $commit wasn't committed by web3-bot, but by $committer."
echo "::set-output name=status::false"
exit
fi
done
echo "::set-output name=status::true"
automerge:
needs: automerge-check
runs-on: ubuntu-latest
# The check for the user is redundant here, as this job depends on the automerge-check job,
# but it prevents this job from spinning up, just to be skipped shortly after.
if: github.event.pull_request.user.login == 'web3-bot' && needs.automerge-check.outputs.status == 'true'
steps:
- name: Wait on tests
uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
running-workflow-name: 'automerge' # the name of this job
- name: Merge PR
uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: ""
MERGE_METHOD: "squash"
MERGE_DELETE_BRANCH: true
26 changes: 26 additions & 0 deletions .github/workflows/build-and-publish-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Publish github pages
on:
push:
branches:
- master
jobs:
build-and-publish:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
npm install
npm run build

# Deploy to gh pages branch
- name: Deploy
uses: s0/git-publish-subdir-action@develop
SgtPooki marked this conversation as resolved.
Show resolved Hide resolved
env:
REPO: self
BRANCH: gh-pages
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131 changes: 131 additions & 0 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: test & maybe release
SgtPooki marked this conversation as resolved.
Show resolved Hide resolved
on:
push:
branches:
- master # with #262 - ${{{ github.default_branch }}}
pull_request:
branches:
- master # with #262 - ${{{ github.default_branch }}}

jobs:

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present lint
- run: npm run --if-present dep-check

test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [16]
SgtPooki marked this conversation as resolved.
Show resolved Hide resolved
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:node
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: node

test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: chrome

test-chrome-webworker:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: chrome-webworker

test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: firefox

test-firefox-webworker:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: firefox-webworker

test-electron-main:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-main
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: electron-main

test-electron-renderer:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: electron-renderer
Loading