Giter Site home page Giter Site logo

cryptid-org / cryptid-js Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 5.0 502 KB

Browser-friendly Identity-based Encryption library powered by WebAssembly.

License: Apache License 2.0

JavaScript 74.40% C 25.53% Shell 0.07%
crypto cryptography ibe identity-based-encryption public-key-cryptography

cryptid-js's People

Contributors

battila7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cryptid-js's Issues

Migrate to pnpm

Brief

cryptid-js is currently managed by the default Node package manager, npm. However, there is a much better solution for this task, pnpm (https://github.com/pnpm/pnpm).

Task

  • Replace the package lock file with a pnpm lock file (ie. install with pnpm).
  • Update the dependency and devDependency versions.

Public API typings

Brief

The public API lacks proper typing making it hard to consume by clients.

Task

Introduce typings or TypeScript in the public API.

Introduce commit message linting

Brief

Once you start linting your code, there's no way back: you want to lint everything! For example, commit messages. Enforcing format and structure in commit messages allows for automatic semver bumps, changelog generation, repository analytics and also looks good. See https://www.conventionalcommits.org/en/v1.0.0/

Because cryptid-js lacks this facility, we should definitely add commitlinting.

Task

Introduce eslint and prettier

Brief

Currently, cryptid-js has absolutely no linting or formatting rules: you can freely write code any way you want, commit it and push it. No restrictions, no checks. You can use tabs in one file and spaces in another (the horror! ๐Ÿ˜ข).

To improve upon this situation, we should set up a linting and formatting toolchain using eslint (https://eslint.org/) and prettier (https://prettier.io/).

Task

  • Create the lint and lint:fix scripts in the package.json.
    • Obviously, lint:fix should run the linter with the --fix flag.
  • Configure eslint and prettier.
    • Please use separeate files, do not pollute the package.json with this configuration.
    • Please be aware, that cryptid-js is isomorphic: clients can use it on both the client-side and the server-side. The linting configuration should be aware of this scenario.

Settings for Prettier

Please use the following settings for prettier:

{
    "singleQuote": true,
    "printWidth": 120,
    "semi": false
}

GitHub Actions workflow on push

Brief

As a bigger goal, we want a nice Continuous Delivery pipeline for cryptid-js. However, even the greatest journey starts with a single step, so for a starter, let's implement a Continuous Integration workflow.

Task

Create a new GitHub Actions workflow that

  • runs on
    • push to master
    • PR to master
  • executes the lint script and fails if the codebase is not properly linted/formatted.

Dependencies

Depends on #7

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.