Skip to content

Commit

Permalink
SAVEPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlilley committed Sep 19, 2024
0 parents commit d867e40
Show file tree
Hide file tree
Showing 1,164 changed files with 43,596 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "sushi-labs/sushi" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "origin/master",
"updateInternalDependencies": "patch",
"privatePackages": {
"tag": false,
"version": false
},
"ignore": ["example-*", "test-*", "site", "test"]
}
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask Question
url: https://github.com/sushi-labs/sushi/discussions/new?category=q-a
about: Ask questions and discuss with other community members
- name: Request Feature
url: https://github.com/sushi-labs/sushi/discussions/new?category=ideas
about: Requests features or brainstorm ideas for new functionality
9 changes: 9 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Security Policy

## Reporting a Vulnerability

If you identify a vulnerability, please email security@sushi.com with:

- Description
- Suggested impact (Critical, High, Medium, Low)
- Minimal reproducible example
11 changes: 11 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Install"
description: "Install dependencies"

runs:
using: "composite"
steps:
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set up pnpm
uses: sushi-labs/actions/.github/actions/pnpm@master
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- bug
- not stale
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
83 changes: 83 additions & 0 deletions .github/workflows/changesets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Changesets
on:
push:
branches: [master]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit

changesets:
name: Create version pull request
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install

- name: Create Version Pull Request
uses: changesets/action@v1
with:
commit: 'chore: version package'
title: 'chore: version package'
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
needs: verify
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
id-token: write
pull-requests: write

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install

- name: Publish to NPM
uses: changesets/action@v1
with:
createGithubReleases: ${{ github.ref == 'refs/heads/master' }}
publish: pnpm changeset:publish
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Prerelease
if: steps.changesets.outputs.published != 'true'
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
git reset --hard origin/master
pnpm clean
pnpm changeset version --no-git-tag --snapshot canary
pnpm changeset:prepublish
pnpm changeset publish --no-git-tag --snapshot canary --tag canary
13 changes: 13 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull request
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit
34 changes: 34 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Snapshot
on:
workflow_dispatch:

jobs:
canary:
name: Release snapshot version
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Publish Snapshots
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
snapshot=$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//')
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
pnpm clean
pnpm changeset version --no-git-tag --snapshot $snapshot
pnpm changeset:prepublish
pnpm changeset publish --no-git-tag --snapshot $snapshot --tag $snapshot
120 changes: 120 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Verify
# on:
# workflow_call:
# workflow_dispatch:
on:
workflow_call:
workflow_dispatch:
# pull_request:
# types: [opened, synchronize]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

jobs:
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.PAT }}
ref: ${{ github.head_ref }}
- name: Install dependencies
uses: ./.github/actions/install
- name: Format
run: pnpm format
- uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: 'chore: format'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'


lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.PAT }}
ref: ${{ github.head_ref }}
- name: Install dependencies
uses: ./.github/actions/install
- name: Lint repo
run: pnpm lint:repo
- name: Lint
run: pnpm lint
- uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: 'chore: lint'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'

build:
name: Build
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install

- name: Build
run: pnpm build

# build:
# name: Build
# needs: [lint, format]
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Install dependencies
# uses: ./.github/actions/install
# - name: Build
# run: pnpm build

types:
name: Types
needs: [lint, format]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/actions/install
- name: Check types
run: pnpm typecheck

test:
name: Test
runs-on: ubuntu-latest
needs: [lint, format]
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/install
- name: Test
run: pnpm test:ci
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
_cjs
_esm
_types
*.local
.DS_Store
.attest
.eslintcache
.next
bench
cache
coverage
node_modules
tsconfig*.tsbuildinfo
src/node/trustedSetups_esm.ts
**/trusted-setups/**/*.txt
.idea

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.envrc

# tests
generated.ts
vectors/**/*.json

# docs
site/dist
.vercel

generated-chain-data.ts
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
Loading

0 comments on commit d867e40

Please sign in to comment.