Socket
Socket
Sign inDemoInstall

precinct

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

precinct - npm Package Compare versions

Comparing version 6.3.1 to 7.0.0

23

index.js

@@ -28,4 +28,3 @@ var getModuleType = require('module-definition');

*/
function precinct(content, options) {
options = options || {};
function precinct(content, options = {}) {
var dependencies = [];

@@ -125,12 +124,2 @@ var ast;

function assign(o1, o2) {
for (var key in o2) {
if (o2.hasOwnProperty(key)) {
o1[key] = o2[key];
}
}
return o1;
}
/**

@@ -145,10 +134,8 @@ * Returns the dependencies for the given file path

*/
precinct.paperwork = function(filename, options) {
options = assign({
precinct.paperwork = function(filename, options = {}) {
options = Object.assign({
includeCore: true
}, options || {});
}, options);
// Note: released with options.fs but intended options.fileSystem for consistency in the community
// TODO: Remove options.fs in the next major version update
var fileSystem = options.fileSystem || options.fs || fs;
var fileSystem = options.fileSystem || fs;
var content = fileSystem.readFileSync(filename, 'utf8');

@@ -155,0 +142,0 @@ var ext = path.extname(filename);

{
"name": "precinct",
"version": "6.3.1",
"version": "7.0.0",
"description": "Unleash the detectives",

@@ -32,3 +32,3 @@ "main": "index.js",

"engines": {
"node": ">=6.0.0"
"node": "^10.13 || ^12 || >=14"
},

@@ -38,13 +38,13 @@ "homepage": "https://github.com/mrjoelkemp/node-precinct",

"commander": "^2.20.3",
"debug": "^4.1.1",
"detective-amd": "^3.0.0",
"debug": "^4.3.1",
"detective-amd": "^3.0.1",
"detective-cjs": "^3.1.1",
"detective-es6": "^2.1.0",
"detective-es6": "^2.2.0",
"detective-less": "^1.0.2",
"detective-postcss": "^3.0.1",
"detective-postcss": "^4.0.0",
"detective-sass": "^3.0.1",
"detective-scss": "^2.0.1",
"detective-stylus": "^1.0.0",
"detective-typescript": "^5.8.0",
"module-definition": "^3.3.0",
"detective-typescript": "^6.0.0",
"module-definition": "^3.3.1",
"node-source-walk": "^4.2.0"

@@ -55,6 +55,6 @@ },

"jscs-preset-mrjoelkemp": "~2.0.0",
"mocha": "^5.2.0",
"rewire": "^4.0.1",
"sinon": "^6.3.5"
"mocha": "^8.2.1",
"rewire": "^5.0.0",
"sinon": "^9.2.1"
}
}

@@ -31,3 +31,3 @@ ### Precinct [![npm](http://img.shields.io/npm/v/precinct.svg)](https://npmjs.org/package/precinct) [![npm](http://img.shields.io/npm/dm/precinct.svg)](https://npmjs.org/package/precinct)

- The supported module type prefixes are `amd`, `commonjs`, `es6`, `sass`, `stylus`, `less`
- The supported module type prefixes are `amd`, `commonjs`, `css`, `es6`, `less`, `sass`, `scss`, `stylus`, `ts`, `tsx`

@@ -34,0 +34,0 @@ Current options:

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