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

sfdx-md-merge-driver

v0.1.7

Published

git merge driver specific for Salesforce.com Metadata

Downloads

744

Readme

sfdx-md-merge-driver

oclif Version CircleCI Appveyor CI Codecov Downloads/week License

This is a git merge driver specific for Salesforce.com Metadata (Profiles, Permission Sets, Custom Labels).

The merge is done based on the nodes of the files, checking if any node changed in both the local copy and the branch we're trying to merge, and automatically merging whenever there is no conflict.

In the case of a node being modified in our local workspace and in the branch we try to merge, both nodes are marked with a conflict that specifies from which change the node comes, so it makes it easier to identify and resolve the conflict.

Automatic Setup (recommended)

To start using it right away:

$ npx sfdx-md-merge-driver install --global

Or install it locally, per-project:

$ cd /path/to/git/repository
$ npx sfdx-md-merge-driver install

...And you're good to go!

Example

$ npx sfdx-md-merge-driver install
$ git merge my-conflicting-branch
Conflicts Found: 2
Conflicts Found: 0
CONFLICT (content): Merge conflict in force-app/main/default/profiles/Admin.profile-meta.xml
Auto-merging force-app/main/default/profiles/Standard.profile-meta.xml
Automatic merge failed; fix conflicts and then commit the result.

Install as Dependency

To avoid regular npx installs, consider installing the driver:

$ npm install -g sfdx-md-merge-driver
$ sfdx-md-merge-driver COMMAND
running command...
$ sfdx-md-merge-driver (-v|--version|version)
sfdx-md-merge-driver/0.1.6 darwin-x64 node-v14.15.1
$ sfdx-md-merge-driver --help [COMMAND]
USAGE
  $ sfdx-md-merge-driver COMMAND
...

Uninstalling

To remove an installed merge driver, use sfdx-md-merge-driver uninstall:

$ npx sfdx-md-merge-driver uninstall [--global] [--driver-name=sfdx-md-merge-driver]

Or remove the package:

$ npm uninstall -g sfdx-md-merge-driver

Commands

sfdx-md-merge-driver help [COMMAND]

display help for sfdx-md-merge-driver

USAGE
  $ sfdx-md-merge-driver help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

sfdx-md-merge-driver install

Set up the merge driver in the current git repository.

USAGE
  $ sfdx-md-merge-driver install

OPTIONS
  -d, --driver=driver
      [default: npx sfdx-md-merge-driver merge %O %A %B %P] string to install as the driver in the git configuration

  -g, --global
      install to your user-level git configuration

  -h, --help
      show CLI help

  -n, --name=name
      [default: sfdx-md-merge-driver] String to use as the merge driver name in your configuration.

  -t, --files=*.profile|*.profile-meta.xml|*.permissionset|*.permissionset-meta.xml|*.labels|*.labels-meta.xml
      [default: *.profile,*.profile-meta.xml,*.permissionset,*.permissionset-meta.xml,*.labels,*.labels-meta.xml] 
      Filenames that will trigger this driver.

See code: src/commands/install.ts

sfdx-md-merge-driver merge %O %A %B [%P]

Check for conflicts and merge them if possible.

USAGE
  $ sfdx-md-merge-driver merge %O %A %B [%P]

ARGUMENTS
  %O  ancestor’s version
  %A  current version
  %B  other branches' version
  %P  pathname in which the merged result will be stored

OPTIONS
  -h, --help  show CLI help

See code: src/commands/merge.ts

sfdx-md-merge-driver uninstall

Remove a previously configured driver

USAGE
  $ sfdx-md-merge-driver uninstall

OPTIONS
  -g, --global     install to your user-level git configuration
  -h, --help       show CLI help
  -n, --name=name  [default: sfdx-md-merge-driver] String to use as the merge driver name in your configuration.

See code: src/commands/uninstall.ts

Author

Written by jayree

Based on code from Amguerrero's repository sfdc_merge and forks from Dhanielk and KevinGossentCap.

Node.js Installer framework based on code from Zkat's repository npm-merge-driver