Socket
Socket
Sign inDemoInstall

monaca-lib

Package Overview
Dependencies
Maintainers
7
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaca-lib - npm Package Compare versions

Comparing version 2.7.5 to 2.7.6

src/default-config/.monacaignore

6

CHANGELOG.md

@@ -5,2 +5,8 @@

v2.7.6
----
* Improved `getLocalProjectFiles` functions by filtering files before further processing
* Generated only one `.monacaignore` file for all project templates
* Fixed Typo
v2.7.5

@@ -7,0 +13,0 @@ ----

2

package.json
{
"name": "monaca-lib",
"version": "2.7.5",
"version": "2.7.6",
"description": "Monaca cloud and localkit API bindings for JavaScript",

@@ -5,0 +5,0 @@ "main": "./src/main.js",

@@ -5,5 +5,8 @@

let crc32 = require('buffer-crc32');
let ignore = require('ignore');
let filterIgnoreFiles = function(files, ignoreListInstance, removeBasePath = false) {
let filterIgnoreFiles = function(files, ignoreList, removeBasePath = false) {
let keys = Object.keys(files);
let ignoreListInstance = ignore().add(ignoreList);
if (removeBasePath === true) keys = keys.map(file => file.substr(1)); //remove '/'

@@ -22,2 +25,9 @@ let allowedKeys = ignoreListInstance.filter(keys);

let filter = function(array, ignoreList) {
if (!ignoreList) return array;
if (!array || !array.length) return array;
let ignoreListInstance = ignore().add(ignoreList);
return ignoreListInstance.filter(array) || [];
}
let isDirectory = (path) => {

@@ -59,12 +69,2 @@ if(fs.lstatSync(path).isDirectory()) return true;

let addFileToLocalFile = function(files, filename, content) {
if (filename && content) {
files[filename] = {
type: 'file',
hash: crc32(content).toString('hex')
}
}
return files;
};
module.exports = {

@@ -76,3 +76,3 @@ filterIgnoreFiles: filterIgnoreFiles,

filterObjectByKeys: filterObjectByKeys,
addFileToLocalFile: addFileToLocalFile,
filter: filter,
};

Sorry, the diff of this file is too big to display

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