Skip to content

Commit c367b62

Browse files
authored
refactor: remove unnecessary @rolldown/pluginutils (#21560)
1 parent 77aab4b commit c367b62

File tree

13 files changed

+10
-46
lines changed

13 files changed

+10
-46
lines changed

docs/guide/api-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ export default function myPlugin() {
584584
```
585585
586586
::: tip
587-
[`@rolldown/pluginutils`](https://www.npmjs.com/package/@rolldown/pluginutils) exports some utilities for hook filters like `exactRegex` and `prefixRegex`.
587+
[`@rolldown/pluginutils`](https://www.npmjs.com/package/@rolldown/pluginutils) exports some utilities for hook filters like `exactRegex` and `prefixRegex`. These are also re-exported from `rolldown/filter` for convenience.
588588
:::
589589
590590
## Client-server Communication

packages/vite/LICENSE.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -95,38 +95,6 @@ Repository: https://github.com/lukeed/polka
9595

9696
---------------------------------------
9797

98-
## @rolldown/pluginutils
99-
License: MIT
100-
Repository: https://github.com/rolldown/rolldown
101-
102-
> MIT License
103-
>
104-
> Copyright (c) 2024-present VoidZero Inc. & Contributors
105-
>
106-
> Permission is hereby granted, free of charge, to any person obtaining a copy
107-
> of this software and associated documentation files (the "Software"), to deal
108-
> in the Software without restriction, including without limitation the rights
109-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110-
> copies of the Software, and to permit persons to whom the Software is
111-
> furnished to do so, subject to the following conditions:
112-
>
113-
> The above copyright notice and this permission notice shall be included in all
114-
> copies or substantial portions of the Software.
115-
>
116-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
122-
> SOFTWARE.
123-
>
124-
> end of terms and conditions
125-
>
126-
> The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE).
127-
128-
---------------------------------------
129-
13098
## @rollup/plugin-alias, @rollup/plugin-dynamic-import-vars, @rollup/pluginutils
13199
License: MIT
132100
By: Johannes Stein

packages/vite/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"@jridgewell/trace-mapping": "^0.3.31",
9191
"@oxc-project/types": "0.112.0",
9292
"@polka/compression": "^1.0.0-next.25",
93-
"@rolldown/pluginutils": "1.0.0-rc.3",
9493
"@rollup/plugin-alias": "^5.1.1",
9594
"@rollup/plugin-commonjs": "^29.0.0",
9695
"@rollup/plugin-dynamic-import-vars": "2.1.4",

packages/vite/src/node/__tests__/plugins/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RUNTIME_MODULE_ID } from 'rolldown'
2-
import { exactRegex } from '@rolldown/pluginutils'
2+
import { exactRegex } from 'rolldown/filter'
33
import { afterAll, describe, expect, test, vi } from 'vitest'
44
import { type InlineConfig, type Plugin, build, createServer } from '../..'
55

packages/vite/src/node/optimizer/rolldownDepPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'node:path'
22
import type { ImportKind, Plugin, RolldownPlugin } from 'rolldown'
3-
import { prefixRegex } from '@rolldown/pluginutils'
3+
import { prefixRegex } from 'rolldown/filter'
44
import MagicString from 'magic-string'
55
import { stripLiteral } from 'strip-literal'
66
import { JS_TYPES_RE, KNOWN_ASSET_TYPES } from '../constants'

packages/vite/src/node/plugins/asset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
import MagicString from 'magic-string'
1111
import colors from 'picocolors'
1212
import picomatch from 'picomatch'
13-
import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils'
13+
import { makeIdFiltersToMatchWithQuery } from 'rolldown/filter'
1414
import {
1515
createToImportMetaURLBasedRelativeRuntime,
1616
toOutputFilePathInJS,

packages/vite/src/node/plugins/assetImportMetaUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'node:path'
22
import MagicString from 'magic-string'
33
import { stripLiteral } from 'strip-literal'
4-
import { exactRegex } from '@rolldown/pluginutils'
4+
import { exactRegex } from 'rolldown/filter'
55
import type { Plugin } from '../plugin'
66
import type { ResolvedConfig } from '../config'
77
import {

packages/vite/src/node/plugins/dynamicImportVars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ImportSpecifier } from 'es-module-lexer'
55
import { parseAst } from 'rolldown/parseAst'
66
import { dynamicImportToGlob } from '@rollup/plugin-dynamic-import-vars'
77
import { viteDynamicImportVarsPlugin as nativeDynamicImportVarsPlugin } from 'rolldown/experimental'
8-
import { exactRegex } from '@rolldown/pluginutils'
8+
import { exactRegex } from 'rolldown/filter'
99
import { type Plugin, perEnvironmentPlugin } from '../plugin'
1010
import type { ResolvedConfig } from '../config'
1111
import { CLIENT_ENTRY } from '../constants'

packages/vite/src/node/plugins/importAnalysisBuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { SourceMap } from 'rolldown'
99
import { viteBuildImportAnalysisPlugin as nativeBuildImportAnalysisPlugin } from 'rolldown/experimental'
1010
import type { RawSourceMap } from '@jridgewell/remapping'
1111
import convertSourceMap from 'convert-source-map'
12-
import { exactRegex } from '@rolldown/pluginutils'
12+
import { exactRegex } from 'rolldown/filter'
1313
import { combineSourcemaps, generateCodeFrame, numberToPos } from '../utils'
1414
import { type Plugin, perEnvironmentPlugin } from '../plugin'
1515
import type { ResolvedConfig } from '../config'

packages/vite/src/node/plugins/modulePreloadPolyfill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { exactRegex } from '@rolldown/pluginutils'
1+
import { exactRegex } from 'rolldown/filter'
22
import { viteModulePreloadPolyfillPlugin as nativeModulePreloadPolyfillPlugin } from 'rolldown/experimental'
33
import { type ResolvedConfig, perEnvironmentPlugin } from '..'
44
import type { Plugin } from '../plugin'

0 commit comments

Comments
 (0)