Commit 86d46fd6 authored by Jérémy Lal's avatar Jérémy Lal

Use node-js-yaml instead of yamlish

parent 66a40ddf
......@@ -5,7 +5,7 @@ Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.deb
Uploaders: Jérémy Lal <kapouer@melix.org>,
Jonas Smedegaard <dr@jones.dk>
Build-Depends: @cdbs@
Build-Depends-Indep: node-yamlish,
Build-Depends-Indep: node-js-yaml,
node-marked
Standards-Version: 4.1.1
Homepage: http://nodejs.org/
......
Description: use node-js-yaml package now that it is available in debian
Last-Update: 2017-12-18
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: not-needed
--- a/Makefile
+++ b/Makefile
@@ -560,13 +560,6 @@
--template=doc/template.html --analytics=$(DOCS_ANALYTICS) $< > $@
gen-doc = \
- [ -e tools/doc/node_modules/js-yaml/package.json ] || \
- [ -e tools/eslint/node_modules/js-yaml/package.json ] || \
- if [ -x $(NODE) ]; then \
- cd tools/doc && ../../$(NODE) ../../$(NPM) install; \
- else \
- cd tools/doc && node ../../$(NPM) install; \
- fi;\
[ -x $(NODE) ] && $(NODE) $(1) || node $(1)
out/doc/api/%.json: doc/api/%.md
--- a/tools/doc/node_modules/js-yaml/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-// Hack to load the js-yaml module from eslint.
-// No other reason than that it’s huge.
-
-const path = require('path');
-
-const realJSYaml = path.resolve(
- __dirname, '..', '..', '..', // tools/
- 'eslint',
- 'node_modules',
- 'js-yaml'
-);
-
-module.exports = require(realJSYaml);
Description: use node-yamlish package instead of js-yaml from eslint
because debian nodejs package does not contain eslint because it's too heavy to bundle
Last-Update: 2016-10-06
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: not-needed
--- a/tools/doc/common.js
+++ b/tools/doc/common.js
@@ -1,6 +1,6 @@
'use strict';
-const yaml = require('js-yaml');
+const yaml = require('yamlish');
function isYAMLBlock(text) {
return !!text.match(/^<!-- YAML/);
@@ -19,7 +19,7 @@
.replace(/-->$/, '');
// js-yaml.safeLoad() throws on error
- const meta = yaml.safeLoad(text);
+ const meta = yaml.decode(text);
const added = meta.added || meta.Added;
if (added) {
--- a/tools/doc/html.js
+++ b/tools/doc/html.js
@@ -495,10 +495,7 @@
}
if (tok.type !== 'heading') return;
- if (tok.depth - depth > 1) {
- return cb(new Error('Inappropriate heading level\n' +
- JSON.stringify(tok)));
- }
+ if (tok.depth - depth > 1) return;
depth = tok.depth;
const realFilename = path.basename(realFilenames[0], '.md');
--- a/tools/doc/json.js
+++ b/tools/doc/json.js
@@ -64,8 +64,7 @@
if (type === 'heading' &&
!text.trim().match(/^example/i)) {
if (tok.depth - depth > 1) {
- return cb(new Error('Inappropriate heading level\n' +
- JSON.stringify(tok)));
+ return;
}
// Sometimes we have two headings with a single
--- a/Makefile
+++ b/Makefile
@@ -560,13 +560,6 @@
--template=doc/template.html --analytics=$(DOCS_ANALYTICS) $< > $@
gen-doc = \
- [ -e tools/doc/node_modules/js-yaml/package.json ] || \
- [ -e tools/eslint/node_modules/js-yaml/package.json ] || \
- if [ -x $(NODE) ]; then \
- cd tools/doc && ../../$(NODE) ../../$(NPM) install; \
- else \
- cd tools/doc && node ../../$(NPM) install; \
- fi;\
[ -x $(NODE) ] && $(NODE) $(1) || node $(1)
out/doc/api/%.json: doc/api/%.md
......@@ -31,6 +31,6 @@ privacy_breach.patch
1005_restore_sh_javascript_nonminified.patch
2017_mips_configure_fpu.patch
test_ci_buildd.patch
doctool-yaml.patch
doctool-debian-js-yaml.patch
6a9b3087bbfaee37a56b175e142a98c82ec61959.patch
openssl/fixups.patch
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment