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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cubic-platform/core

v1.0.3

Published

Core utils and shared setup for Cubic microservices

Readme

@cubic-platform/core

Общие конфигурации и инструменты для микросервисов Cubic.

Установка

Всего 2 команды:

pnpm add @cubic-platform/core
npx cubic-init

Скрипт автоматически:

  • Спросит тип проекта (Node.js/NestJS или React/Next.js/RN)
  • Установит все зависимости (TypeScript, ESLint, Prettier, Husky, Commitlint, Lint-staged)
  • Создаст все конфигурационные файлы
  • Настроит git hooks
  • Создаст tsconfig.json, .gitignore, директорию src/
  • Добавит скрипты в package.json

Что включено

| Конфиг | Описание | |--------|----------| | @cubic-platform/core/prettier | Prettier с сортировкой импортов | | @cubic-platform/core/eslint | Строгий ESLint для TS/React/NestJS | | @cubic-platform/core/commitlint | Валидация сообщений коммитов | | @cubic-platform/core/lint-staged | Конфиг для pre-commit линтинга | | @cubic-platform/core/tsconfig/base | Строгий базовый TypeScript | | @cubic-platform/core/tsconfig/node | TypeScript для NestJS/Node.js | | @cubic-platform/core/tsconfig/react | TypeScript для React/Next.js/RN | | @cubic-platform/core/gitignore | Общий gitignore |

Ручная настройка

Prettier

// prettier.config.mjs
export { default } from '@cubic-platform/core/prettier'

Особенности:

  • Табы, ширина 4
  • Без точек с запятой
  • Одинарные кавычки
  • Сортировка импортов через @trivago/prettier-plugin-sort-imports

ESLint

// eslint.config.mjs
export { default } from '@cubic-platform/core/eslint'

Или расширить:

// eslint.config.mjs
import baseConfig from '@cubic-platform/core/eslint'

export default [
  ...baseConfig,
  {
    rules: {
      // ваши правила
    }
  }
]

Особенности:

  • Строгие правила TypeScript с проверкой типов
  • Правила React и React Hooks
  • Сортировка импортов и обнаружение циклов
  • Специальные правила для NestJS (декораторы)
  • Ослабленные правила для тестов

TypeScript

NestJS / Node.js:

{
  "extends": "@cubic-platform/core/tsconfig/node",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  }
}

React / Next.js / React Native:

{
  "extends": "@cubic-platform/core/tsconfig/react"
}

Только база (своя настройка):

{
  "extends": "@cubic-platform/core/tsconfig/base"
}

Commitlint

// commitlint.config.mjs
export { default } from '@cubic-platform/core/commitlint'

Lint-staged

// lint-staged.config.mjs
export { default } from '@cubic-platform/core/lint-staged'

Gitignore

Скопировать в корень проекта:

cp node_modules/@cubic-platform/core/src/.gitignore .gitignore

Git Flow соглашения

Именование веток

тип/cubic-XXXX

| Тип | Описание | |-----|----------| | feature | Новый функционал | | fix | Исправление багов | | bugfix | Исправление багов (алиас) | | hotfix | Срочные исправления на проде | | release | Подготовка релиза | | refactor | Рефакторинг кода | | docs | Документация | | test | Тесты | | chore | Обслуживание |

XXXX = 2-4 заглавные буквы (код сервиса)

Примеры:

git checkout -b feature/cubic-AUTH
git checkout -b fix/cubic-API
git checkout -b hotfix/cubic-USER

Защищённые ветки (без префикса):

  • main
  • master
  • develop

Формат сообщений коммитов

тип/cubic-XXXX - описание
  • Максимум 72 символа
  • Описание начинается с маленькой буквы
  • Без точки в конце

Примеры:

git commit -m "feature/cubic-AUTH - add JWT authentication"
git commit -m "fix/cubic-API - resolve timeout on large requests"
git commit -m "hotfix/cubic-USER - patch XSS vulnerability"

Лицензия

ISC