Giter Site home page Giter Site logo

Effect

Welcome to Effect, a powerful TypeScript framework that provides a fully-fledged functional effect system with a rich standard library.

Requirements

  • TypeScript 5.4 or newer
  • The strict flag enabled in your tsconfig.json file
{
  // ...
  "compilerOptions": {
    // ...
    "strict": true,
  },
}

Documentation

For detailed information and usage examples, please visit the Effect website.

Introduction to Effect

To get started with Effect, watch our introductory video on YouTube. This video provides an overview of Effect and its key features, making it a great starting point for newcomers:

Introduction to Effect

Connect with Our Community

Join our vibrant community on Discord to interact with fellow developers, ask questions, and share your experiences. Here's the invite link to our Discord server: Join Effect's Discord Community.

API Reference

For detailed information on the Effect API, please refer to our API Reference.

Contributing via Pull Requests

We welcome contributions via pull requests! Here are some guidelines to help you get started:

Setting Up Your Environment

Begin by forking the repository and clone it to your local machine.

Navigate into the cloned repository and create a new branch for your changes:

git checkout -b my-branch

Ensure all required dependencies are installed by running:

pnpm install  # Requires pnpm version 9.0.4

Making Changes

Implement Your Changes

Make the changes you propose to the codebase. If your changes impact functionality, please add corresponding tests to validate your updates.

Validate Your Changes

Run the following commands to ensure your changes do not introduce any issues:

  • pnpm codegen (optional): Re-generate the package entrypoints in case you have changed the structure of a package or introduced a new module.
  • pnpm check: Confirm that the code compiles without errors.
  • pnpm test: Execute all unit tests to ensure your changes haven't broken existing functionality.
  • pnpm circular: Check for any circular dependencies in imports.
  • pnpm lint: Ensure the code adheres to our coding standards.
    • If you encounter style issues, use pnpm lint-fix to automatically correct some of these.
  • pnpm dtslint: Run type-level tests.
  • pnpm docgen: Ensure the documentation generates correctly and reflects any changes made.

Document Your Changes

JSDoc Comments

When adding a new feature, it's important to document your code using JSDoc comments. This helps other developers understand the purpose and usage of your changes. Include at least the following in your JSDoc comments:

  • A Short Description: Summarize the purpose and functionality of the feature.
  • Example: Provide a usage example under the @example tag to demonstrate how to use the feature.
  • Since Version: Use the @since tag to indicate the version in which the feature was introduced. If you're unsure about the version, please consult with a project maintainer.
  • Category (Optional): You can categorize the feature with the @category tag to help organize the documentation. If you're unsure about what category to assign, ask a project maintainer.

Changeset Documentation

Before committing your changes, document them with a changeset. This process helps in tracking modifications and effectively communicating them to the project team and users:

pnpm changeset

During the changeset creation process, you will be prompted to select the appropriate level for your changes:

  • patch: Opt for this if you are making small fixes or minor changes that do not affect the library's overall functionality.
  • minor: Choose this for new features that enhance functionality but do not disrupt existing features.
  • major: Select this for any changes that result in backward-incompatible modifications to the library.

Finalizing Your Contribution

Commit Your Changes

Once you have documented your changes with a changeset, it’s time to commit them to the repository. Use a clear and descriptive commit message, which could be the same message you used in your changeset:

git commit -am 'Add some feature'

Linking to Issues

If your commit addresses an open issue, reference the issue number directly in your commit message. This helps to link your contribution clearly to specific tasks or bug reports. Additionally, if your commit resolves the issue, you can indicate this by adding a phrase like ", closes #<issue-number>". For example:

git commit -am 'Add some feature, closes #123'

This practice not only helps in tracking the progress of issues but also automatically closes the issue when the commit is merged, streamlining project management.

Push to Your Fork

Push the changes up to your GitHub fork:

git push origin my-branch

Create a Pull Request

Open a pull request against the appropriate branch on the original repository:

  • main branch: For minor patches or bug fixes.
  • next-minor branch: For new features that are non-breaking.
  • next-major branch: For changes that introduce breaking modifications.

Please be patient! We will do our best to review your pull request as soon as possible.

Effect's Projects

.github icon .github

Organization-wide configuration for Effect-TS

build-utils icon build-utils

Custom utilities used to assist with building and packaging Effect libraries

cache icon cache

An Effect native cache with a simple and compositional interface

cli icon cli

Rapidly build powerful and composable command-line applications

codemod icon codemod

Code mod's for the Effect ecosystem

data icon data

Custom built data types leveraged by the Effect ecosystem

discord-bot icon discord-bot

The Effect Community's custom Discord bot, built with Effect

docgen icon docgen

An opinionated documentation generator for Effect projects

dtslint icon dtslint

Effect's custom fork of dtslint used to lint TypeScript declaration (.d.ts) files

effect icon effect

An ecosystem of tools to build robust applications in TypeScript

examples icon examples

A repository of examples showing how to use Effect

figlet icon figlet

An implementation of a FIGlet font parser and renderer built with Effect

infra icon infra

Infrastructure relevant to the Effect organization

io icon io

Effect's core runtime, a fiber-based implementation of structured concurrency

markdown-toc icon markdown-toc

API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files. Uses Remarkable to parse markdown. Used by NASA/openmct, Prisma, Joi, Mocha, Sass, Prettier, Orbit DB, FormatJS, Raneto, hapijs/code, webpack-flow, docusaurus, release-it, ts-loader, json-server, reactfire, bunyan, husky, react-easy-state, react-snap,

match icon match

Functional pattern matching with the full power of TypeScript

platform icon platform

Unified interfaces for common platform-specific services

printer icon printer

An easy to use, extensible pretty-printer for rendering documents

schema icon schema

Modeling the schema of data structures as first-class values

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.