Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nowa/core

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nowa/core - npm Package Compare versions

Comparing version 0.7.2 to 0.8.0-beta.29048b3e

lib/plugins/loadAdvanced.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="0.8.0-beta.29048b3e"></a>
# [0.8.0-beta.29048b3e](https://github.com/nowa-webpack/nowa2/compare/@nowa/core@0.7.2...@nowa/core@0.8.0-beta.29048b3e) (2018-09-14)
### Features
* support loading advanced config & solution ([29048b3](https://github.com/nowa-webpack/nowa2/commit/29048b3))
<a name="0.7.2"></a>

@@ -8,0 +19,0 @@ ## [0.7.2](https://github.com/nowa-webpack/nowa2/compare/@nowa/core@0.7.1...@nowa/core@0.7.2) (2018-09-04)

2

lib/plugins/loadPlugins.js

@@ -6,3 +6,3 @@ "use strict";

apply(runner, { logger }) {
runner.$register('load-plugins', ({ config, solution }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
runner.$register('load-plugins', ({ config = {}, solution = {} }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
const allPlugins = [...((solution.nowa && solution.nowa.plugins) || []), ...((config.nowa && config.nowa.plugins) || [])];

@@ -9,0 +9,0 @@ logger.debug(`got ${allPlugins.length} plugin(s) to load`);

@@ -17,5 +17,9 @@ import { Module } from './core/module';

'init-context': [undefined, IRuntime['context']];
'load-advanced': [Pick<IRuntime, 'context'>, {
config: IRuntime['raw']['config'];
solution: IRuntime['raw']['solution'];
} | null];
'load-config': [Pick<IRuntime, 'context'>, IRuntime['raw']['config']];
'load-solution': [Pick<IRuntime, 'context'> & Pick<IRuntime['raw'], 'config'>, IRuntime['raw']['solution']];
'load-plugins': [Pick<IRuntime, 'context'> & Pick<IRuntime['raw'], 'config' | 'solution'>, Array<IPlugin<Runner>>];
'load-plugins': [Pick<IRuntime, 'context'> & Partial<Pick<IRuntime['raw'], 'config' | 'solution'>>, Array<IPlugin<Runner>>];
'load-commands': [Pick<IRuntime, 'context'> & Pick<IRuntime['raw'], 'config' | 'solution'>, IRuntime['raw']['commands']];

@@ -22,0 +26,0 @@ 'parse-config': [Pick<IRuntime, 'context'> & IRuntime['raw'], IRuntime['parsed']['config']];

@@ -22,2 +22,15 @@ "use strict";

this.runtime.context = yield this.$applyHookBail('init-context');
logger.debug('apply load-advanced-config');
const advanced = yield this.$applyHookBail('load-advanced', { context: this.runtime.context });
if (advanced) {
const advancedPlugins = yield this.$applyHookBail('load-plugins', {
config: advanced.config,
context: this.runtime.context,
solution: advanced.solution,
});
logger.debug(`load ${advancedPlugins.length} advanced plugin(s)`);
for (const plugin of advancedPlugins) {
yield plugin.apply(this, this.$createUtils(plugin.name));
}
}
logger.debug('apply load-config');

@@ -24,0 +37,0 @@ this.runtime.raw.config = yield this.$applyHookBail('load-config', { context: this.runtime.context });

{
"name": "@nowa/core",
"version": "0.7.2",
"version": "0.8.0-beta.29048b3e",
"description": "the nowa core",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc