Skip to content

Commit 00e1719

Browse files
authored
refactor: prefer polyrepo
2 parents e519ba4 + fd27950 commit 00e1719

File tree

198 files changed

+3177
-40383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+3177
-40383
lines changed

packages/eslint-config-custom/library.js renamed to .eslintrc.cjs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,44 @@ const { resolve } = require('node:path');
22

33
const project = resolve(process.cwd(), 'tsconfig.json');
44

5-
/*
6-
* This is a custom ESLint configuration for use with
7-
* typescript packages.
8-
*
9-
* This config extends the Vercel Engineering Style Guide.
10-
* For more information, see https://github.com/vercel/style-guide
11-
*
12-
*/
13-
5+
/** @type {import('eslint').Linter.Config} */
146
module.exports = {
15-
extends: [
16-
'@vercel/style-guide/eslint/node',
17-
'@vercel/style-guide/eslint/typescript',
18-
].map(require.resolve),
197
parserOptions: {
208
project,
219
},
22-
globals: {
23-
React: true,
24-
JSX: true,
25-
},
2610
settings: {
2711
'import/resolver': {
2812
typescript: {
2913
project,
3014
},
3115
},
3216
},
17+
extends: [
18+
'@vercel/style-guide/eslint/node',
19+
'@vercel/style-guide/eslint/typescript',
20+
].map(require.resolve),
3321
rules: {
22+
'no-bitwise': 'off',
3423
'no-console': 'warn',
3524
'eslint-comments/require-description': 'off',
25+
'import/no-extraneous-dependencies': 'off',
26+
'@typescript-eslint/no-unsafe-member-access': 'off',
27+
'@typescript-eslint/no-unsafe-call': 'off',
28+
'@typescript-eslint/no-unsafe-return': 'off',
29+
'@typescript-eslint/no-unsafe-argument': 'off',
30+
'@typescript-eslint/no-unsafe-assignment': 'off',
3631
'@typescript-eslint/explicit-function-return-type': 'off',
3732
},
3833
ignorePatterns: [
39-
'node_modules/',
40-
'dist/',
41-
'build/',
42-
'coverage/',
43-
'generated/',
34+
'test',
35+
'*.config.*',
36+
'node_modules',
37+
'dist',
38+
'build',
39+
'coverage',
40+
'generated',
41+
'trade-interfaces',
42+
'codegen',
43+
'docs',
4444
],
4545
};

.github/workflows/build-and-test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'v**'
8+
- 'releases/v**'
9+
pull_request:
10+
types: [opened, synchronize, reopened]
11+
branches:
12+
- main
13+
- 'v**'
14+
- 'releases/v**'
15+
16+
jobs:
17+
build-and-test:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repo
22+
uses: actions/checkout@v3
23+
with:
24+
submodules: true
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v2
28+
with:
29+
version: latest
30+
31+
- name: Install packages, build, lint, and test
32+
run: |
33+
pnpm i
34+
pnpm build
35+
pnpm lint
36+
pnpm test

.github/workflows/bump-version.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# https://medium.com/full-human/configuring-ci-cd-building-an-npm-package-with-typescript-d0e2393f6bb
2+
name: Bump Package Version and Tag Release
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: 'Semver type of new version (major / minor / patch)'
9+
required: true
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
bump-pkg-version-and-tag-release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Check out the content (source branch). Use a deploy key so that
21+
# when we push changes, it will trigger the release workflow
22+
# run that runs on: tag. (Using the GitHub token would
23+
# not run the workflow to prevent infinite recursion.)
24+
- name: Checkout repo
25+
uses: actions/checkout@v3
26+
with:
27+
submodules: true
28+
ssh-key: ${{ secrets.DEPLOY_KEY }}
29+
30+
- name: Install pnpm
31+
uses: pnpm/action-setup@v2
32+
with:
33+
version: latest
34+
35+
- name: Install packages
36+
run: pnpm i
37+
38+
- name: Setup Git
39+
run: |
40+
git config user.name '${{secrets.MAINTAINER_NAME}}'
41+
git config user.email '${{secrets.MAINTAINER_EMAIL}}'
42+
43+
- name: bump version
44+
run: npm version ${{ github.event.inputs.version }}
45+
46+
- name: Push latest version
47+
run: git push origin main --follow-tags

.github/workflows/deploy-docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-deploy-docs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v3
17+
with:
18+
submodules: true
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: latest
24+
25+
- name: Install packages, build, and generate Docs
26+
run: |
27+
pnpm i
28+
pnpm build
29+
pnpm gen-docs
30+
31+
- name: Deploy to Github Pages
32+
uses: JamesIves/github-pages-deploy-action@v4
33+
with:
34+
folder: docs
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Semantic Release
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: read # for checkout
9+
10+
jobs:
11+
semantic-release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write # to be able to publish a GitHub release
16+
issues: write # to be able to comment on released issues
17+
pull-requests: write # to be able to comment on released pull requests
18+
id-token: write # to enable use of OIDC for npm provenance
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
with:
23+
submodules: true
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: latest
29+
30+
- name: Install packages and build
31+
run: |
32+
pnpm i
33+
pnpm build
34+
35+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
36+
run: pnpm audit signatures
37+
38+
- name: Release
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
run: npx semantic-release

.gitignore

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,11 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
1+
*.log
2+
.DS_Store
43
node_modules
5-
.pnp
6-
.pnp.js
4+
dist
75

8-
# testing
96
coverage
107

11-
# next.js
12-
.next/
13-
out/
14-
build
15-
16-
# misc
17-
.DS_Store
18-
*.pem
19-
!trade.valorem.xyz.pem
20-
21-
# debug
22-
npm-debug.log*
23-
yarn-debug.log*
24-
yarn-error.log*
25-
26-
# local env files
27-
.env
28-
.env.local
29-
.env.development.local
30-
.env.test.local
31-
.env.production.local
32-
33-
# turbo
34-
.turbo
35-
36-
# vercel
37-
.vercel
8+
src/lib/codegen
9+
src/lib/trade-interfaces
3810

39-
# CI will build and deploy
40-
# apps/docs
41-
# WIP
42-
packages/_react-hooks
11+
docs

.gitmodules

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[submodule "trade-interfaces"]
2-
path = packages/proto/trade-interfaces
2+
path = src/lib/trade-interfaces
33
url = https://github.com/valorem-labs-inc/trade-interfaces.git
4+

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.releaserc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://json.schemastore.org/semantic-release.json",
3+
"branches": ["main"],
4+
"repositoryUrl": "https://github.com/valorem-labs-inc/sdk.git"
5+
}

.vscode/settings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1 @@
1-
# Turborepo starter
2-
3-
This is an official starter Turborepo.
4-
5-
## Using this example
6-
7-
Run the following command:
8-
9-
```sh
10-
npx create-turbo@latest
11-
```
12-
13-
## What's inside?
14-
15-
This Turborepo includes the following packages/apps:
16-
17-
### Apps and Packages
18-
19-
- `docs`: a [Next.js](https://nextjs.org/) app
20-
- `web`: another [Next.js](https://nextjs.org/) app
21-
- `ui`: a stub React component library shared by both `web` and `docs` applications
22-
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
23-
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
24-
25-
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
26-
27-
### Utilities
28-
29-
This Turborepo has some additional tools already setup for you:
30-
31-
- [TypeScript](https://www.typescriptlang.org/) for static type checking
32-
- [ESLint](https://eslint.org/) for code linting
33-
- [Prettier](https://prettier.io) for code formatting
34-
35-
### Build
36-
37-
To build all apps and packages, run the following command:
38-
39-
```
40-
cd my-turborepo
41-
pnpm build
42-
```
43-
44-
### Develop
45-
46-
To develop all apps and packages, run the following command:
47-
48-
```
49-
cd my-turborepo
50-
pnpm dev
51-
```
52-
53-
### Remote Caching
54-
55-
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
56-
57-
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
58-
59-
```
60-
cd my-turborepo
61-
npx turbo login
62-
```
63-
64-
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
65-
66-
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
67-
68-
```
69-
npx turbo link
70-
```
71-
72-
## Useful Links
73-
74-
Learn more about the power of Turborepo:
75-
76-
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
77-
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
78-
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
79-
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
80-
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
81-
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
1+
TODO

apps/docs/.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)