dgeni-packages
Advanced tools
Comparing version 0.17.0 to 0.17.1
# Changelog | ||
# 0.17.1 17 March 2017 | ||
## Bug Fixes | ||
- **typescript:** ensure all modules have relative filepaths | ||
([434233](https://github.com/angular/angular.js/commit/43423313e246e07a002d2410182d1157b206dbc7)) | ||
# 0.17.0 17 March 2017 | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "dgeni-packages", | ||
"version": "0.17.0", | ||
"version": "0.17.1", | ||
"description": "A collection of dgeni packages for generating documentation from source code", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -14,3 +14,3 @@ var ts = require('typescript'); | ||
getSourceFile: function(fileName, languageVersion, onError) { | ||
var text, resolvedPath, resolvedPathWithExt; | ||
var text, baseFilePath, resolvedPath, resolvedPathWithExt; | ||
@@ -20,2 +20,3 @@ // Strip off the extension and resolve relative to the baseDir | ||
resolvedPath = path.resolve(baseDir, baseFilePath); | ||
baseFilePath = path.relative(baseDir, resolvedPath); | ||
@@ -63,3 +64,3 @@ // Iterate through each possible extension and return the first source file that is actually found | ||
fileExists: function(fileName) { | ||
var text, resolvedPath, resolvedPathWithExt; | ||
var text, baseFilePath, resolvedPath, resolvedPathWithExt; | ||
@@ -66,0 +67,0 @@ // Strip off the extension and resolve relative to the baseDir |
@@ -22,3 +22,3 @@ var mockPackage = require('../../mocks/mockPackage'); | ||
describe('getSourceFile', function() { | ||
it('should return a SourceFile object for a given path, with fileName relative to baseDir', function() { | ||
it('should return a SourceFile object for a given path', function() { | ||
var sourceFile = host.getSourceFile('testSrc.ts'); | ||
@@ -30,2 +30,9 @@ expect(sourceFile.fileName).toEqual('testSrc.ts'); | ||
it('should return a SourceFile object for a given path, with fileName relative to baseDir', function() { | ||
var sourceFile = host.getSourceFile(path.resolve(baseDir, 'testSrc.ts')); | ||
expect(sourceFile.fileName).toEqual('testSrc.ts'); | ||
expect(sourceFile.pos).toEqual(0); | ||
expect(sourceFile.text).toEqual(jasmine.any(String)); | ||
}); | ||
it('should try each of the configured extensions and update the filename to the correct extension', function() { | ||
@@ -32,0 +39,0 @@ var sourceFile = host.getSourceFile('testSrc.js'); |
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
566243
10380