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

cmacc-compiler

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmacc-compiler - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

package.json
{
"name": "cmacc-compiler",
"version": "1.0.12",
"version": "1.0.13",
"description": "Cmacc Compiler",

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

@@ -37,2 +37,3 @@ var fs = require('fs');

resolve = ref;
}

@@ -44,2 +45,3 @@

if (urlObj.protocol) {

@@ -49,3 +51,12 @@ var dir = path.dirname(urlObj.pathname);

resolve = url.format(urlObj);
//TODO: Hack for file path windows
if(/^win/.test(process.platform)){
resolve = resolve.replace(/(\w\w\w\w\:\/\/\w\/)(\w\:)/, "file:///" + "$2")
resolve = resolve.replace(/(\w\w\w\w\:\w\:\\)(\w\:\\)/,"file:\\" + '$2')
resolve = resolve.replace(/(\/(\w\:))(\/(\w\:))+/g, '$1' )
resolve = resolve.replace(/(\w\w\w\w\:\/\/\/)(\w\:\\)(\w\:\\)/,'$1' +'$3')
}
} else {
resolve = options.path + '/' + ref;

@@ -52,0 +63,0 @@ }

@@ -11,4 +11,10 @@ var fs = require('fs');

//TODO: Hack for file path windows
if(/^win/.test(process.platform) ){
file = file.replace(/(\w\w\w\w\:\/\/)(\w\:)/, 'file:///' + '$2')
}
var urlObj = url.parse(file);
if(urlObj.protocol){

@@ -34,2 +40,7 @@

var location = decodeURI(urlObj.pathname);
//TODO: Hack for file path windows
if(/^win/.test(process.platform) ){
location = location.substring(1)
}
return fs.readFileSync(location, 'utf8');

@@ -36,0 +47,0 @@ }

@@ -13,2 +13,3 @@ var string = require('./string');

}
if ($$mrg$$) {

@@ -18,2 +19,12 @@ $$src$$.$$mrg$$ = $$mrg$$;

//TODO: Hack for file path windows
if(/^win/.test(process.platform) ){
if($$src$$.$$text$$){
$$src$$.$$text$$ = $$src$$.$$text$$.replace(/^((\r\n)|;)*/yg,'')
}
if($$src$$.$$text$$ === '' || $$src$$.$$text$$ === null){
delete $$src$$.$$text$$
}
}
return $$src$$;

@@ -20,0 +31,0 @@

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