Comparing version 2.0.6 to 2.0.7
16
index.js
const _ = require('lodash/fp'); | ||
const Promise = require('bluebird'); | ||
const writeJSONAsync = Promise.promisify(require('fs-extra').writeJSON); | ||
const path = require('path'); | ||
const logger = require('./libs/logger'); | ||
const root = process.env.PWD; | ||
const cartablePath = path.resolve(root, 'cartable.json'); | ||
let cartable; | ||
let cartable = []; | ||
try { | ||
cartable = JSON.parse(require(cartablePath)); | ||
} catch (e) { | ||
cartable = []; | ||
} | ||
@@ -21,2 +11,3 @@ const get = (pname) => { | ||
)(cartable); | ||
if (found) { | ||
@@ -29,4 +20,3 @@ logger.info('Module already required'); | ||
const p = require(pname); | ||
cartable.push({ name: pname, content: p }); | ||
writeJSONAsync(cartablePath, JSON.stringify(cartable)).catch(logger.error); | ||
cartable.push({ name: pname }); | ||
return p; | ||
@@ -33,0 +23,0 @@ } catch (e) { |
{ | ||
"name": "cartable", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "", | ||
@@ -20,5 +20,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"bluebird": "^3.5.0", | ||
"colors": "^1.1.2", | ||
"fs-extra": "^2.1.2", | ||
"lodash": "^4.17.4" | ||
@@ -25,0 +23,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2672
2
6
1
55
- Removedbluebird@^3.5.0
- Removedfs-extra@^2.1.2
- Removedbluebird@3.7.2(transitive)
- Removedfs-extra@2.1.2(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjsonfile@2.4.0(transitive)