Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes loading scoped plugins to ensure name is preserved (#926)
* fix: Fixes loading scoped plugins to ensure name is preserved * Inverting logic to only path.parse on relative paths * Fixing tests * Removing debugger * Adding unit test for plugin name * Empty-Commit * Bumping timeout up for windows tests
- Loading branch information
Showing
4 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import test from 'ava'; | ||
import { getPluginName } from '../lib/plugin/factory.js'; | ||
|
||
test('pluginName can return correct name for variants', t => { | ||
t.is(getPluginName('plain-plugin'), 'plain-plugin'); | ||
t.is(getPluginName('@some/scoped-plugin'), '@some/scoped-plugin'); | ||
t.is(getPluginName('@some/nested/scoped-plugin'), '@some/nested/scoped-plugin'); | ||
t.is(getPluginName('./relative-plugin.cjs'), 'relative-plugin'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters