Socket
Socket
Sign inDemoInstall

dgeni-packages

Package Overview
Dependencies
Maintainers
2
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgeni-packages - npm Package Compare versions

Comparing version 0.20.0-beta.5 to 0.20.0-rc.1

8

base/processors/checkAnchorLinks.js

@@ -16,2 +16,3 @@ var _ = require('lodash');

webRoot: '/',
errorOnUnmatchedLinks: false,
$validate: {

@@ -104,3 +105,8 @@ ignoredLinks: { presence: true },

if ( unmatchedLinkCount ) {
log.warn(unmatchedLinkCount, 'unmatched links');
var errorMessage = unmatchedLinkCount + ' unmatched links';
if (this.errorOnUnmatchedLinks) {
throw new Error(errorMessage)
} else {
log.warn(errorMessage);
}
}

@@ -107,0 +113,0 @@ }

@@ -30,2 +30,9 @@ var path = require('canonical-path');

it('should abort when there is a dangling link and `errorOnUnmatchedLinks` is true', function() {
processor.errorOnUnmatchedLinks = true;
expect(function() {
processor.$process([{ renderedContent: '<a href="foo"></a>', outputPath: 'doc/path.html', path: 'doc/path' }]);
}).toThrowError('1 unmatched links');
});
it("should not warn when there is a page for a link", function() {

@@ -32,0 +39,0 @@ processor.$process([

# Changelog
# 0.20.0-rc.1 6 July 2017
## Bug Fixes
- **typescript:** implement the CompilerHost.readFile method 4d667ff2
## Features
- **base:** allow checkAnchorLinks to abort processing eee3e7b1
# 0.20.0-beta.5 2 July 2017

@@ -4,0 +15,0 @@

2

package.json
{
"name": "dgeni-packages",
"version": "0.20.0-beta.5",
"version": "0.20.0-rc.1",
"description": "A collection of dgeni packages for generating documentation from source code",

@@ -5,0 +5,0 @@ "scripts": {

@@ -87,4 +87,4 @@ "use strict";

/* tslint:disable:no-console */
console.log('readFile - NOT IMPLEMENTED', fileName);
return '';
this.log.debug('readFile', fileName);
return fs.readFileSync(fileName, 'utf-8');
};

@@ -91,0 +91,0 @@ return CustomCompilerHost;

@@ -58,2 +58,11 @@ "use strict";

});
describe('readFile', function () {
it('should delegate to fs.readFileSync', function () {
var mockResult = 'content of file';
spyOn(fs, 'readFileSync').and.returnValue(mockResult);
var result = host.readFile('a/b/c.ts');
expect(result).toBe(mockResult);
expect(fs.readFileSync).toHaveBeenCalledWith('a/b/c.ts', 'utf-8');
});
});
describe('writeFile', function () {

@@ -60,0 +69,0 @@ it('should do nothing', function () {

@@ -67,2 +67,12 @@ import * as fs from 'fs';

describe('readFile', () => {
it('should delegate to fs.readFileSync', () => {
const mockResult = 'content of file';
spyOn(fs, 'readFileSync').and.returnValue(mockResult);
const result = host.readFile('a/b/c.ts');
expect(result).toBe(mockResult);
expect(fs.readFileSync).toHaveBeenCalledWith('a/b/c.ts', 'utf-8');
});
});
describe('writeFile', () => {

@@ -69,0 +79,0 @@ it('should do nothing', () => {

@@ -91,5 +91,5 @@ import * as fs from 'fs';

/* tslint:disable:no-console */
console.log('readFile - NOT IMPLEMENTED', fileName);
return '';
this.log.debug('readFile', fileName);
return fs.readFileSync(fileName, 'utf-8');
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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