New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cm-web-modules

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cm-web-modules - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "cm-web-modules",
"version": "1.1.1",
"version": "1.1.2",
"description": "Collection of clean and small ES6 modules for the web",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -33,13 +33,13 @@ /**

* Add a module to the library
* @param moduleName Name of the module
* @param moduleSourceRoot The source root inside the module folder
* @param moduleSource The module source folder or file inside the 'moduleSourceRoot'
* @param projectName Name of the project
* @param projectSourceRoot The source root inside the module folder
* @param subfolder The module source folder or file inside the 'moduleSourceRoot'
*/
addModule(moduleName, moduleSourceRoot = "src", moduleSource = moduleName) {
addProject(projectName, projectSourceRoot = "src", subfolder = projectName) {
let type = "dir"
if (moduleSource.endsWith(".js")) {
if (subfolder.endsWith(".js")) {
type = "file"
}
try {
const fromAbsolute = this.props.nodeModulesPath + "/" + moduleName + "/" + moduleSourceRoot + "/" + moduleSource
const fromAbsolute = this.props.nodeModulesPath + "/" + projectName + "/" + projectSourceRoot + "/" + subfolder
if (!fs.existsSync(fromAbsolute)) {

@@ -49,3 +49,3 @@ console.error("Not found: " + fromAbsolute)

const fromRelative = path.relative(this.projectRoot + "/" + this.props.projectLibFolder, fromAbsolute)
const toRelative = "./" + this.props.projectLibFolder + "/" + moduleSource
const toRelative = "./" + this.props.projectLibFolder + "/" + subfolder
console.log("Adding", fromRelative, "=>", toRelative, "(" + type + ")")

@@ -52,0 +52,0 @@ if (fs.existsSync(toRelative)) {

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