Coder Social home page Coder Social logo

snaps-monorepo

Monorepo for experimental snaps dependencies.

Contributing

Installing

Run yarn install in the project root directory. Do not run any installation commands in individual workspaces.

If you add a dependency with a lifecycle script, said dependency must be added to the devDependencies and lavamoat.allow-scripts config of the root package.json file. This is currently the only way to use @lavamoat/allow-scripts in monorepos.

Building

Run yarn build to build all packages in correct order. If you encounter any errors, try yarn build:clean, and if that fails, check the TypeScript configuration (see below).

You can also run yarn build in a specific package / workspace, although you have to ensure that its dependencies have been built.

Repository-wide watching is currently not possible due to the build processes of some packages.

Configuring TypeScript

The TypeScript configuration of this monorepo is brittle, and requires manual maintenance. It uses TypeScript project references and composite sub-projects (i.e. monorepo package). In short, the root tsconfig.json must contain an empty files array, and references to each interdependent project with a tsconfig.json in its root directory. Meanwhile, every sub-project must explicitly declare the relative paths to its local dependencies via its references array.

If building from the monorepo root suddenly starts to fail, check if the errors are referring to monorepo packages, and verify that their tsconfig.json files are configured correctly.

Some packages do not require a tsconfig.json file. These packages must be explicitly ignored in the TypeScript config lint script. If a package is neither referenced nor ignored, linting will fail.

Testing and Linting

Run yarn test and yarn lint in the project root directory, or in a workspace.

Publishing

  1. Run Create Release Pull Request workflow
  2. Checkout the created branch.
  3. Update CHANGELOG.md in each package, moving changes to their categories and make them more descriptive.
  4. Run yarn install in root to update yarn.lock.
  5. Run yarn build in packages/examples to update snap manifests
  6. Get the PR merged, Publish Release workflow will start on main branch.
  7. After the workflow does a dry run, manually approve the deployment in Github Actions tab.

To publish locally from the monorepo root use:

yarn publish:all --otp=YOUR_NPM_OTP_CODE

web3work3's Projects

arbitrum icon arbitrum

Powers fast, private, decentralized applications

chains icon chains

provides metadata for networkIDs and chainIDs

core icon core

The Lens Protocol/web3work3/05004

node icon node

Everything required to run your own Base node

v4-periphery icon v4-periphery

🦄 🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v4/web3work3

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.