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

renamer

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

renamer - npm Package Compare versions

Comparing version 1.1.4 to 2.0.0

1

bin/cli.js
#!/usr/bin/env node
const nodeVersionMatches = require('node-version-matches')
/* v8.9.0 required for passing custom paths to require.resolve() */
if (nodeVersionMatches('>=8.9.0')) {

@@ -4,0 +5,0 @@ const CliApp = require('../lib/cli-app')

3

index.js
const nodeVersionMatches = require('node-version-matches')
/* v8.9.0 required for passing custom paths to require.resolve() */
if (!nodeVersionMatches('>=8.9.0')) {

@@ -21,3 +22,3 @@ const chalk = require('chalk')

* A synchronous method to rename files in bulk.
*
*
* @param {object} options - The renamer options

@@ -24,0 +25,0 @@ * @param {string[]} [options.files] - One or more glob patterns or filenames to process.

@@ -16,3 +16,3 @@ const cliOptions = require('../lib/cli-options')

},
paths: [ path.resolve(__dirname, 'plugin'), '.', globalModules ],
paths: [path.resolve(__dirname, 'plugin'), '.', globalModules],
prefix: 'renamer-'

@@ -19,0 +19,0 @@ })

@@ -34,3 +34,3 @@ exports.optionDefinitions = [

plugin: true,
defaultValue: [ 'default', 'index' ]
defaultValue: ['default', 'index']
},

@@ -37,0 +37,0 @@ {

@@ -42,3 +42,3 @@ module.exports = PluginBase => class Default extends PluginBase {

}
} else if ([ 'name', 'ext' ].includes(element)) {
} else if (['name', 'ext'].includes(element)) {
file[element] = file[element].replace(find, replace)

@@ -45,0 +45,0 @@ const basename = file.name + file.ext

@@ -6,3 +6,3 @@ class Replacer {

pluginNames = arrayify(pluginNames)
this.plugins = util.loadPlugins(pluginNames.length ? pluginNames : [ 'default', 'index' ])
this.plugins = util.loadPlugins(pluginNames.length ? pluginNames : ['default', 'index'])
}

@@ -9,0 +9,0 @@

@@ -61,3 +61,3 @@ /**

createPlugin = loadModule(pluginName, {
paths: [ path.resolve(__dirname, 'plugin'), '.', globalModules ],
paths: [path.resolve(__dirname, 'plugin'), '.', globalModules],
prefix: 'renamer-'

@@ -64,0 +64,0 @@ })

{
"name": "renamer",
"description": "Rename files in bulk",
"version": "1.1.4",
"version": "2.0.0",
"author": "Lloyd Brookes <75pound@gmail.com>",

@@ -9,3 +9,3 @@ "bin": "bin/cli.js",

"engines": {
"node": ">=8.9.0"
"node": ">=10"
},

@@ -33,26 +33,26 @@ "repository": "https://github.com/75lb/renamer",

"dependencies": {
"array-back": "^4.0.0",
"chalk": "^2.4.2",
"array-back": "^4.0.1",
"chalk": "^4.0.0",
"command-line-args": "^5.1.1",
"command-line-plugin": "^0.2.0",
"command-line-usage": "^6.0.2",
"command-line-usage": "^6.1.0",
"fast-diff": "^1.2.0",
"glob": "^7.1.5",
"glob": "^7.1.6",
"global-modules": "^2.0.0",
"load-module": "^2.0.2",
"node-version-matches": "^1.0.1",
"load-module": "^3.0.0",
"node-version-matches": "^2.0.1",
"printj": "^1.2.2",
"reduce-flatten": "^3.0.0",
"reduce-unique": "^2.0.1",
"stream-read-all": "^2.0.0",
"typical": "^5.2.0"
"stream-read-all": "^3.0.0",
"typical": "^6.0.0"
},
"devDependencies": {
"coveralls": "^3.0.7",
"jsdoc-to-markdown": "^5.0.2",
"coveralls": "^3.0.11",
"jsdoc-to-markdown": "^5.0.3",
"mkdirp2": "^1.0.4",
"nyc": "^14.1.1",
"rimraf": "^3.0.0",
"test-runner": "^0.6.0"
"nyc": "^15.0.1",
"rimraf": "^3.0.2",
"test-runner": "^0.8.13"
}
}

@@ -104,2 +104,4 @@ [![view on npm](http://img.shields.io/npm/v/renamer.svg)](https://www.npmjs.org/package/renamer)

&copy; 2012-19 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).
&copy; 2012-20 Lloyd Brookes \<75pound@gmail.com\>.
Tested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).

Sorry, the diff of this file is not supported yet

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