Skip to content

Commit

Permalink
add: rebase last commits, add coingecko readme and packages, fix depr…
Browse files Browse the repository at this point in the history
…ecated files and js outputs, refactor cg constructor
  • Loading branch information
0xjjojo committed May 24, 2024
1 parent d41540d commit d46267e
Show file tree
Hide file tree
Showing 19 changed files with 1,050 additions and 963 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"workspaces": [
"packages/*",
"tooling/*"
"packages/**",
"tooling/**"
],
"devDependencies": {
"@commitlint/config-conventional": "19.2.2",
"@hyperhub/errors": "workspace:*",
"@hyperhub/serverless": "workspace:*",
"@hyperhub/test-config": "workspace:*",
"@hyperhub/typescript-config": "workspace:*",
"@types/node": "18.13.0",
"commitlint": "19.3.0",
"husky": "9.0.11",
"lint-staged": "15.2.4",
"prettier": "3.2.5",
"turbo": "1.13.3"
"ts-node-dev": "2.0.0",
"turbo": "1.13.3",
"typescript": "4.9.4"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "eslint --cache --fix",
Expand Down
3 changes: 3 additions & 0 deletions packages/__example__/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Example Package

Easily kickoff a package replicating this structure.
5 changes: 5 additions & 0 deletions packages/__example__/__test__/example.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { describe, it } from 'vitest'

describe('examplePackage test', () => {
it.skip("Implement tests")
});
19 changes: 19 additions & 0 deletions packages/__example__/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@hyperhub/example",
"private": true,
"version": "0.0.0",
"scripts": {
"build": "tsc -p tsconfig.json",
"lint": "eslint --fix --ext .js,.jsx,.ts,.tsx src",
"test": "vitest",
"coverage": "vitest run --coverage",
"tsc": "tsc --noEmit"
},
"devDependencies": {
"@hyperhub/errors": "workspace:*",
"@hyperhub/test-config": "workspace:*",
"@hyperhub/typescript-config": "workspace:*",
"typescript": "4.9.4",
"vitest": "1.6.0"
}
}
3 changes: 3 additions & 0 deletions packages/__example__/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const example = () => {
// Implement
};
8 changes: 8 additions & 0 deletions packages/__example__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@hyperhub/typescript-config/base.json",
"exclude": ["dist", "node_modules", "__test__"],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
}
}
11 changes: 11 additions & 0 deletions packages/__example__/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { baseConfig } from "@hyperhub/test-config";
import { mergeConfig, defineConfig } from "vitest/config";

export default mergeConfig(
baseConfig,
defineConfig({
test: {
exclude: ["coverage/*"],
},
}),
);
11 changes: 10 additions & 1 deletion packages/errors/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"extends": "@hyperhub/typescript-config/base.json",
"exclude": ["dist", "node_modules", "__test__"],
"compilerOptions": {
<<<<<<< HEAD
"outDir": "./dist",
"rootDir": "./src",
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
=======
"rootDir": "./src",
"outDir": "./dist",
"declaration": true,
"declarationMap": true
}
>>>>>>> feeaa35 (chore: add EOF)
}
3 changes: 3 additions & 0 deletions packages/lib/coingecko/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Coingecko Package

Adds coingecko API utilities.
2 changes: 1 addition & 1 deletion packages/lib/coingecko/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export class CoingeckoError extends BaseError {
constructor(description: string) {
super({ name: "CoingeckoError", description });
}
}
}
2 changes: 1 addition & 1 deletion .env.example → packages/serverless/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COINGECKO_API_URL=""
COINGECKO_API_KEY=""
COINGECKO_API_KEY=""
8 changes: 0 additions & 8 deletions packages/serverless/__test__/handlers/example.test.js

This file was deleted.

8 changes: 2 additions & 6 deletions packages/serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@
"tsc": "tsc --noEmit"
},
"devDependencies": {
"@hyperhub/errors": "workspace:*",
"@hyperhub/typescript-config": "workspace:*",
"@serverless/typescript": "3.27.0",
"@types/aws-lambda": "8.10.71",
"@types/node": "18.13.0",
"@vitest/coverage-v8": "1.6.0",
"esbuild": "0.16.0",
"serverless": "3.27.0",
"serverless-esbuild": "1.37.3",
"serverless-iam-roles-per-function": "3.2.0",
"serverless-offline": "12.0.4",
"ts-node-dev": "2.0.0",
"typescript": "4.9.4",
"vitest": "1.6.0"
"serverless-offline": "12.0.4"
}
}
7 changes: 7 additions & 0 deletions packages/serverless/src/errors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { BaseError } from "@hyperhub/errors";

export default class LambdaError extends BaseError {
constructor(description: string) {
super({ name: "LambdaError", description });
}
};
9 changes: 8 additions & 1 deletion packages/serverless/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"extends": "@hyperhub/typescript-config/base.json",
<<<<<<< HEAD
"exclude": ["dist", "node_modules", "__test__"],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
=======
"include": ["./src/**/*.ts"],
"exclude": ["dist", "node_modules"],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
>>>>>>> 5d538ab (fix: deps (#10))
}
}
1 change: 0 additions & 1 deletion tooling/test-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"devDependencies": {
"@hyperhub/typescript-config": "workspace:*",
"@vitest/coverage-v8": "1.6.0",
"typescript": "5.4.5",
"vitest": "1.6.0"
}
}
1 change: 0 additions & 1 deletion tooling/typescript-config/base.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",

"compilerOptions": {
"lib": ["ESNext"],
"module": "commonjs",
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"globalDependencies": ["**/.env.*local"],
"pipeline": {
"build": {
"dependsOn": ["^build"],
"dependsOn": [],
"outputs": ["dist/**"]
},
"test": {
Expand Down
Loading

0 comments on commit d46267e

Please sign in to comment.