Skip to content

Commit

Permalink
feat(profile-upload): alpha version of image upload
Browse files Browse the repository at this point in the history
chore(cleanup): fix unfinished renaming

chore(types): workaround ipfs-http-client problem

ipfs/js-ipfs#3839

chore(types): added more types for the upload feature

chore(upload): small code cleanup, do not throw on wrong file input

chore(jest): switch to jest

chore(ci): fix build

chore(ci): fix caching on ci

chore(uploader): tests, wip

chore(cleanup): wrap up alpha version of image upload
  • Loading branch information
rryter committed Aug 29, 2021
1 parent 59d1e2d commit c72af0c
Show file tree
Hide file tree
Showing 22 changed files with 26,171 additions and 11,684 deletions.
82 changes: 43 additions & 39 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
{
"version": "0.1",
"$schema": "https://github.com/raw/streetsidesoftware/cspell/master/cspell.schema.json",
"language": "en",
"words": [
"bitauth",
"bitjson",
"bytecode",
"cimg",
"circleci",
"codecov",
"commitlint",
"dependabot",
"editorconfig",
"esnext",
"execa",
"exponentiate",
"globby",
"ifps",
"ipfs",
"Keccak",
"libauth",
"mkdir",
"prettierignore",
"sandboxed",
"submodules",
"transpiled",
"Typechain",
"typedoc",
"untracked"
],
"flagWords": [],
"ignorePaths": [
"package.json",
"package-lock.json",
"yarn.lock",
"tsconfig.json",
"node_modules/**"
]
}
"version": "0.2",
"$schema": "https://github.com/raw/streetsidesoftware/cspell/master/cspell.schema.json",
"language": "en",
"words": [
"bitauth",
"bitjson",
"bytecode",
"cimg",
"circleci",
"codecov",
"commitlint",
"dependabot",
"editorconfig",
"esnext",
"execa",
"exponentiate",
"globby",
"ifps",
"ipfs",
"Keccak",
"libauth",
"mkdir",
"prettierignore",
"sandboxed",
"submodules",
"transpiled",
"Typechain",
"typedoc",
"testenv",
"untracked",
"prepend",
"nomiclabs",
"esbuild"
],
"flagWords": [],
"ignorePaths": [
"package.json",
"package-lock.json",
"yarn.lock",
"tsconfig.json",
"node_modules/**"
]
}
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "./tsconfig.json" },
"env": { "es6": true },
"ignorePatterns": ["node_modules", "build", "coverage"],
"ignorePatterns": ["node_modules", "build", "coverage", "test", "jest.config.js"],
"plugins": ["import", "eslint-comments"],
"extends": [
"eslint:recommended",
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- run: npm config set scripts-prepend-node-path auto
- run: npm ci
- run: npm run generate-types
- run: npm run fix
- run: npm run cov
- run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand Down
5 changes: 0 additions & 5 deletions .nycrc.json

This file was deleted.

43 changes: 43 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const { ethers } = require('hardhat/register');

module.exports = async () => {
return {
roots: ['<rootDir>'],
transform: {
'^.+\\.tsx?$': [
'esbuild-jest',
{
sourcemap: true,
loaders: {
'.spec.ts': 'ts',
},
},
],
},
globals: {
ethers,
},
collectCoverageFrom: ['src/**/*.ts'],
coveragePathIgnorePatterns: [
'node_modules',
'interfaces',
'<rootDir>/src/index.ts',
'.mock.ts',
],
coverageDirectory: '<rootDir>/coverage/',
coverageThreshold: {
global: {
branches: 40,
functions: 30,
lines: 50,
statements: 50,
},
},
logHeapUsage: true,
testEnvironment: 'node',
setupFilesAfterEnv: ['./jest.setup.ts'],
maxWorkers: '50%',
maxConcurrency: 10,
reporters: ['default'],
};
};
4 changes: 4 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { waffleJest } from '@ethereum-waffle/jest';

jest.setTimeout(10000);
expect.extend(waffleJest);
Loading

0 comments on commit c72af0c

Please sign in to comment.