Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"hidden": false
}
]
},
"packages/synapse-core": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

needs the rest of the config copied down

"bump-minor-pre-major": true,
"pull-request-header": "📦 Release Preparation",
"pull-request-footer": "\n\n## 🚀 How to Release\n\n1. **Review** the changelog and version bump in this PR\n2. **Merge this PR** to trigger the release\n3. After merging, the workflow will:\n - Create a GitHub release with tag ${version}\n - Publish to npm automatically\n4. Wait until the workflow is complete before merging another release PR\n\n⚠️ **Note**: The release has NOT been created yet. It will only be created after you merge this PR."
}
}
}
3 changes: 2 additions & 1 deletion .github/release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"packages/synapse-sdk": "0.31.1"
"packages/synapse-sdk": "0.31.1",
"packages/synapse-core": "0.0.1"
}
6 changes: 4 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
npm:
needs: release
if: |
contains(fromJson(needs.release.outputs.paths_released), 'packages/synapse-sdk')
contains(fromJson(needs.release.outputs.paths_released), 'packages/synapse-sdk') ||
contains(fromJson(needs.release.outputs.paths_released), 'packages/synapse-core')
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -49,6 +50,7 @@ jobs:
docs:
needs: release
if: |
contains(fromJson(needs.release.outputs.paths_released), 'packages/synapse-sdk')
contains(fromJson(needs.release.outputs.paths_released), 'packages/synapse-sdk') ||
contains(fromJson(needs.release.outputs.paths_released), 'packages/synapse-core')
uses: ./.github/workflows/docs.yml
secrets: inherit
41 changes: 41 additions & 0 deletions .github/workflows/synapse-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: synapse-core
on:
push:
branches:
- master
paths:
- "packages/synapse-core/**"
- .github/workflows/synapse-core.yml
pull_request:
paths:
- "packages/synapse-core/**"
- .github/workflows/synapse-core.yml
jobs:
test:
strategy:
fail-fast: false
matrix:
node: [lts/*, current]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
- name: Playwright for Windows
if: matrix.os == 'windows-latest'
run: pnpx playwright install winldd
- name: Install Dependencies
run: pnpm install
# - name: Run tests
# run: pnpm -r --filter @filoz/synapse-core run test
Copy link
Collaborator

Choose a reason for hiding this comment

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

? not ready yet?

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 tests in core yet

# shell: bash
- name: Check docs build
run: pnpm -r --filter docs run build
5 changes: 2 additions & 3 deletions .github/workflows/synapse-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Run tests
run: |
pnpm config set script-shell bash
pnpm -r --filter @filoz/synapse-sdk run test
run: pnpm -r --filter @filoz/synapse-sdk run test
shell: bash
- name: Check docs build
run: pnpm -r --filter docs run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ filecoin-project-*/
# VIM
*.swp
.env
.wireit/
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"!**/__snapshots__",
"!**/components.d.ts",
"!**/mockServiceWorker.js",
"!**/abis/gen.ts"
"!**/abis/gen.ts",
"!packages/synapse-core/src/gen.ts"
]
},
"vcs": {
Expand Down
2 changes: 1 addition & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default defineConfig({
parametersFormat: 'table',
indexFormat: 'table',
groupOrder: ['classes', 'functions', 'variables', 'types', '*'],
plugin: ['typedoc-plugin-mdn-links', 'typedoc-plugin-missing-exports'],
plugin: ['typedoc-plugin-mdn-links'],
},
}),
starlightLlmsTxt(),
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"@biomejs/biome": "~2.2.5",
"knip": "^5.64.1",
"markdownlint-cli2": "^0.18.1",
"typescript": "5.9.3"
"typescript": "5.9.3",
"wireit": "^0.14.12"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec biome check --no-errors-on-unmatched --files-ignore-unknown=true --staged"
Expand Down
32 changes: 32 additions & 0 deletions packages/synapse-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Synapse Core

[![NPM](https://nodei.co/npm/@filoz/synapse-sdk.svg?style=flat&data=n,v&color=blue)](https://nodei.co/npm/@filoz/synapse-core/)

> A JavaScript/TypeScript SDK for interacting with Filecoin Synapse - a smart-contract based marketplace for storage and other services in the Filecoin ecosystem.

## Overview

TODO

## Installation

```bash
pnpm install @filoz/synapse-core [email protected]
```

Note: `viem` is a peer dependency and must be installed separately.

## Docs

Check the documentation [website](https://synapse.filecoin.services/)

## Contributing

Read contributing [guidelines](../../.github/CONTRIBUTING.md).

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/FilOzone/synapse-sdk)

## License

Dual-licensed: [MIT](../../LICENSE.md), [Apache Software License v2](../../LICENSE.md) by way of the
[Permissive License Stack](https://protocol.ai/blog/announcing-the-permissive-license-stack/).
108 changes: 108 additions & 0 deletions packages/synapse-core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"name": "@filoz/synapse-core",
"version": "0.0.1",
"description": "JavaScript Standard Library for Filecoin Onchain Cloud",
"repository": {
"type": "git",
"url": "git+https://github.com/FilOzone/synapse-sdk.git"
},
"keywords": [
"filecoin",
"synapse",
"filecoin pay",
"filecoin onchain cloud",
"web3"
],
"author": "Hugo Dias <[email protected]>",
"license": "Apache-2.0 OR MIT",
"bugs": {
"url": "https://github.com/FilOzone/synapse-sdk/issues"
},
"homepage": "https://github.com/FilOzone/synapse-sdk/tree/main/packages/synapse-core",
"type": "module",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"default": "./dist/src/index.js"
},
"./chains": {
"types": "./dist/src/chains.d.ts",
"default": "./dist/src/chains.js"
},
"./utils": {
"types": "./dist/src/utils.d.ts",
"default": "./dist/src/utils.js"
}
},
"typesVersions": {
"*": {
"chains": [
"./dist/src/chains"
],
"utils": [
"./dist/src/utils"
]
}
},
"files": [
"src",
"dist/src",
"dist/src/**/*.d.ts",
"dist/src/**/*.d.ts.map"
],
"scripts": {
"generate-abi": "wagmi generate",
"build": "wireit",
"lint": "wireit",
"test": "pnpm run lint && pnpm run test:node",
"test:node": "playwright-test 'src/test/**/*.test.ts' --mode node",
"test:browser": "playwright-test 'src/test/**/*.test.ts' --assets ./src/test/mocks"
},
"wireit": {
"build": {
"command": "tsc --build --pretty",
"clean": "if-file-deleted",
"files": [
"src/**/*.ts",
"tsconfig.json"
],
"output": [
"dist/**"
]
},
"lint": {
"command": "biome check --no-errors-on-unmatched --files-ignore-unknown=true .",
"files": [
"src/**/*.ts",
"../../biome.json"
],
"output": [],
"dependencies": [
"build"
]
}
},
"devDependencies": {
"@biomejs/biome": "~2.2.5",
"@types/mocha": "^10.0.10",
"@types/node": "^24.6.2",
"@wagmi/cli": "^2.6.0",
"mocha": "^11.7.4",
"playwright-test": "^14.1.12",
"typescript": "5.9.3"
},
"publishConfig": {
"access": "public"
},
"msw": {
"workerDirectory": [
"src/test/mocks"
]
},
"peerDependencies": {
"ethers": "6.x",
"viem": "2.x"
}
}
Loading