Mrm Core Versions Save

Utilities to make tasks for Mrm

v1.0.2

7 years ago
  • Fixed: Should not fail when reading empty JSON files

v1.0.1

7 years ago
  • Fixed: Support Node 4

v1.0.0

7 years ago

Breaking changes

lines.append → lines.add

Append implies adding to the end, add don’t suggest any order. If item is already in the middle of the list, it will stay in the middle.

New methods

  • json.unset(values: String|String[]) — remove value(s) by given address
  • yaml.unset(values: String|String[]) — remove value(s) by given address
  • lines.remove(values: String|String[]) — remove given line(s) from a file

Bug fixes

  • Strip comments from JSON

v0.3.2

7 years ago
  • Fixed: (json|yaml).merge() should merge arrays of objects without duplicates

v0.3.1

7 years ago
  • Fixed: (json|yaml).merge() should merge arrays without duplicates

v0.3.0

7 years ago

New features

File system helpers:

const { copyFiles, makeDirs } = require('mrm-core')
copyFiles('source dir', 'file name') // Copy file
copyFiles('source dir', ['file name 1', 'file name 2']) // Copy files
copyFiles('source dir', 'file name', { overwrite: false }) // Do not overwrite
makeDirs('dir name') // Create folder
makeDirs(['dir name 1', 'dir name 2']) // Create folders

v0.2.2

7 years ago
  • Fixed: install() should not run Yarn when there are no new packages

v0.2.1

7 years ago
  • Fixed: install() should not throw when package.json has no dependencies section

v0.2.0

7 years ago

New features

  • exists() method in all formats

Bug fixes

  • Align lines.append() and install() APIs: both should accept a string or an array
  • install() should not install already installed packages
  • lines.append() should not reorder file when adding a line that already exists