@vue/component-compiler-utils
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -0,1 +1,10 @@ | ||
## [2.5.1](https://github.com/vuejs/component-compiler-utils/compare/v2.5.0...v2.5.1) (2019-01-25) | ||
### Bug Fixes | ||
* fix sourceMap path separator on Windows, default sourceRoot to "" ([#51](https://github.com/vuejs/component-compiler-utils/issues/51)) ([df32cd9](https://github.com/vuejs/component-compiler-utils/commit/df32cd9)), closes [#47](https://github.com/vuejs/component-compiler-utils/issues/47) | ||
# [2.5.0](https://github.com/vuejs/component-compiler-utils/compare/v2.4.0...v2.5.0) (2019-01-08) | ||
@@ -2,0 +11,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { VueTemplateCompiler, VueTemplateCompilerOptions } from './types'; | ||
import { VueTemplateCompiler, VueTemplateCompilerOptions, ErrorWithRange } from './types'; | ||
import { AssetURLOptions } from './templateCompilerModules/assetUrl'; | ||
@@ -20,5 +20,5 @@ export interface TemplateCompileOptions { | ||
source: string; | ||
tips: string[]; | ||
errors: string[]; | ||
tips: (string | ErrorWithRange)[]; | ||
errors: (string | ErrorWithRange)[]; | ||
} | ||
export declare function compileTemplate(options: TemplateCompileOptions): TemplateCompileResult; |
@@ -99,3 +99,3 @@ "use strict"; | ||
semi: false, | ||
parser: 'babylon' | ||
parser: 'babel' | ||
}); | ||
@@ -102,0 +102,0 @@ } |
@@ -9,3 +9,3 @@ "use strict"; | ||
function parse(options) { | ||
const { source, filename = '', compiler, compilerParseOptions = { pad: 'line' }, sourceRoot = process.cwd(), needMap = true } = options; | ||
const { source, filename = '', compiler, compilerParseOptions = { pad: 'line' }, sourceRoot = '', needMap = true } = options; | ||
const cacheKey = hash(filename + source); | ||
@@ -34,4 +34,4 @@ let output = cache.get(cacheKey); | ||
const map = new SourceMapGenerator({ | ||
file: filename, | ||
sourceRoot | ||
file: filename.replace(/\\/g, '/'), | ||
sourceRoot: sourceRoot.replace(/\\/g, '/') | ||
}); | ||
@@ -38,0 +38,0 @@ map.setSourceContent(filename, source); |
@@ -20,2 +20,3 @@ import { SFCDescriptor } from './parse'; | ||
modules?: Object[]; | ||
outputSourceRange?: boolean; | ||
} | ||
@@ -25,2 +26,7 @@ export interface VueTemplateCompilerParseOptions { | ||
} | ||
export interface ErrorWithRange { | ||
msg: string; | ||
start: number; | ||
end: number; | ||
} | ||
export interface VueTemplateCompilerResults { | ||
@@ -30,4 +36,4 @@ ast: Object | void; | ||
staticRenderFns: string[]; | ||
errors: string[]; | ||
tips: string[]; | ||
errors: (string | ErrorWithRange)[]; | ||
tips: (string | ErrorWithRange)[]; | ||
} |
@@ -1,2 +0,6 @@ | ||
import { VueTemplateCompiler, VueTemplateCompilerOptions } from './types' | ||
import { | ||
VueTemplateCompiler, | ||
VueTemplateCompilerOptions, | ||
ErrorWithRange | ||
} from './types' | ||
@@ -29,4 +33,4 @@ import assetUrlsModule, { | ||
source: string | ||
tips: string[] | ||
errors: string[] | ||
tips: (string | ErrorWithRange)[] | ||
errors: (string | ErrorWithRange)[] | ||
} | ||
@@ -172,3 +176,3 @@ | ||
semi: false, | ||
parser: 'babylon' | ||
parser: 'babel' | ||
}) | ||
@@ -175,0 +179,0 @@ } |
@@ -52,3 +52,3 @@ import { | ||
compilerParseOptions = { pad: 'line' }, | ||
sourceRoot = process.cwd(), | ||
sourceRoot = '', | ||
needMap = true | ||
@@ -93,4 +93,4 @@ } = options | ||
const map = new SourceMapGenerator({ | ||
file: filename, | ||
sourceRoot | ||
file: filename.replace(/\\/g, '/'), | ||
sourceRoot: sourceRoot.replace(/\\/g, '/') | ||
}) | ||
@@ -97,0 +97,0 @@ map.setSourceContent(filename, source) |
@@ -35,2 +35,3 @@ import { SFCDescriptor } from './parse' | ||
modules?: Object[] | ||
outputSourceRange?: boolean | ||
} | ||
@@ -42,2 +43,8 @@ | ||
export interface ErrorWithRange { | ||
msg: string | ||
start: number | ||
end: number | ||
} | ||
export interface VueTemplateCompilerResults { | ||
@@ -47,4 +54,4 @@ ast: Object | void | ||
staticRenderFns: string[] | ||
errors: string[] | ||
tips: string[] | ||
errors: (string | ErrorWithRange)[] | ||
tips: (string | ErrorWithRange)[] | ||
} |
{ | ||
"name": "@vue/component-compiler-utils", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Lower level utilities for compiling Vue single file components", | ||
@@ -61,3 +61,3 @@ "main": "dist/index.js", | ||
"postcss-selector-parser": "^5.0.0", | ||
"prettier": "1.13.7", | ||
"prettier": "1.16.0", | ||
"source-map": "^0.7.3", | ||
@@ -64,0 +64,0 @@ "vue-template-es2015-compiler": "^1.6.0" |
65067
1576
+ Addedprettier@1.16.0(transitive)
- Removedprettier@1.13.7(transitive)
Updatedprettier@1.16.0