Comparing version 1.0.6 to 1.0.7
@@ -7,2 +7,8 @@ # Changelog | ||
## [1.0.7] - 2020-03-24 | ||
### Fixed | ||
- Exposed & fixed `addDiagnostic` helper | ||
_(Fixes [#6](https://github.com/nonara/ts-patch/issues/6))_ | ||
## [1.0.6] - 2020-03-18 | ||
@@ -50,2 +56,4 @@ | ||
[1.0.7]: https://github.com/nonara/ts-patch/compare/v1.0.6...v1.0.7 | ||
[1.0.6]: https://github.com/nonara/ts-patch/compare/v1.0.5...v1.0.6 | ||
[1.0.5]: https://github.com/nonara/ts-patch/compare/v1.0.4...v1.0.5 | ||
@@ -52,0 +60,0 @@ [1.0.4]: https://github.com/nonara/ts-patch/compare/v1.0.3...v1.0.4 |
{ | ||
"name": "ts-patch", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Patch typescript to support custom transformers in tsconfig.json", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -61,3 +61,3 @@ [![npm version](https://badge.fury.io/js/ts-patch.svg)](https://badge.fury.io/js/ts-patch) | ||
```ts | ||
(program: ts.Program, config?: PluginConfig) => ts.TransformerFactory | ||
(program: ts.Program, config: PluginConfig | undefined, helpers: { ts: typeof ts, addDiagnostic: (diag: ts.Diagnostic) => void }) => ts.TransformerFactory | ||
where | ||
@@ -67,2 +67,3 @@ ts.TransformerFactory = (context: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile | ||
Config Example: `{ "transform": "transformer-module" }`. | ||
_Note: `addDiagnostic()` can only add `Diagnostic` entries to `EmitResult.diagnostic` It cannot be used to alter semantic diagnostics_ | ||
@@ -177,2 +178,2 @@ #### config | ||
This project is licensed under the MIT License | ||
This project is licensed under the MIT License |
@@ -1048,3 +1048,3 @@ (function () { | ||
var result = originalEmit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, mergedTransformers); | ||
result.diagnostics.concat(transformerErrors.get(program) || []); | ||
result.diagnostics = __spreadArrays((result.diagnostics || []), (transformerErrors.get(program) || [])); | ||
return result; | ||
@@ -1051,0 +1051,0 @@ }; |
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
137107
177