react-native-rename
Advanced tools
Comparing version
@@ -120,3 +120,3 @@ #!/usr/bin/env node | ||
var nS_NewName = newName.replace(/\s/g, ''); | ||
var pattern = /^([0-9]|[a-z])+([0-9a-z\s]+)$/i; | ||
var pattern = new RegExp('^([\\p{Letter}\\p{Number}])+([\\p{Letter}\\p{Number}\\s]+)$', 'u'); | ||
var lC_Ns_NewAppName = nS_NewName.toLowerCase(); | ||
@@ -178,19 +178,19 @@ var bundleID = _commander2.default.bundleID ? _commander2.default.bundleID.toLowerCase() : null; | ||
var filePathsCount = 0; | ||
var itemsProcessed = 0; | ||
listOfFilesToModifyContent.map(function (file) { | ||
filePathsCount += file.paths.length - 1; | ||
filePathsCount += file.paths.length; | ||
file.paths.map(function (filePath, index) { | ||
var itemsProcessed = 0; | ||
var newPaths = []; | ||
if (_fs2.default.existsSync(_path2.default.join(__dirname, filePath))) { | ||
newPaths.push(_path2.default.join(__dirname, filePath)); | ||
setTimeout(function () { | ||
itemsProcessed += index; | ||
setTimeout(function () { | ||
itemsProcessed++; | ||
if (_fs2.default.existsSync(_path2.default.join(__dirname, filePath))) { | ||
newPaths.push(_path2.default.join(__dirname, filePath)); | ||
replaceContent(file.regex, file.replacement, newPaths); | ||
if (itemsProcessed === filePathsCount) { | ||
resolve(); | ||
} | ||
}, 200 * index); | ||
} | ||
} | ||
if (itemsProcessed === filePathsCount) { | ||
resolve(); | ||
} | ||
}, 200 * index); | ||
}); | ||
@@ -197,0 +197,0 @@ }); |
{ | ||
"name": "react-native-rename", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"description": "Rename react-native app with just one command", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,5 +9,3 @@ # react-native-rename [](https://www.npmjs.com/package/react-native-rename) [](https://npm-stat.com/charts.html?package=react-native-rename) [](https://npm-stat.com/charts.html?package=react-native-rename) [](https://www.paypal.me/junedomingo) | ||
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/rLaZTxWeQsGAsDnqWnPDEK7u/junedomingo/react-native-rename'> | ||
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/rLaZTxWeQsGAsDnqWnPDEK7u/junedomingo/react-native-rename.svg' /> | ||
</a> | ||
**Note:** This package does not attempt to properly rename build artifacts such as `ios/build` or Cocoa Pod installation targets. After renaming your project you should clean, build, and reinstall third party dependencies to get it running properly with the new name. | ||
@@ -22,3 +20,3 @@ #### Installation | ||
Switch to new branch first | ||
>better to have back-up | ||
> better to have back-up | ||
@@ -47,1 +45,3 @@ ``` | ||
``` | ||
<a href="https://www.buymeacoffee.com/junedomingo"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" target="_blank"></a> |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
131523
-47.22%13
-27.78%338
-1.46%1
Infinity%