Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,6 @@ typings/
# TernJS port file
.tern-port
workspace.code-workspace

# turbo
.turbo
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"email": "clemens@bitcoincomputer.io"
},
"private": true,
"packageManager": "npm@10.2.4",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to specify the exact npm version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no we don't need the exact version, but turbo requires it. I added my latest version.

"workspaces": [
"packages/*"
],
Expand All @@ -32,7 +33,8 @@
"check-obfuscation": "./scripts/check-obfuscation.sh",
"husky-checks": "./scripts/husky-checks.sh",
"prepare": "husky install",
"prepublishOnly": "./scripts/check-obfuscation.sh"
"prepublishOnly": "./scripts/check-obfuscation.sh",
"build-all-packages": "turbo run build"
},
"dependencies": {
"@endo/static-module-record": "^1.0.4"
Expand All @@ -49,6 +51,7 @@
"husky": "^9.0.11",
"path": "^0.12.7",
"ts-node": "^10.9.2",
"turbo": "^2.1.3",
"typescript": "^4.9.5",
"url": "^0.11.3"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/TBC20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"scripts": {
"build": "rm -rf build && tsc -p tsconfig.release.json",
"build-turbo": "turbo run build",
"build:watch": "tsc -w -p tsconfig.release.json",
"clean": "rimraf coverage build tmp",
"clean-logs": "rm -f *.log 2> /dev/null",
Expand All @@ -27,7 +28,7 @@
"prebuild": "npm run lint",
"start": "node build/src/main.js",
"prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"types": "tsc",
"types": "tsc --noEmit",
"test": "mocha --config .mocharc.json",
"test-and-show": "npm run test 2>&1 | tee TBC20-test.log && open TBC20-test.log"
},
Expand Down
1 change: 1 addition & 0 deletions packages/TBC721/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"types": "./build/src/index.d.ts",
"scripts": {
"build": "rm -rf build && tsc -p tsconfig.release.json",
"build-turbo": "turbo run build",
"build:watch": "tsc -w -p tsconfig.release.json",
"clean": "rimraf coverage build tmp",
"clean-logs": "rm -f *.log 2> /dev/null",
Expand Down
1 change: 1 addition & 0 deletions packages/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build-turbo": "turbo run build",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest run",
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"tsc-compile": "rm -rf built/* && tsc",
"install-monorepo": "cd ../../../ && npm run delete-node-modules && npm install && cd monorepo/packages/components",
"build": "npm run tsc-compile",
"build-turbo": "turbo run build",
"lint": "eslint --fix . --ext .ts,.tsx --ignore-pattern built/",
"lint-fix": "eslint src --fix",
"prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
Expand Down
1 change: 0 additions & 1 deletion packages/cra-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"scripts": {
"start": "react-scripts start",
"deploy": "node --experimental-modules scripts/deploy.mjs",
"build": "react-scripts build",
"eject": "react-scripts eject",
"lint": "eslint src",
"lint-fix": "eslint src --fix",
Expand Down
1 change: 1 addition & 0 deletions packages/explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build-turbo": "turbo run build",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest run",
Expand Down
12 changes: 6 additions & 6 deletions packages/explorer/src/components/Block.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { useContext, useEffect, useState } from 'react'
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'
import { ComputerContext, UtilsContext } from '@bitcoin-computer/components'
import { useContext, useEffect, useState } from "react"
import { Link, useLocation, useNavigate, useParams } from "react-router-dom"
import { ComputerContext, UtilsContext } from "@bitcoin-computer/components"

function Block() {
const navigate = useNavigate()
const location = useLocation()
const params = useParams()
const computer = useContext(ComputerContext)
const [block] = useState(params.block)
const [blockData, setBlockData] = useState<unknown | null>(null)
const [blockData, setBlockData] = useState<any | null>(null)
const { showSnackBar, showLoader } = UtilsContext.useUtilsComponents()

useEffect(() => {
const fetch = async () => {
try {
showLoader(true)
const res = await computer.rpcCall('getblock', `${block} 2`)
const res = await computer.rpcCall("getblock", `${block} 2`)
setBlockData(res.result)
showLoader(false)
} catch {
showLoader(false)
showSnackBar('Error getting block', false)
showSnackBar("Error getting block", false)
}
}
fetch()
Expand Down
1 change: 1 addition & 0 deletions packages/nakamotojs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"scripts": {
"audit": "better-npm-audit audit -l high",
"build": "npm run clean && tsc -p ./tsconfig.json && npm run formatjs",
"build-turbo": "turbo run build",
"build:tests": "npm run clean:jstests && tsc -p ./test/tsconfig.json",
"clean": "rimraf src",
"clean:jstests": "rimraf 'test/**/!(ts-node-register)*.js'",
Expand Down
1 change: 1 addition & 0 deletions packages/nft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build-turbo": "turbo run build",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest run",
Expand Down
1 change: 1 addition & 0 deletions packages/nodejs-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Minimalistic boilerplate to quick-start Bitcoin Computer development.",
"scripts": {
"build": "tsc -p tsconfig.release.json",
"build-turbo": "turbo run build",
"clean-logs": "rm -f *.log 2> /dev/null",
"lint": "eslint --fix . --ext .ts,.tsx",
"prebuild": "npm run lint",
Expand Down
2 changes: 0 additions & 2 deletions packages/swap/build/src/list.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
declare const Contract: typeof import("@bitcoin-computer/lib/computer").Contract;
export declare class List extends Contract {
elements: string[];
constructor();
Expand All @@ -11,4 +10,3 @@ export declare class ListHelper {
constructor(computer: any, mod?: string);
deploy(): Promise<string>;
}
export {};
1 change: 0 additions & 1 deletion packages/swap/build/src/list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const { Contract } = await import('@bitcoin-computer/lib');
export class List extends Contract {
constructor() {
super({ elements: [] });
Expand Down
1 change: 1 addition & 0 deletions packages/swap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"start": "node build/src/main.js",
"prebuild": "npm run lint",
"build": "rm -rf build && tsc -p tsconfig.release.json",
"build-turbo": "turbo run build",
"lint": "eslint . --ext .ts,.tsx --ignore-pattern build/",
"lint-fix": "eslint --fix . --ext .ts,.tsx --ignore-pattern build/",
"test": "mocha --config .mocharc.json",
Expand Down
1 change: 0 additions & 1 deletion packages/swap/src/list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable max-classes-per-file */
const { Contract } = await import('@bitcoin-computer/lib')

export class List extends Contract {
elements: string[]
Expand Down
1 change: 1 addition & 0 deletions packages/vite-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build-turbo": "turbo run build",
"lint": "eslint .",
"preview": "vite preview",
"deploy": "node --loader ts-node/esm ./scripts/deploy.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build-turbo": "turbo run build",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest run",
Expand Down
9 changes: 9 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://turborepo.org/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
}
}
}