-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
168 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-effect-app": patch | ||
--- | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
types: | ||
name: Types | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm check | ||
- run: pnpm dtslint | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm lint | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm vitest | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
if: github.repository_owner == 'Effect-Ts' | ||
name: Release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
permissions: | ||
contents: write | ||
id-token: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- name: Create Release Pull Request or Publish | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm changeset-version | ||
publish: pnpm changeset-publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
"type": "module", | ||
"packageManager": "[email protected]", | ||
"workspaces": [ | ||
"packages/*", | ||
"examples/*" | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"build": "pnpm --recursive --parallel run build", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { mergeConfig, type UserConfigExport } from "vitest/config" | ||
import shared from "../../vitest.shared.js" | ||
|
||
const config: UserConfigExport = {} | ||
|
||
export default mergeConfig(shared, config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as it from "@effect/vitest" | ||
|
||
it.addEqualityTesters() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import * as path from "node:path" | ||
import type { UserConfig } from "vitest/config" | ||
|
||
const alias = (name: string) => { | ||
const target = process.env.TEST_DIST !== undefined ? "dist/dist/esm" : "src" | ||
return ({ | ||
[`${name}/test`]: path.join(__dirname, "packages", name, "test"), | ||
[`${name}`]: path.join(__dirname, "packages", name, target) | ||
}) | ||
} | ||
|
||
// This is a workaround, see https://github.com/vitest-dev/vitest/issues/4744 | ||
const config: UserConfig = { | ||
esbuild: { | ||
target: "es2020" | ||
}, | ||
optimizeDeps: { | ||
exclude: ["bun:sqlite"] | ||
}, | ||
test: { | ||
setupFiles: [path.join(__dirname, "setupTests.ts")], | ||
fakeTimers: { | ||
toFake: undefined | ||
}, | ||
sequence: { | ||
concurrent: true | ||
}, | ||
include: ["test/**/*.test.ts"], | ||
alias: { | ||
...alias("create-effect-app") | ||
} | ||
} | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as path from "node:path" | ||
import { defineWorkspace, type UserWorkspaceConfig } from "vitest/config" | ||
|
||
// Remaining issues: | ||
// - Random failures (browser): https://github.com/vitest-dev/vitest/issues/4497 | ||
// - Alias resolution (browser, has workaround): https://github.com/vitest-dev/vitest/issues/4744 | ||
// - Workspace optimization: https://github.com/vitest-dev/vitest/issues/4746 | ||
|
||
// TODO: Once https://github.com/vitest-dev/vitest/issues/4497 and https://github.com/vitest-dev/vitest/issues/4746 | ||
// are resolved, we can create specialized workspace groups in separate workspace files to better control test groups | ||
// with different dependencies (e.g. playwright browser) in CI. | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const project = ( | ||
config: UserWorkspaceConfig["test"] & { name: `${string}|${string}` }, | ||
root = config.root ?? path.join(__dirname, `packages/${config.name.split("|").at(0)}`) | ||
) => ({ | ||
extends: "vitest.shared.ts", | ||
test: { root, ...config } | ||
}) | ||
|
||
export default defineWorkspace([ | ||
// Add specialized configuration for some packages. | ||
// project({ name: "effect|browser", environment: "happy-dom" }), | ||
// project({ name: "schema|browser", environment: "happy-dom" }), | ||
// Add the default configuration for all packages. | ||
"packages/*" | ||
]) |