Skip to content

Commit febf50c

Browse files
committed
merge: resolve conflicts in alias types/tests; adopt robust bundle close in tests
1 parent c49fe5c commit febf50c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.config/tsconfig.plugin.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
// Important: this config is symlinked into package directories as `tsconfig.json`.
3+
// The `extends` path must therefore be relative to the symlink location (e.g. packages/<pkg>/).
24
"extends": "../../.config/tsconfig.base.json",
35
"compilerOptions": {
46
"noEmit": false,

packages/alias/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function getEntries({ entries, customResolver }: RollupAliasOptions): readonly R
7878
});
7979
}
8080

81-
function getHookFunction<T extends Function>(hook: T | { handler?: T }): T | null {
81+
function getHookFunction<T extends (...args: any[]) => any>(hook: T | { handler?: T }): T | null {
8282
if (typeof hook === 'function') {
8383
return hook;
8484
}
@@ -142,7 +142,7 @@ export default function alias(options: RollupAliasOptions = {}): Plugin {
142142

143143
if (!path.isAbsolute(updatedId)) {
144144
this.warn(
145-
`rewrote ${importee} to ${updatedId} but was not an abolute path and was not handled by other plugins. ` +
145+
`rewrote ${importee} to ${updatedId} but was not an absolute path and was not handled by other plugins. ` +
146146
`This will lead to duplicated modules for the same path. ` +
147147
`To avoid duplicating modules, you should resolve to an absolute path.`
148148
);

packages/alias/test/alias.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ describe('plugin-alias', () => {
489489
expect(warnList).toMatchObject([
490490
{
491491
message:
492-
'[plugin alias] rewrote @/warn-importee.js to test/fixtures/folder/warn-importee.js but was not an abolute path and was not handled by other plugins. ' +
492+
'[plugin alias] rewrote @/warn-importee.js to test/fixtures/folder/warn-importee.js but was not an absolute path and was not handled by other plugins. ' +
493493
'This will lead to duplicated modules for the same path. ' +
494494
'To avoid duplicating modules, you should resolve to an absolute path.',
495495
code: 'PLUGIN_WARNING',

0 commit comments

Comments
 (0)