npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@smartweaver/core

v0.0.2

Published

A collection of code intended to help you build your Steezy SmartWeave tooling and workflows

Downloads

21

Readme

SmartWeaver

A collection of code intended to help you build your steezy SmartWeave tooling and workflows

Explore

View SmartWeaver projects at https://github.com/smartweaver.

Codebases

The SmartWeaver ecosystem is made up of the following codebases:

  • Core: All files/directories in the src directory (excluding src/standard)
  • Standard: All files/directories in the src/standard directory
  • Modules: All repositories at https://github.com/smartweaver excluding the core repository

These codebases are explained in further detail below.

Core

This part of the codebase provides types, interfaces, and classes (with minimal implementation). It contains the lowest level APIs and is intended to help build the Standard and Modules codebases.

To separate concerns, Core does not import code from Standard or Modules.

Standard

This part of the codebase is similar to Deno's Standard Library and Go's Standard Library, but smaller. Standard code is intended to be used as standalone code and code to help build modules in the Modules codebase (e.g., Slick Contract).

To separate concerns, Standard code only imports from Standard and Core. It does not import from Modules.

Modules

This part of the codebase is:

  • not included in this module;
  • is a combination of multiple repositories (found at https://github.com/smartweaver); and
  • can contain third-party code.

Modules import the most functionality for things like processing contract interactions, deploying contracts, bundling transactions, etc. Modules import from:

  • Core
  • Standard
  • Third-party code (e.g., smartweave, arweave)

Contributing

Prerequisites

  • Install Node (use the Node version in nvmrc)
  • Install Deno (use the latest v1.x version)

Tests

Tests are in the tests directory. The tests directory has a strict structure and naming convention as follows:

  • The tests directory structure mimics the src directory structure:

    ▾  src/
      ▾  standard/
        ▸  handlers/
    ▾  tests/
      ▸  core/
      ▾  standard/
        ▸  handlers/
  • Test file names mimic the file they test, include the type of tests they contain, and end of .test.ts:

    Format:    <file being tested>.<test type>.test.ts
    
    src file:  IsolatedHandlerChain.ts
    test file: IsolatedHandlerChain.unit.test.ts

Here is an example of the conventions mentioned above:

▾  src/
  ▸  core/
  ▾  standard/
    ▾  chains/
         IsolatedHandlerChain.ts
    ▸  handlers/
▾  tests/
  ▸  core/
  ▾  standard/
    ▾  chains/
         IsolatedHandlerChain.unit.test.ts
         IsolatedHandlerChain.integration.test.ts
    ▸  handlers/

Development Tips

  1. Use Node version in nvmrc.

  2. Do not add scripts to package.json. Add scripts to deno.json. This repo uses deno task <script>, not yarn <script>.

  3. Add tests if you can. If you do, follow the conventions mentioned above in the Tests section.

  4. Add a summary to your pull request and how to exercise your work. For example:

    ## Summary
       
    - Added this
    - Changed that
    
    ## How to test
    
    1. Run this script.
    
    1. Run the tests.
    
    1. Import this module and check the typings.
    
    ... etc.
  5. GitHub actions are in place to check pull requests for lint and formatting. Use deno lint and deno fmt to help you make fixes/changes.