Skip to content

Commit ba9e404

Browse files
committed
workspace skeleton
0 parents  commit ba9e404

32 files changed

+1085
-0
lines changed

.changeset/config.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "Effect-TS/effect" }],
4+
"commit": false,
5+
"linked": [],
6+
"access": "restricted",
7+
"baseBranch": "main",
8+
"updateInternalDependencies": "patch",
9+
"ignore": [],
10+
"snapshot": {
11+
"useCalculatedVersion": false,
12+
"prereleaseTemplate": "{tag}-{commit}"
13+
}
14+
}

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake;

.eslintrc.cjs

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/* eslint-disable no-undef */
2+
module.exports = {
3+
root: true,
4+
ignorePatterns: ["dist", "build", "docs", "*.md"],
5+
parser: "@typescript-eslint/parser",
6+
parserOptions: {
7+
ecmaVersion: 2018,
8+
sourceType: "module"
9+
},
10+
settings: {
11+
"import/parsers": {
12+
"@typescript-eslint/parser": [".ts", ".tsx"]
13+
},
14+
"import/resolver": {
15+
typescript: {
16+
alwaysTryTypes: true
17+
}
18+
}
19+
},
20+
extends: [
21+
"eslint:recommended",
22+
"plugin:@typescript-eslint/eslint-recommended",
23+
"plugin:@typescript-eslint/recommended",
24+
"plugin:@effect/recommended"
25+
],
26+
plugins: [
27+
"deprecation",
28+
"import",
29+
"sort-destructure-keys",
30+
"simple-import-sort",
31+
"codegen"
32+
],
33+
rules: {
34+
"codegen/codegen": "error",
35+
"no-fallthrough": "off",
36+
"no-irregular-whitespace": "off",
37+
"object-shorthand": "error",
38+
"prefer-destructuring": "off",
39+
"sort-imports": "off",
40+
"no-unused-vars": "off",
41+
"prefer-rest-params": "off",
42+
"prefer-spread": "off",
43+
"import/first": "error",
44+
"import/no-cycle": "error",
45+
"import/newline-after-import": "error",
46+
"import/no-duplicates": "error",
47+
"import/no-unresolved": "off",
48+
"import/order": "off",
49+
"simple-import-sort/imports": "off",
50+
"sort-destructure-keys/sort-destructure-keys": "error",
51+
"deprecation/deprecation": "off",
52+
"@typescript-eslint/array-type": [
53+
"warn",
54+
{ default: "generic", readonly: "generic" }
55+
],
56+
"@typescript-eslint/member-delimiter-style": 0,
57+
"@typescript-eslint/no-non-null-assertion": "off",
58+
"@typescript-eslint/ban-types": "off",
59+
"@typescript-eslint/no-explicit-any": "off",
60+
"@typescript-eslint/no-empty-interface": "off",
61+
"@typescript-eslint/consistent-type-imports": "warn",
62+
"@typescript-eslint/no-unused-vars": [
63+
"error",
64+
{
65+
argsIgnorePattern: "^_",
66+
varsIgnorePattern: "^_"
67+
}
68+
],
69+
"@typescript-eslint/ban-ts-comment": "off",
70+
"@typescript-eslint/camelcase": "off",
71+
"@typescript-eslint/explicit-function-return-type": "off",
72+
"@typescript-eslint/explicit-module-boundary-types": "off",
73+
"@typescript-eslint/interface-name-prefix": "off",
74+
"@typescript-eslint/no-array-constructor": "off",
75+
"@typescript-eslint/no-use-before-define": "off",
76+
"@typescript-eslint/no-namespace": "off",
77+
"@effect/dprint": [
78+
"error",
79+
{
80+
config: {
81+
indentWidth: 2,
82+
lineWidth: 120,
83+
semiColons: "asi",
84+
quoteStyle: "alwaysDouble",
85+
trailingCommas: "never",
86+
operatorPosition: "maintain",
87+
"arrowFunction.useParentheses": "force"
88+
}
89+
}
90+
]
91+
}
92+
}

.github/CODEOWNERS

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* @mikearnaldi
2+
3+
/packages/effect/ @mikearnaldi
4+
/packages/cli/ @IMax153 @tim-smart
5+
/packages/opentelemetry/ @tim-smart @mikearnaldi
6+
/packages/platform/ @tim-smart
7+
/packages/platform-browser/ @tim-smart
8+
/packages/platform-bun/ @tim-smart
9+
/packages/platform-node/ @tim-smart
10+
/packages/printer/ @IMax153 @mikearnaldi
11+
/packages/printer-ansi/ @IMax153 @mikearnaldi
12+
/packages/rpc/ @tim-smart
13+
/packages/rpc-http/ @tim-smart
14+
/packages/rpc-http-node/ @tim-smart
15+
/packages/rpc-nextjs/ @tim-smart
16+
/packages/rpc-workers/ @tim-smart
17+
/packages/schema/ @gcanti
18+
/packages/typeclass/ @tim-smart @gcanti

.github/actions/setup/action.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup
2+
description: Perform standard setup and install dependencies using pnpm.
3+
inputs:
4+
node-version:
5+
description: The version of Node.js to install
6+
required: true
7+
default: 20.9.0
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install pnpm
13+
uses: pnpm/action-setup@v2
14+
- name: Install node
15+
uses: buildjet/setup-node@v3
16+
with:
17+
cache: pnpm
18+
node-version: ${{ inputs.node-version }}
19+
- name: Install dependencies
20+
shell: bash
21+
run: pnpm install --ignore-scripts

.github/workflows/check.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Check
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches: [main, next-minor, next-major]
6+
push:
7+
branches: [main, next-minor, next-major]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install dependencies
21+
uses: ./.github/actions/setup
22+
- run: pnpm build
23+
- name: Check source state
24+
run: git add packages/*/src && git diff-index --cached HEAD --exit-code packages/*/src
25+
26+
types:
27+
name: Types
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 10
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Install dependencies
33+
uses: ./.github/actions/setup
34+
- run: pnpm check
35+
- run: pnpm dtslint
36+
37+
lint:
38+
name: Lint
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 10
41+
steps:
42+
- uses: actions/checkout@v3
43+
- name: Install dependencies
44+
uses: ./.github/actions/setup
45+
- run: pnpm circular
46+
- run: pnpm lint
47+
48+
test:
49+
name: Test (${{ matrix.shard }})
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 10
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
shard: [1/3, 2/3, 3/3]
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: Install dependencies
59+
uses: ./.github/actions/setup
60+
- name: Test
61+
run: pnpm vitest --shard ${{ matrix.shard }}

.github/workflows/pages.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Pages
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches: [main, next-minor, next-major]
6+
push:
7+
branches: [main, next-minor, next-major]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install dependencies
21+
uses: ./.github/actions/setup
22+
- run: pnpm docgen
23+
- name: Build pages Jekyll
24+
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main'
25+
uses: actions/jekyll-build-pages@v1
26+
with:
27+
source: ./docs
28+
destination: ./_site
29+
- name: Upload pages artifact
30+
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main'
31+
uses: actions/upload-pages-artifact@v2
32+
33+
deploy:
34+
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main'
35+
name: Deploy
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 10
38+
needs: build
39+
permissions:
40+
pages: write # To deploy to GitHub Pages
41+
id-token: write # To verify the deployment originates from an appropriate source
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v2

.github/workflows/release-queue.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release queue
2+
on:
3+
pull_request_target:
4+
branches: [main, next-minor, next-major]
5+
push:
6+
branches: [main, next-minor, next-major]
7+
8+
jobs:
9+
update:
10+
if: github.repository_owner == 'Effect-Ts'
11+
name: Update
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- run: gh pr checkout ${{ github.event.pull_request.number }}
19+
if: github.event.pull_request
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: tim-smart/next-release-action@main
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
packages: effect

.github/workflows/release.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [main]
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
9+
jobs:
10+
release:
11+
if: github.repository_owner == 'Effect-Ts'
12+
name: Release
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Install dependencies
18+
uses: ./.github/actions/setup
19+
- name: Create Release Pull Request or Publish
20+
uses: changesets/action@v1
21+
with:
22+
version: pnpm changeset-version
23+
publish: pnpm changeset-publish
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)