Coder Social home page Coder Social logo

rightcapitalhq / verdaccio-package-diff Goto Github PK

View Code? Open in Web Editor NEW
3.0 7.0 0.0 97 KB

A package diff plugin for Verdaccio

Home Page: https://opensource.rightcapital.com

License: MIT License

JavaScript 5.66% Shell 0.89% Dockerfile 5.49% HTML 24.09% TypeScript 63.87%
npm package package-difference plugin pnpm verdaccio verdaccio-plugin yarn package-diff

verdaccio-package-diff's Introduction

Verdaccio Package Diff Plugin

made by RightCapital GitHub Workflow Status (with event) Conventional Commits RightCapital frontend style guide

Introduce

If you want to know what has changed between the two versions in the package, this plugin can tell you.

How to use

To view the diffs between two versions of a package, go to:

{YOUR_VERDACCIO_SITE}/-/npm/package-diff/viewer?name={PACKAGE_NAME}&from={PACKAGE_VERSION_A}&to={PACKAGE_VERSION_B}

This will display the file differences between the two versions.

How to install

Build your own docker image

To install this plugin in your own Verdaccio docker image:

Refer to the Verdaccio documentation on creating custom Dockerfile

Create a Dockerfile:

FROM node:lts-alpine as builder

RUN mkdir -p /verdaccio/plugins \
  && cd /verdaccio/plugins \
  && npm install --global-style --no-bin-links --omit=optional @rightcapital/verdaccio-package-diff

FROM verdaccio/verdaccio:5

COPY --from=builder --chown=$VERDACCIO_USER_UID:root \
  /verdaccio/plugins/node_modules/@rightcapital/verdaccio-package-diff \
  /verdaccio/plugins/@rightcapital/verdaccio-package-diff

USER root

RUN mkdir -p /opt/verdaccio/.npm
RUN chown -R  $VERDACCIO_USER_UID:root /opt/verdaccio/.npm

USER $VERDACCIO_USER_UID

Config plugin

Enable the plugin in your config.yaml:

middlewares:
  '@rightcapital/verdaccio-package-diff':
    enabled: true

Set plugin permissions

Create a .npmrc file for your container, this will allow the plugin to access private packages.

volumes:
  - './.npmrc:/opt/verdaccio/.npmrc'

About permissions

You can use Verdaccio packages configuration to control which packages can be access by package diff plugin.

verdaccio-package-diff's People

Contributors

frantic1048 avatar jzhangdev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.