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

@nteract/actions

Package Overview
Dependencies
Maintainers
16
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nteract/actions - npm Package Compare versions

Comparing version 2.8.5 to 2.9.0

24

__tests__/actions-spec.ts

@@ -711,2 +711,26 @@ import {

});
test("creates a CLOSE_NOTEBOOK action", () => {
const contentRef = createContentRef();
expect(actions.closeNotebook({ contentRef })).toEqual({
type: actionTypes.CLOSE_NOTEBOOK,
payload: { contentRef }
});
});
test("creates a DISPOSE_CONTENT action", () => {
const contentRef = createContentRef();
expect(actions.disposeContent({ contentRef })).toEqual({
type: actionTypes.DISPOSE_CONTENT,
payload: { contentRef }
});
});
test("creates a DISPOSE_KERNEL action", () => {
const kernelRef = createKernelRef();
expect(actions.disposeKernel({ kernelRef })).toEqual({
type: actionTypes.DISPOSE_KERNEL,
payload: { kernelRef }
});
});
});

2

lib/actions/contents.d.ts

@@ -54,1 +54,3 @@ import * as actionTypes from "../actionTypes";

export declare function updateFileText(payload: actionTypes.UpdateFileText["payload"]): actionTypes.UpdateFileText;
export declare function closeNotebook(payload: actionTypes.DisposeContent["payload"]): actionTypes.CloseNotebook;
export declare function disposeContent(payload: actionTypes.DisposeContent["payload"]): actionTypes.DisposeContent;

@@ -137,1 +137,19 @@ "use strict";

exports.updateFileText = updateFileText;
function closeNotebook(payload) {
return {
type: actionTypes.CLOSE_NOTEBOOK,
payload: {
contentRef: payload.contentRef
}
};
}
exports.closeNotebook = closeNotebook;
function disposeContent(payload) {
return {
type: actionTypes.DISPOSE_CONTENT,
payload: {
contentRef: payload.contentRef
}
};
}
exports.disposeContent = disposeContent;

@@ -115,1 +115,2 @@ import { ContentRef, KernelInfo, KernelRef, LocalKernelProps, RemoteKernelProps } from "@nteract/types";

}): actionTypes.SetKernelInfo;
export declare function disposeKernel(payload: actionTypes.DisposeKernel["payload"]): actionTypes.DisposeKernel;

@@ -214,1 +214,8 @@ "use strict";

exports.setKernelInfo = setKernelInfo;
function disposeKernel(payload) {
return {
type: actionTypes.DISPOSE_KERNEL,
payload
};
}
exports.disposeKernel = disposeKernel;

@@ -160,1 +160,15 @@ import { ContentRef, KernelRef, KernelspecInfo } from "@nteract/types";

}
export declare const CLOSE_NOTEBOOK = "CLOSE_NOTEBOOK";
export interface CloseNotebook {
type: "CLOSE_NOTEBOOK";
payload: {
contentRef: ContentRef;
};
}
export declare const DISPOSE_CONTENT = "DISPOSE_CONTENT";
export interface DisposeContent {
type: "DISPOSE_CONTENT";
payload: {
contentRef: ContentRef;
};
}

@@ -21,1 +21,3 @@ "use strict";

exports.UPDATE_FILE_TEXT = "UPDATE_FILE_TEXT";
exports.CLOSE_NOTEBOOK = "CLOSE_NOTEBOOK";
exports.DISPOSE_CONTENT = "DISPOSE_CONTENT";

@@ -97,2 +97,3 @@ import { CellId } from "@nteract/commutable";

kernelRef?: KernelRef | null;
dispose?: boolean;
contentRef?: ContentRef | null;

@@ -247,1 +248,8 @@ };

}
export declare const DISPOSE_KERNEL = "DISPOSE_KERNEL";
export interface DisposeKernel {
type: "DISPOSE_KERNEL";
payload: {
kernelRef: KernelRef;
};
}

@@ -31,1 +31,2 @@ "use strict";

exports.SHUTDOWN_REPLY_TIMED_OUT = "SHUTDOWN_REPLY_TIMED_OUT";
exports.DISPOSE_KERNEL = "DISPOSE_KERNEL";

6

package.json
{
"name": "@nteract/actions",
"version": "2.8.5",
"version": "2.9.0",
"description": "A collection of actions",

@@ -20,5 +20,5 @@ "main": "lib/index.js",

"immutable": "^4.0.0-rc.12",
"rx-jupyter": "^5.4.3"
"rx-jupyter": "^5.4.4"
},
"gitHead": "d95126b9a2cce5f74a989bab3665b269a16b0e41"
"gitHead": "f3fea3654283b9b1aca49797865f5e290e4958f8"
}

@@ -171,1 +171,23 @@ // Local modules

}
export function closeNotebook(
payload: actionTypes.DisposeContent["payload"]
): actionTypes.CloseNotebook {
return {
type: actionTypes.CLOSE_NOTEBOOK,
payload: {
contentRef: payload.contentRef
}
};
}
export function disposeContent(
payload: actionTypes.DisposeContent["payload"]
): actionTypes.DisposeContent {
return {
type: actionTypes.DISPOSE_CONTENT,
payload: {
contentRef: payload.contentRef
}
};
}

@@ -93,3 +93,5 @@ import {

export function killKernel(payload: actionTypes.KillKernelAction["payload"]): actionTypes.KillKernelAction {
export function killKernel(
payload: actionTypes.KillKernelAction["payload"]
): actionTypes.KillKernelAction {
return {

@@ -297,1 +299,10 @@ type: actionTypes.KILL_KERNEL,

}
export function disposeKernel(
payload: actionTypes.DisposeKernel["payload"]
): actionTypes.DisposeKernel {
return {
type: actionTypes.DISPOSE_KERNEL,
payload
};
}

@@ -176,1 +176,18 @@ import { ContentRef, KernelRef, KernelspecInfo } from "@nteract/types";

}
export const CLOSE_NOTEBOOK = "CLOSE_NOTEBOOK";
export interface CloseNotebook {
type: "CLOSE_NOTEBOOK";
payload: {
contentRef: ContentRef;
};
}
export const DISPOSE_CONTENT = "DISPOSE_CONTENT";
export interface DisposeContent {
type: "DISPOSE_CONTENT";
payload: {
contentRef: ContentRef;
}
}

@@ -116,2 +116,3 @@ import { CellId } from "@nteract/commutable";

kernelRef?: KernelRef | null;
dispose?: boolean;
contentRef?: ContentRef | null;

@@ -281,1 +282,9 @@ };

}
export const DISPOSE_KERNEL = "DISPOSE_KERNEL";
export interface DisposeKernel {
type: "DISPOSE_KERNEL";
payload: {
kernelRef: KernelRef;
};
}
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