Skip to content

Commit

Permalink
feat: Merge branch 'main' into feat/eth
Browse files Browse the repository at this point in the history
  • Loading branch information
denizenging committed Oct 9, 2023
2 parents ebadcc3 + db4ce55 commit 501af9b
Show file tree
Hide file tree
Showing 11 changed files with 3,136 additions and 61 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 🧪 Lint and test

on:
push:
pull_request:

jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8

- run: pnpm recursive install
- name: Linting
continue-on-error: true
run: pnpm lint

- name: Run the tests
run: pnpm coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
publish:
runs-on: ubuntu-latest
needs: build_and_test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Build all
run: pnpm i
- name: Build all
run: pnpm build-all
- name: Release
run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
pnpm whoami
pnpm publish:ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# js stuff
!/package.json
!/lerna.json
!/pnpm-lock.yaml
!/pnpm-workspace.yaml
!/.prettierrc
Expand Down
11 changes: 11 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
"version": "0.0.0",
"command": {
"publish": {
"conventionalCommits": true
}
},
"packages": ["pkg/*"],
"npmClient": "pnpm"
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"build:cjs": "pnpm -F @slangroom/* exec tsc --outDir build/cjs --module commonjs && pnpm cjs-fixup",
"build:esm": "pnpm -F @slangroom/* exec tsc --outdir build/esm --module node16",
"build-all": "pnpm build",
"cjs-fixup": "pnpm -F @slangroom/* exec sh -c \"echo '{\\\"type\\\":\\\"commonjs\\\"}' >build/cjs/package.json\""
"cjs-fixup": "pnpm -F @slangroom/* exec sh -c \"echo '{\\\"type\\\":\\\"commonjs\\\"}' >build/cjs/package.json\"",
"publish:ci": "lerna publish --no-git-tag-version --yes"
},
"devDependencies": {
"@lerna-lite/publish": "^2.5.1",
"@types/node": "^20.3.1",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
Expand Down
6 changes: 4 additions & 2 deletions pkg/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"dependencies": {
"@slangroom/deps": "workspace:*",
"@slangroom/shared": "workspace:*",
"@slangroom/ignored": "workspace:*",
"@slangroom/core": "workspace:*"
"@slangroom/ignored": "workspace:*"
},
"repository": "https://github.com/dyne/slangroom",
"license": "AGPL-3.0-only",
Expand Down Expand Up @@ -33,5 +32,8 @@
"default": "./build/cjs/src/*.js"
}
}
},
"publishConfig": {
"access": "public"
}
}
3 changes: 3 additions & 0 deletions pkg/deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
"default": "./build/cjs/src/*.js"
}
}
},
"publishConfig": {
"access": "public"
}
}
3 changes: 3 additions & 0 deletions pkg/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
"default": "./build/cjs/src/*.js"
}
}
},
"publishConfig": {
"access": "public"
}
}
3 changes: 3 additions & 0 deletions pkg/ignored/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
"default": "./build/cjs/src/*.js"
}
}
},
"publishConfig": {
"access": "public"
}
}
3 changes: 3 additions & 0 deletions pkg/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
"default": "./build/cjs/src/*.js"
}
}
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 501af9b

Please sign in to comment.