Skip to content

Commit 8172f08

Browse files
committed
refactor(deps): simplify pluginutils handling after rolldown move
Match the lighter-weight handling from #1569: - packages/core/package.json: collapse the two pluginutils exports back to single .mjs strings. TypeScript already resolves a sibling .d.mts for an .mjs path under moduleResolution: bundler / node16, so the explicit `types` entries were redundant. - packages/tools/src/sync-remote-deps.ts: drop the parallel .mjs branch in transformPluginutilsExport — once we stop wrapping string exports into objects, the matching `types` derivation isn't needed either. - .github/actions/build-upstream/action.yml, justfile: drop the `pnpm --filter @rolldown/pluginutils build` step. Since rolldown moved pluginutils out of its workspace into a standalone npm package (rolldown/plugins), no workspace package matches that filter — the step was a silent no-op (`No projects matched the filters`).
1 parent 96567b6 commit 8172f08

4 files changed

Lines changed: 2 additions & 21 deletions

File tree

.github/actions/build-upstream/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ runs:
6060
- name: Build upstream TypeScript packages
6161
shell: bash
6262
run: |
63-
pnpm --filter @rolldown/pluginutils build
6463
pnpm --filter rolldown build-node
6564
pnpm --filter vite build-types
6665
pnpm --filter "@voidzero-dev/*" build

justfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ _fix_symlinks:
4242

4343
build:
4444
pnpm install
45-
pnpm --filter @rolldown/pluginutils build
4645
pnpm --filter rolldown build-binding:release
4746
pnpm --filter rolldown build-node
4847
pnpm --filter vite build-types

packages/core/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,8 @@
8585
"default": "./dist/rolldown/plugins-index.mjs",
8686
"types": "./dist/rolldown/plugins-index.d.mts"
8787
},
88-
"./rolldown/pluginutils": {
89-
"default": "./dist/pluginutils/index.mjs",
90-
"types": "./dist/pluginutils/index.d.mts"
91-
},
92-
"./rolldown/pluginutils/filter": {
93-
"default": "./dist/pluginutils/filter/index.mjs",
94-
"types": "./dist/pluginutils/filter/index.d.mts"
95-
},
88+
"./rolldown/pluginutils": "./dist/pluginutils/index.mjs",
89+
"./rolldown/pluginutils/filter": "./dist/pluginutils/filter/index.mjs",
9690
"./rolldown/utils": {
9791
"default": "./dist/rolldown/utils-index.mjs",
9892
"types": "./dist/rolldown/utils-index.d.mts"

packages/tools/src/sync-remote-deps.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,6 @@ function transformPluginutilsExport(
277277
},
278278
];
279279
}
280-
if (newValue.endsWith('.mjs')) {
281-
return [
282-
newExportPath,
283-
{
284-
default: newValue,
285-
types: newValue.replace(/\.mjs$/, '.d.mts'),
286-
},
287-
];
288-
}
289280
return [newExportPath, newValue];
290281
}
291282

@@ -296,8 +287,6 @@ function transformPluginutilsExport(
296287
if (importPath && !('types' in newValue)) {
297288
if (importPath.endsWith('.js')) {
298289
newValue.types = importPath.replace(/\.js$/, '.d.ts');
299-
} else if (importPath.endsWith('.mjs')) {
300-
newValue.types = importPath.replace(/\.mjs$/, '.d.mts');
301290
}
302291
}
303292
}

0 commit comments

Comments
 (0)