deps: use normalizePath from @rollup/pluginutils (#320)

- this was introduced in v4.1.0 of @rollup/pluginutils:
  https://github.com/rollup/plugins/blob/master/packages/pluginutils/CHANGELOG.md#v410

- this is the same as the code in `normalize.ts` but it uses constants
  from Node and is used by multiple Rollup plugins, so just helps with
  standardization
  - also less code and types to ship in the bundle!

- removed the dist files for `normalize` as well, but didn't do a build
  in this commit as those are usually done in separate commits
This commit is contained in:
Anton Gilgur 2022-05-04 12:17:56 -04:00 committed by GitHub
parent 462442d6f5
commit 895431d3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 9 deletions

2
dist/normalize.d.ts vendored
View File

@ -1,2 +0,0 @@
export declare function normalize(fileName: string): string;
//# sourceMappingURL=normalize.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,UAGzC"}

View File

@ -1,7 +1,7 @@
import { tsModule } from "./tsproxy";
import * as tsTypes from "typescript";
import * as _ from "lodash";
import { normalize } from "./normalize";
import { normalizePath as normalize } from "@rollup/pluginutils";
import { TransformerFactoryCreator } from "./ioptions";
export class LanguageServiceHost implements tsTypes.LanguageServiceHost

View File

@ -13,7 +13,7 @@ import { printDiagnostics } from "./print-diagnostics";
import { TSLIB, TSLIB_VIRTUAL, tslibSource, tslibVersion } from "./tslib";
import { blue, red, yellow, green } from "colors/safe";
import { relative, dirname, normalize as pathNormalize, resolve as pathResolve } from "path";
import { normalize } from "./normalize";
import { normalizePath as normalize } from "@rollup/pluginutils";
import findCacheDir from "find-cache-dir";
import { PluginImpl, PluginContext, InputOptions, OutputOptions, TransformResult, SourceMap, Plugin } from "rollup";

View File

@ -1,4 +0,0 @@
export function normalize(fileName: string)
{
return fileName.split("\\").join("/");
}