Socket
Socket
Sign inDemoInstall

@stackflow/react

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackflow/react - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7-canary.0

42

dist/index.js

@@ -441,3 +441,2 @@ "use strict";

const plugins = ((_a4 = options.plugins) != null ? _a4 : []).flat(Infinity).map((p) => p);
const pluginInstances = plugins.map((plugin) => plugin());
const activityComponentMap = Object.entries(options.activities).reduce(

@@ -483,29 +482,21 @@ (acc, [key, Activity]) => __spreadProps(__spreadValues({}, acc), {

] : [];
const initialPushedEvents = pluginInstances.reduce(
(initialEvents, pluginInstance) => {
var _a5, _b, _c;
return (_c = (_b = pluginInstance.overrideInitialEvents) == null ? void 0 : _b.call(pluginInstance, {
initialEvents,
initialContext: (_a5 = props.initialContext) != null ? _a5 : {}
})) != null ? _c : initialEvents;
},
initialPushedEventsByOption
);
const isInitialActivityIgnored = initialPushedEvents.length > 0 && initialPushedEventsByOption.length > 0 && initialPushedEvents !== initialPushedEventsByOption;
if (isInitialActivityIgnored) {
console.warn(
`Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${initialPushedEventsByOption[0].activityName}" in the "stackflow" is ignored.`
);
}
if (initialPushedEvents.length === 0) {
console.warn(
`Stackflow - There is no initial activity. If you want to set the initial activity, add the \`initialActivity\` option of the \`stackflow()\` function or add a plugin that sets the initial activity. (e.g. \`@stackflow/plugin-history-sync\`)`
);
}
const store = (0, import_core7.makeCoreStore)({
initialEvents: [
...staticCoreStore.pullEvents(),
...initialPushedEvents
...initialPushedEventsByOption
],
plugins
initialContext: props.initialContext,
plugins,
handlers: {
onInitialActivityIgnored: (initialPushedEvents) => {
console.warn(
`Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${initialPushedEvents[0].activityName}" in the "stackflow" is ignored.`
);
},
onInitialActivityNotFound: () => {
console.warn(
`Stackflow - There is no initial activity. If you want to set the initial activity, add the \`initialActivity\` option of the \`stackflow()\` function or add a plugin that sets the initial activity. (e.g. \`@stackflow/plugin-history-sync\`)`
);
}
}
});

@@ -518,3 +509,3 @@ if (isBrowser()) {

}, []);
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PluginsProvider, { value: pluginInstances, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CoreProvider, { coreStore, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PluginsProvider, { value: coreStore.pluginInstances, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CoreProvider, { coreStore, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
MainRenderer_default,

@@ -556,3 +547,2 @@ {

plugins.push(p);
pluginInstances.push(p());
});

@@ -559,0 +549,0 @@ },

{
"name": "@stackflow/react",
"version": "1.1.6",
"version": "1.1.7-canary.0",
"license": "MIT",

@@ -32,3 +32,3 @@ "exports": {

"devDependencies": {
"@stackflow/core": "^1.0.9",
"@stackflow/core": "^1.0.10-canary.0",
"@stackflow/esbuild-config": "^1.0.1",

@@ -54,3 +54,3 @@ "@stackflow/eslint-config": "^1.0.2",

"peerDependencies": {
"@stackflow/core": "^1.0.9",
"@stackflow/core": "^1.0.10-canary.0",
"@types/react": ">=16.8.0",

@@ -57,0 +57,0 @@ "react": ">=16.8.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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