Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bigbinary/neeto-commons-frontend

Package Overview
Dependencies
Maintainers
12
Versions
352
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigbinary/neeto-commons-frontend

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

  • 2.0.24
  • Source
  • npm
  • Socket score

Version published
Maintainers
12
Created
Source

neeto-commons-frontend

A library encapsulating common boilerplate frontend code required for all neeto products.

Installation Instructions

Install from npm:

yarn add "@bigbinary/neeto-commons-frontend@2.0.24"

This package relies on the host project's tailwind configuration. So add neeto-commons-frontend to your project's tailwind.config.js file:

module.exports = {
  purge: {
    content: [
      // ... other content directories
      "./node_modules/@bigbinary/neeto-commons-frontend/**/*.js",
    ],
  },
  // ... other tailwind config options
};

Usage

This package exports four different sets of functions and components. Click on them to read more:

  1. Initializers
  2. React utilities
  3. Pure utility functions
  4. Web utility functions

Migrating from version 1 to 2

There is only a single breaking change from version 1 to version 2. The pure functions (which has only ramda as its peerDependency) have been moved to a separate bundle (named pure). You can import them from @bigbinary/neeto-commons-frontend/pure instead of @bigbinary/neeto-commons-frontend/utils.

Here is a list of functions that have been moved:

removeById, findById, replaceById, modifyById, findBy, removeBy, replaceBy,modifyBy, existsById, existsBy, findLastBy, findIndexById, findIndexBy,findLastIndexBy, filterBy, countBy, copyKeys, renameKeys, copyKeysDeep

noop, toLabelAndValue, getRandomInt, randomPick, dynamicArray, isNotNil, isNotEmpty, notEquals, isNot, notEqualsDeep, isNotEqualDeep

transformObjectDeep, keysToCamelCase, keysToSnakeCase, deepFreezeObject, matches, filterNonNull

slugify, humanize, snakeToCamelCase, camelToSnakeCase, capitalize, truncate

When you are migrating from version 1 to version 2, do the following:

  1. Search for all imports from @bigbinary/neeto-commons-frontend/utils and delete the above mentioned functions from those imports.
  2. Import these functions from @bigbinary/neeto-commons-frontend/pure instead.

Development instructions

  1. Clone this repository.
  2. Run yarn install to download the dependencies and setup the development environment.
  3. Have a host application ready.
  4. Run yarn build --watch to automatically transpile code as you save the file. You can omit the --watch flag if you want to run the build only once.
  5. In a different terminal, run yalc publish to publish the neeto-commons-frontend to the local yalc store.
  6. Run yalc add @bigbinary/neeto-commons-frontend to install the neeto-commons-frontend to the host application.
  7. After making necessary changes to neeto-commons-frontend, run yalc push to push the changes to the host application (assuming that you are in watch mode and the changes are bundled automatically).
  8. Video explanation on how to use yalc: https://vimeo.com/722958162/9e931b640c

Building and releasing.

This is how releases are managed in this repo.

  • We will create a branch with the next release version as its name (2.0.x) from main branch.
  • Version in README.md and package.json will be updated to the current branch name.
  • We will create a draft PR of this branch targeting main. This keeps the branch in sync with main branch (bot-bigbinary will auto-merge the changes).
  • When all features have been built, we will deploy it to all neeto-applications locally using yalc package manager. We won't raise PR until the deployment and verification is successfully done locally for all neeto-applications. The usage of yalc is explained in this video: https://vimeo.com/722958162/9e931b640c
  • In case if we notice any problem during verification, like any missed edge cases, we will fix the problem in neeto-commons-frontend locally and re-run yalc push to update the local host projects.
  • Once everything is working fine and the verification is complete, create a PR with those bug fixes and get it merged.
  • We will now merge the PR 2.X.Y to main.
  • We can now create a new github release from main branch with the current version as the tag name (2.X.Y).
  • Whenever a new release is created with a new version number, the github actions will automatically publish the built package to npm.
  • Immediately, we will open another branch with the next version (2.X.Z) and the cycle will continue.
  • Now we can run yalc remove neeto-commons-frontend to remove yalc based package and run yarn add neeto-commons-frontend@2.X.Y to fetch the latest changes from npm in all repos and raise PR. You might be able to slightly tweak this script to get the job done: https://gist.github.com/jagannathBhat/42a584748d97fe134f0abadb191ef29a

FAQs

Package last updated on 02 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc