Skip to content

Commit

Permalink
deps: use normalizePath from @rollup/pluginutils (#320)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
agilgur5 committed May 4, 2022
1 parent 462442d commit 895431d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
2 changes: 0 additions & 2 deletions dist/normalize.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/normalize.d.ts.map

This file was deleted.

2 changes: 1 addition & 1 deletion src/host.ts
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -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";
Expand Down
4 changes: 0 additions & 4 deletions src/normalize.ts

This file was deleted.

0 comments on commit 895431d

Please sign in to comment.