Skip to content

chore: upgrade remarkable dependency #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions appveyor.yml
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be tempted to replace this with a github actions workflow

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
environment:
matrix:
# node.js
- nodejs_version: "22.15.1"
- nodejs_version: "8.0"
- nodejs_version: "7.0"
- nodejs_version: "6.0"
- nodejs_version: "5.0"
- nodejs_version: "4.0"
- nodejs_version: "0.12"
- nodejs_version: "0.10"

# Install scripts. (runs after repo cloning)
install:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"minimist": "^1.2.0",
"mixin-deep": "^1.1.3",
"object.pick": "^1.2.0",
"remarkable": "^1.7.1",
"remarkable": "^2.0.1",
"repeat-string": "^1.6.1",
"strip-color": "^0.1.0"
},
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

var utils = require('./lib/utils');
var Remarkable = require('remarkable').Remarkable;
var querystring = require('querystring');

/**
Expand All @@ -26,7 +27,7 @@ module.exports = toc;
*/

function toc(str, options) {
return new utils.Remarkable()
return new Remarkable()
.use(generate(options))
.render(str);
}
Expand Down
1 change: 0 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ require('markdown-link', 'mdlink');
require('minimist');
require('mixin-deep', 'merge');
require('object.pick', 'pick');
require('remarkable', 'Remarkable');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When continuing to use lazy-cache I got a Remarkable is not a constructor error. I'm not sure that there is much value in lazy-cache for remarkable when it's doing the majority of the heavy lifting for this module.

require('repeat-string', 'repeat');
require('strip-color');
require = fn;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"markdown-toc": "cli.js"
},
"engines": {
"node": ">=0.10.0"
"node": ">=6.0.0"
},
"scripts": {
"test": "mocha"
Expand All @@ -56,7 +56,7 @@
"minimist": "^1.2.0",
"mixin-deep": "^1.1.3",
"object.pick": "^1.2.0",
"remarkable": "^1.7.1",
"remarkable": "^2.0.1",
"repeat-string": "^1.6.1",
"strip-color": "^0.1.0"
},
Expand Down
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var fs = require('fs');
var assert = require('assert');
var inspect = require('util').inspect;
var utils = require('../lib/utils');
var Remarkable = require('remarkable').Remarkable;
var toc = require('..');

function strip(str) {
Expand All @@ -18,7 +19,7 @@ function read(fp) {
describe('plugin', function() {
it('should work as a remarkable plugin', function() {
function render(str, options) {
return new utils.Remarkable()
return new Remarkable()
.use(toc.plugin(options))
.render(str);
}
Expand Down