mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
9fc2e79611
* feat(plugin): implement scope package support plugins * feat(plugin): improve plugin loader * chore: fix build * chore: cover config path case * chore: async ui thene plugin * chore: store async plugin * chore: refactor plugin loader auth * feat: filter refactoring * chore: remove old plugin loader * chore: add changeset * chore: add docs * chore: refactor relative plugin loader * Update user.jwt.spec.ts * Update user.jwt.spec.ts
1.7 KiB
1.7 KiB
@verdaccio/api | @verdaccio/auth | @verdaccio/config | @verdaccio/types | @verdaccio/loaders | @verdaccio/node-api | verdaccio-audit | verdaccio-auth-memory | verdaccio-htpasswd | @verdaccio/local-storage | verdaccio-memory | @verdaccio/server | @verdaccio/server-fastify | @verdaccio/store | @verdaccio/test-helper | customprefix-auth | verdaccio | @verdaccio/web |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
major | major | major | major | major | major | major | major | major | major | major | major | major | major | major | major | major | major |
feat(plugins): improve plugin loader
Changes
- Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
- Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928
- https://github.com/verdaccio/verdaccio/issues/1394
config.plugins
plugin path validations- Updated algorithm for plugin loader.
- improved documentation (included dev)
Features
- Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
- Custom prefix:
// config.yaml
server:
pluginPrefix: mycompany
middleware:
audit:
foo: 1
This configuration will look up for mycompany-audit
instead Verdaccio-audit
.
Breaking Changes
sinopia plugins
sinopia
fallback support is removed, but can be restored usingpluginPrefix
plugin filter
- method rename
filter_metadata
->filterMetadata
Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928
The plugin receives as first argument config
, which represents the config of the plugin. Example:
// config.yaml
auth:
plugin:
foo: 1
bar: 2
export class Plugin<T> {
public constructor(config: T, options: PluginOptions) {
console.log(config);
// {foo:1, bar: 2}
}
}