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

requirejs-config-file

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requirejs-config-file - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

22

index.js
'use strict';
const fs = require('fs-extra');
const fs = require('fs');
const path = require('path');
const makeDir = require('make-dir');
const esprima = require('esprima');

@@ -10,6 +12,14 @@ const util = require('util');

function outputFileSync (filePath, contents, fileSystem = fs) {
const dir = path.dirname(filePath);
makeDir.sync(dir, {
fs: fileSystem
});
fileSystem.writeFileSync(filePath, contents);
}
class ConfigFile {
constructor(filePath, fileSystem = undefined) {
constructor(filePath, fileSystem = fs) {
this.filePath = filePath;
this.fileSystem = fileSystem || fs;
this.fileSystem = fileSystem;
this.config = null;

@@ -108,3 +118,3 @@

this.fileSystem.outputFileSync(this.filePath, contents);
outputFileSync(this.filePath, contents, this.fileSystem);
}

@@ -117,4 +127,4 @@

*/
createIfNotExists(config) {
this.config = config || {};
createIfNotExists(config = {}) {
this.config = config;
this.type = 'create-if-not-exists';

@@ -121,0 +131,0 @@ }

{
"name": "requirejs-config-file",
"version": "3.1.1",
"version": "3.1.2",
"description": "A small api to read and write your requirejs config file",

@@ -23,6 +23,7 @@ "main": "index.js",

"engines": {
"node": ">=4.0.0"
"node": ">=6.0.0"
},
"devDependencies": {
"chai": "^4.1.2",
"fs-extra": "^7.0.1",
"grunt": "^1.0.1",

@@ -32,10 +33,10 @@ "grunt-contrib-jshint": "^1.1.0",

"matchdep": "^2.0.0",
"unionfs": "^3.0.2",
"memfs": "^2.14.1"
"memfs": "^2.14.1",
"unionfs": "^3.0.2"
},
"dependencies": {
"esprima": "^4.0.0",
"fs-extra": "^5.0.0",
"make-dir": "^2.1.0",
"stringify-object": "^3.2.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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