Comparing version 4.1.2 to 4.2.0
@@ -5,2 +5,8 @@ <!--remark setext--> | ||
4.2.0 / 2016-03-30 | ||
================== | ||
* Add support for `.remarkrc.js` files ([`cd59707`](https://github.com/wooorm/remark/commit/cd59707)) | ||
* Fix list item continuation and fenced-code ([`b208e2d`](https://github.com/wooorm/remark/commit/b208e2d)) | ||
4.1.1 / 2016-02-17 | ||
@@ -7,0 +13,0 @@ ================== |
@@ -6,3 +6,3 @@ /** | ||
* @module remark | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Markdown processor powered by plugins. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:cli | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Bridge between CLI options and node. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:configuration | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Find remark rc files. | ||
@@ -32,8 +32,9 @@ */ | ||
var RC_NAME = '.remarkrc'; | ||
var PLUGIN_KEY = 'plugins'; | ||
var PACKAGE_NAME = 'package'; | ||
var PACKAGE_EXTENSION = 'json'; | ||
var PACKAGE_FILENAME = [PACKAGE_NAME, PACKAGE_EXTENSION].join('.'); | ||
var MODULE_EXTENSION = 'js'; | ||
var RCJS_NAME = [RC_NAME, MODULE_EXTENSION].join('.'); | ||
var PLUGIN_KEY = 'plugins'; | ||
var PACKAGE_FIELD = 'remarkConfig'; | ||
var PERSONAL_CONFIGURATION = home ? path.join(home, RC_NAME) : null; | ||
@@ -46,2 +47,3 @@ /* | ||
var exists = fs.existsSync; | ||
var extname = path.extname; | ||
var has = Object.prototype.hasOwnProperty; | ||
@@ -137,3 +139,7 @@ var concat = Array.prototype.concat; | ||
try { | ||
configuration = JSON.parse(read(filePath, 'utf8')) || {}; | ||
if (extname(filePath).slice(1) === MODULE_EXTENSION) { | ||
configuration = require(filePath); | ||
} else { | ||
configuration = JSON.parse(read(filePath, 'utf8')) || {}; | ||
} | ||
} catch (exception) { | ||
@@ -161,6 +167,18 @@ exception.message = 'Cannot read configuration file: ' + | ||
if (PERSONAL_CONFIGURATION && exists(PERSONAL_CONFIGURATION)) { | ||
configuration = load(PERSONAL_CONFIGURATION); | ||
/** | ||
* Load one file-path. | ||
* | ||
* @param {string} filePath - Location of config file. | ||
*/ | ||
function loadOne(filePath) { | ||
if (exists(filePath)) { | ||
merge(configuration, load(filePath)); | ||
} | ||
} | ||
if (home) { | ||
loadOne(path.join(home, RC_NAME)); | ||
loadOne(path.join(home, RCJS_NAME)); | ||
} | ||
return configuration; | ||
@@ -171,3 +189,3 @@ } | ||
* Get a local configuration object, by walking from | ||
* `directory` upwards and mergin all configurations. | ||
* `directory` upwards and merging all configurations. | ||
* If no configuration was found by walking upwards, the | ||
@@ -185,3 +203,7 @@ * current user's config (at `~`) is used. | ||
function getLocalConfiguration(context, directory, callback) { | ||
findUp.all([RC_NAME, PACKAGE_FILENAME], directory, function (err, files) { | ||
findUp.all([ | ||
RC_NAME, | ||
RCJS_NAME, | ||
PACKAGE_FILENAME | ||
], directory, function (err, files) { | ||
var configuration = {}; | ||
@@ -188,0 +210,0 @@ var index = files && files.length; |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:configure | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Configure a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:copy | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Move a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:file-system | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Write a file to the file system. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Process a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:parse | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Parse a file into an AST. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:queue | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Queue all files which came this far. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:read | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Read a file if not already filled. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:stdout | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Write a file to stdout(4). | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:stringify | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Compile an AST into a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:transform | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Transform an AST associated with a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:configure | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Configure a collection of files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:traverse | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Find files from the file-system. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Process a collection of files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:log | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Log a file context on successful completion. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:stdin | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Read from stdin. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:transform | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Transform all files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Collection of virtual files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:traverser | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Get applicable input files from | ||
@@ -9,0 +9,0 @@ * the file system to be processed by remark, respecting |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:ignore | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Find remark ignore files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview CLI Engine. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:spinner | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview A spinner for stdout(4). | ||
@@ -9,0 +9,0 @@ */ |
@@ -5,3 +5,3 @@ /** | ||
* @license MIT | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @module remark:cli:watch-output-cache | ||
@@ -8,0 +8,0 @@ * @fileoverview Cache changed files which are also watched. |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:defaults | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Default values for parse and | ||
@@ -9,0 +9,0 @@ * stringification settings. |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:stringify | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Compile an abstract syntax tree into | ||
@@ -9,0 +9,0 @@ * a markdown document. |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:utilities | ||
* @version 4.1.2 | ||
* @version 4.2.0 | ||
* @fileoverview Collection of tiny helpers useful for | ||
@@ -9,0 +9,0 @@ * both parsing and compiling markdown. |
{ | ||
"name": "remark", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "Markdown processor powered by plugins", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
370846
10201
11