Skip to content

Commit 70e961f

Browse files
Reworked memory module (#15)
1 parent ed0e27f commit 70e961f

19 files changed

+2001
-249
lines changed

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,7 @@ on:
88
types: [created]
99

1010
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
16-
with:
17-
node-version: 16
18-
- run: npm ci
19-
2011
publish-npm:
21-
needs: build
2212
runs-on: ubuntu-latest
2313
steps:
2414
- uses: actions/checkout@v3
@@ -27,6 +17,7 @@ jobs:
2717
node-version: 16
2818
registry-url: https://registry.npmjs.org/
2919
- run: npm ci
20+
- run: npm run build
3021
- run: npm publish --access public
3122
env:
3223
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ jobs:
1616
with:
1717
node-version: 16
1818
- run: npm ci
19+
- run: npm run build
1920
- run: npm run test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
coverage/
3+
lib/

CHANGELOG.MD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to the "@qavajs/memory" will be documented in this file.
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## [1.5.0]
8+
Breaking Change:
9+
Memory no more throwing error if value does not exist. Instead, _undefined_ is returned.
10+
- :rocket: refactored and simplified whole library
11+
- :rocket: added _$js_ computed to evaluate expression
12+
```javascript
13+
const result = memory.getValue('$js($val + 1)'); // evaluates js expression
14+
```
15+
- :rocket: all JS types are now supported in computed
16+
717
## [1.4.2]
818
- :beetle: fixed issue with dots in computed params
919

README.MD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## @qavajs/memory
44

5-
This library provides the capability to transit variables between step and access them from gherkin definitions
5+
This library provides single storage of variables for @qavajs framework
66

77
`npm install @qavajs/memory`
88
## Usage
@@ -62,12 +62,12 @@ It will assign value based on CUCUMBER_WORKER_ID env variable.
6262
```javascript
6363
const { parallel } = require('@qavajs/memory/utils');
6464

65-
class Memory {
65+
class Memory_old {
6666
user = parallel([
6767
{ username: 'user1', password: 'password' },
6868
{ username: 'user2', password: 'password' }
6969
]);
7070
}
7171

72-
module.exports = Memory;
72+
module.exports = Memory_old;
7373
```

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
const memory = require('./src/Memory');
2-
module.exports = memory;
1+
module.exports = require('./lib/memory').default;

0 commit comments

Comments
 (0)