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: |
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
9069
169
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@typescript-eslint/types@4.33.0(transitive)
+ Added@typescript-eslint/typescript-estree@4.33.0(transitive)
+ Added@typescript-eslint/visitor-keys@4.33.0(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addeddetective-postcss@4.0.0(transitive)
+ Addeddetective-typescript@6.0.0(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addedeslint-visitor-keys@2.1.0(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobby@11.1.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpostcss@8.4.47(transitive)
+ Addedpostcss-values-parser@2.0.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removed@typescript-eslint/typescript-estree@2.34.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddetective-postcss@3.0.1(transitive)
- Removeddetective-typescript@5.8.0(transitive)
- Removedeslint-visitor-keys@1.3.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedlodash@4.17.21(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpicocolors@0.2.1(transitive)
- Removedpostcss@7.0.39(transitive)
- Removedpostcss-values-parser@1.5.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updateddebug@^4.3.1
Updateddetective-amd@^3.0.1
Updateddetective-es6@^2.2.0
Updateddetective-postcss@^4.0.0
Updateddetective-typescript@^6.0.0
Updatedmodule-definition@^3.3.1