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

camunda-external-task-client-js

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camunda-external-task-client-js - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

4

CHANGELOG.md
# Changelog
## 2.2.0
### Features
- Support setting transient variables via API ([#244](https://github.com/camunda/camunda-external-task-client-js/pull/244))
## 2.1.1

@@ -4,0 +8,0 @@ ### Bug Fixes

@@ -133,2 +133,23 @@ # Variables

## `variables.setTransient(variableName, value)`
Sets a value for the variable with key _variableName_, also sets transient flag true to variable.
> **Note:** The variable type is determined automatically.
```js
variables.setTransient("fullName", { first: "John", last: "Doe" });
console.log(variables.getTyped("fullName"));
```
Output:
```js
{
value: { first: "John", last: "Doe" },
type: "json",
valueInfo: {transient: true}
}
```
## `variables.setTyped(variableName, typedValue)`

@@ -135,0 +156,0 @@

@@ -105,2 +105,18 @@ /*

/**
* Sets value for variable corresponding to variableName
* The type is determined automatically
* The variable has transient flag: true
* @param variableName
* @param value
*/
this.setTransient = (variableName, value) => {
const type = getVariableType(value);
return this.setTyped(variableName, {
type,
value,
valueInfo: { transient: true }
});
};
/**
* Sets the values of multiple variables at once

@@ -107,0 +123,0 @@ * The new values are merged with existing ones

@@ -146,2 +146,13 @@ /*

it('setTransient("fooTransient", "fooValueTransient")) should set variable with key "fooTransient" and value "fooValueTransient" and transient "true"', () => {
// given
expect(variables.getAllTyped()).toMatchSnapshot("variables");
expect(variables.getDirtyVariables()).toMatchSnapshot("dirty variables");
variables.setTransient("fooTransient", "fooValueTransient");
// then
expect(variables.getAllTyped()).toMatchSnapshot("variables");
expect(variables.getDirtyVariables()).toMatchSnapshot("dirty variables");
});
it("setAll(someValues) should add someValues to variables", () => {

@@ -148,0 +159,0 @@ // given

2

package.json
{
"version": "2.1.1",
"version": "2.2.0",
"name": "camunda-external-task-client-js",

@@ -4,0 +4,0 @@ "main": "index.js",

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

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